openfox 2.0.45 → 2.0.47

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/README.md +20 -19
  2. package/dist/{chat-handler-N455RNSL.js → chat-handler-RQMS6H7Y.js} +7 -7
  3. package/dist/{chunk-4EFNO4BV.js → chunk-2DKFKTLY.js} +2 -2
  4. package/dist/{chunk-IPTJ3MYR.js → chunk-7LRXWATH.js} +6 -6
  5. package/dist/{chunk-K3NOKF5A.js → chunk-C7NO4BBK.js} +10 -143
  6. package/dist/{chunk-SM2PK6TV.js → chunk-CDFPKVOF.js} +2 -2
  7. package/dist/{chunk-JNSSFTVD.js → chunk-CDRQJDSJ.js} +3 -1
  8. package/dist/{chunk-JREYASTD.js → chunk-CJDWHFC2.js} +9 -6
  9. package/dist/{chunk-OBKCUYR5.js → chunk-ENZPGAZV.js} +6 -6
  10. package/dist/{chunk-CTGMHRHD.js → chunk-GTY27MWS.js} +39 -12
  11. package/dist/{chunk-ZBLT7MNL.js → chunk-H5AC62SN.js} +2 -2
  12. package/dist/{chunk-BSDMJT53.js → chunk-LB3E24TN.js} +5 -3
  13. package/dist/{chunk-4GBKQZ2U.js → chunk-LCCED4OV.js} +97 -42
  14. package/dist/{chunk-QOZ2DIWF.js → chunk-U62IKLKM.js} +8 -3
  15. package/dist/{chunk-IEDE6VK4.js → chunk-UFFLA4W6.js} +2 -6
  16. package/dist/cli/dev.js +1 -1
  17. package/dist/cli/index.js +1 -1
  18. package/dist/{client-ZUL4AR4J.js → client-5FOFNUXM.js} +3 -3
  19. package/dist/{compactor-LQ46XQJV.js → compactor-VIN5YWQF.js} +3 -3
  20. package/dist/{config-G5MVFHLP.js → config-G5GNT4UT.js} +2 -6
  21. package/dist/{events-7RIPFG62.js → events-S4EOKSYA.js} +2 -2
  22. package/dist/{http-client-3OLSDU63.js → http-client-JTRLBNJC.js} +2 -2
  23. package/dist/{orchestrator-5S2D5XWE.js → orchestrator-B37KCY3N.js} +6 -6
  24. package/dist/package.json +1 -1
  25. package/dist/{processor-X53RROTI.js → processor-FQEDZOWL.js} +7 -7
  26. package/dist/{protocol-COpRaEpx.d.ts → protocol-A2CLNSAK.d.ts} +2 -0
  27. package/dist/{provider-DLH5GJH2.js → provider-BYKY7BS3.js} +8 -8
  28. package/dist/{provider-manager-5UZXYOZZ.js → provider-manager-7ARKB5FZ.js} +4 -4
  29. package/dist/{serve-XY327IVV.js → serve-3SFSDC3X.js} +14 -13
  30. package/dist/server/index.d.ts +5 -1
  31. package/dist/server/index.js +11 -11
  32. package/dist/{server-RRS5ZQ7I.js → server-PV5DANZ7.js} +10 -10
  33. package/dist/{settings-L2V4ZUA2.js → settings-X43DCM55.js} +2 -2
  34. package/dist/shared/index.d.ts +2 -2
  35. package/dist/{tools-ZPKIMLNI.js → tools-CSRQDWRI.js} +5 -5
  36. package/dist/web/assets/{index-D8oQRDLg.js → index-C4UaPDjy.js} +51 -51
  37. package/dist/web/index.html +1 -1
  38. package/dist/web/sw.js +1 -1
  39. package/package.json +1 -1
package/README.md CHANGED
@@ -109,25 +109,26 @@ _Vision Fallback — Image processing configuration_
109
109
 
110
110
  ## Environment Variables
111
111
 
112
- | Variable | Default | Description |
113
- | --------------------------- | -------------------------- | --------------------------------------------------------------- |
114
- | `OPENFOX_LLM_URL` | `http://localhost:8000/v1` | LLM API base URL |
115
- | `OPENFOX_VLLM_URL` | — | Deprecated alias for `OPENFOX_LLM_URL` |
116
- | `OPENFOX_BACKEND` | `unknown` | Backend type: `vllm`, `sglang`, `ollama`, `llamacpp`, `unknown` |
117
- | `OPENFOX_MODEL_NAME` | `''` | Override default model name |
118
- | `OPENFOX_MAX_CONTEXT` | `200000` | Max context window in tokens |
119
- | `OPENFOX_LLM_TIMEOUT` | `300000` | LLM request timeout in ms |
120
- | `OPENFOX_LLM_IDLE_TIMEOUT` | `300000` | LLM stream idle timeout in ms |
121
- | `OPENFOX_PORT` | `10369` | Server listen port |
122
- | `OPENFOX_HOST` | `127.0.0.1` | Server bind host |
123
- | `OPENFOX_WORKDIR` | `cwd` | Working directory |
124
- | `OPENFOX_DB_PATH` | `./openfox.db` | SQLite database path |
125
- | `OPENFOX_LOG_LEVEL` | `info` | Log level: `debug`, `info`, `warn`, `error` |
126
- | `OPENFOX_REASONING_EFFORT` | — | Reasoning effort (e.g. `none`, `low`, `medium`, `high`) |
127
- | `OPENFOX_DEV` | `false` | Enable dev mode |
128
- | `OPENFOX_MODE` | `production` | Force mode: `production`, `development`, `test` |
129
- | `OPENFOX_SERVICE` | `false` | Run as systemd service (suppresses browser open) |
130
- | `OPENFOX_GIT_POLL_INTERVAL` | `10000` | Git status poll interval in ms |
112
+ | Variable | Default | Description |
113
+ | ------------------------------------ | -------------------------- | --------------------------------------------------------------- |
114
+ | `OPENFOX_LLM_URL` | `http://localhost:8000/v1` | LLM API base URL |
115
+ | `OPENFOX_VLLM_URL` | — | Deprecated alias for `OPENFOX_LLM_URL` |
116
+ | `OPENFOX_BACKEND` | `unknown` | Backend type: `vllm`, `sglang`, `ollama`, `llamacpp`, `unknown` |
117
+ | `OPENFOX_MODEL_NAME` | `''` | Override default model name |
118
+ | `OPENFOX_MAX_CONTEXT` | `200000` | Max context window in tokens |
119
+ | `OPENFOX_LLM_TIMEOUT` | `300000` | LLM request timeout in ms |
120
+ | `OPENFOX_LLM_IDLE_TIMEOUT` | `300000` | LLM stream idle timeout in ms |
121
+ | `OPENFOX_PORT` | `10369` | Server listen port |
122
+ | `OPENFOX_HOST` | `127.0.0.1` | Server bind host |
123
+ | `OPENFOX_WORKDIR` | `cwd` | Working directory |
124
+ | `OPENFOX_DB_PATH` | `./openfox.db` | SQLite database path |
125
+ | `OPENFOX_LOG_LEVEL` | `info` | Log level: `debug`, `info`, `warn`, `error` |
126
+ | `OPENFOX_REASONING_EFFORT` | — | Reasoning effort (e.g. `none`, `low`, `medium`, `high`) |
127
+ | `OPENFOX_DEV` | `false` | Enable dev mode |
128
+ | `OPENFOX_MODE` | `production` | Force mode: `production`, `development`, `test` |
129
+ | `OPENFOX_SERVICE` | `false` | Run as systemd service (suppresses browser open) |
130
+ | `OPENFOX_GIT_POLL_INTERVAL` | `10000` | Git status poll interval in ms |
131
+ | `OPENFOX_DISABLE_AUTO_SESSION_TITLE` | `false` | Disable automatic session title generation |
131
132
 
132
133
  ## License
133
134
 
@@ -2,11 +2,11 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-QOZ2DIWF.js";
5
+ } from "./chunk-U62IKLKM.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-JREYASTD.js";
9
- import "./chunk-CTGMHRHD.js";
8
+ } from "./chunk-CJDWHFC2.js";
9
+ import "./chunk-GTY27MWS.js";
10
10
  import "./chunk-LBGHZLLH.js";
11
11
  import "./chunk-PBGOZMVY.js";
12
12
  import "./chunk-VRGRAQDG.js";
@@ -17,12 +17,12 @@ import {
17
17
  createSessionRunningMessage
18
18
  } from "./chunk-F4PMNP7S.js";
19
19
  import "./chunk-EU3WWTFH.js";
20
- import "./chunk-JNSSFTVD.js";
20
+ import "./chunk-CDRQJDSJ.js";
21
21
  import "./chunk-YQ3SOPBI.js";
22
22
  import "./chunk-55RWNJBT.js";
23
23
  import {
24
24
  getEventStore
25
- } from "./chunk-BSDMJT53.js";
25
+ } from "./chunk-LB3E24TN.js";
26
26
  import "./chunk-EHYFYQXY.js";
27
27
  import "./chunk-ZPIZLTWU.js";
28
28
  import "./chunk-J2GP3J3X.js";
@@ -30,7 +30,7 @@ import "./chunk-Z4FMBCJO.js";
30
30
  import "./chunk-Z6W4YHJB.js";
31
31
  import "./chunk-K44MW7JJ.js";
32
32
  import "./chunk-YD6NDTKF.js";
33
- import "./chunk-K3NOKF5A.js";
33
+ import "./chunk-C7NO4BBK.js";
34
34
  import "./chunk-CQGTEGKL.js";
35
35
  import "./chunk-V4IE7HJY.js";
36
36
  import "./chunk-5WRI5ZAA.js";
@@ -154,4 +154,4 @@ export {
154
154
  startChatSession,
155
155
  stopSessionExecution
156
156
  };
157
- //# sourceMappingURL=chat-handler-N455RNSL.js.map
157
+ //# sourceMappingURL=chat-handler-RQMS6H7Y.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-55RWNJBT.js";
5
5
  import {
6
6
  getCurrentWindowMessageOptions
7
- } from "./chunk-BSDMJT53.js";
7
+ } from "./chunk-LB3E24TN.js";
8
8
 
9
9
  // src/server/context/compactor.ts
10
10
  function appendCompactionPrompt(sessionId, append) {
@@ -31,4 +31,4 @@ export {
31
31
  shouldCompact,
32
32
  getCompactionTarget
33
33
  };
34
- //# sourceMappingURL=chunk-4EFNO4BV.js.map
34
+ //# sourceMappingURL=chunk-2DKFKTLY.js.map
@@ -2,7 +2,7 @@ import {
2
2
  injectWorkflowKickoffIfNeeded,
3
3
  runAgentTurn,
4
4
  runChatTurn
5
- } from "./chunk-JREYASTD.js";
5
+ } from "./chunk-CJDWHFC2.js";
6
6
  import {
7
7
  applyDynamicContext,
8
8
  checkAborted,
@@ -16,7 +16,7 @@ import {
16
16
  loadAllAgentsDefault,
17
17
  saveItemToDir,
18
18
  spawnShellProcess
19
- } from "./chunk-CTGMHRHD.js";
19
+ } from "./chunk-GTY27MWS.js";
20
20
  import {
21
21
  getPlatformShell,
22
22
  onProcessEvent
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-EU3WWTFH.js";
41
41
  import {
42
42
  appendCompactionPrompt
43
- } from "./chunk-4EFNO4BV.js";
43
+ } from "./chunk-2DKFKTLY.js";
44
44
  import {
45
45
  TurnMetrics,
46
46
  createMessageStartEvent
@@ -49,10 +49,10 @@ import {
49
49
  getCurrentContextWindowId,
50
50
  getEventStore,
51
51
  getRuntimeConfig
52
- } from "./chunk-BSDMJT53.js";
52
+ } from "./chunk-LB3E24TN.js";
53
53
  import {
54
54
  createLLMClient
55
- } from "./chunk-ZBLT7MNL.js";
55
+ } from "./chunk-H5AC62SN.js";
56
56
  import {
57
57
  ensureVersionPrefix
58
58
  } from "./chunk-HNCM3D7Y.js";
@@ -2065,4 +2065,4 @@ export {
2065
2065
  signalMcpReady,
2066
2066
  createWebSocketServer
2067
2067
  };
2068
- //# sourceMappingURL=chunk-IPTJ3MYR.js.map
2068
+ //# sourceMappingURL=chunk-7LRXWATH.js.map
@@ -35,11 +35,7 @@ var providerSchema = z.object({
35
35
  models: z.array(modelConfigSchema).default([]),
36
36
  isActive: z.boolean(),
37
37
  createdAt: z.string(),
38
- isLocal: z.boolean().optional(),
39
- // Deprecated: model field kept for migration, will be removed after migration
40
- model: z.string().optional(),
41
- // Deprecated: maxContext kept for migration
42
- maxContext: z.number().optional()
38
+ isLocal: z.boolean().optional()
43
39
  });
44
40
  var serverSchema = z.object({
45
41
  port: z.number().default(10369),
@@ -100,7 +96,8 @@ var configSchema = z.object({
100
96
  database: databaseSchema.default({ path: "" }),
101
97
  workspace: workspaceSchema.default(() => ({ workdir: process.cwd() })),
102
98
  llm: llmConfigSchema.optional(),
103
- visionFallback: visionFallbackSchema.optional()
99
+ visionFallback: visionFallbackSchema.optional(),
100
+ disableAutoSessionTitle: z.boolean().optional()
104
101
  }).transform((data) => ({
105
102
  providers: data.providers ?? [],
106
103
  mcpServers: data.mcpServers,
@@ -112,120 +109,18 @@ var configSchema = z.object({
112
109
  database: data.database ?? { path: "" },
113
110
  workspace: data.workspace ?? { workdir: process.cwd() },
114
111
  llm: data.llm,
115
- visionFallback: data.visionFallback ?? defaultVisionFallback
112
+ visionFallback: data.visionFallback ?? defaultVisionFallback,
113
+ ...data.disableAutoSessionTitle !== void 0 ? { disableAutoSessionTitle: data.disableAutoSessionTitle } : {}
116
114
  }));
117
- var oldLlmSchema = z.object({
118
- url: z.string().url().default("http://localhost:8000/v1"),
119
- model: z.string().default("auto"),
120
- backend: z.enum(["vllm", "sglang", "ollama", "llamacpp", "unknown"]).default("unknown"),
121
- maxContext: z.number().default(2e5),
122
- // Deprecated: use reasoningEffort instead
123
- disableThinking: z.boolean().optional(),
124
- reasoningEffort: z.string().optional(),
125
- apiKey: z.string().optional()
126
- }).transform((data) => {
127
- if (data.disableThinking && !data.reasoningEffort) {
128
- return { ...data, reasoningEffort: "none", disableThinking: void 0 };
129
- }
130
- return { ...data, disableThinking: void 0 };
131
- });
132
- var oldConfigSchema = z.object({
133
- llm: oldLlmSchema,
134
- server: serverSchema.default({ port: 10369, host: "127.0.0.1", openBrowser: true }),
135
- logging: loggingSchema.default({ level: "error" }),
136
- database: databaseSchema.default({ path: "" })
137
- });
138
115
  function getVisionFallback(config) {
139
116
  return config.visionFallback ?? getDefaultVisionFallback();
140
117
  }
141
- function migrateConfig(raw) {
142
- if (typeof raw === "object" && raw !== null && "providers" in raw) {
143
- const obj = raw;
144
- let migrationOccurred = false;
145
- const providers = obj.providers.map((p) => {
146
- const { model, maxContext, models: existingModels, backend, ...rest } = p;
147
- const normalizedBackend = backend === "auto" ? "unknown" : backend;
148
- let models = existingModels ?? [];
149
- if (maxContext !== void 0 && (existingModels === void 0 || existingModels.length === 0)) {
150
- migrationOccurred = true;
151
- models = [
152
- {
153
- id: model ?? "auto",
154
- contextWindow: maxContext,
155
- source: "user"
156
- }
157
- ];
158
- }
159
- return {
160
- ...rest,
161
- backend: normalizedBackend,
162
- models
163
- };
164
- });
165
- if (migrationOccurred) {
166
- console.warn("Migrating legacy maxContext to model-specific config");
167
- }
168
- return {
169
- config: configSchema.parse({
170
- ...obj,
171
- providers
172
- }),
173
- migrated: migrationOccurred
174
- };
175
- }
176
- if (typeof raw === "object" && raw !== null && "llm" in raw) {
177
- const rawObj = raw;
178
- const llm = rawObj["llm"];
179
- if (llm && llm["backend"] === "auto") {
180
- llm["backend"] = "unknown";
181
- }
182
- const oldConfig = oldConfigSchema.parse(raw);
183
- const providerId = randomUUID();
184
- const models = [
185
- {
186
- id: oldConfig.llm.model || "auto",
187
- contextWindow: oldConfig.llm.maxContext,
188
- source: "user"
189
- }
190
- ];
191
- const provider = {
192
- id: providerId,
193
- name: "Default",
194
- url: oldConfig.llm.url,
195
- backend: oldConfig.llm.backend,
196
- apiKey: oldConfig.llm.apiKey,
197
- models,
198
- isActive: true,
199
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
200
- };
201
- const model = oldConfig.llm.model || "auto";
202
- return {
203
- config: configSchema.parse({
204
- providers: [provider],
205
- defaultModelSelection: `${providerId}/${model}`,
206
- server: oldConfig.server,
207
- logging: oldConfig.logging,
208
- database: oldConfig.database,
209
- workspace: { workdir: process.cwd() }
210
- }),
211
- migrated: true
212
- };
213
- }
214
- return {
215
- config: configSchema.parse(raw),
216
- migrated: false
217
- };
218
- }
219
118
  async function loadGlobalConfig(mode) {
220
119
  const configPath = getGlobalConfigPath(mode);
221
120
  try {
222
121
  const content = await readFile(configPath, "utf-8");
223
122
  const parsed = JSON.parse(content);
224
- const { config, migrated } = migrateConfig(parsed);
225
- if (migrated) {
226
- await saveGlobalConfig(mode, config);
227
- }
228
- return config;
123
+ return configSchema.parse(parsed);
229
124
  } catch {
230
125
  return configSchema.parse({});
231
126
  }
@@ -246,7 +141,8 @@ async function saveGlobalConfig(mode, config) {
246
141
  database: config.database ?? { path: "" },
247
142
  workspace: config.workspace ?? { workdir: process.cwd() },
248
143
  llm: config.llm,
249
- visionFallback: config.visionFallback ?? defaultVisionFallback
144
+ visionFallback: config.visionFallback ?? defaultVisionFallback,
145
+ ...config.disableAutoSessionTitle !== void 0 ? { disableAutoSessionTitle: config.disableAutoSessionTitle } : {}
250
146
  };
251
147
  await mkdir(dirname(configPath), { recursive: true });
252
148
  await writeFile(configPath, JSON.stringify(fullConfig, null, 2));
@@ -370,38 +266,10 @@ function activateProvider(config, providerId) {
370
266
  visionFallback: config.visionFallback ?? defaultVisionFallback
371
267
  };
372
268
  }
373
- function mergeConfigs(...configs) {
374
- const result = configs.reduce(
375
- (acc, curr) => {
376
- if (curr.llm) {
377
- acc.llm = { ...acc.llm, ...curr.llm };
378
- }
379
- if (curr.server) {
380
- acc.server = { ...acc.server, ...curr.server };
381
- }
382
- if (curr.logging) {
383
- acc.logging = { ...acc.logging, ...curr.logging };
384
- }
385
- return acc;
386
- },
387
- {
388
- llm: {
389
- url: "http://localhost:8000/v1",
390
- model: "auto",
391
- backend: "unknown",
392
- maxContext: 2e5
393
- },
394
- server: { port: 10369, host: "127.0.0.1", openBrowser: true },
395
- logging: { level: "error" }
396
- }
397
- );
398
- return oldConfigSchema.parse(result);
399
- }
400
269
 
401
270
  export {
402
271
  configFileExists,
403
272
  getVisionFallback,
404
- migrateConfig,
405
273
  loadGlobalConfig,
406
274
  getDefaultVisionFallback,
407
275
  saveGlobalConfig,
@@ -411,7 +279,6 @@ export {
411
279
  addProvider,
412
280
  updateProvider,
413
281
  removeProvider,
414
- activateProvider,
415
- mergeConfigs
282
+ activateProvider
416
283
  };
417
- //# sourceMappingURL=chunk-K3NOKF5A.js.map
284
+ //# sourceMappingURL=chunk-C7NO4BBK.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-M3RB4IF6.js";
4
4
  import {
5
5
  createLLMClient
6
- } from "./chunk-ZBLT7MNL.js";
6
+ } from "./chunk-H5AC62SN.js";
7
7
  import {
8
8
  buildModelsUrl,
9
9
  ensureVersionPrefix,
@@ -551,4 +551,4 @@ export {
551
551
  parseDefaultModelSelection,
552
552
  createProviderManager
553
553
  };
554
- //# sourceMappingURL=chunk-SM2PK6TV.js.map
554
+ //# sourceMappingURL=chunk-CDFPKVOF.js.map
@@ -17,6 +17,7 @@ var SETTINGS_KEYS = {
17
17
  DISPLAY_SHOW_OPEN_IN_EDITOR: "display.showOpenInEditorLinks",
18
18
  DISPLAY_MAX_VISIBLE_ITEMS: "display.maxVisibleItems",
19
19
  LLM_DYNAMIC_SYSTEM_PROMPT: "llm.dynamicSystemPrompt",
20
+ CACHE_WARMING: "cache.warming",
20
21
  KEYBINDINGS: "keybindings",
21
22
  RETRY_PATTERNS: "agent.retryPatterns"
22
23
  };
@@ -32,6 +33,7 @@ var SETTINGS_DEFAULTS = {
32
33
  [SETTINGS_KEYS.DISPLAY_SHOW_OPEN_IN_EDITOR]: "false",
33
34
  [SETTINGS_KEYS.DISPLAY_MAX_VISIBLE_ITEMS]: "300",
34
35
  [SETTINGS_KEYS.LLM_DYNAMIC_SYSTEM_PROMPT]: "false",
36
+ [SETTINGS_KEYS.CACHE_WARMING]: "false",
35
37
  [SETTINGS_KEYS.RETRY_PATTERNS]: JSON.stringify({ patterns: [], maxRetriesPerTurn: 10 }),
36
38
  [SETTINGS_KEYS.KEYBINDINGS]: JSON.stringify({
37
39
  terminalToggle: { type: "double-press", key: "Control", threshold: 300 },
@@ -90,4 +92,4 @@ export {
90
92
  deleteSetting,
91
93
  getAllSettings
92
94
  };
93
- //# sourceMappingURL=chunk-JNSSFTVD.js.map
95
+ //# sourceMappingURL=chunk-CDRQJDSJ.js.map
@@ -12,7 +12,7 @@ import {
12
12
  loadAllAgentsDefault,
13
13
  processEventsForConversation,
14
14
  runTopLevelAgentLoop
15
- } from "./chunk-CTGMHRHD.js";
15
+ } from "./chunk-GTY27MWS.js";
16
16
  import {
17
17
  TurnMetrics,
18
18
  WORKFLOW_KICKOFF_PROMPT,
@@ -26,7 +26,7 @@ import {
26
26
  getCurrentWindowMessageOptions,
27
27
  getEventStore,
28
28
  getRuntimeConfig
29
- } from "./chunk-BSDMJT53.js";
29
+ } from "./chunk-LB3E24TN.js";
30
30
  import {
31
31
  buildSnapshotFromSessionState
32
32
  } from "./chunk-EHYFYQXY.js";
@@ -39,7 +39,7 @@ import {
39
39
 
40
40
  // src/server/chat/orchestrator.ts
41
41
  async function buildRetryPatterns() {
42
- const { getSetting, SETTINGS_KEYS } = await import("./settings-L2V4ZUA2.js");
42
+ const { getSetting, SETTINGS_KEYS } = await import("./settings-X43DCM55.js");
43
43
  const raw = getSetting(SETTINGS_KEYS.RETRY_PATTERNS);
44
44
  if (!raw) {
45
45
  const oldXmlProtection = getSetting("llm.disableXmlProtection");
@@ -206,7 +206,9 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
206
206
  const statsIdentity = resolveStatsIdentity(options);
207
207
  const allAgents = await loadAllAgentsDefault();
208
208
  const agentDef = findAgentById(agentId, allAgents) ?? findAgentById("planner", allAgents);
209
- injectAgentReminder(options.sessionId, agentDef);
209
+ if (!options.warmup) {
210
+ injectAgentReminder(options.sessionId, agentDef);
211
+ }
210
212
  const { content: instructionContent } = await getAllInstructions(
211
213
  options.sessionManager.requireSession(options.sessionId).workdir,
212
214
  options.sessionManager.requireSession(options.sessionId).projectId
@@ -262,7 +264,8 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
262
264
  injectAgentReminder: () => injectAgentReminder(options.sessionId, agentDef),
263
265
  ...options.initialCompacting ? { initialCompacting: true } : {},
264
266
  ...callbacks?.injectKickoff ? { injectKickoff: callbacks.injectKickoff } : {},
265
- ...callbacks?.onToolExecuted ? { onToolExecuted: callbacks.onToolExecuted } : {}
267
+ ...callbacks?.onToolExecuted ? { onToolExecuted: callbacks.onToolExecuted } : {},
268
+ ...options.warmup ? { warmup: true } : {}
266
269
  },
267
270
  turnMetrics
268
271
  );
@@ -310,4 +313,4 @@ export {
310
313
  runAgentTurn,
311
314
  injectWorkflowKickoffIfNeeded
312
315
  };
313
- //# sourceMappingURL=chunk-JREYASTD.js.map
316
+ //# sourceMappingURL=chunk-CJDWHFC2.js.map
@@ -39,7 +39,7 @@ Options:
39
39
  }
40
40
  async function runNetworkSetup(mode) {
41
41
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-YY5PJYSC.js");
42
- const { saveGlobalConfig } = await import("./config-G5MVFHLP.js");
42
+ const { saveGlobalConfig } = await import("./config-G5GNT4UT.js");
43
43
  const { getAuthKeyPath } = await import("./paths-F27V3S4I.js");
44
44
  const existingAuth = await loadAuthConfig(mode);
45
45
  if (existingAuth) {
@@ -106,7 +106,7 @@ async function runNetworkSetup(mode) {
106
106
  console.log("\u2713 Configuration saved!\n");
107
107
  }
108
108
  async function runConfig(mode) {
109
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-G5MVFHLP.js");
109
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-G5GNT4UT.js");
110
110
  const { getGlobalConfigPath } = await import("./paths-F27V3S4I.js");
111
111
  const config = await loadGlobalConfig(mode);
112
112
  const configPath = getGlobalConfigPath(mode);
@@ -164,7 +164,7 @@ async function runCli(options) {
164
164
  break;
165
165
  }
166
166
  case "provider": {
167
- const { runProviderCommand } = await import("./provider-DLH5GJH2.js");
167
+ const { runProviderCommand } = await import("./provider-BYKY7BS3.js");
168
168
  const [, subcommand] = positionals;
169
169
  await runProviderCommand(mode, subcommand);
170
170
  break;
@@ -203,12 +203,12 @@ async function runCli(options) {
203
203
  break;
204
204
  }
205
205
  default: {
206
- const { configFileExists } = await import("./config-G5MVFHLP.js");
206
+ const { configFileExists } = await import("./config-G5GNT4UT.js");
207
207
  const configExists = await configFileExists(mode);
208
208
  if (!configExists) {
209
209
  await runNetworkSetup(mode);
210
210
  }
211
- const { runServe } = await import("./serve-XY327IVV.js");
211
+ const { runServe } = await import("./serve-3SFSDC3X.js");
212
212
  const serveOptions = { mode };
213
213
  if (values.port) serveOptions.port = parseInt(values.port);
214
214
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -220,4 +220,4 @@ async function runCli(options) {
220
220
  export {
221
221
  runCli
222
222
  };
223
- //# sourceMappingURL=chunk-OBKCUYR5.js.map
223
+ //# sourceMappingURL=chunk-ENZPGAZV.js.map
@@ -32,7 +32,7 @@ import {
32
32
  SETTINGS_KEYS,
33
33
  deleteSetting,
34
34
  getSetting
35
- } from "./chunk-JNSSFTVD.js";
35
+ } from "./chunk-CDRQJDSJ.js";
36
36
  import {
37
37
  getProject
38
38
  } from "./chunk-YQ3SOPBI.js";
@@ -55,7 +55,7 @@ import {
55
55
  getCurrentWindowMessageOptions,
56
56
  getEventStore,
57
57
  getRuntimeConfig
58
- } from "./chunk-BSDMJT53.js";
58
+ } from "./chunk-LB3E24TN.js";
59
59
  import {
60
60
  buildContextMessagesFromEventHistory,
61
61
  foldContextState,
@@ -71,7 +71,7 @@ import {
71
71
  import {
72
72
  loadGlobalConfig,
73
73
  saveGlobalConfig
74
- } from "./chunk-K3NOKF5A.js";
74
+ } from "./chunk-C7NO4BBK.js";
75
75
  import {
76
76
  getGlobalConfigDir
77
77
  } from "./chunk-CQGTEGKL.js";
@@ -882,7 +882,7 @@ var readFileTool = createTool(
882
882
  type: "function",
883
883
  function: {
884
884
  name: "read_file",
885
- description: "Read the contents of a file or list directory contents. For text files: returns line-numbered content. For images (PNG, JPEG, GIF, WebP, BMP, SVG): returns base64-encoded data with MIME type metadata. For directories: returns a tree-formatted listing of entries with file sizes.",
885
+ description: "Read the contents of a file or list directory contents. For text files: returns file content. For images (PNG, JPEG, GIF, WebP, BMP, SVG): returns base64-encoded data with MIME type metadata. For directories: returns a tree-formatted listing of entries with file sizes.",
886
886
  parameters: {
887
887
  type: "object",
888
888
  properties: {
@@ -948,7 +948,7 @@ var readFileTool = createTool(
948
948
  const startLine = Math.max(1, offset);
949
949
  const endLine = Math.min(startLine + limit - 1, totalLines);
950
950
  const selectedLines = lines.slice(startLine - 1, endLine);
951
- const formatted = selectedLines.map((line, i) => `${startLine + i}|${line}`).join("\n");
951
+ const formatted = selectedLines.join("\n");
952
952
  const truncated = endLine < totalLines;
953
953
  let output = formatted;
954
954
  if (truncated) {
@@ -969,6 +969,8 @@ var readFileTool = createTool(
969
969
  encoding,
970
970
  confidence: Math.round(confidence * 100) / 100,
971
971
  lineCount: totalLines,
972
+ startLine,
973
+ endLine,
972
974
  path: fullPath
973
975
  }
974
976
  });
@@ -2455,6 +2457,31 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
2455
2457
  let returnValueNudgeCount = 0;
2456
2458
  for (; ; ) {
2457
2459
  if (signal?.aborted) throw new Error("Aborted");
2460
+ if (config.warmup) {
2461
+ const session2 = sessionManager.requireSession(sessionId);
2462
+ const runtimeConfig2 = getRuntimeConfig();
2463
+ const configDir2 = getGlobalConfigDir(runtimeConfig2.mode ?? "production");
2464
+ const skills2 = await getEnabledSkillMetadata(configDir2, runtimeConfig2.workdir);
2465
+ const { content: instructionContent2 } = await getAllInstructions(session2.workdir, session2.projectId);
2466
+ const toolRegistry2 = config.getToolRegistry();
2467
+ const assembledRequest2 = await config.assembleRequest({
2468
+ workdir: session2.workdir,
2469
+ messages: [],
2470
+ injectedFiles: [],
2471
+ promptTools: toolRegistry2.definitions,
2472
+ toolChoice: "none",
2473
+ ...instructionContent2 ? { customInstructions: instructionContent2 } : {},
2474
+ ...skills2.length > 0 ? { skills: skills2 } : {}
2475
+ });
2476
+ await llmClient.complete({
2477
+ messages: [{ role: "system", content: assembledRequest2.systemPrompt }],
2478
+ tools: assembledRequest2.tools,
2479
+ maxTokens: 1,
2480
+ temperature: 0,
2481
+ skipClientReasoningEffort: true
2482
+ });
2483
+ return {};
2484
+ }
2458
2485
  const session = sessionManager.requireSession(sessionId);
2459
2486
  if (retryLimiter.count() === 0) {
2460
2487
  await config.injectKickoff?.();
@@ -2581,7 +2608,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
2581
2608
  sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
2582
2609
  if (!compacting) {
2583
2610
  const contextState2 = sessionManager.getContextState(sessionId);
2584
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-LQ46XQJV.js");
2611
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-VIN5YWQF.js");
2585
2612
  if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
2586
2613
  appendCompactionPrompt(sessionId, append);
2587
2614
  compacting = true;
@@ -2938,7 +2965,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
2938
2965
  import { createHash as createHash2 } from "crypto";
2939
2966
  async function loadVisionModelFromGlobalConfig() {
2940
2967
  try {
2941
- const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-G5MVFHLP.js");
2968
+ const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-G5GNT4UT.js");
2942
2969
  const runtimeConfig = getRuntimeConfig();
2943
2970
  const mode = runtimeConfig.mode ?? "production";
2944
2971
  const globalConfig = await loadGlobalConfig2(mode);
@@ -3452,7 +3479,7 @@ var callSubAgentTool = {
3452
3479
  };
3453
3480
  }
3454
3481
  try {
3455
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZPKIMLNI.js");
3482
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-CSRQDWRI.js");
3456
3483
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3457
3484
  const turnMetrics = new TurnMetrics();
3458
3485
  const result = await executeSubAgent({
@@ -4268,7 +4295,7 @@ function resolveAgentDef2(sessionManager, sessionId) {
4268
4295
  }
4269
4296
  async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
4270
4297
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
4271
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZPKIMLNI.js");
4298
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-CSRQDWRI.js");
4272
4299
  const tools = getToolRegistryForAgent2(agentDef).definitions;
4273
4300
  const toolFingerprint = getToolFingerprint(tools);
4274
4301
  const allAgents = await loadAllAgentsDefault();
@@ -4281,7 +4308,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
4281
4308
  async function computeSessionHash(sessionManager, sessionId) {
4282
4309
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
4283
4310
  const agentDef = await resolveAgentDef2(sessionManager, sessionId);
4284
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZPKIMLNI.js");
4311
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-CSRQDWRI.js");
4285
4312
  const tools = getToolRegistryForAgent2(agentDef).definitions;
4286
4313
  const toolFingerprint = getToolFingerprint(tools);
4287
4314
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -4388,7 +4415,7 @@ var mcpConfigTool = createTool(
4388
4415
  await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated });
4389
4416
  }
4390
4417
  async function rebuildTools() {
4391
- const { setMcpTools: setMcpTools2 } = await import("./tools-ZPKIMLNI.js");
4418
+ const { setMcpTools: setMcpTools2 } = await import("./tools-CSRQDWRI.js");
4392
4419
  const mcpTools = createMcpTools(mcpManagerForTools);
4393
4420
  setMcpTools2(mcpTools);
4394
4421
  }
@@ -5058,4 +5085,4 @@ export {
5058
5085
  getToolRegistryForAgent,
5059
5086
  createToolRegistry
5060
5087
  };
5061
- //# sourceMappingURL=chunk-CTGMHRHD.js.map
5088
+ //# sourceMappingURL=chunk-GTY27MWS.js.map
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  LLMError,
15
15
  OpenAIHttpClient
16
- } from "./chunk-IEDE6VK4.js";
16
+ } from "./chunk-UFFLA4W6.js";
17
17
  import {
18
18
  logger
19
19
  } from "./chunk-K44MW7JJ.js";
@@ -259,4 +259,4 @@ function createLLMClient(config, initialBackend = "unknown") {
259
259
  export {
260
260
  createLLMClient
261
261
  };
262
- //# sourceMappingURL=chunk-ZBLT7MNL.js.map
262
+ //# sourceMappingURL=chunk-H5AC62SN.js.map