openfox 2.0.133 → 2.0.135

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 (84) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/CHANGELOG.md +30 -0
  3. package/dist/{chat-handler-T47GATL5.js → chat-handler-WGDFMOOD.js} +23 -22
  4. package/dist/chunk-24YKXKCG.js +35 -0
  5. package/dist/chunk-2OMGR7LN.js +45 -0
  6. package/dist/{chunk-GFW2HWJ6.js → chunk-4R5GV7RW.js} +37 -16
  7. package/dist/{chunk-P5MSY7ZI.js → chunk-5H5NRWHA.js} +22 -17
  8. package/dist/{chunk-MQMPIXON.js → chunk-5UMXFLET.js} +3 -3
  9. package/dist/{chunk-5JWJEZJ3.js → chunk-5UQ4CKOA.js} +2 -2
  10. package/dist/{chunk-7JVBDBXE.js → chunk-7QMWYNVF.js} +2 -2
  11. package/dist/{chunk-P57IBMK4.js → chunk-AATMPL7S.js} +4 -4
  12. package/dist/{chunk-OUQZZEIQ.js → chunk-BIZFY3QP.js} +487 -210
  13. package/dist/{chunk-LQKXJPKP.js → chunk-CTWZPN7G.js} +5 -1
  14. package/dist/{chunk-BKMWZTNO.js → chunk-DWA4IE65.js} +14 -2
  15. package/dist/{chunk-HXHPKGJE.js → chunk-ESZQTFQP.js} +614 -157
  16. package/dist/{chunk-KWAHD2JA.js → chunk-F2MOHHXB.js} +15 -2
  17. package/dist/{chunk-A7CB4USC.js → chunk-GP3CLMPQ.js} +132 -45
  18. package/dist/{chunk-HCYSGLY2.js → chunk-HF3NDXB4.js} +1 -1
  19. package/dist/{chunk-Y6ZGHOKM.js → chunk-I5ODJKYM.js} +4 -4
  20. package/dist/{chunk-OMMPTN6X.js → chunk-IAT2LBIX.js} +69 -27
  21. package/dist/{chunk-6EZDW4JS.js → chunk-J3NMNYGM.js} +2 -2
  22. package/dist/{chunk-M5T4RDPJ.js → chunk-MEEUXRFL.js} +2 -2
  23. package/dist/{chunk-RRUSYVQD.js → chunk-NFEZATSN.js} +8 -8
  24. package/dist/{chunk-MGEYAYGU.js → chunk-O3RCSKUH.js} +2 -2
  25. package/dist/{chunk-ELYHHEYL.js → chunk-ORCQ3EXQ.js} +2 -2
  26. package/dist/{chunk-FEIRWXLX.js → chunk-OZWHRBDY.js} +64 -17
  27. package/dist/{chunk-FGNJMKDV.js → chunk-QZOV4OVN.js} +29 -5
  28. package/dist/{chunk-TACWRDDC.js → chunk-S67WIWUG.js} +2 -2
  29. package/dist/{chunk-ZL4IAFF3.js → chunk-UKIUQAQZ.js} +3 -3
  30. package/dist/{chunk-VXG3AFFY.js → chunk-VHLD6PCZ.js} +8 -8
  31. package/dist/chunk-WY3PWHWY.js +7 -0
  32. package/dist/{chunk-CLDCHOEA.js → chunk-ZMK4VX7V.js} +2 -2
  33. package/dist/cli/dev.js +4 -1
  34. package/dist/cli/index.js +4 -1
  35. package/dist/{client-2K6PPPJJ.js → client-VVYOWXRR.js} +4 -4
  36. package/dist/{compactor-OEJAA2YP.js → compactor-454UEIEX.js} +9 -9
  37. package/dist/{dynamic-context-NJZKAZE3.js → dynamic-context-LKC6JYLQ.js} +10 -10
  38. package/dist/{events-ZJPRGVL2.js → events-335XAKFK.js} +6 -6
  39. package/dist/export-import-3WMRLO4A.js +137 -0
  40. package/dist/{folding-QRZOHY2I.js → folding-H7JTX6KI.js} +4 -4
  41. package/dist/{http-client-P4XTKAZA.js → http-client-A445WYZU.js} +3 -3
  42. package/dist/{install-VA2F6X6Z.js → install-AVTFA344.js} +64 -15
  43. package/dist/{launch-UKXVO37B.js → launch-GJ7EHQRI.js} +23 -22
  44. package/dist/{manager-TMBFBCQL.js → manager-ZACEUL5P.js} +4 -4
  45. package/dist/{mcp-YU7AM3UV.js → mcp-SQ4DOGPT.js} +22 -9
  46. package/dist/{orchestrator-GX22Y5EM.js → orchestrator-JGJWTRO5.js} +22 -21
  47. package/dist/package.json +3 -1
  48. package/dist/{path-security-CBACXAMS.js → path-security-4LROI7F4.js} +10 -10
  49. package/dist/{platform-5LQXOZO3.js → platform-XPMZKAUB.js} +3 -3
  50. package/dist/{processor-V35OLKRV.js → processor-MSQP63ML.js} +22 -21
  51. package/dist/{project-creator-6AGQTNXB.js → project-creator-T3A4H3YV.js} +42 -29
  52. package/dist/{protocol-BMUoqwYH.d.ts → protocol-Nr_H1_oC.d.ts} +3 -1
  53. package/dist/{protocol-Y7MRKRUO.js → protocol-XO4ZROAU.js} +3 -3
  54. package/dist/provider/index.d.ts +4 -4
  55. package/dist/provider-JWUNG2TD.js +507 -0
  56. package/dist/{provider-manager-BO5ZBG3T.js → provider-manager-2KKZ37XJ.js} +5 -5
  57. package/dist/pwa-V5PFB4OQ.js +502 -0
  58. package/dist/{registry-CMSSZHDC.js → registry-BEIR7Y5G.js} +3 -3
  59. package/dist/{serve-XRVT3D7Z.js → serve-CW5C3CBZ.js} +47 -36
  60. package/dist/server/index.d.ts +18 -3
  61. package/dist/server/index.js +27 -26
  62. package/dist/{server-GXMZMPXI.js → server-ZHEB7XS2.js} +26 -25
  63. package/dist/{service-WKABQHKL.js → service-M77VWL2M.js} +97 -32
  64. package/dist/{service-O3LCO3TQ.js → service-XIUNS5XV.js} +7 -6
  65. package/dist/{session-overrides-OECQYRDK.js → session-overrides-LYW5PJ3R.js} +5 -5
  66. package/dist/{sessions-NMPX5ICI.js → sessions-AOK3AGHY.js} +6 -4
  67. package/dist/{settings-MDCRNQBY.js → settings-ZJPM6PQV.js} +2 -2
  68. package/dist/shared/index.d.ts +31 -4
  69. package/dist/shared/index.js +16 -2
  70. package/dist/{tasks-WOC3QUFA.js → tasks-3JJWJJ3X.js} +34 -18
  71. package/dist/{tools-CW6POKUL.js → tools-E63MOJBO.js} +20 -19
  72. package/dist/{types-CoY8Ka1C.d.ts → types-BlQjLBui.d.ts} +1 -1
  73. package/dist/{types-BIkpxjaj.d.ts → types-G10ho8PT.d.ts} +1 -1
  74. package/dist/update-XVXNSSDK.js +76 -0
  75. package/dist/web/assets/{index-Y300llHY.css → index-Bg_Z8i3F.css} +1 -1
  76. package/dist/web/assets/index-wTFCxQAw.js +313 -0
  77. package/dist/web/index.html +2 -2
  78. package/dist/web/sw.js +1 -1
  79. package/package.json +3 -1
  80. package/dist/chunk-JKGHTBEV.js +0 -7
  81. package/dist/provider-NWRGNGS3.js +0 -403
  82. package/dist/pwa-2GRFSXD7.js +0 -363
  83. package/dist/update-VC3Y3EOP.js +0 -49
  84. package/dist/web/assets/index-ATAQvBwl.js +0 -312
@@ -2,25 +2,27 @@ import {
2
2
  getGateConfig,
3
3
  getTaskSettings,
4
4
  isTaskConflictError,
5
- isTaskGateError
6
- } from "./chunk-FEIRWXLX.js";
5
+ isTaskGateError,
6
+ serverT
7
+ } from "./chunk-OZWHRBDY.js";
7
8
  import "./chunk-OSXPQSLW.js";
8
- import "./chunk-5JWJEZJ3.js";
9
+ import "./chunk-5UQ4CKOA.js";
9
10
  import "./chunk-OA2FURC3.js";
10
11
  import "./chunk-J2GP3J3X.js";
11
12
  import {
12
13
  getProject
13
14
  } from "./chunk-DPFET73G.js";
14
- import "./chunk-CLDCHOEA.js";
15
+ import "./chunk-ZMK4VX7V.js";
15
16
  import "./chunk-TS5WKTFB.js";
16
17
  import "./chunk-UV6IH6HK.js";
17
18
  import "./chunk-HNCM3D7Y.js";
18
19
  import "./chunk-EUOWCVU6.js";
19
- import "./chunk-6EZDW4JS.js";
20
- import "./chunk-LQKXJPKP.js";
20
+ import "./chunk-J3NMNYGM.js";
21
+ import "./chunk-CTWZPN7G.js";
21
22
  import "./chunk-JU757HVI.js";
22
23
  import "./chunk-2AI7VYPN.js";
23
24
  import "./chunk-K44MW7JJ.js";
25
+ import "./chunk-24YKXKCG.js";
24
26
  import "./chunk-YLJ4XMA6.js";
25
27
 
26
28
  // src/server/routes/tasks.ts
@@ -29,7 +31,7 @@ function registerTaskRoutes(router, tasksService) {
29
31
  const requireProject = (req, res) => {
30
32
  const projectId = req.params["projectId"];
31
33
  if (!getProject(projectId)) {
32
- res.status(404).json({ error: "Project not found" });
34
+ res.status(404).json({ error: serverT({ en: "Project not found", fr: "Projet introuvable" }) });
33
35
  return null;
34
36
  }
35
37
  return projectId;
@@ -46,7 +48,7 @@ function registerTaskRoutes(router, tasksService) {
46
48
  if (isTaskConflictError(error)) {
47
49
  return res.status(409).json({ error: error.message, code: "CONFLICT", task: error.task });
48
50
  }
49
- return res.status(400).json({ error: error instanceof Error ? error.message : "Unknown error" });
51
+ return res.status(400).json({ error: error instanceof Error ? error.message : serverT({ en: "Unknown error", fr: "Erreur inconnue" }) });
50
52
  };
51
53
  const HUMAN = "human";
52
54
  router.get("/projects/:projectId/tasks", (req, res) => {
@@ -69,7 +71,7 @@ function registerTaskRoutes(router, tasksService) {
69
71
  if (!projectId) return;
70
72
  const { gates } = req.body;
71
73
  if (!Array.isArray(gates)) {
72
- return res.status(400).json({ error: "gates (array) is required" });
74
+ return res.status(400).json({ error: serverT({ en: "gates (array) is required", fr: "gates (tableau) est requis" }) });
73
75
  }
74
76
  const normalized = gates.map(
75
77
  (g, i) => ({
@@ -94,13 +96,20 @@ function registerTaskRoutes(router, tasksService) {
94
96
  const settings = {};
95
97
  if (typeof slotLimit === "number") {
96
98
  if (!Number.isInteger(slotLimit) || slotLimit < 1 || slotLimit > 10) {
97
- return res.status(400).json({ error: "slotLimit must be an integer between 1 and 10" });
99
+ return res.status(400).json({
100
+ error: serverT({
101
+ en: "slotLimit must be an integer between 1 and 10",
102
+ fr: "slotLimit doit \xEAtre un entier entre 1 et 10"
103
+ })
104
+ });
98
105
  }
99
106
  settings.slotLimit = slotLimit;
100
107
  }
101
108
  if (typeof queuePaused === "boolean") settings.queuePaused = queuePaused;
102
109
  if (Object.keys(settings).length === 0) {
103
- return res.status(400).json({ error: "Provide slotLimit and/or queuePaused" });
110
+ return res.status(400).json({
111
+ error: serverT({ en: "Provide slotLimit and/or queuePaused", fr: "Fournissez slotLimit et/ou queuePaused" })
112
+ });
104
113
  }
105
114
  tasksService.setSettings(projectId, settings).then((saved) => {
106
115
  res.json({ settings: saved });
@@ -111,7 +120,7 @@ function registerTaskRoutes(router, tasksService) {
111
120
  if (!projectId) return;
112
121
  const { prompt, attachments, agentId, providerId, model } = req.body;
113
122
  if (typeof prompt !== "string") {
114
- return res.status(400).json({ error: "prompt (string) is required" });
123
+ return res.status(400).json({ error: serverT({ en: "prompt (string) is required", fr: "prompt (cha\xEEne) est requis" }) });
115
124
  }
116
125
  try {
117
126
  const task = tasksService.create(
@@ -134,7 +143,7 @@ function registerTaskRoutes(router, tasksService) {
134
143
  const projectId = requireProject(req, res);
135
144
  if (!projectId) return;
136
145
  const task = tasksService.get(projectId, req.params["taskId"]);
137
- if (!task) return res.status(404).json({ error: "Task not found" });
146
+ if (!task) return res.status(404).json({ error: serverT({ en: "Task not found", fr: "T\xE2che introuvable" }) });
138
147
  res.json({ task });
139
148
  });
140
149
  router.put("/projects/:projectId/tasks/:taskId", (req, res) => {
@@ -150,7 +159,7 @@ function registerTaskRoutes(router, tasksService) {
150
159
  if (typeof providerId === "string" || providerId === null) patch.providerId = providerId;
151
160
  if (typeof model === "string" || model === null) patch.model = model;
152
161
  if (Object.keys(patch).length === 0) {
153
- return res.status(400).json({ error: "No updatable fields provided" });
162
+ return res.status(400).json({ error: serverT({ en: "No updatable fields provided", fr: "Aucun champ modifiable fourni" }) });
154
163
  }
155
164
  tasksService.update(projectId, req.params["taskId"], patch, { actor: HUMAN }, expectedVersion).then(({ task }) => res.json({ task })).catch((error) => handleError(res, error));
156
165
  });
@@ -174,7 +183,12 @@ function registerTaskRoutes(router, tasksService) {
174
183
  if (!projectId) return;
175
184
  const { to, reason, expectedVersion, sessionId } = req.body;
176
185
  if (!["todo", "in_progress", "done"].includes(to)) {
177
- return res.status(400).json({ error: "to must be one of: todo, in_progress, done" });
186
+ return res.status(400).json({
187
+ error: serverT({
188
+ en: "to must be one of: todo, in_progress, done",
189
+ fr: "to doit \xEAtre l\u2019un de : todo, in_progress, done"
190
+ })
191
+ });
178
192
  }
179
193
  tasksService.move(projectId, req.params["taskId"], to, {
180
194
  actor: HUMAN,
@@ -188,7 +202,7 @@ function registerTaskRoutes(router, tasksService) {
188
202
  if (!projectId) return;
189
203
  const { value, expectedVersion } = req.body;
190
204
  if (typeof value !== "string") {
191
- return res.status(400).json({ error: "value (string) is required" });
205
+ return res.status(400).json({ error: serverT({ en: "value (string) is required", fr: "value (cha\xEEne) est requise" }) });
192
206
  }
193
207
  tasksService.setGateValue(
194
208
  projectId,
@@ -205,7 +219,9 @@ function registerTaskRoutes(router, tasksService) {
205
219
  if (!projectId) return;
206
220
  const { status, index } = req.body;
207
221
  if (!["todo", "in_progress", "done"].includes(status) || typeof index !== "number") {
208
- return res.status(400).json({ error: "status and index (number) are required" });
222
+ return res.status(400).json({
223
+ error: serverT({ en: "status and index (number) are required", fr: "status et index (nombre) sont requis" })
224
+ });
209
225
  }
210
226
  try {
211
227
  res.json({ task: tasksService.reorder(projectId, req.params["taskId"], status, index) });
@@ -217,4 +233,4 @@ function registerTaskRoutes(router, tasksService) {
217
233
  export {
218
234
  registerTaskRoutes
219
235
  };
220
- //# sourceMappingURL=tasks-WOC3QUFA.js.map
236
+ //# sourceMappingURL=tasks-3JJWJJ3X.js.map
@@ -10,19 +10,19 @@ import {
10
10
  setTasksService,
11
11
  stepDoneTool,
12
12
  validateToolAction
13
- } from "./chunk-HXHPKGJE.js";
13
+ } from "./chunk-ESZQTFQP.js";
14
14
  import "./chunk-XE6UC5Z3.js";
15
15
  import "./chunk-J7GAZGZT.js";
16
- import "./chunk-FEIRWXLX.js";
17
- import "./chunk-TACWRDDC.js";
16
+ import "./chunk-OZWHRBDY.js";
17
+ import "./chunk-S67WIWUG.js";
18
18
  import "./chunk-7ET46SNE.js";
19
19
  import "./chunk-LW6MMSTD.js";
20
- import "./chunk-MQMPIXON.js";
20
+ import "./chunk-5UMXFLET.js";
21
21
  import "./chunk-I72ACQ6R.js";
22
22
  import "./chunk-JE7LW7Y6.js";
23
23
  import "./chunk-OAN4BXEW.js";
24
- import "./chunk-BKMWZTNO.js";
25
- import "./chunk-7JVBDBXE.js";
24
+ import "./chunk-DWA4IE65.js";
25
+ import "./chunk-7QMWYNVF.js";
26
26
  import {
27
27
  AskUserInterrupt,
28
28
  cancelQuestionsForSession,
@@ -35,30 +35,31 @@ import {
35
35
  getConfirmationSessionId,
36
36
  providePathConfirmation,
37
37
  requestPathAccess
38
- } from "./chunk-Y6ZGHOKM.js";
39
- import "./chunk-FGNJMKDV.js";
40
- import "./chunk-M5T4RDPJ.js";
41
- import "./chunk-KWAHD2JA.js";
42
- import "./chunk-ELYHHEYL.js";
38
+ } from "./chunk-I5ODJKYM.js";
39
+ import "./chunk-QZOV4OVN.js";
40
+ import "./chunk-MEEUXRFL.js";
41
+ import "./chunk-F2MOHHXB.js";
42
+ import "./chunk-ORCQ3EXQ.js";
43
43
  import "./chunk-OSXPQSLW.js";
44
- import "./chunk-P57IBMK4.js";
44
+ import "./chunk-AATMPL7S.js";
45
45
  import "./chunk-LCLH6ZUL.js";
46
- import "./chunk-MGEYAYGU.js";
47
- import "./chunk-5JWJEZJ3.js";
46
+ import "./chunk-O3RCSKUH.js";
47
+ import "./chunk-5UQ4CKOA.js";
48
48
  import "./chunk-OA2FURC3.js";
49
49
  import "./chunk-J2GP3J3X.js";
50
50
  import "./chunk-DPFET73G.js";
51
- import "./chunk-CLDCHOEA.js";
51
+ import "./chunk-ZMK4VX7V.js";
52
52
  import "./chunk-TS5WKTFB.js";
53
53
  import "./chunk-UV6IH6HK.js";
54
54
  import "./chunk-HNCM3D7Y.js";
55
55
  import "./chunk-EUOWCVU6.js";
56
- import "./chunk-6EZDW4JS.js";
57
- import "./chunk-LQKXJPKP.js";
56
+ import "./chunk-J3NMNYGM.js";
57
+ import "./chunk-CTWZPN7G.js";
58
58
  import "./chunk-JU757HVI.js";
59
59
  import "./chunk-2AI7VYPN.js";
60
60
  import "./chunk-K44MW7JJ.js";
61
- import "./chunk-HCYSGLY2.js";
61
+ import "./chunk-HF3NDXB4.js";
62
+ import "./chunk-24YKXKCG.js";
62
63
  import "./chunk-R5FAEKXQ.js";
63
64
  import "./chunk-CQGTEGKL.js";
64
65
  import "./chunk-YLJ4XMA6.js";
@@ -84,4 +85,4 @@ export {
84
85
  stepDoneTool,
85
86
  validateToolAction
86
87
  };
87
- //# sourceMappingURL=tools-CW6POKUL.js.map
88
+ //# sourceMappingURL=tools-E63MOJBO.js.map
@@ -1,4 +1,4 @@
1
- import { T as ToolCall, A as Attachment } from './types-BIkpxjaj.js';
1
+ import { T as ToolCall, A as Attachment } from './types-G10ho8PT.js';
2
2
 
3
3
  interface LLMMessage {
4
4
  role: 'system' | 'user' | 'assistant' | 'tool';
@@ -702,4 +702,4 @@ interface ElementData {
702
702
  attributes: Record<string, string>;
703
703
  }
704
704
 
705
- export type { ToolResult as $, Attachment as A, SessionMetadata as B, CallStatsDataPoint as C, DangerLevel as D, EditContextEdit as E, FileReadEntry as F, SessionMode as G, SessionPhase as H, InjectedFile as I, SessionSummary as J, StatsDataPoint as K, LLMCallStats as L, ModelConfig as M, StatsIdentity as N, TaskActor as O, PreparingToolCall as P, TaskAuditEntry as Q, RecentUserPrompt as R, SessionStats as S, ToolCall as T, TaskGateConfig as U, TaskGateValue as V, TaskRunState as W, TaskStatus as X, Todo as Y, ToolMode as Z, ToolName as _, Message as a, UserStepChoice as a0, ValidationResult as a1, WorkflowExecution as a2, WorkflowExecutionStatus as a3, WorkflowLaunchScope as a4, WorkflowParameter as a5, WorkflowScope as a6, Config as b, ContextState as c, ContextWindow as d, Criterion as e, CriterionAttempt as f, CriterionStatus as g, CriterionValidation as h, Diagnostic as i, EditContextLine as j, EditContextRegion as k, ElementData as l, ExecutionState as m, LlmBackend as n, MessageRole as o, MessageSegment as p, MessageStats as q, MetadataEntry as r, ModelSessionStats as s, Project as t, ProjectTask as u, ProjectTaskCounts as v, ProjectTaskSettings as w, Provider as x, ProviderBackend as y, Session as z };
705
+ export type { TaskStatus as $, Attachment as A, LlmBackend as B, ContextState as C, Diagnostic as D, EditContextEdit as E, FileReadEntry as F, MessageRole as G, MessageSegment as H, InjectedFile as I, ModelSessionStats as J, PreparingToolCall as K, LLMCallStats as L, ModelConfig as M, Provider as N, ProviderBackend as O, Project as P, SessionMetadata as Q, RecentUserPrompt as R, SessionMode as S, ToolCall as T, StatsDataPoint as U, StatsIdentity as V, WorkflowExecution as W, TaskActor as X, TaskAuditEntry as Y, TaskGateValue as Z, TaskRunState as _, ToolMode as a, ToolName as a0, UserStepChoice as a1, ValidationResult as a2, WorkflowExecutionStatus as a3, WorkflowLaunchScope as a4, WorkflowParameter as a5, WorkflowScope as a6, ToolResult as b, Message as c, MessageStats as d, Todo as e, Criterion as f, MetadataEntry as g, SessionPhase as h, SessionSummary as i, Session as j, ProjectTask as k, ProjectTaskSettings as l, ProjectTaskCounts as m, TaskGateConfig as n, SessionStats as o, CallStatsDataPoint as p, Config as q, ContextWindow as r, CriterionAttempt as s, CriterionStatus as t, CriterionValidation as u, DangerLevel as v, EditContextLine as w, EditContextRegion as x, ElementData as y, ExecutionState as z };
@@ -0,0 +1,76 @@
1
+ import {
2
+ cliT
3
+ } from "./chunk-2OMGR7LN.js";
4
+ import {
5
+ VERSION
6
+ } from "./chunk-WY3PWHWY.js";
7
+ import "./chunk-24YKXKCG.js";
8
+ import "./chunk-CQGTEGKL.js";
9
+ import "./chunk-YLJ4XMA6.js";
10
+
11
+ // src/cli/update.ts
12
+ import { spawnSync } from "child_process";
13
+ function npm(args, inherit = false) {
14
+ const win = process.platform === "win32";
15
+ const result = spawnSync(win ? ["npm", ...args].join(" ") : "npm", win ? [] : args, {
16
+ encoding: "utf-8",
17
+ ...inherit ? { stdio: "inherit" } : {},
18
+ shell: win,
19
+ windowsHide: true
20
+ });
21
+ return { ok: result.status === 0, stdout: (result.stdout ?? "").trim() };
22
+ }
23
+ async function runUpdate(options = {}) {
24
+ const view = npm(["view", "openfox", "version"]);
25
+ if (!view.ok) {
26
+ console.error(
27
+ cliT({
28
+ en: "Failed to check the latest version (npm view openfox version)",
29
+ fr: "\xC9chec de la v\xE9rification de la derni\xE8re version (npm view openfox version)"
30
+ })
31
+ );
32
+ return 1;
33
+ }
34
+ const latest = view.stdout;
35
+ if (VERSION === latest) {
36
+ console.log(
37
+ cliT({
38
+ en: `OpenFox is already at the latest version: ${VERSION}`,
39
+ fr: `OpenFox est d\xE9j\xE0 \xE0 la derni\xE8re version : ${VERSION}`
40
+ })
41
+ );
42
+ return 0;
43
+ }
44
+ console.log(
45
+ cliT({ en: `Updating OpenFox: ${VERSION} -> ${latest}`, fr: `Mise \xE0 jour d\u2019OpenFox : ${VERSION} -> ${latest}` })
46
+ );
47
+ if (!npm(["install", "-g", "openfox@latest"], true).ok) {
48
+ return 1;
49
+ }
50
+ const refreshLauncher = options.refreshLauncher ?? (async () => {
51
+ const { runInstall } = await import("./install-AVTFA344.js");
52
+ return runInstall({ quiet: true });
53
+ });
54
+ const installCode = await refreshLauncher();
55
+ if (installCode !== 0) {
56
+ console.error(
57
+ cliT({
58
+ en: "OpenFox updated, but the persistent launcher could not be refreshed.",
59
+ fr: "OpenFox a \xE9t\xE9 mis \xE0 jour, mais le lanceur persistant n\u2019a pas pu \xEAtre actualis\xE9."
60
+ })
61
+ );
62
+ return installCode;
63
+ }
64
+ console.log(cliT({ en: `Updated: ${latest}`, fr: `Mis \xE0 jour : ${latest}` }));
65
+ console.log(
66
+ cliT({
67
+ en: "Please restart OpenFox to use the new version.",
68
+ fr: "Veuillez red\xE9marrer OpenFox pour utiliser la nouvelle version."
69
+ })
70
+ );
71
+ return 0;
72
+ }
73
+ export {
74
+ runUpdate
75
+ };
76
+ //# sourceMappingURL=update-XVXNSSDK.js.map