openfox 2.0.102 → 2.0.104
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.
- package/CHANGELOG.md +23 -0
- package/dist/CHANGELOG.md +23 -0
- package/dist/{ask-TOBEA6KD.js → ask-CJMU6EW7.js} +2 -2
- package/dist/{chat-handler-IBFSBSGV.js → chat-handler-G2ZJNAVB.js} +18 -18
- package/dist/{chunk-AI27N57J.js → chunk-2COWPTSJ.js} +2 -2
- package/dist/{chunk-QL2G5UWE.js → chunk-3NVISPE7.js} +22 -12
- package/dist/chunk-4H427UBV.js +1298 -0
- package/dist/{chunk-W5FTCTGY.js → chunk-5VKT34HE.js} +2 -2
- package/dist/{chunk-FQS7A5M4.js → chunk-6SIX7P6O.js} +2 -2
- package/dist/{chunk-MGKS2NG2.js → chunk-B76OP3OE.js} +3 -3
- package/dist/{chunk-WPCYFH6X.js → chunk-DMI2BXHA.js} +4 -4
- package/dist/{chunk-KKEBXFB3.js → chunk-EF7KGWF6.js} +2 -2
- package/dist/{chunk-QGWS2EBU.js → chunk-EFIC3TUX.js} +16 -16
- package/dist/{chunk-MR7ZEGOF.js → chunk-ERKPMNC7.js} +5 -2
- package/dist/{chunk-ZLCPNTRT.js → chunk-ERTTKKCE.js} +6 -2
- package/dist/{chunk-BJDQPILB.js → chunk-F766OIDT.js} +2 -2
- package/dist/{chunk-K6VVTE6C.js → chunk-HZXWVD5A.js} +29 -19
- package/dist/{chunk-4Z2ARCY3.js → chunk-J27BLIPY.js} +2 -2
- package/dist/{chunk-EU3WWTFH.js → chunk-JAX5OEMM.js} +5 -1
- package/dist/chunk-MLOCSFIW.js +7 -0
- package/dist/{chunk-RZC6DAT2.js → chunk-OUMHR7LR.js} +2 -2
- package/dist/{chunk-DPRJYQ5U.js → chunk-PKLWSTDB.js} +17 -17
- package/dist/{chunk-2EYTYXWN.js → chunk-S5HDT5RQ.js} +2 -2
- package/dist/{chunk-YZSBJUGC.js → chunk-SPA7PQPJ.js} +3 -1
- package/dist/{chunk-KLK5N4OX.js → chunk-TFQSCHVU.js} +3 -3
- package/dist/{chunk-7HIJP4PC.js → chunk-UADZ2LZJ.js} +2 -2
- package/dist/{chunk-Z753S3X7.js → chunk-W2KZ7H55.js} +22 -15
- package/dist/{chunk-W5RC44R6.js → chunk-WHJ67MO2.js} +8 -8
- package/dist/{chunk-6ZV3NYEE.js → chunk-XWW7LOU4.js} +118 -77
- package/dist/{chunk-73EV6QYX.js → chunk-YXIDKMBJ.js} +3 -3
- package/dist/cli/dev.js +2 -2
- package/dist/cli/index.js +2 -2
- package/dist/{client-Q7BHKOCD.js → client-2EAJAGPC.js} +4 -4
- package/dist/{compactor-43P3LGDU.js → compactor-IEYTUHYX.js} +9 -9
- package/dist/{dynamic-context-AMPVZXUU.js → dynamic-context-Z5BU2RVP.js} +7 -7
- package/dist/{events-RCC32JOA.js → events-BGVLDGLK.js} +6 -6
- package/dist/{folding-ZNUXPQUD.js → folding-AJMZBHNR.js} +4 -4
- package/dist/{http-client-WGNBG7PC.js → http-client-A7A4XWNK.js} +3 -3
- package/dist/{manager-HFGJLW7Q.js → manager-GGIIENDX.js} +4 -4
- package/dist/{model-overrides-DQDT5Y7R.js → model-overrides-BLEFI7FQ.js} +3 -3
- package/dist/{orchestrator-QDXKDLOW.js → orchestrator-SYAYO6NS.js} +17 -17
- package/dist/package.json +1 -1
- package/dist/{path-security-SUFEIBTC.js → path-security-JCDBLFIE.js} +7 -7
- package/dist/{platform-2RLL7RAE.js → platform-GZ2WIDS5.js} +3 -3
- package/dist/{processor-YWNLWAZW.js → processor-CBGV2K4E.js} +17 -17
- package/dist/{protocol-BXgdUKgZ.d.ts → protocol-rfiBDoXm.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-FX3QCGAF.js → provider-XCVHKXPS.js} +68 -68
- package/dist/{provider-manager-GLG6BA32.js → provider-manager-AUYP3QAM.js} +5 -5
- package/dist/{pwa-SEWCVKZX.js → pwa-XPHP3PY2.js} +35 -35
- package/dist/{registry-GBNLVWYQ.js → registry-M2QVGRNK.js} +3 -3
- package/dist/{serve-RKHLNGEV.js → serve-NPS4GJWH.js} +25 -25
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +24 -24
- package/dist/{server-QGQGSHW6.js → server-FKM4FQKD.js} +20 -20
- package/dist/{session-overrides-MBGBX6TM.js → session-overrides-HA5IQYLI.js} +5 -5
- package/dist/{sessions-FEIFYGH7.js → sessions-ZV2WRC6K.js} +4 -4
- package/dist/{settings-FT7HF7ZB.js → settings-TGCITCVA.js} +2 -2
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tools-M5DKWCJJ.js → tools-KKALZLKX.js} +15 -15
- package/dist/{types-DBftgbfl.d.ts → types-o-YQ3Bfq.d.ts} +1 -1
- package/dist/{types-7idXD8Bq.d.ts → types-o0v5xVxu.d.ts} +1 -1
- package/dist/{update-N4GD5IUX.js → update-7BEZMI4R.js} +2 -2
- package/dist/web/assets/index-B7wjVPjL.css +40 -0
- package/dist/web/assets/index-BoWCT9PC.js +323 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/web/workbox-9c191d2f.js +1 -0
- package/package.json +1 -1
- package/dist/chunk-SV3I2YNO.js +0 -7
- package/dist/chunk-XY3LESVZ.js +0 -1000
- package/dist/web/assets/index-B0CNNl1k.css +0 -32
- package/dist/web/assets/index-FWViKQkM.js +0 -324
- package/dist/web/workbox-8c29f6e4.js +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
2
|
+
cancel,
|
|
3
|
+
isCancel,
|
|
4
|
+
log,
|
|
5
|
+
outro,
|
|
6
|
+
password,
|
|
7
|
+
select,
|
|
8
|
+
spinner,
|
|
9
|
+
text
|
|
10
|
+
} from "./chunk-4H427UBV.js";
|
|
11
11
|
import {
|
|
12
12
|
detectModel,
|
|
13
13
|
fetchAvailableModelsFromBackend
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2COWPTSJ.js";
|
|
15
15
|
import "./chunk-J2GP3J3X.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-F766OIDT.js";
|
|
17
17
|
import "./chunk-V4IE7HJY.js";
|
|
18
18
|
import "./chunk-YHEQTVFV.js";
|
|
19
19
|
import "./chunk-HNCM3D7Y.js";
|
|
20
20
|
import "./chunk-KCED2X4H.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-ERKPMNC7.js";
|
|
22
|
+
import "./chunk-SPA7PQPJ.js";
|
|
23
23
|
import "./chunk-GLF65XDS.js";
|
|
24
24
|
import "./chunk-K44MW7JJ.js";
|
|
25
25
|
import {
|
|
@@ -54,7 +54,7 @@ Provider Management Commands:
|
|
|
54
54
|
}
|
|
55
55
|
async function runProviderAdd(mode) {
|
|
56
56
|
const config = await loadGlobalConfig(mode);
|
|
57
|
-
const name = await
|
|
57
|
+
const name = await text({
|
|
58
58
|
message: "Provider name:",
|
|
59
59
|
placeholder: "My Local vLLM",
|
|
60
60
|
validate: (value) => {
|
|
@@ -62,11 +62,11 @@ async function runProviderAdd(mode) {
|
|
|
62
62
|
if (config.providers.some((p) => p.name === value)) return "Provider with this name already exists";
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
if (
|
|
66
|
-
|
|
65
|
+
if (isCancel(name)) {
|
|
66
|
+
cancel("Cancelled");
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
log.info(`URL examples:
|
|
70
70
|
vLLM/SGLang: http://localhost:8000
|
|
71
71
|
Ollama: http://localhost:11434
|
|
72
72
|
llama.cpp: http://localhost:8080
|
|
@@ -74,7 +74,7 @@ async function runProviderAdd(mode) {
|
|
|
74
74
|
Anthropic: https://api.anthropic.com
|
|
75
75
|
|
|
76
76
|
(Don't include /v1 - it's added automatically)`);
|
|
77
|
-
const url = await
|
|
77
|
+
const url = await text({
|
|
78
78
|
message: "API URL:",
|
|
79
79
|
placeholder: "http://localhost:8000",
|
|
80
80
|
initialValue: "http://localhost:8000",
|
|
@@ -83,20 +83,20 @@ async function runProviderAdd(mode) {
|
|
|
83
83
|
if (!value.startsWith("http")) return "Must start with http:// or https://";
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
if (
|
|
87
|
-
|
|
86
|
+
if (isCancel(url)) {
|
|
87
|
+
cancel("Cancelled");
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
const backend = await
|
|
90
|
+
const backend = await select({
|
|
91
91
|
message: "Backend type:",
|
|
92
92
|
options: BACKEND_OPTIONS
|
|
93
93
|
});
|
|
94
|
-
if (
|
|
95
|
-
|
|
94
|
+
if (isCancel(backend)) {
|
|
95
|
+
cancel("Cancelled");
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
let selectedModel;
|
|
99
|
-
const s =
|
|
99
|
+
const s = spinner();
|
|
100
100
|
s.start(`Fetching available models from ${url}...`);
|
|
101
101
|
let availableModels = [];
|
|
102
102
|
try {
|
|
@@ -106,7 +106,7 @@ async function runProviderAdd(mode) {
|
|
|
106
106
|
s.stop("\u26A0 Could not fetch models, will use auto-detect");
|
|
107
107
|
}
|
|
108
108
|
if (availableModels.length > 0) {
|
|
109
|
-
const modelChoice = await
|
|
109
|
+
const modelChoice = await select({
|
|
110
110
|
message: "Select model:",
|
|
111
111
|
options: availableModels.map((m) => ({
|
|
112
112
|
value: m,
|
|
@@ -114,24 +114,24 @@ async function runProviderAdd(mode) {
|
|
|
114
114
|
hint: m
|
|
115
115
|
}))
|
|
116
116
|
});
|
|
117
|
-
if (
|
|
118
|
-
|
|
117
|
+
if (isCancel(modelChoice)) {
|
|
118
|
+
cancel("Cancelled");
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
selectedModel = modelChoice;
|
|
122
122
|
} else {
|
|
123
|
-
const model = await
|
|
123
|
+
const model = await text({
|
|
124
124
|
message: 'Model name (or "auto" to detect):',
|
|
125
125
|
placeholder: "auto",
|
|
126
126
|
initialValue: "auto"
|
|
127
127
|
});
|
|
128
|
-
if (
|
|
129
|
-
|
|
128
|
+
if (isCancel(model)) {
|
|
129
|
+
cancel("Cancelled");
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
selectedModel = model;
|
|
133
133
|
if (selectedModel === "auto") {
|
|
134
|
-
const detectSpinner =
|
|
134
|
+
const detectSpinner = spinner();
|
|
135
135
|
detectSpinner.start("Detecting model...");
|
|
136
136
|
let detectedModel;
|
|
137
137
|
try {
|
|
@@ -149,7 +149,7 @@ async function runProviderAdd(mode) {
|
|
|
149
149
|
}
|
|
150
150
|
const localBackends = /* @__PURE__ */ new Set(["vllm", "sglang", "ollama", "llamacpp", "opencode-go"]);
|
|
151
151
|
const defaultIsLocal = localBackends.has(backend);
|
|
152
|
-
const isLocalChoice = await
|
|
152
|
+
const isLocalChoice = await select({
|
|
153
153
|
message: "Is this a local provider?",
|
|
154
154
|
options: [
|
|
155
155
|
{ value: "yes", label: "Yes" },
|
|
@@ -157,45 +157,45 @@ async function runProviderAdd(mode) {
|
|
|
157
157
|
],
|
|
158
158
|
initialValue: defaultIsLocal ? "yes" : "no"
|
|
159
159
|
});
|
|
160
|
-
if (
|
|
161
|
-
|
|
160
|
+
if (isCancel(isLocalChoice)) {
|
|
161
|
+
cancel("Cancelled");
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
const isLocal = isLocalChoice === "yes";
|
|
165
165
|
let apiKey;
|
|
166
166
|
if (backend === "openai" || backend === "anthropic") {
|
|
167
|
-
const key = await
|
|
167
|
+
const key = await password({
|
|
168
168
|
message: "API Key:"
|
|
169
169
|
});
|
|
170
|
-
if (
|
|
171
|
-
|
|
170
|
+
if (isCancel(key)) {
|
|
171
|
+
cancel("Cancelled");
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
174
|
apiKey = key || void 0;
|
|
175
175
|
} else {
|
|
176
|
-
const needsKey = await
|
|
176
|
+
const needsKey = await select({
|
|
177
177
|
message: "Does this provider require an API key?",
|
|
178
178
|
options: [
|
|
179
179
|
{ value: "no", label: "No" },
|
|
180
180
|
{ value: "yes", label: "Yes" }
|
|
181
181
|
]
|
|
182
182
|
});
|
|
183
|
-
if (
|
|
184
|
-
|
|
183
|
+
if (isCancel(needsKey)) {
|
|
184
|
+
cancel("Cancelled");
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
187
|
if (needsKey === "yes") {
|
|
188
|
-
const key = await
|
|
188
|
+
const key = await password({
|
|
189
189
|
message: "API Key:"
|
|
190
190
|
});
|
|
191
|
-
if (
|
|
192
|
-
|
|
191
|
+
if (isCancel(key)) {
|
|
192
|
+
cancel("Cancelled");
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
apiKey = key || void 0;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
const testSpinner =
|
|
198
|
+
const testSpinner = spinner();
|
|
199
199
|
testSpinner.start(`Testing connection to ${url}...`);
|
|
200
200
|
const finalBackend = backend;
|
|
201
201
|
let finalDetectedModel = null;
|
|
@@ -206,32 +206,32 @@ async function runProviderAdd(mode) {
|
|
|
206
206
|
testSpinner.stop(`\u2713 Connected to ${finalBackend}${finalDetectedModel !== "auto" ? ` (${finalDetectedModel})` : ""}`);
|
|
207
207
|
} catch {
|
|
208
208
|
testSpinner.stop("\u26A0 Could not connect to provider");
|
|
209
|
-
const continueAnyway = await
|
|
209
|
+
const continueAnyway = await select({
|
|
210
210
|
message: "Provider is not reachable. Save anyway?",
|
|
211
211
|
options: [
|
|
212
212
|
{ value: "yes", label: "Yes, save anyway" },
|
|
213
213
|
{ value: "no", label: "No, cancel" }
|
|
214
214
|
]
|
|
215
215
|
});
|
|
216
|
-
if (
|
|
217
|
-
|
|
216
|
+
if (isCancel(continueAnyway) || continueAnyway === "no") {
|
|
217
|
+
cancel("Cancelled");
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
const makeActive = config.providers.length === 0 || await (async () => {
|
|
222
|
-
const choice = await
|
|
222
|
+
const choice = await select({
|
|
223
223
|
message: "Make this the active provider?",
|
|
224
224
|
options: [
|
|
225
225
|
{ value: "yes", label: "Yes" },
|
|
226
226
|
{ value: "no", label: "No" }
|
|
227
227
|
]
|
|
228
228
|
});
|
|
229
|
-
if (
|
|
229
|
+
if (isCancel(choice)) return false;
|
|
230
230
|
return choice === "yes";
|
|
231
231
|
})();
|
|
232
232
|
const modelsWithContent = [];
|
|
233
233
|
if (availableModels.length > 0) {
|
|
234
|
-
const modelFetchSpinner =
|
|
234
|
+
const modelFetchSpinner = spinner();
|
|
235
235
|
modelFetchSpinner.start("Fetching model metadata...");
|
|
236
236
|
try {
|
|
237
237
|
const urlWithV1 = url.includes("/v1") ? url : `${url}/v1`;
|
|
@@ -278,12 +278,12 @@ async function runProviderAdd(mode) {
|
|
|
278
278
|
);
|
|
279
279
|
}
|
|
280
280
|
await saveGlobalConfig(mode, newConfig);
|
|
281
|
-
|
|
281
|
+
outro(`\u2713 Provider "${name}" added${makeActive ? " and activated" : ""}`);
|
|
282
282
|
}
|
|
283
283
|
async function runProviderList(mode) {
|
|
284
284
|
const config = await loadGlobalConfig(mode);
|
|
285
285
|
if (config.providers.length === 0) {
|
|
286
|
-
|
|
286
|
+
log.warn("No providers configured. Run `openfox provider add` to add one.");
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
console.log("\nConfigured providers:\n");
|
|
@@ -302,15 +302,15 @@ async function runProviderList(mode) {
|
|
|
302
302
|
async function runProviderUse(mode) {
|
|
303
303
|
const config = await loadGlobalConfig(mode);
|
|
304
304
|
if (config.providers.length === 0) {
|
|
305
|
-
|
|
305
|
+
log.warn("No providers configured. Run `openfox provider add` to add one.");
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
308
|
if (config.providers.length === 1) {
|
|
309
|
-
|
|
309
|
+
log.info("Only one provider configured, already active.");
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
const activeProvider = getActiveProvider(config);
|
|
313
|
-
const choice = await
|
|
313
|
+
const choice = await select({
|
|
314
314
|
message: "Select provider to activate:",
|
|
315
315
|
options: config.providers.map((p) => ({
|
|
316
316
|
value: p.id,
|
|
@@ -319,26 +319,26 @@ async function runProviderUse(mode) {
|
|
|
319
319
|
})),
|
|
320
320
|
initialValue: activeProvider?.id
|
|
321
321
|
});
|
|
322
|
-
if (
|
|
323
|
-
|
|
322
|
+
if (isCancel(choice)) {
|
|
323
|
+
cancel("Cancelled");
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
326
|
if (choice === activeProvider?.id) {
|
|
327
|
-
|
|
327
|
+
log.info("Already the active provider.");
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
330
|
const newConfig = activateProvider(config, choice);
|
|
331
331
|
await saveGlobalConfig(mode, newConfig);
|
|
332
332
|
const activated = newConfig.providers.find((p) => p.id === choice);
|
|
333
|
-
|
|
333
|
+
outro(`\u2713 Now using "${activated?.name}"`);
|
|
334
334
|
}
|
|
335
335
|
async function runProviderRemove(mode) {
|
|
336
336
|
const config = await loadGlobalConfig(mode);
|
|
337
337
|
if (config.providers.length === 0) {
|
|
338
|
-
|
|
338
|
+
log.warn("No providers configured.");
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
const choice = await
|
|
341
|
+
const choice = await select({
|
|
342
342
|
message: "Select provider to remove:",
|
|
343
343
|
options: config.providers.map((p) => ({
|
|
344
344
|
value: p.id,
|
|
@@ -346,27 +346,27 @@ async function runProviderRemove(mode) {
|
|
|
346
346
|
hint: p.url
|
|
347
347
|
}))
|
|
348
348
|
});
|
|
349
|
-
if (
|
|
350
|
-
|
|
349
|
+
if (isCancel(choice)) {
|
|
350
|
+
cancel("Cancelled");
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
353
|
const providerToRemove = config.providers.find((p) => p.id === choice);
|
|
354
354
|
if (providerToRemove?.isActive && config.providers.length > 1) {
|
|
355
|
-
const confirm = await
|
|
355
|
+
const confirm = await select({
|
|
356
356
|
message: `"${providerToRemove.name}" is the active provider. Remove it anyway?`,
|
|
357
357
|
options: [
|
|
358
358
|
{ value: "yes", label: "Yes, remove and activate next provider" },
|
|
359
359
|
{ value: "no", label: "No, cancel" }
|
|
360
360
|
]
|
|
361
361
|
});
|
|
362
|
-
if (
|
|
363
|
-
|
|
362
|
+
if (isCancel(confirm) || confirm === "no") {
|
|
363
|
+
cancel("Cancelled");
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
const newConfig = removeProvider(config, choice);
|
|
368
368
|
await saveGlobalConfig(mode, newConfig);
|
|
369
|
-
|
|
369
|
+
outro(`\u2713 Removed "${providerToRemove?.name}"`);
|
|
370
370
|
}
|
|
371
371
|
async function runProviderCommand(mode, subcommand) {
|
|
372
372
|
switch (subcommand) {
|
|
@@ -398,4 +398,4 @@ export {
|
|
|
398
398
|
runProviderRemove,
|
|
399
399
|
runProviderUse
|
|
400
400
|
};
|
|
401
|
-
//# sourceMappingURL=provider-
|
|
401
|
+
//# sourceMappingURL=provider-XCVHKXPS.js.map
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
fetchAvailableModelsFromBackend,
|
|
4
4
|
fetchModelsWithContext,
|
|
5
5
|
parseDefaultModelSelection
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2COWPTSJ.js";
|
|
7
7
|
import "./chunk-J2GP3J3X.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-F766OIDT.js";
|
|
9
9
|
import "./chunk-V4IE7HJY.js";
|
|
10
10
|
import "./chunk-YHEQTVFV.js";
|
|
11
11
|
import "./chunk-HNCM3D7Y.js";
|
|
12
12
|
import "./chunk-KCED2X4H.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ERKPMNC7.js";
|
|
14
|
+
import "./chunk-SPA7PQPJ.js";
|
|
15
15
|
import "./chunk-GLF65XDS.js";
|
|
16
16
|
import "./chunk-K44MW7JJ.js";
|
|
17
17
|
import "./chunk-5WRI5ZAA.js";
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
fetchModelsWithContext,
|
|
22
22
|
parseDefaultModelSelection
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=provider-manager-
|
|
24
|
+
//# sourceMappingURL=provider-manager-AUYP3QAM.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
2
|
+
cancel,
|
|
3
|
+
confirm,
|
|
4
|
+
isCancel,
|
|
5
|
+
log
|
|
6
|
+
} from "./chunk-4H427UBV.js";
|
|
7
7
|
import {
|
|
8
8
|
getGlobalConfigDir
|
|
9
9
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -157,7 +157,7 @@ async function pwaInstall(mode) {
|
|
|
157
157
|
const manifestUrl = getManifestUrl(mode);
|
|
158
158
|
if (!isFirefoxPwaAvailable()) {
|
|
159
159
|
const hint = getFirefoxPwaInstallHint();
|
|
160
|
-
|
|
160
|
+
log.error("firefoxpwa is not installed or not on your PATH.");
|
|
161
161
|
console.log(`
|
|
162
162
|
Install it first:
|
|
163
163
|
|
|
@@ -167,30 +167,30 @@ See: https://pwasforfirefox.filips.si/installation/`);
|
|
|
167
167
|
process.exit(1);
|
|
168
168
|
}
|
|
169
169
|
if (!isRuntimeInstalled()) {
|
|
170
|
-
const install = await
|
|
170
|
+
const install = await confirm({
|
|
171
171
|
message: "Firefox PWA runtime is not installed. Install it now?",
|
|
172
172
|
initialValue: true
|
|
173
173
|
});
|
|
174
|
-
if (
|
|
175
|
-
|
|
174
|
+
if (isCancel(install)) {
|
|
175
|
+
cancel();
|
|
176
176
|
process.exit(0);
|
|
177
177
|
}
|
|
178
178
|
if (install) {
|
|
179
|
-
|
|
179
|
+
log.info("Running: firefoxpwa runtime install");
|
|
180
180
|
try {
|
|
181
181
|
spawn("firefoxpwa", ["runtime", "install"], { stdio: "inherit", windowsHide: true });
|
|
182
182
|
} catch {
|
|
183
|
-
|
|
183
|
+
log.error("Failed to install runtime.");
|
|
184
184
|
process.exit(1);
|
|
185
185
|
}
|
|
186
186
|
} else {
|
|
187
|
-
|
|
187
|
+
log.info("Skipping runtime install. The PWA cannot be used until the runtime is installed.");
|
|
188
188
|
process.exit(0);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
const port = mode === "development" ? 10469 : 10369;
|
|
192
192
|
if (!await isServerReachable(port)) {
|
|
193
|
-
|
|
193
|
+
log.error(`OpenFox server is not reachable on port ${port}.`);
|
|
194
194
|
console.log(`
|
|
195
195
|
Start OpenFox first:
|
|
196
196
|
|
|
@@ -202,7 +202,7 @@ Start OpenFox first:
|
|
|
202
202
|
if (existing) {
|
|
203
203
|
const installed = probeInstalledApp(manifestUrl);
|
|
204
204
|
if (installed) {
|
|
205
|
-
|
|
205
|
+
log.info("OpenFox PWA is already installed.");
|
|
206
206
|
console.log(` App ID: ${installed.appId}`);
|
|
207
207
|
console.log(` Profile: ${installed.profileId}`);
|
|
208
208
|
console.log(` URL: ${manifestUrl}`);
|
|
@@ -214,7 +214,7 @@ Use "openfox pwa launch" to start it, or "openfox pwa uninstall" to remove it.`)
|
|
|
214
214
|
if (existing) {
|
|
215
215
|
await removePwaConfig(mode);
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
log.info("Installing OpenFox PWA...");
|
|
218
218
|
let appId = "";
|
|
219
219
|
let profileId = "00000000000000000000000000";
|
|
220
220
|
try {
|
|
@@ -225,17 +225,17 @@ Use "openfox pwa launch" to start it, or "openfox pwa uninstall" to remove it.`)
|
|
|
225
225
|
profileId = detected.profileId;
|
|
226
226
|
}
|
|
227
227
|
} catch {
|
|
228
|
-
|
|
228
|
+
log.error("Failed to install PWA. Ensure OpenFox is running and try again.");
|
|
229
229
|
process.exit(1);
|
|
230
230
|
}
|
|
231
231
|
if (!appId) {
|
|
232
|
-
|
|
232
|
+
log.error("Could not detect installed app ID. The PWA may still be installed.");
|
|
233
233
|
console.log("Check with: firefoxpwa profile list");
|
|
234
234
|
process.exit(1);
|
|
235
235
|
}
|
|
236
236
|
const pwaConfig = { appId, profileId, manifestUrl, installedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
237
237
|
await savePwaConfig(mode, pwaConfig);
|
|
238
|
-
|
|
238
|
+
log.info("OpenFox PWA installed successfully!");
|
|
239
239
|
console.log(`
|
|
240
240
|
App ID: ${appId}`);
|
|
241
241
|
console.log(` Profile: ${profileId}`);
|
|
@@ -244,7 +244,7 @@ Launch it with: openfox pwa launch`);
|
|
|
244
244
|
}
|
|
245
245
|
async function pwaUninstall(mode) {
|
|
246
246
|
if (!isFirefoxPwaAvailable()) {
|
|
247
|
-
|
|
247
|
+
log.error("firefoxpwa is not installed or not on your PATH.");
|
|
248
248
|
process.exit(1);
|
|
249
249
|
}
|
|
250
250
|
const manifestUrl = getManifestUrl(mode);
|
|
@@ -255,24 +255,24 @@ async function pwaUninstall(mode) {
|
|
|
255
255
|
if (detected) appId = detected.appId;
|
|
256
256
|
}
|
|
257
257
|
if (!appId) {
|
|
258
|
-
|
|
258
|
+
log.info("OpenFox PWA is not installed.");
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
log.info("Removing OpenFox PWA...");
|
|
262
262
|
try {
|
|
263
263
|
execSync(`firefoxpwa site uninstall ${appId} --quiet`, { encoding: "utf-8", windowsHide: true });
|
|
264
264
|
} catch {
|
|
265
|
-
|
|
265
|
+
log.error(`Failed to uninstall PWA (ID: ${appId}).`);
|
|
266
266
|
process.exit(1);
|
|
267
267
|
}
|
|
268
268
|
await removePwaConfig(mode);
|
|
269
|
-
|
|
269
|
+
log.info("OpenFox PWA removed from your system.");
|
|
270
270
|
console.log("\nNote: The Firefox PWA runtime is still installed.");
|
|
271
271
|
console.log("To remove it: firefoxpwa runtime uninstall");
|
|
272
272
|
}
|
|
273
273
|
async function pwaLaunch(mode) {
|
|
274
274
|
if (!isFirefoxPwaAvailable()) {
|
|
275
|
-
|
|
275
|
+
log.error("firefoxpwa is not installed or not on your PATH.");
|
|
276
276
|
process.exit(1);
|
|
277
277
|
}
|
|
278
278
|
const manifestUrl = getManifestUrl(mode);
|
|
@@ -283,16 +283,16 @@ async function pwaLaunch(mode) {
|
|
|
283
283
|
if (detected) appId = detected.appId;
|
|
284
284
|
}
|
|
285
285
|
if (!appId) {
|
|
286
|
-
|
|
286
|
+
log.info("OpenFox PWA is not installed.");
|
|
287
287
|
console.log("\nInstall it first: openfox pwa install");
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
log.info("Launching OpenFox PWA...");
|
|
291
291
|
spawn("firefoxpwa", ["site", "launch", appId], { stdio: "inherit", windowsHide: true });
|
|
292
292
|
}
|
|
293
293
|
async function pwaUpdate(mode) {
|
|
294
294
|
if (!isFirefoxPwaAvailable()) {
|
|
295
|
-
|
|
295
|
+
log.error("firefoxpwa is not installed or not on your PATH.");
|
|
296
296
|
process.exit(1);
|
|
297
297
|
}
|
|
298
298
|
const manifestUrl = getManifestUrl(mode);
|
|
@@ -303,17 +303,17 @@ async function pwaUpdate(mode) {
|
|
|
303
303
|
if (detected) appId = detected.appId;
|
|
304
304
|
}
|
|
305
305
|
if (!appId) {
|
|
306
|
-
|
|
306
|
+
log.info("OpenFox PWA is not installed.");
|
|
307
307
|
console.log("\nInstall it first: openfox pwa install");
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
try {
|
|
311
311
|
execSync(`firefoxpwa site update ${appId}`, { encoding: "utf-8", windowsHide: true });
|
|
312
312
|
} catch {
|
|
313
|
-
|
|
313
|
+
log.error("Failed to update PWA metadata.");
|
|
314
314
|
process.exit(1);
|
|
315
315
|
}
|
|
316
|
-
|
|
316
|
+
log.info("OpenFox PWA metadata updated.");
|
|
317
317
|
console.log(`
|
|
318
318
|
The manifest is re-fetched automatically on each launch.`);
|
|
319
319
|
console.log(`Launch to pick up OpenFox changes:
|
|
@@ -322,12 +322,12 @@ The manifest is re-fetched automatically on each launch.`);
|
|
|
322
322
|
}
|
|
323
323
|
async function pwaStatus(mode) {
|
|
324
324
|
if (!isFirefoxPwaAvailable()) {
|
|
325
|
-
|
|
325
|
+
log.error("firefoxpwa is not installed or not on your PATH.");
|
|
326
326
|
console.log("\nInstall PWAsForFirefox: https://pwasforfirefox.filips.si/installation/");
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
329
|
if (!isRuntimeInstalled()) {
|
|
330
|
-
|
|
330
|
+
log.warn("Firefox PWA runtime is not installed.");
|
|
331
331
|
console.log(`
|
|
332
332
|
Run: firefoxpwa runtime install`);
|
|
333
333
|
return;
|
|
@@ -340,11 +340,11 @@ Run: firefoxpwa runtime install`);
|
|
|
340
340
|
if (detected) appId = detected.appId;
|
|
341
341
|
}
|
|
342
342
|
if (!appId) {
|
|
343
|
-
|
|
343
|
+
log.info("OpenFox PWA is not installed.");
|
|
344
344
|
console.log("\nInstall it: openfox pwa install");
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
log.info("OpenFox PWA is installed.");
|
|
348
348
|
console.log(`
|
|
349
349
|
App ID: ${appId}`);
|
|
350
350
|
console.log(` Profile ID: ${existing?.profileId ?? "default"}`);
|
|
@@ -360,4 +360,4 @@ export {
|
|
|
360
360
|
runPwaCommand,
|
|
361
361
|
savePwaConfig
|
|
362
362
|
};
|
|
363
|
-
//# sourceMappingURL=pwa-
|
|
363
|
+
//# sourceMappingURL=pwa-XPHP3PY2.js.map
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
resolveDefaultAgentId,
|
|
18
18
|
saveAgent,
|
|
19
19
|
saveAgentToProject
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-6SIX7P6O.js";
|
|
21
|
+
import "./chunk-SPA7PQPJ.js";
|
|
22
22
|
import "./chunk-GLF65XDS.js";
|
|
23
23
|
import "./chunk-K44MW7JJ.js";
|
|
24
24
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -43,4 +43,4 @@ export {
|
|
|
43
43
|
saveAgent,
|
|
44
44
|
saveAgentToProject
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=registry-
|
|
46
|
+
//# sourceMappingURL=registry-M2QVGRNK.js.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XWW7LOU4.js";
|
|
4
|
+
import "./chunk-HZXWVD5A.js";
|
|
5
5
|
import "./chunk-62QCBNPE.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-WHJ67MO2.js";
|
|
7
|
+
import "./chunk-3NVISPE7.js";
|
|
8
|
+
import "./chunk-W2KZ7H55.js";
|
|
9
|
+
import "./chunk-YXIDKMBJ.js";
|
|
10
|
+
import "./chunk-PKLWSTDB.js";
|
|
11
|
+
import "./chunk-B76OP3OE.js";
|
|
12
12
|
import "./chunk-5ZJYEINJ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-J27BLIPY.js";
|
|
14
14
|
import "./chunk-ZASSAZ73.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-TFQSCHVU.js";
|
|
16
16
|
import "./chunk-I72ACQ6R.js";
|
|
17
17
|
import "./chunk-JE7LW7Y6.js";
|
|
18
18
|
import "./chunk-VKWVPQJ5.js";
|
|
19
19
|
import "./chunk-D3SXT3BL.js";
|
|
20
20
|
import "./chunk-J7GAZGZT.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-UADZ2LZJ.js";
|
|
22
|
+
import "./chunk-ERTTKKCE.js";
|
|
23
|
+
import "./chunk-DMI2BXHA.js";
|
|
24
24
|
import "./chunk-27SDWNKL.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-JAX5OEMM.js";
|
|
26
|
+
import "./chunk-EF7KGWF6.js";
|
|
27
|
+
import "./chunk-5VKT34HE.js";
|
|
28
28
|
import "./chunk-WWFH5GAR.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-MLOCSFIW.js";
|
|
32
|
+
import "./chunk-S5HDT5RQ.js";
|
|
33
|
+
import "./chunk-OUMHR7LR.js";
|
|
34
34
|
import {
|
|
35
35
|
loadConfig
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-6SIX7P6O.js";
|
|
37
|
+
import "./chunk-2COWPTSJ.js";
|
|
38
38
|
import "./chunk-J2GP3J3X.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-F766OIDT.js";
|
|
40
40
|
import "./chunk-V4IE7HJY.js";
|
|
41
41
|
import "./chunk-YHEQTVFV.js";
|
|
42
42
|
import "./chunk-HNCM3D7Y.js";
|
|
43
43
|
import "./chunk-KCED2X4H.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-ERKPMNC7.js";
|
|
45
|
+
import "./chunk-SPA7PQPJ.js";
|
|
46
46
|
import "./chunk-GLF65XDS.js";
|
|
47
47
|
import {
|
|
48
48
|
logger
|
|
@@ -220,4 +220,4 @@ async function runServe(options) {
|
|
|
220
220
|
export {
|
|
221
221
|
runServe
|
|
222
222
|
};
|
|
223
|
-
//# sourceMappingURL=serve-
|
|
223
|
+
//# sourceMappingURL=serve-NPS4GJWH.js.map
|