openfox 2.0.62 → 2.0.64

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 (40) hide show
  1. package/README.md +14 -0
  2. package/dist/{chat-handler-TRAITVLO.js → chat-handler-LI4R4Z2E.js} +11 -11
  3. package/dist/{chunk-L4WACPUX.js → chunk-73N5CJH3.js} +5 -5
  4. package/dist/{chunk-BKTBHEPY.js → chunk-HZNY77HZ.js} +32 -42
  5. package/dist/{chunk-QZRS2RF5.js → chunk-JFQSQO2N.js} +362 -92
  6. package/dist/{chunk-3WL5YCP6.js → chunk-O3G6X5CT.js} +6 -6
  7. package/dist/{chunk-GJU35MDV.js → chunk-OESYKZCM.js} +2 -2
  8. package/dist/{chunk-JKLPWTUN.js → chunk-QBYQ7KDX.js} +9 -4
  9. package/dist/{chunk-NVPVDDQZ.js → chunk-QJ5FH5DP.js} +14 -10
  10. package/dist/{chunk-H774GQJW.js → chunk-RYIREJAW.js} +234 -40
  11. package/dist/{chunk-WEB4WBUF.js → chunk-WD75RSGR.js} +149 -117
  12. package/dist/{chunk-43UFGATL.js → chunk-WGAAQASA.js} +31 -9
  13. package/dist/{chunk-6VDCH5ML.js → chunk-X5YCWKNS.js} +4 -4
  14. package/dist/cli/dev.js +1 -1
  15. package/dist/cli/index.js +1 -1
  16. package/dist/{client-KRFGMNGN.js → client-LAKW7TA5.js} +3 -3
  17. package/dist/{compactor-Q33AJPCQ.js → compactor-I3N56PSJ.js} +4 -4
  18. package/dist/{config-GMQUPNBY.js → config-EUMVEFHU.js} +2 -2
  19. package/dist/{orchestrator-TQ23BAFQ.js → orchestrator-PFN7C5JI.js} +14 -14
  20. package/dist/package.json +5 -1
  21. package/dist/{processor-3ZOFGZP5.js → processor-AYYXP5NS.js} +13 -12
  22. package/dist/protocol-Cq66hdDX.d.ts +375 -0
  23. package/dist/provider/index.d.ts +129 -0
  24. package/dist/provider/index.js +1 -0
  25. package/dist/{provider-LBYBC5AG.js → provider-GYOW4OWQ.js} +7 -9
  26. package/dist/{provider-manager-ABEUYU3K.js → provider-manager-HRHNF73A.js} +4 -5
  27. package/dist/{serve-CNA5NKOR.js → serve-54KALE6R.js} +15 -16
  28. package/dist/server/index.d.ts +6 -87
  29. package/dist/server/index.js +12 -13
  30. package/dist/{server-CI5IEBOC.js → server-Z2A5YZM6.js} +10 -14
  31. package/dist/shared/index.d.ts +3 -2
  32. package/dist/{tools-33FQNFKC.js → tools-R6LPK6OS.js} +7 -7
  33. package/dist/types-CDZakn7f.d.ts +89 -0
  34. package/dist/{protocol-J7khRG62.d.ts → types-akHmgvBk.d.ts} +17 -373
  35. package/dist/web/assets/{index-CETZPQXr.js → index-CkE65FP4.js} +74 -73
  36. package/dist/web/assets/{index-BGkyTfuQ.css → index-DvPmgi8F.css} +1 -1
  37. package/dist/web/index.html +2 -2
  38. package/dist/web/sw.js +1 -1
  39. package/package.json +5 -1
  40. package/dist/chunk-M3RB4IF6.js +0 -114
@@ -1,3 +1,16 @@
1
+ import {
2
+ COMPACTION_PROMPT,
3
+ TurnMetrics,
4
+ buildBasePrompt,
5
+ computeEffectiveTools,
6
+ consumeStreamGenerator,
7
+ createChatDoneEvent,
8
+ createMessageDoneEvent,
9
+ createMessageStartEvent,
10
+ createToolCallEvent,
11
+ createToolResultEvent,
12
+ streamLLMPure
13
+ } from "./chunk-X5YCWKNS.js";
1
14
  import {
2
15
  startInspectProxy
3
16
  } from "./chunk-LBGHZLLH.js";
@@ -18,6 +31,22 @@ import {
18
31
  import {
19
32
  createMcpTools
20
33
  } from "./chunk-NWO6GRYE.js";
34
+ import {
35
+ getCurrentContextWindowId,
36
+ getCurrentWindowMessageOptions,
37
+ getEventStore,
38
+ getRuntimeConfig
39
+ } from "./chunk-AIJE3RYH.js";
40
+ import {
41
+ buildContextMessagesFromEventHistory,
42
+ foldContextState,
43
+ handleMessageDelta,
44
+ handleMessageThinking,
45
+ handleToolCall,
46
+ handleToolResult,
47
+ reorderToolMessages,
48
+ stripOrphanedToolCalls
49
+ } from "./chunk-TMUBLQFC.js";
21
50
  import {
22
51
  createChatDoneMessage,
23
52
  createChatMessageMessage,
@@ -39,47 +68,18 @@ import {
39
68
  getProject
40
69
  } from "./chunk-YQ3SOPBI.js";
41
70
  import {
42
- COMPACTION_PROMPT,
43
- TurnMetrics,
44
- buildBasePrompt,
45
- computeEffectiveTools,
46
- consumeStreamGenerator,
47
- createChatDoneEvent,
48
- createMessageDoneEvent,
49
- createMessageStartEvent,
50
- createToolCallEvent,
51
- createToolResultEvent,
52
- streamLLMPure
53
- } from "./chunk-6VDCH5ML.js";
54
- import {
55
- getCurrentContextWindowId,
56
- getCurrentWindowMessageOptions,
57
- getEventStore,
58
- getRuntimeConfig
59
- } from "./chunk-AIJE3RYH.js";
60
- import {
61
- buildContextMessagesFromEventHistory,
62
- foldContextState,
63
- handleMessageDelta,
64
- handleMessageThinking,
65
- handleToolCall,
66
- handleToolResult,
67
- reorderToolMessages,
68
- stripOrphanedToolCalls
69
- } from "./chunk-TMUBLQFC.js";
71
+ modelSupportsVision
72
+ } from "./chunk-V4IE7HJY.js";
70
73
  import {
71
74
  logger
72
75
  } from "./chunk-K44MW7JJ.js";
73
76
  import {
74
77
  loadGlobalConfig,
75
78
  saveGlobalConfig
76
- } from "./chunk-43UFGATL.js";
79
+ } from "./chunk-WGAAQASA.js";
77
80
  import {
78
81
  getGlobalConfigDir
79
82
  } from "./chunk-CQGTEGKL.js";
80
- import {
81
- modelSupportsVision
82
- } from "./chunk-V4IE7HJY.js";
83
83
 
84
84
  // src/server/tools/read.ts
85
85
  import { readFile as readFile2, stat, readdir } from "fs/promises";
@@ -239,7 +239,7 @@ function extractAbsolutePathsFromCommand(command) {
239
239
  sanitized = sanitized.replace(/s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
240
240
  sanitized = sanitized.replace(/s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
241
241
  sanitized = sanitized.replace(
242
- /git\s+commit\s+(?:-[^-]\s*|--message\s+)(["'])(?:\\?.)*?\1/gi,
242
+ /git\s+commit\b.*?(?:-(?:[a-zA-Z]*m)(?=\s)|--message)\s+(["'])(?:(?!\1).)*\1/g,
243
243
  (match2) => match2.replace(/\/[^\s"'|&;<>`()]+/g, " __COMMIT_MSG__ ")
244
244
  );
245
245
  const fileUrlMatches = command.matchAll(/file:\/\/([^\s'"]+)/g);
@@ -380,7 +380,21 @@ function extractGitNoVerify(command) {
380
380
  }
381
381
  return false;
382
382
  }
383
- async function requestPathAccess(paths, workdir, sessionId, callId, tool, onEvent, dangerLevel, command) {
383
+ async function requestPathAccess(paths, workdir, sessionId, callId, tool, onEvent, dangerLevel, command, isSubAgent) {
384
+ if (isSubAgent) {
385
+ const result2 = await checkPathsAccess(paths, workdir, sessionId);
386
+ if (!result2.needsConfirmation) return;
387
+ if (dangerLevel === "dangerous") {
388
+ const allPaths2 = [.../* @__PURE__ */ new Set([...result2.deniedPaths, ...result2.sensitivePaths])];
389
+ addAllowedPaths(sessionId, allPaths2);
390
+ return;
391
+ }
392
+ const allPaths = [.../* @__PURE__ */ new Set([...result2.deniedPaths, ...result2.sensitivePaths])];
393
+ const hasDenied2 = result2.deniedPaths.length > 0;
394
+ const hasSensitive2 = result2.sensitivePaths.length > 0;
395
+ const reason2 = hasDenied2 && hasSensitive2 ? "both" : hasDenied2 ? "outside_workdir" : "sensitive_file";
396
+ throw new PathAccessDeniedError(allPaths, tool, reason2);
397
+ }
384
398
  const emitPendingEvent = (confirmationPaths, confirmationReason) => {
385
399
  try {
386
400
  const eventStore = getEventStore();
@@ -553,7 +567,8 @@ function createTool(name, definition, handler2) {
553
567
  name,
554
568
  context.onEvent,
555
569
  context.dangerLevel,
556
- command
570
+ command,
571
+ context.isSubAgent
557
572
  );
558
573
  }
559
574
  },
@@ -2579,6 +2594,9 @@ async function executeTools(assistantMsgId, toolCalls, ctx, append) {
2579
2594
  if (ctx.dangerLevel) {
2580
2595
  toolContext.dangerLevel = ctx.dangerLevel;
2581
2596
  }
2597
+ if (ctx.isSubAgent) {
2598
+ toolContext.isSubAgent = true;
2599
+ }
2582
2600
  const startTime = Date.now();
2583
2601
  let toolResult;
2584
2602
  try {
@@ -2865,7 +2883,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
2865
2883
  sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
2866
2884
  if (!compacting) {
2867
2885
  const contextState2 = sessionManager.getContextState(sessionId);
2868
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-Q33AJPCQ.js");
2886
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-I3N56PSJ.js");
2869
2887
  if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
2870
2888
  appendCompactionPrompt(sessionId, append);
2871
2889
  compacting = true;
@@ -2957,6 +2975,9 @@ ${COMPACTION_PROMPT}`,
2957
2975
  if (session.dangerLevel) {
2958
2976
  batchContext.dangerLevel = session.dangerLevel;
2959
2977
  }
2978
+ if (config.subAgentMetadata) {
2979
+ batchContext.isSubAgent = true;
2980
+ }
2960
2981
  batchContext.agentTimeout = getRuntimeConfig().agent.toolTimeout;
2961
2982
  const batchResult = await executeTools(assistantMsgId, result.toolCalls, batchContext, append);
2962
2983
  if (batchResult.stepDoneCalled) {
@@ -3222,7 +3243,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
3222
3243
  import { createHash as createHash2 } from "crypto";
3223
3244
  async function loadVisionModelFromGlobalConfig() {
3224
3245
  try {
3225
- const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-GMQUPNBY.js");
3246
+ const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-EUMVEFHU.js");
3226
3247
  const runtimeConfig = getRuntimeConfig();
3227
3248
  const mode = runtimeConfig.mode ?? "production";
3228
3249
  const globalConfig = await loadGlobalConfig2(mode);
@@ -3766,7 +3787,7 @@ var callSubAgentTool = {
3766
3787
  };
3767
3788
  }
3768
3789
  try {
3769
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-33FQNFKC.js");
3790
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-R6LPK6OS.js");
3770
3791
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3771
3792
  const turnMetrics = new TurnMetrics();
3772
3793
  const result = await executeSubAgent({
@@ -4688,7 +4709,7 @@ var mcpConfigTool = createTool(
4688
4709
  mcpNotifyChanged?.(sessionId);
4689
4710
  }
4690
4711
  async function rebuildTools() {
4691
- const { setMcpTools: setMcpTools2 } = await import("./tools-33FQNFKC.js");
4712
+ const { setMcpTools: setMcpTools2 } = await import("./tools-R6LPK6OS.js");
4692
4713
  const mcpTools = createMcpTools(mcpManagerForTools);
4693
4714
  setMcpTools2(mcpTools);
4694
4715
  }
@@ -5259,103 +5280,114 @@ function createRegistryFromTools(tools, allowedTools, toolPermissions, agentId,
5259
5280
  for (const tool of tools) {
5260
5281
  toolMap.set(tool.name, tool);
5261
5282
  }
5283
+ async function trySubAgentAlias(name, args, context) {
5284
+ if (!toolMap.has("call_sub_agent")) {
5285
+ return null;
5286
+ }
5287
+ try {
5288
+ const agents = await loadAllAgentsDefault();
5289
+ const agentDef = findAgentById(name, agents);
5290
+ if (!agentDef?.metadata.subagent) {
5291
+ return null;
5292
+ }
5293
+ const prompt = extractSubAgentPrompt(args);
5294
+ logger.info("Sub-agent alias transformation", {
5295
+ from: name,
5296
+ to: "call_sub_agent",
5297
+ subAgentType: name
5298
+ });
5299
+ return callSubAgentTool.execute({ subAgentType: name, prompt }, context);
5300
+ } catch (err) {
5301
+ logger.warn("Sub-agent alias resolution failed", {
5302
+ tool: name,
5303
+ error: err instanceof Error ? err.message : String(err)
5304
+ });
5305
+ return null;
5306
+ }
5307
+ }
5262
5308
  return {
5263
5309
  tools,
5264
5310
  definitions: tools.map((t) => t.definition),
5265
5311
  async execute(name, args, context) {
5266
5312
  const tool = toolMap.get(name);
5267
- if (!tool) {
5268
- if (toolMap.has("call_sub_agent")) {
5269
- try {
5270
- const agents = await loadAllAgentsDefault();
5271
- const agentDef = findAgentById(name, agents);
5272
- if (agentDef?.metadata.subagent) {
5273
- const prompt = extractSubAgentPrompt(args);
5274
- logger.warn("Sub-agent alias redirect", { from: name, to: "call_sub_agent", subAgentType: name });
5275
- return callSubAgentTool.execute({ subAgentType: name, prompt }, context);
5276
- }
5277
- } catch (err) {
5278
- logger.warn("Sub-agent alias resolution failed", {
5313
+ if (tool) {
5314
+ const isMcpTool = !getBuiltInToolNames().has(name);
5315
+ const hasRestrictions = allowedTools !== void 0;
5316
+ if (!isMcpTool && hasRestrictions) {
5317
+ const effectiveTools = computeEffectiveTools(allowedTools, isSubAgent ? "sub-agent" : "agent");
5318
+ if (!effectiveTools.has(name)) {
5319
+ logger.debug("Permission denied: tool not in allowed list", {
5279
5320
  tool: name,
5280
- error: err instanceof Error ? err.message : String(err)
5321
+ allowedTools
5281
5322
  });
5323
+ return {
5324
+ success: false,
5325
+ error: createPermissionErrorMessage(name, allowedTools, agentId, isSubAgent),
5326
+ durationMs: 0,
5327
+ truncated: false
5328
+ };
5282
5329
  }
5283
5330
  }
5284
- return {
5285
- success: false,
5286
- error: `Unknown tool: ${name}. Available tools: ${tools.map((t) => t.name).join(", ")}`,
5287
- durationMs: 0,
5288
- truncated: false
5331
+ if (toolPermissions) {
5332
+ const action = args["action"];
5333
+ if (action) {
5334
+ const actionError = validateToolAction(name, action, toolPermissions);
5335
+ if (actionError) {
5336
+ logger.debug("Permission denied: action not allowed", {
5337
+ tool: name,
5338
+ action,
5339
+ toolPermissions
5340
+ });
5341
+ return {
5342
+ success: false,
5343
+ error: actionError,
5344
+ durationMs: 0,
5345
+ truncated: false
5346
+ };
5347
+ }
5348
+ }
5349
+ }
5350
+ const permittedActionsArray = {};
5351
+ for (const [key, value] of Object.entries(toolPermissions || {})) {
5352
+ permittedActionsArray[key] = [...value];
5353
+ }
5354
+ const contextWithPerms = {
5355
+ ...context,
5356
+ permittedActions: Object.keys(permittedActionsArray).length > 0 ? permittedActionsArray : void 0
5289
5357
  };
5290
- }
5291
- const isMcpTool = !getBuiltInToolNames().has(name);
5292
- const hasRestrictions = allowedTools !== void 0;
5293
- if (!isMcpTool && hasRestrictions) {
5294
- const effectiveTools = computeEffectiveTools(allowedTools, isSubAgent ? "sub-agent" : "agent");
5295
- if (!effectiveTools.has(name)) {
5296
- logger.debug("Permission denied: tool not in allowed list", {
5358
+ logger.debug("Executing tool", { tool: name, args });
5359
+ try {
5360
+ const result = await tool.execute(args, contextWithPerms);
5361
+ logger.debug("Tool completed", {
5297
5362
  tool: name,
5298
- allowedTools
5363
+ success: result.success,
5364
+ durationMs: result.durationMs
5299
5365
  });
5366
+ return result;
5367
+ } catch (error) {
5368
+ if (error instanceof AskUserInterrupt) {
5369
+ throw error;
5370
+ }
5371
+ if (error instanceof PathAccessDeniedError) {
5372
+ throw error;
5373
+ }
5374
+ logger.error("Tool execution error", { tool: name, error });
5300
5375
  return {
5301
5376
  success: false,
5302
- error: createPermissionErrorMessage(name, allowedTools, agentId, isSubAgent),
5377
+ error: error instanceof Error ? error.message : "Unknown error",
5303
5378
  durationMs: 0,
5304
5379
  truncated: false
5305
5380
  };
5306
5381
  }
5307
5382
  }
5308
- if (toolPermissions) {
5309
- const action = args["action"];
5310
- if (action) {
5311
- const actionError = validateToolAction(name, action, toolPermissions);
5312
- if (actionError) {
5313
- logger.debug("Permission denied: action not allowed", {
5314
- tool: name,
5315
- action,
5316
- toolPermissions
5317
- });
5318
- return {
5319
- success: false,
5320
- error: actionError,
5321
- durationMs: 0,
5322
- truncated: false
5323
- };
5324
- }
5325
- }
5326
- }
5327
- const permittedActionsArray = {};
5328
- for (const [key, value] of Object.entries(toolPermissions || {})) {
5329
- permittedActionsArray[key] = [...value];
5330
- }
5331
- const contextWithPerms = {
5332
- ...context,
5333
- permittedActions: Object.keys(permittedActionsArray).length > 0 ? permittedActionsArray : void 0
5383
+ const aliasResult = await trySubAgentAlias(name, args, context);
5384
+ if (aliasResult) return aliasResult;
5385
+ return {
5386
+ success: false,
5387
+ error: `Unknown tool: ${name}. Available tools: ${tools.map((t) => t.name).join(", ")}`,
5388
+ durationMs: 0,
5389
+ truncated: false
5334
5390
  };
5335
- logger.debug("Executing tool", { tool: name, args });
5336
- try {
5337
- const result = await tool.execute(args, contextWithPerms);
5338
- logger.debug("Tool completed", {
5339
- tool: name,
5340
- success: result.success,
5341
- durationMs: result.durationMs
5342
- });
5343
- return result;
5344
- } catch (error) {
5345
- if (error instanceof AskUserInterrupt) {
5346
- throw error;
5347
- }
5348
- if (error instanceof PathAccessDeniedError) {
5349
- throw error;
5350
- }
5351
- logger.error("Tool execution error", { tool: name, error });
5352
- return {
5353
- success: false,
5354
- error: error instanceof Error ? error.message : "Unknown error",
5355
- durationMs: 0,
5356
- truncated: false
5357
- };
5358
- }
5359
5391
  }
5360
5392
  };
5361
5393
  }
@@ -5492,4 +5524,4 @@ export {
5492
5524
  getToolRegistryForAgent,
5493
5525
  createToolRegistry
5494
5526
  };
5495
- //# sourceMappingURL=chunk-WEB4WBUF.js.map
5527
+ //# sourceMappingURL=chunk-WD75RSGR.js.map
@@ -38,15 +38,37 @@ var modelConfigSchema = z.object({
38
38
  }).passthrough();
39
39
  var providerSchema = z.object({
40
40
  id: z.string(),
41
- name: z.string(),
42
- url: z.string(),
43
- backend: backendSchema,
41
+ preset: z.string().optional(),
42
+ name: z.string().optional(),
43
+ url: z.string().optional(),
44
+ backend: backendSchema.optional(),
44
45
  apiKey: z.string().optional(),
45
- models: z.array(modelConfigSchema).default([]),
46
- isActive: z.boolean(),
47
- createdAt: z.string(),
48
- isLocal: z.boolean().optional()
49
- });
46
+ models: z.array(modelConfigSchema).optional(),
47
+ isActive: z.boolean().optional(),
48
+ createdAt: z.string().optional(),
49
+ isLocal: z.boolean().optional(),
50
+ thinkingField: z.string().optional(),
51
+ authAdapter: z.string().optional(),
52
+ transportAdapter: z.string().optional(),
53
+ credentialRef: z.string().optional()
54
+ }).transform(
55
+ (provider) => ({
56
+ id: provider.id,
57
+ ...provider.preset ? { preset: provider.preset } : {},
58
+ name: provider.name ?? provider.id,
59
+ url: provider.url ?? "",
60
+ backend: provider.backend ?? "unknown",
61
+ ...provider.apiKey ? { apiKey: provider.apiKey } : {},
62
+ models: provider.models ?? [],
63
+ isActive: provider.isActive ?? false,
64
+ createdAt: provider.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
65
+ ...provider.isLocal !== void 0 ? { isLocal: provider.isLocal } : {},
66
+ ...provider.thinkingField ? { thinkingField: provider.thinkingField } : {},
67
+ ...provider.authAdapter ? { authAdapter: provider.authAdapter } : {},
68
+ ...provider.transportAdapter ? { transportAdapter: provider.transportAdapter } : {},
69
+ ...provider.credentialRef ? { credentialRef: provider.credentialRef } : {}
70
+ })
71
+ );
50
72
  var serverSchema = z.object({
51
73
  port: z.number().default(10369),
52
74
  host: z.string().default("127.0.0.1"),
@@ -291,4 +313,4 @@ export {
291
313
  removeProvider,
292
314
  activateProvider
293
315
  };
294
- //# sourceMappingURL=chunk-43UFGATL.js.map
316
+ //# sourceMappingURL=chunk-WGAAQASA.js.map
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  streamWithSegments
3
3
  } from "./chunk-J2GP3J3X.js";
4
+ import {
5
+ getModelProfile
6
+ } from "./chunk-V4IE7HJY.js";
4
7
  import {
5
8
  getBackendCapabilities
6
9
  } from "./chunk-YHEQTVFV.js";
@@ -10,9 +13,6 @@ import {
10
13
  import {
11
14
  logger
12
15
  } from "./chunk-K44MW7JJ.js";
13
- import {
14
- getModelProfile
15
- } from "./chunk-V4IE7HJY.js";
16
16
 
17
17
  // src/server/tools/tool-policy.ts
18
18
  var ALWAYS_ALLOWED = /* @__PURE__ */ new Set(["step_done"]);
@@ -705,4 +705,4 @@ export {
705
705
  createChatDoneEvent,
706
706
  consumeStreamGenerator
707
707
  };
708
- //# sourceMappingURL=chunk-6VDCH5ML.js.map
708
+ //# sourceMappingURL=chunk-X5YCWKNS.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-3WL5YCP6.js";
4
+ } from "../chunk-O3G6X5CT.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
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-3WL5YCP6.js";
4
+ } from "../chunk-O3G6X5CT.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  createLLMClient
3
- } from "./chunk-JKLPWTUN.js";
3
+ } from "./chunk-QBYQ7KDX.js";
4
+ import "./chunk-V4IE7HJY.js";
4
5
  import "./chunk-YHEQTVFV.js";
5
6
  import "./chunk-HNCM3D7Y.js";
6
7
  import "./chunk-Z6W4YHJB.js";
7
8
  import "./chunk-ZO5EXQMG.js";
8
9
  import "./chunk-K44MW7JJ.js";
9
- import "./chunk-V4IE7HJY.js";
10
10
  import "./chunk-5WRI5ZAA.js";
11
11
  export {
12
12
  createLLMClient
13
13
  };
14
- //# sourceMappingURL=client-KRFGMNGN.js.map
14
+ //# sourceMappingURL=client-LAKW7TA5.js.map
@@ -2,20 +2,20 @@ import {
2
2
  appendCompactionPrompt,
3
3
  getCompactionTarget,
4
4
  shouldCompact
5
- } from "./chunk-GJU35MDV.js";
6
- import "./chunk-6VDCH5ML.js";
5
+ } from "./chunk-OESYKZCM.js";
6
+ import "./chunk-X5YCWKNS.js";
7
7
  import "./chunk-AIJE3RYH.js";
8
8
  import "./chunk-TMUBLQFC.js";
9
9
  import "./chunk-ZPIZLTWU.js";
10
10
  import "./chunk-J2GP3J3X.js";
11
+ import "./chunk-V4IE7HJY.js";
11
12
  import "./chunk-YHEQTVFV.js";
12
13
  import "./chunk-Z6W4YHJB.js";
13
14
  import "./chunk-K44MW7JJ.js";
14
- import "./chunk-V4IE7HJY.js";
15
15
  import "./chunk-5WRI5ZAA.js";
16
16
  export {
17
17
  appendCompactionPrompt,
18
18
  getCompactionTarget,
19
19
  shouldCompact
20
20
  };
21
- //# sourceMappingURL=compactor-Q33AJPCQ.js.map
21
+ //# sourceMappingURL=compactor-I3N56PSJ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  saveGlobalConfig,
12
12
  setDefaultModelSelection,
13
13
  updateProvider
14
- } from "./chunk-43UFGATL.js";
14
+ } from "./chunk-WGAAQASA.js";
15
15
  import "./chunk-CQGTEGKL.js";
16
16
  import "./chunk-5WRI5ZAA.js";
17
17
  export {
@@ -28,4 +28,4 @@ export {
28
28
  setDefaultModelSelection,
29
29
  updateProvider
30
30
  };
31
- //# sourceMappingURL=config-GMQUPNBY.js.map
31
+ //# sourceMappingURL=config-EUMVEFHU.js.map
@@ -2,16 +2,8 @@ import {
2
2
  injectWorkflowKickoffIfNeeded,
3
3
  runAgentTurn,
4
4
  runChatTurn
5
- } from "./chunk-L4WACPUX.js";
6
- import "./chunk-WEB4WBUF.js";
7
- import "./chunk-LBGHZLLH.js";
8
- import "./chunk-BGTEIA2S.js";
9
- import "./chunk-PK2RMVMB.js";
10
- import "./chunk-NWO6GRYE.js";
11
- import "./chunk-F4PMNP7S.js";
12
- import "./chunk-EU3WWTFH.js";
13
- import "./chunk-SVSKQYFH.js";
14
- import "./chunk-YQ3SOPBI.js";
5
+ } from "./chunk-73N5CJH3.js";
6
+ import "./chunk-WD75RSGR.js";
15
7
  import {
16
8
  TurnMetrics,
17
9
  createChatDoneEvent,
@@ -19,18 +11,26 @@ import {
19
11
  createMessageStartEvent,
20
12
  createToolCallEvent,
21
13
  createToolResultEvent
22
- } from "./chunk-6VDCH5ML.js";
14
+ } from "./chunk-X5YCWKNS.js";
15
+ import "./chunk-LBGHZLLH.js";
16
+ import "./chunk-BGTEIA2S.js";
17
+ import "./chunk-PK2RMVMB.js";
18
+ import "./chunk-NWO6GRYE.js";
23
19
  import "./chunk-AIJE3RYH.js";
24
20
  import "./chunk-TMUBLQFC.js";
21
+ import "./chunk-F4PMNP7S.js";
22
+ import "./chunk-EU3WWTFH.js";
23
+ import "./chunk-SVSKQYFH.js";
24
+ import "./chunk-YQ3SOPBI.js";
25
25
  import "./chunk-ZPIZLTWU.js";
26
26
  import "./chunk-J2GP3J3X.js";
27
+ import "./chunk-V4IE7HJY.js";
27
28
  import "./chunk-YHEQTVFV.js";
28
29
  import "./chunk-Z6W4YHJB.js";
29
30
  import "./chunk-K44MW7JJ.js";
30
31
  import "./chunk-YD6NDTKF.js";
31
- import "./chunk-43UFGATL.js";
32
+ import "./chunk-WGAAQASA.js";
32
33
  import "./chunk-CQGTEGKL.js";
33
- import "./chunk-V4IE7HJY.js";
34
34
  import "./chunk-5WRI5ZAA.js";
35
35
  export {
36
36
  TurnMetrics,
@@ -43,4 +43,4 @@ export {
43
43
  runAgentTurn,
44
44
  runChatTurn
45
45
  };
46
- //# sourceMappingURL=orchestrator-TQ23BAFQ.js.map
46
+ //# sourceMappingURL=orchestrator-PFN7C5JI.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.62",
3
+ "version": "2.0.64",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,6 +15,10 @@
15
15
  "./shared": {
16
16
  "types": "./dist/shared/index.d.ts",
17
17
  "import": "./dist/shared/index.js"
18
+ },
19
+ "./provider": {
20
+ "types": "./dist/provider/index.d.ts",
21
+ "import": "./dist/provider/index.js"
18
22
  }
19
23
  },
20
24
  "files": [
@@ -2,12 +2,17 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-NVPVDDQZ.js";
6
- import "./chunk-WEB4WBUF.js";
5
+ } from "./chunk-QJ5FH5DP.js";
6
+ import "./chunk-WD75RSGR.js";
7
+ import "./chunk-X5YCWKNS.js";
7
8
  import "./chunk-LBGHZLLH.js";
8
9
  import "./chunk-BGTEIA2S.js";
9
10
  import "./chunk-PK2RMVMB.js";
10
11
  import "./chunk-NWO6GRYE.js";
12
+ import {
13
+ getEventStore
14
+ } from "./chunk-AIJE3RYH.js";
15
+ import "./chunk-TMUBLQFC.js";
11
16
  import {
12
17
  createChatMessageMessage,
13
18
  createSessionRunningMessage
@@ -15,22 +20,17 @@ import {
15
20
  import "./chunk-EU3WWTFH.js";
16
21
  import "./chunk-SVSKQYFH.js";
17
22
  import "./chunk-YQ3SOPBI.js";
18
- import "./chunk-6VDCH5ML.js";
19
- import {
20
- getEventStore
21
- } from "./chunk-AIJE3RYH.js";
22
- import "./chunk-TMUBLQFC.js";
23
23
  import "./chunk-ZPIZLTWU.js";
24
24
  import "./chunk-J2GP3J3X.js";
25
+ import "./chunk-V4IE7HJY.js";
25
26
  import "./chunk-YHEQTVFV.js";
26
27
  import "./chunk-Z6W4YHJB.js";
27
28
  import {
28
29
  logger
29
30
  } from "./chunk-K44MW7JJ.js";
30
31
  import "./chunk-YD6NDTKF.js";
31
- import "./chunk-43UFGATL.js";
32
+ import "./chunk-WGAAQASA.js";
32
33
  import "./chunk-CQGTEGKL.js";
33
- import "./chunk-V4IE7HJY.js";
34
34
  import "./chunk-5WRI5ZAA.js";
35
35
 
36
36
  // src/server/queue/processor.ts
@@ -139,7 +139,8 @@ var QueueProcessor = class {
139
139
  providerManager: this.deps.providerManager,
140
140
  broadcastForSession,
141
141
  eventStore: getEventStore(),
142
- getLLMClient: this.deps.getLLMClient
142
+ getLLMClient: this.deps.getLLMClient,
143
+ ...this.deps.getLLMClientForProvider ? { getLLMClientForProvider: this.deps.getLLMClientForProvider } : {}
143
144
  },
144
145
  controller.signal
145
146
  );
@@ -174,7 +175,7 @@ var QueueProcessor = class {
174
175
  backend: provider?.backend ?? llmClient.getBackend(),
175
176
  model: llmClient.getModel()
176
177
  };
177
- const { runChatTurn } = await import("./orchestrator-TQ23BAFQ.js");
178
+ const { runChatTurn } = await import("./orchestrator-PFN7C5JI.js");
178
179
  const runChatTurnParams = buildRunChatTurnParams({
179
180
  sessionManager,
180
181
  sessionId,
@@ -222,4 +223,4 @@ var QueueProcessor = class {
222
223
  export {
223
224
  QueueProcessor
224
225
  };
225
- //# sourceMappingURL=processor-3ZOFGZP5.js.map
226
+ //# sourceMappingURL=processor-AYYXP5NS.js.map