pinomad 0.12.0 → 0.14.0
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/dist/chunk-0dh2k3er.js +43 -0
- package/dist/{chunk-47ff1d1t.js → chunk-1mjbt2z2.js} +191 -11
- package/dist/{chunk-7wj0jh3t.js → chunk-1rdbnvy6.js} +1 -1
- package/dist/{chunk-ksfxqd8s.js → chunk-35szq73k.js} +2682 -459
- package/dist/{chunk-mnmqyq7d.js → chunk-5j7ybhjj.js} +1984 -333
- package/dist/{chunk-agq4tn9r.js → chunk-5pv0g1nj.js} +12 -10
- package/dist/{chunk-7mn38n4f.js → chunk-63ymn5c9.js} +2 -2
- package/dist/{chunk-nppgxh6c.js → chunk-6j6hkfbj.js} +8 -4
- package/dist/{chunk-pqe7q1s7.js → chunk-6vbp1vva.js} +2 -1
- package/dist/{chunk-g3ahp7b9.js → chunk-9trbbz4r.js} +1 -1
- package/dist/{chunk-gg2dcqbg.js → chunk-b0nwq1dt.js} +29 -12
- package/dist/chunk-dsr19q5h.js +23 -0
- package/dist/{chunk-41q0saz0.js → chunk-e53c0s8z.js} +9 -7
- package/dist/{chunk-np4jd070.js → chunk-e59k3bmz.js} +307 -56
- package/dist/chunk-eerpgvy9.js +315 -0
- package/dist/chunk-eewxy4cp.js +240 -0
- package/dist/{chunk-vqkb70d7.js → chunk-evbv1fkn.js} +3 -3
- package/dist/{chunk-vx7dy07y.js → chunk-ex5yr09h.js} +11 -6
- package/dist/{chunk-t91zt5f0.js → chunk-hg9gs396.js} +1 -1
- package/dist/{chunk-aqj9wfmb.js → chunk-mtkvft88.js} +1 -1
- package/dist/{chunk-t5abqsva.js → chunk-mxwcnnkg.js} +15 -305
- package/dist/{chunk-5qf1grkk.js → chunk-w927q9m1.js} +52 -16
- package/dist/pinomad.js +12 -12
- package/package.json +16 -11
- package/web/assets/{core-DnpzcQzs.js → core-BWHGsFpV.js} +1 -1
- package/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/web/assets/{highlighted-diff-Dn5ifsvK.js → highlighted-diff-DJ7KZCpS.js} +2 -2
- package/web/assets/{highlights-DnHv6NBM.js → highlights-CyEmo6OI.js} +1 -1
- package/web/assets/{highlights-themes-CUdrlZk3.js → highlights-themes-CSNkBojy.js} +1 -1
- package/web/assets/index-C_qkbyL7.css +1 -0
- package/web/assets/index-DefQtCI2.js +396 -0
- package/web/assets/{shiki-BuPP5HCg.js → shiki-BzCmRG-v.js} +2 -2
- package/web/assets/{shiki-langs-FJk0v0Ga.js → shiki-langs-DOkjyV4d.js} +1 -1
- package/web/assets/{stream-tokenizer-Bl6bisIa.js → stream-tokenizer-CBPqFe4Z.js} +1 -1
- package/web/assets/{theming-themes-BL_CC-Mm.js → theming-themes-wKVca0aB.js} +1 -1
- package/web/assets/{xterm-view-ZsuzJb2C.js → xterm-view-CKa1-QCM.js} +12 -12
- package/web/index.html +3 -2
- package/web/theme-boot.js +11 -0
- package/dist/chunk-42nqtx5r.js +0 -22
- package/dist/chunk-jeqsdcj1.js +0 -96
- package/web/assets/index-BV0ecolo.css +0 -1
- package/web/assets/index-DNsTTgPE.js +0 -396
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
assertSecureServerOrigin,
|
|
4
4
|
probeServerAccounts,
|
|
5
5
|
runServerOperation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-63ymn5c9.js";
|
|
7
7
|
import {
|
|
8
8
|
loadHostKey,
|
|
9
9
|
loadRelayKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-hg9gs396.js";
|
|
11
11
|
import {
|
|
12
12
|
readRemovalNotice,
|
|
13
13
|
readServerConfig,
|
|
@@ -15,23 +15,25 @@ import {
|
|
|
15
15
|
} from "./chunk-nq57fdnq.js";
|
|
16
16
|
import {
|
|
17
17
|
relayHostId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-9trbbz4r.js";
|
|
19
|
+
import {
|
|
20
|
+
restartService
|
|
21
|
+
} from "./chunk-eerpgvy9.js";
|
|
22
|
+
import"./chunk-e59k3bmz.js";
|
|
23
|
+
import"./chunk-kzbzacz9.js";
|
|
19
24
|
import {
|
|
20
25
|
argValue,
|
|
21
|
-
restartService,
|
|
22
26
|
serviceManager,
|
|
23
27
|
withoutRelayArgs
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import"./chunk-
|
|
26
|
-
import"./chunk-
|
|
27
|
-
import"./chunk-47ff1d1t.js";
|
|
28
|
-
import"./chunk-pqe7q1s7.js";
|
|
28
|
+
} from "./chunk-mxwcnnkg.js";
|
|
29
|
+
import"./chunk-1mjbt2z2.js";
|
|
30
|
+
import"./chunk-6vbp1vva.js";
|
|
29
31
|
import {
|
|
30
32
|
DEFAULT_DATA_DIR
|
|
31
33
|
} from "./chunk-ngf1zatm.js";
|
|
32
34
|
import {
|
|
33
35
|
commandHint
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-1rdbnvy6.js";
|
|
35
37
|
import"./chunk-df32avw6.js";
|
|
36
38
|
|
|
37
39
|
// apps/host/src/cli/leave.ts
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
relayWsBase,
|
|
7
7
|
signRelayChallenge,
|
|
8
8
|
signRelayChallengeV2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-9trbbz4r.js";
|
|
10
10
|
import {
|
|
11
11
|
toBase64Url
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6vbp1vva.js";
|
|
13
13
|
|
|
14
14
|
// apps/host/src/cli/server-ops.ts
|
|
15
15
|
import { WebSocket } from "ws";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
RTC_DEFAULT_STUN
|
|
3
|
-
|
|
2
|
+
RTC_DEFAULT_STUN,
|
|
3
|
+
isAutoUpgradeMode
|
|
4
|
+
} from "./chunk-1mjbt2z2.js";
|
|
4
5
|
import {
|
|
5
6
|
HOST_SETTING_KEYS,
|
|
6
7
|
cleanHostName,
|
|
7
8
|
isQueueMode,
|
|
8
9
|
isThinkingLevel,
|
|
9
10
|
normalizeHostName
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6vbp1vva.js";
|
|
11
12
|
|
|
12
13
|
// apps/host/src/host-value.ts
|
|
13
14
|
function constantValue(value) {
|
|
@@ -70,10 +71,12 @@ var fileValueError = (key, value, models) => {
|
|
|
70
71
|
return Array.isArray(value) && value.every((entry) => typeof entry === "string" && entry !== "") ? undefined : "malformed";
|
|
71
72
|
case "hostName":
|
|
72
73
|
return typeof value === "string" ? undefined : "malformed";
|
|
74
|
+
case "autoUpgrade":
|
|
75
|
+
return isAutoUpgradeMode(value) ? undefined : "malformed";
|
|
73
76
|
}
|
|
74
77
|
};
|
|
75
78
|
var sameModel = (a, b) => a === b || a !== null && b !== null && a.provider === b.provider && a.modelId === b.modelId;
|
|
76
|
-
var sameSettings = (a, b) => a.steeringMode === b.steeringMode && a.followUpMode === b.followUpMode && a.acceptAccountDevices === b.acceptAccountDevices && a.defaultThinkingLevel === b.defaultThinkingLevel && sameModel(a.defaultModel, b.defaultModel) && (a.rtcStun === undefined || b.rtcStun === undefined ? a.rtcStun === b.rtcStun : sameList(a.rtcStun, b.rtcStun, (x, y) => x === y)) && a.hostName === b.hostName && sameList(a.custom, b.custom, (x, y) => x === y);
|
|
79
|
+
var sameSettings = (a, b) => a.steeringMode === b.steeringMode && a.followUpMode === b.followUpMode && a.acceptAccountDevices === b.acceptAccountDevices && a.defaultThinkingLevel === b.defaultThinkingLevel && sameModel(a.defaultModel, b.defaultModel) && (a.rtcStun === undefined || b.rtcStun === undefined ? a.rtcStun === b.rtcStun : sameList(a.rtcStun, b.rtcStun, (x, y) => x === y)) && a.hostName === b.hostName && a.autoUpgrade === b.autoUpgrade && sameList(a.custom, b.custom, (x, y) => x === y);
|
|
77
80
|
var parse = (path, text) => {
|
|
78
81
|
let parsed;
|
|
79
82
|
try {
|
|
@@ -120,6 +123,7 @@ async function openHostSettings(options) {
|
|
|
120
123
|
acceptAccountDevices: fileValues.acceptAccountDevices ?? true,
|
|
121
124
|
rtcStun: fileValues.rtcStun ?? RTC_DEFAULT_STUN,
|
|
122
125
|
hostName: normalizeHostName(fileValues.hostName ?? hostname()),
|
|
126
|
+
autoUpgrade: fileValues.autoUpgrade ?? "notify",
|
|
123
127
|
custom
|
|
124
128
|
};
|
|
125
129
|
};
|
|
@@ -82,7 +82,8 @@ var HOST_SETTING_KEY_SET = {
|
|
|
82
82
|
followUpMode: true,
|
|
83
83
|
acceptAccountDevices: true,
|
|
84
84
|
rtcStun: true,
|
|
85
|
-
hostName: true
|
|
85
|
+
hostName: true,
|
|
86
|
+
autoUpgrade: true
|
|
86
87
|
};
|
|
87
88
|
var HOST_SETTING_KEYS = Object.keys(HOST_SETTING_KEY_SET);
|
|
88
89
|
var THINKING_LEVEL_KEYS = { off: true, minimal: true, low: true, medium: true, high: true, xhigh: true, max: true };
|
|
@@ -3,39 +3,41 @@ import {
|
|
|
3
3
|
isSecureServerOrigin,
|
|
4
4
|
probeServerAccounts,
|
|
5
5
|
runServerOperation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-63ymn5c9.js";
|
|
7
7
|
import {
|
|
8
8
|
constantValue,
|
|
9
9
|
openHostSettings
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6j6hkfbj.js";
|
|
11
11
|
import {
|
|
12
12
|
loadHostKey,
|
|
13
13
|
loadRelayKey
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-hg9gs396.js";
|
|
15
15
|
import {
|
|
16
16
|
writeServerConfig
|
|
17
17
|
} from "./chunk-nq57fdnq.js";
|
|
18
18
|
import {
|
|
19
19
|
relayHostId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-9trbbz4r.js";
|
|
21
|
+
import {
|
|
22
|
+
restartService
|
|
23
|
+
} from "./chunk-eerpgvy9.js";
|
|
21
24
|
import {
|
|
22
25
|
argValue,
|
|
23
26
|
installSpec,
|
|
24
|
-
restartService,
|
|
25
27
|
serviceManager,
|
|
26
28
|
withoutRelayArgs
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-mxwcnnkg.js";
|
|
28
30
|
import {
|
|
29
31
|
cleanHostName,
|
|
30
32
|
normalizeHostName
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6vbp1vva.js";
|
|
32
34
|
import {
|
|
33
35
|
DEFAULT_DATA_DIR
|
|
34
36
|
} from "./chunk-ngf1zatm.js";
|
|
35
37
|
import {
|
|
36
38
|
commandHint,
|
|
37
39
|
hostEntry
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-1rdbnvy6.js";
|
|
39
41
|
|
|
40
42
|
// apps/host/src/cli/join.ts
|
|
41
43
|
import { mkdir } from "node:fs/promises";
|
|
@@ -315,6 +317,7 @@ async function requestJoinToken(args, deps) {
|
|
|
315
317
|
}
|
|
316
318
|
|
|
317
319
|
// apps/host/src/cli/service-slot.ts
|
|
320
|
+
import { existsSync } from "node:fs";
|
|
318
321
|
import { homedir } from "node:os";
|
|
319
322
|
import { resolve } from "node:path";
|
|
320
323
|
async function openServiceSlot(dataDir, manager) {
|
|
@@ -325,8 +328,19 @@ async function openServiceSlot(dataDir, manager) {
|
|
|
325
328
|
}
|
|
326
329
|
return { dataDir, manager, state, previous };
|
|
327
330
|
}
|
|
331
|
+
function launcherFor(given, previous) {
|
|
332
|
+
if (given !== undefined)
|
|
333
|
+
return given;
|
|
334
|
+
const installed = previous?.launcher;
|
|
335
|
+
return installed !== undefined && existsSync(installed) ? installed : undefined;
|
|
336
|
+
}
|
|
328
337
|
async function writeService(slot, edit, options) {
|
|
329
338
|
const { dataDir, manager, previous } = slot;
|
|
339
|
+
const launcher = launcherFor(options.launcher, previous);
|
|
340
|
+
const withLauncher = (spec2) => {
|
|
341
|
+
const { launcher: _, ...rest } = spec2;
|
|
342
|
+
return launcher === undefined ? rest : { ...rest, launcher };
|
|
343
|
+
};
|
|
330
344
|
const fresh = installSpec(["--data-dir", dataDir, ...edit([])], {
|
|
331
345
|
execPath: process.execPath,
|
|
332
346
|
env: process.env,
|
|
@@ -336,11 +350,11 @@ async function writeService(slot, edit, options) {
|
|
|
336
350
|
entryArgs: hostEntry.args
|
|
337
351
|
});
|
|
338
352
|
if (!slot.state.installed) {
|
|
339
|
-
await manager.install(fresh);
|
|
353
|
+
await manager.install(withLauncher(fresh));
|
|
340
354
|
return "installed";
|
|
341
355
|
}
|
|
342
|
-
const spec = previous === undefined ? fresh : { ...previous, hostArgs: edit(previous.hostArgs) };
|
|
343
|
-
const same = previous !== undefined && spec.hostArgs.join("\x00") === previous.hostArgs.join("\x00");
|
|
356
|
+
const spec = withLauncher(previous === undefined ? fresh : { ...previous, hostArgs: edit(previous.hostArgs) });
|
|
357
|
+
const same = previous !== undefined && spec.hostArgs.join("\x00") === previous.hostArgs.join("\x00") && spec.launcher === previous.launcher;
|
|
344
358
|
if (same && !options.changed && slot.state.running)
|
|
345
359
|
return "unchanged";
|
|
346
360
|
const port = argValue(spec.hostArgs, "--port");
|
|
@@ -409,7 +423,10 @@ async function joinServer(args, deps) {
|
|
|
409
423
|
if (args.name !== undefined)
|
|
410
424
|
await settings.update({ hostName: args.name });
|
|
411
425
|
const edit = args.editHostArgs ?? ((hostArgs) => hostArgs);
|
|
412
|
-
service = await writeService(slot, (hostArgs) => edit(withoutRelayArgs(hostArgs)), {
|
|
426
|
+
service = await writeService(slot, (hostArgs) => edit(withoutRelayArgs(hostArgs)), {
|
|
427
|
+
changed: true,
|
|
428
|
+
launcher: args.launcher
|
|
429
|
+
});
|
|
413
430
|
} catch (error) {
|
|
414
431
|
throw new Error(`joined ${username} at ${origin}, but local setup failed: ${message(error)}
|
|
415
432
|
` + (args.token === undefined ? `run the command again and confirm it again (re-joining the same host is safe)` : `generate a fresh join token and run the command again (re-joining the same host is safe)`));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
joinServer,
|
|
4
|
+
main
|
|
5
|
+
} from "./chunk-b0nwq1dt.js";
|
|
6
|
+
import"./chunk-63ymn5c9.js";
|
|
7
|
+
import"./chunk-6j6hkfbj.js";
|
|
8
|
+
import"./chunk-hg9gs396.js";
|
|
9
|
+
import"./chunk-nq57fdnq.js";
|
|
10
|
+
import"./chunk-9trbbz4r.js";
|
|
11
|
+
import"./chunk-eerpgvy9.js";
|
|
12
|
+
import"./chunk-e59k3bmz.js";
|
|
13
|
+
import"./chunk-kzbzacz9.js";
|
|
14
|
+
import"./chunk-mxwcnnkg.js";
|
|
15
|
+
import"./chunk-1mjbt2z2.js";
|
|
16
|
+
import"./chunk-6vbp1vva.js";
|
|
17
|
+
import"./chunk-ngf1zatm.js";
|
|
18
|
+
import"./chunk-1rdbnvy6.js";
|
|
19
|
+
import"./chunk-df32avw6.js";
|
|
20
|
+
export {
|
|
21
|
+
main,
|
|
22
|
+
joinServer
|
|
23
|
+
};
|
|
@@ -4,21 +4,23 @@ import {
|
|
|
4
4
|
readServerConfig
|
|
5
5
|
} from "./chunk-nq57fdnq.js";
|
|
6
6
|
import {
|
|
7
|
-
argValue,
|
|
8
7
|
reachabilityLine,
|
|
9
|
-
serviceManager,
|
|
10
8
|
versionLine
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import"./chunk-
|
|
9
|
+
} from "./chunk-eerpgvy9.js";
|
|
10
|
+
import"./chunk-e59k3bmz.js";
|
|
13
11
|
import"./chunk-kzbzacz9.js";
|
|
14
|
-
import
|
|
15
|
-
|
|
12
|
+
import {
|
|
13
|
+
argValue,
|
|
14
|
+
serviceManager
|
|
15
|
+
} from "./chunk-mxwcnnkg.js";
|
|
16
|
+
import"./chunk-1mjbt2z2.js";
|
|
17
|
+
import"./chunk-6vbp1vva.js";
|
|
16
18
|
import {
|
|
17
19
|
DEFAULT_DATA_DIR
|
|
18
20
|
} from "./chunk-ngf1zatm.js";
|
|
19
21
|
import {
|
|
20
22
|
commandHint
|
|
21
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-1rdbnvy6.js";
|
|
22
24
|
import"./chunk-df32avw6.js";
|
|
23
25
|
|
|
24
26
|
// apps/host/src/cli/status.ts
|