@bendyline/gezel-cli 1.2.4 → 1.2.6
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/README.md +312 -309
- package/dist/app-author-command.js +4 -2
- package/dist/app-command.js +4 -2
- package/dist/bin/gezel-main.js +775 -83
- package/dist/handboek-export.js +7 -9
- package/dist/knowledge-command.js +4 -2
- package/dist/tui/index.js +96 -59
- package/package.json +11 -11
package/dist/handboek-export.js
CHANGED
|
@@ -292,15 +292,14 @@ function modelCatalogMarkdown(chat, images, videos) {
|
|
|
292
292
|
"",
|
|
293
293
|
`## Image models (${images.length})`,
|
|
294
294
|
"",
|
|
295
|
-
"Models your crew can use to draw pictures, icons and illustrations.",
|
|
295
|
+
"Models your crew can use to draw pictures, icons and illustrations. Gezel works out what each one needs from its files and offers only the ones your machine can run.",
|
|
296
296
|
"",
|
|
297
|
-
"| Model | Size |
|
|
298
|
-
"| --- | --- | --- | --- |
|
|
297
|
+
"| Model | Size | Commercial use | License |",
|
|
298
|
+
"| --- | --- | --- | --- |",
|
|
299
299
|
...images.map(
|
|
300
300
|
(m) => row([
|
|
301
301
|
link(m.name, m.upstream),
|
|
302
302
|
formatGB(m.approxSizeBytes),
|
|
303
|
-
m.minRamGB ? `${m.minRamGB} GB` : "",
|
|
304
303
|
yesNo(m.commercialUse),
|
|
305
304
|
cell(m.licenseShortName ?? m.license ?? "")
|
|
306
305
|
])
|
|
@@ -312,16 +311,15 @@ function modelCatalogMarkdown(chat, images, videos) {
|
|
|
312
311
|
"",
|
|
313
312
|
`## Video models (${videos.length})`,
|
|
314
313
|
"",
|
|
315
|
-
"Models that turn a prompt or a picture into a short clip.",
|
|
314
|
+
"Models that turn a prompt or a picture into a short clip. Gezel works out what each one needs from its files and offers only the ones your machine can run.",
|
|
316
315
|
"",
|
|
317
|
-
"| Model | Size | Longest clip |
|
|
318
|
-
"| --- | --- | --- | --- | --- |
|
|
316
|
+
"| Model | Size | Longest clip | Commercial use | License |",
|
|
317
|
+
"| --- | --- | --- | --- | --- |",
|
|
319
318
|
...videos.map(
|
|
320
319
|
(m) => row([
|
|
321
320
|
link(m.name, m.upstream),
|
|
322
321
|
formatGB(m.approxSizeBytes),
|
|
323
322
|
m.maxDurationSeconds ? `${m.maxDurationSeconds} s` : "",
|
|
324
|
-
m.minVramGB ? `${m.minVramGB} GB` : "",
|
|
325
323
|
yesNo(m.commercialUse),
|
|
326
324
|
cell(m.licenseShortName ?? m.license ?? "")
|
|
327
325
|
])
|
|
@@ -577,7 +575,7 @@ var BASELINE_CSS = `:root {
|
|
|
577
575
|
--hb-ink-warm: #2a2520;
|
|
578
576
|
--hb-ink-muted: #5a4f42;
|
|
579
577
|
--hb-ink-quiet: #8b7e6b;
|
|
580
|
-
--hb-sage: #
|
|
578
|
+
--hb-sage: #5c6a4a;
|
|
581
579
|
--hb-sage-forest: #3d4d3a;
|
|
582
580
|
--hb-cream-ink: #f3ede0;
|
|
583
581
|
--hb-accent: #b0724c;
|
|
@@ -35,9 +35,11 @@ import { chmod, mkdir, readFile, realpath, rm, writeFile } from "fs/promises";
|
|
|
35
35
|
import { homedir } from "os";
|
|
36
36
|
import { basename, dirname, join, resolve } from "path";
|
|
37
37
|
import {
|
|
38
|
+
evaluateApiCompat,
|
|
38
39
|
getLogLevel,
|
|
39
40
|
getLogOutput,
|
|
40
|
-
|
|
41
|
+
gezelNamesInUse,
|
|
42
|
+
pickUnusedGezelName,
|
|
41
43
|
projectLeadGezelId,
|
|
42
44
|
setLogLevel,
|
|
43
45
|
setLogOutput
|
|
@@ -63,7 +65,7 @@ import {
|
|
|
63
65
|
stopOwnedDaemon,
|
|
64
66
|
systemSharedAssetsDir
|
|
65
67
|
} from "@bendyline/gezel-client/node";
|
|
66
|
-
import { gezelPaths } from "@bendyline/gezel/paths";
|
|
68
|
+
import { gezelHome, gezelPaths, nativePayloadVerificationPath } from "@bendyline/gezel/paths";
|
|
67
69
|
var CliError = class extends Error {
|
|
68
70
|
constructor(message) {
|
|
69
71
|
super(message);
|
package/dist/tui/index.js
CHANGED
|
@@ -5,7 +5,8 @@ import { render } from "ink";
|
|
|
5
5
|
|
|
6
6
|
// src/tui/App.tsx
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
gezelNamesInUse as gezelNamesInUse2,
|
|
9
|
+
pickUnusedGezelName as pickUnusedGezelName2
|
|
9
10
|
} from "@bendyline/gezel";
|
|
10
11
|
import { Box as Box6, Text as Text6, useApp, useInput as useInput4, useStdout } from "ink";
|
|
11
12
|
import { useCallback as useCallback2, useEffect as useEffect4, useMemo, useRef as useRef3, useState as useState5 } from "react";
|
|
@@ -16,9 +17,11 @@ import { chmod, mkdir, readFile, realpath, rm, writeFile } from "fs/promises";
|
|
|
16
17
|
import { homedir } from "os";
|
|
17
18
|
import { basename, dirname, join, resolve } from "path";
|
|
18
19
|
import {
|
|
20
|
+
evaluateApiCompat,
|
|
19
21
|
getLogLevel,
|
|
20
22
|
getLogOutput,
|
|
21
|
-
|
|
23
|
+
gezelNamesInUse,
|
|
24
|
+
pickUnusedGezelName,
|
|
22
25
|
projectLeadGezelId,
|
|
23
26
|
setLogLevel,
|
|
24
27
|
setLogOutput
|
|
@@ -44,7 +47,7 @@ import {
|
|
|
44
47
|
stopOwnedDaemon,
|
|
45
48
|
systemSharedAssetsDir
|
|
46
49
|
} from "@bendyline/gezel-client/node";
|
|
47
|
-
import { gezelPaths } from "@bendyline/gezel/paths";
|
|
50
|
+
import { gezelHome, gezelPaths, nativePayloadVerificationPath } from "@bendyline/gezel/paths";
|
|
48
51
|
var CliError = class extends Error {
|
|
49
52
|
constructor(message) {
|
|
50
53
|
super(message);
|
|
@@ -69,7 +72,7 @@ async function ensureCliProjectLead(client, projectId) {
|
|
|
69
72
|
(gezel) => gezel.templateId === "builder" || gezel.role?.trim().toLowerCase() === "builder"
|
|
70
73
|
);
|
|
71
74
|
if (!builder) {
|
|
72
|
-
const { name, gender } =
|
|
75
|
+
const { name, gender } = pickUnusedGezelName(gezelNamesInUse(gezels2));
|
|
73
76
|
builder = await client.createGezelFromTemplate("builder", { name, gender });
|
|
74
77
|
}
|
|
75
78
|
const updated2 = await client.updateProject(projectId, { voormanGezelId: builder.id });
|
|
@@ -84,7 +87,7 @@ async function ensureCliProjectLead(client, projectId) {
|
|
|
84
87
|
(gezel) => gezel.templateId === "voorman" || gezel.role?.trim().toLowerCase() === "voorman"
|
|
85
88
|
);
|
|
86
89
|
if (!voorman) {
|
|
87
|
-
const { name, gender } =
|
|
90
|
+
const { name, gender } = pickUnusedGezelName(gezelNamesInUse(gezels));
|
|
88
91
|
voorman = await client.createGezelFromTemplate("voorman", { name, gender });
|
|
89
92
|
}
|
|
90
93
|
const updated = await client.updateProject(projectId, { voormanGezelId: voorman.id });
|
|
@@ -2501,9 +2504,12 @@ import {
|
|
|
2501
2504
|
formatModelAttribution,
|
|
2502
2505
|
isMoEFromTags,
|
|
2503
2506
|
isRecommendedModel,
|
|
2504
|
-
|
|
2507
|
+
lowBitScoreFactor,
|
|
2505
2508
|
pickRecommendedModel
|
|
2506
2509
|
} from "@bendyline/gezel";
|
|
2510
|
+
function fitVerdicts(res) {
|
|
2511
|
+
return res ? new Map(res.models.map((m) => [m.id, m.verdict])) : null;
|
|
2512
|
+
}
|
|
2507
2513
|
var CHAT_MEMORY_OVERHEAD = {
|
|
2508
2514
|
"llama-cpp": 1.2,
|
|
2509
2515
|
mlx: 1.3
|
|
@@ -2514,7 +2520,17 @@ var NATIVE_TOOLKIT = [
|
|
|
2514
2520
|
"whisper-server",
|
|
2515
2521
|
"llama-server"
|
|
2516
2522
|
];
|
|
2517
|
-
function
|
|
2523
|
+
function recoDevice(memory) {
|
|
2524
|
+
return {
|
|
2525
|
+
platform: memory.platform,
|
|
2526
|
+
gpuVramBytes: memory.gpuVramBytes,
|
|
2527
|
+
...memory.gpuMemoryKind ? { gpuMemoryKind: memory.gpuMemoryKind } : {},
|
|
2528
|
+
totalRamBytes: memory.totalRamBytes,
|
|
2529
|
+
usableBytes: memory.usableBytes,
|
|
2530
|
+
...memory.budgetBytes !== void 0 ? { budgetBytes: memory.budgetBytes } : {}
|
|
2531
|
+
};
|
|
2532
|
+
}
|
|
2533
|
+
function chatModelCandidates(items, device, provider) {
|
|
2518
2534
|
const candidates = [];
|
|
2519
2535
|
for (const item of items) {
|
|
2520
2536
|
if (item.manifest.kind !== "chat-model") continue;
|
|
@@ -2540,10 +2556,29 @@ function rankChatModels(items, device, provider) {
|
|
|
2540
2556
|
// Effective score: a model the shared gate rejects (restricted license,
|
|
2541
2557
|
// no tool support) sorts as unscored rather than leading the list.
|
|
2542
2558
|
recoScore: isRecommendedModel(manifest) ? manifest.recoScore ?? 0 : 0,
|
|
2559
|
+
...source.quantization ? { quantization: source.quantization } : {},
|
|
2543
2560
|
fit,
|
|
2544
2561
|
attribution: formatModelAttribution(manifest)
|
|
2545
2562
|
});
|
|
2546
2563
|
}
|
|
2564
|
+
return candidates;
|
|
2565
|
+
}
|
|
2566
|
+
function orderInstalledChatModels(installed, ranked, candidates) {
|
|
2567
|
+
const fit = new Map(candidates.map((model) => [model.id, model.fit]));
|
|
2568
|
+
const position = (id) => {
|
|
2569
|
+
const index = ranked.findIndex((model) => model.id === id);
|
|
2570
|
+
return index < 0 ? Number.POSITIVE_INFINITY : index;
|
|
2571
|
+
};
|
|
2572
|
+
const cannotRun = (id) => fit.get(id) === "too-big" ? 1 : 0;
|
|
2573
|
+
return [...installed].sort(
|
|
2574
|
+
(a, b) => cannotRun(a.id) - cannotRun(b.id) || position(a.id) - position(b.id)
|
|
2575
|
+
);
|
|
2576
|
+
}
|
|
2577
|
+
function runsHere(id, candidates) {
|
|
2578
|
+
return candidates.find((model) => model.id === id)?.fit !== "too-big";
|
|
2579
|
+
}
|
|
2580
|
+
function rankChatModels(items, device, provider) {
|
|
2581
|
+
const candidates = chatModelCandidates(items, device, provider);
|
|
2547
2582
|
if (candidates.length === 0) return [];
|
|
2548
2583
|
const picked = pickRecommendedModel(
|
|
2549
2584
|
candidates.map((model) => ({
|
|
@@ -2551,7 +2586,8 @@ function rankChatModels(items, device, provider) {
|
|
|
2551
2586
|
...model.recoScore > 0 ? { recoScore: model.recoScore } : {},
|
|
2552
2587
|
licenseClass: "open",
|
|
2553
2588
|
tags: items.find((item) => item.manifest.kind === "chat-model" && item.manifest.id === model.id)?.manifest?.tags ?? [],
|
|
2554
|
-
residentBytes: model.residentBytes
|
|
2589
|
+
residentBytes: model.residentBytes,
|
|
2590
|
+
...model.quantization ? { quantization: model.quantization } : {}
|
|
2555
2591
|
})),
|
|
2556
2592
|
device
|
|
2557
2593
|
);
|
|
@@ -2559,8 +2595,9 @@ function rankChatModels(items, device, provider) {
|
|
|
2559
2595
|
(model) => model.fit === "fits" || model.fit === "fits-offload"
|
|
2560
2596
|
);
|
|
2561
2597
|
const pool = comfortable.length > 0 ? comfortable : candidates;
|
|
2598
|
+
const ranked = (model) => model.recoScore * lowBitScoreFactor(model.quantization);
|
|
2562
2599
|
pool.sort(
|
|
2563
|
-
(a, b) => b
|
|
2600
|
+
(a, b) => ranked(b) - ranked(a) || fitOrder(a.fit) - fitOrder(b.fit) || b.residentBytes - a.residentBytes || a.name.localeCompare(b.name)
|
|
2564
2601
|
);
|
|
2565
2602
|
if (!picked) return pool;
|
|
2566
2603
|
const bestIndex = pool.findIndex((model) => model.id === picked.id);
|
|
@@ -2578,15 +2615,15 @@ function rankChatModels(items, device, provider) {
|
|
|
2578
2615
|
function bootstrapChatModelLabel(model) {
|
|
2579
2616
|
return `${model.name} (${model.attribution})`;
|
|
2580
2617
|
}
|
|
2581
|
-
function pickAccessoryModels(input
|
|
2618
|
+
function pickAccessoryModels(input) {
|
|
2582
2619
|
const output = [];
|
|
2583
|
-
const image = pickCatalogMedia(input.imageItems,
|
|
2620
|
+
const image = pickCatalogMedia(input.imageItems, input.fit.image);
|
|
2584
2621
|
if (image && !input.installed.image?.has(image.id)) {
|
|
2585
2622
|
output.push({
|
|
2586
2623
|
kind: "image",
|
|
2587
2624
|
id: image.id,
|
|
2588
2625
|
name: image.name,
|
|
2589
|
-
approxSizeBytes: image.approxSizeBytes + (image.auxiliaryFiles ?? []).reduce((sum, file) => sum + (file.
|
|
2626
|
+
approxSizeBytes: image.approxSizeBytes + (image.auxiliaryFiles ?? []).reduce((sum, file) => sum + (file.approxSizeBytes ?? 0), 0),
|
|
2590
2627
|
requiredEngine: "sd-server"
|
|
2591
2628
|
});
|
|
2592
2629
|
}
|
|
@@ -2619,7 +2656,7 @@ function pickAccessoryModels(input, device) {
|
|
|
2619
2656
|
approxSizeBytes: tts.approxSizeBytes
|
|
2620
2657
|
});
|
|
2621
2658
|
}
|
|
2622
|
-
const video = pickCatalogMedia(input.videoItems,
|
|
2659
|
+
const video = pickCatalogMedia(input.videoItems, input.fit.video);
|
|
2623
2660
|
if (video && !input.installed.video?.has(video.id)) {
|
|
2624
2661
|
output.push({
|
|
2625
2662
|
kind: "video",
|
|
@@ -2647,14 +2684,8 @@ function fitOrder(fit) {
|
|
|
2647
2684
|
return 3;
|
|
2648
2685
|
}
|
|
2649
2686
|
}
|
|
2650
|
-
function pickCatalogMedia(items,
|
|
2651
|
-
const models = items.map((item) => item.manifest).filter((model) =>
|
|
2652
|
-
if (model.licenseClass !== "open" || !model.recoScore) return false;
|
|
2653
|
-
return mediaModelFits(
|
|
2654
|
-
device,
|
|
2655
|
-
kind === "image" ? { minRamGB: model.minRamGB } : { minVramGB: model.minVramGB }
|
|
2656
|
-
);
|
|
2657
|
-
});
|
|
2687
|
+
function pickCatalogMedia(items, verdicts) {
|
|
2688
|
+
const models = items.map((item) => item.manifest).filter((model) => isRecommendedModel(model) && verdicts?.get(model.id) === "fits");
|
|
2658
2689
|
return pickScoredOpen(models);
|
|
2659
2690
|
}
|
|
2660
2691
|
function pickScoredOpen(models, requireLicense = true) {
|
|
@@ -3251,7 +3282,8 @@ function App(props) {
|
|
|
3251
3282
|
async (templateId) => {
|
|
3252
3283
|
note(`recruiting ${templateId}\u2026`);
|
|
3253
3284
|
try {
|
|
3254
|
-
const {
|
|
3285
|
+
const { gezels: roster } = await client.listGezels();
|
|
3286
|
+
const { name, gender } = pickUnusedGezelName2(gezelNamesInUse2(roster));
|
|
3255
3287
|
const gezel = await client.createGezelFromTemplate(templateId, { name, gender });
|
|
3256
3288
|
await refreshGezels();
|
|
3257
3289
|
note(`${gezel.name} joined the project as ${gezel.role ?? templateId}.`);
|
|
@@ -4684,6 +4716,7 @@ import { Box as Box7, Text as Text7, useApp as useApp2, useInput as useInput5 }
|
|
|
4684
4716
|
import { useCallback as useCallback3, useEffect as useEffect5, useState as useState6 } from "react";
|
|
4685
4717
|
|
|
4686
4718
|
// src/run-readiness.ts
|
|
4719
|
+
import { resolveOnDeviceProvider as resolveOnDeviceProvider2 } from "@bendyline/gezel/native";
|
|
4687
4720
|
async function settledFirstRunConfig(client, options = {}) {
|
|
4688
4721
|
const attempts = options.attempts ?? 12;
|
|
4689
4722
|
const delayMs = options.delayMs ?? 250;
|
|
@@ -4734,7 +4767,9 @@ function BootstrapGate(props) {
|
|
|
4734
4767
|
installedVideo,
|
|
4735
4768
|
installedStt,
|
|
4736
4769
|
installedTts,
|
|
4737
|
-
installedRecognition
|
|
4770
|
+
installedRecognition,
|
|
4771
|
+
imageFit,
|
|
4772
|
+
videoFit
|
|
4738
4773
|
] = await Promise.all([
|
|
4739
4774
|
client.listCatalogItems("image-model").catch(() => ({ items: [] })),
|
|
4740
4775
|
client.listCatalogItems("video-model").catch(() => ({ items: [] })),
|
|
@@ -4744,15 +4779,24 @@ function BootstrapGate(props) {
|
|
|
4744
4779
|
client.listInstalledVideoModels().catch(() => ({ models: [] })),
|
|
4745
4780
|
client.listInstalledSttModels().catch(() => ({ models: [] })),
|
|
4746
4781
|
client.listInstalledTtsModels().catch(() => ({ models: [] })),
|
|
4747
|
-
client.listInstalledRecognitionModels().catch(() => ({ models: [] }))
|
|
4782
|
+
client.listInstalledRecognitionModels().catch(() => ({ models: [] })),
|
|
4783
|
+
client.getImageModelFit().catch(() => null),
|
|
4784
|
+
client.getVideoModelFit().catch(() => null)
|
|
4748
4785
|
]);
|
|
4749
4786
|
const installedIds = new Set(installedChat.models.map((model) => model.id));
|
|
4787
|
+
const candidates = chatModelCandidates(context.chatCatalog, context.device, context.provider);
|
|
4750
4788
|
const rankedChatModels = rankChatModels(
|
|
4751
4789
|
context.chatCatalog,
|
|
4752
4790
|
context.device,
|
|
4753
4791
|
context.provider
|
|
4754
4792
|
);
|
|
4755
4793
|
const recommendedChatModel = rankedChatModels[0];
|
|
4794
|
+
const installedInOrder = orderInstalledChatModels(
|
|
4795
|
+
installedChat.models,
|
|
4796
|
+
rankedChatModels,
|
|
4797
|
+
candidates
|
|
4798
|
+
);
|
|
4799
|
+
const leadInstalled = installedInOrder.find((model) => runsHere(model.id, candidates));
|
|
4756
4800
|
const chatModels = rankedChatModels.filter((model) => !installedIds.has(model.id));
|
|
4757
4801
|
const catalogAttributions = new Map(
|
|
4758
4802
|
context.chatCatalog.flatMap(
|
|
@@ -4767,31 +4811,30 @@ function BootstrapGate(props) {
|
|
|
4767
4811
|
});
|
|
4768
4812
|
return;
|
|
4769
4813
|
}
|
|
4770
|
-
const accessories = pickAccessoryModels(
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
recognition: idSet(installedRecognition.models)
|
|
4782
|
-
}
|
|
4814
|
+
const accessories = pickAccessoryModels({
|
|
4815
|
+
imageItems: imageCatalog.items,
|
|
4816
|
+
videoItems: videoCatalog.items,
|
|
4817
|
+
audio: audioCatalog,
|
|
4818
|
+
recognition: recognitionCatalog.models,
|
|
4819
|
+
installed: {
|
|
4820
|
+
image: idSet(installedImage.models),
|
|
4821
|
+
video: idSet(installedVideo.models),
|
|
4822
|
+
stt: idSet(installedStt.models),
|
|
4823
|
+
tts: idSet(installedTts.models),
|
|
4824
|
+
recognition: idSet(installedRecognition.models)
|
|
4783
4825
|
},
|
|
4784
|
-
|
|
4785
|
-
);
|
|
4826
|
+
fit: { image: fitVerdicts(imageFit), video: fitVerdicts(videoFit) }
|
|
4827
|
+
});
|
|
4786
4828
|
setScreen({
|
|
4787
4829
|
kind: "model-choice",
|
|
4788
4830
|
plan: {
|
|
4789
4831
|
context,
|
|
4790
|
-
installedChatModels:
|
|
4832
|
+
installedChatModels: installedInOrder.map((model) => {
|
|
4791
4833
|
const attribution = catalogAttributions.get(model.id);
|
|
4792
4834
|
return { ...model, ...attribution ? { attribution } : {} };
|
|
4793
4835
|
}),
|
|
4794
4836
|
...recommendedChatModel ? { recommendedChatModel } : {},
|
|
4837
|
+
...leadInstalled ? { leadInstalledId: leadInstalled.id } : {},
|
|
4795
4838
|
chatModels,
|
|
4796
4839
|
accessories
|
|
4797
4840
|
}
|
|
@@ -5014,7 +5057,7 @@ function BootstrapGate(props) {
|
|
|
5014
5057
|
);
|
|
5015
5058
|
const workshopDownloadBytes = accessoryBytes + (best && !bestInstalled ? best.approxSizeBytes : 0);
|
|
5016
5059
|
const workshopHelperLabels = screen.plan.accessories.map(accessoryKindLabel).join(", ");
|
|
5017
|
-
const
|
|
5060
|
+
const recommendedOptions = [
|
|
5018
5061
|
...best ? [
|
|
5019
5062
|
{
|
|
5020
5063
|
label: `Recommended \u2014 ${bestInstalled ? "Use" : "Download"} ${bootstrapChatModelLabel(best)}`,
|
|
@@ -5028,12 +5071,16 @@ function BootstrapGate(props) {
|
|
|
5028
5071
|
value: "bundle"
|
|
5029
5072
|
}
|
|
5030
5073
|
] : []
|
|
5031
|
-
] : []
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
}
|
|
5074
|
+
] : []
|
|
5075
|
+
];
|
|
5076
|
+
const installedOptions = screen.plan.installedChatModels.filter((model) => model.id !== best?.id).map((model) => ({
|
|
5077
|
+
label: `Use ${model.name ?? model.id}${model.attribution ? ` (${model.attribution})` : ""}`,
|
|
5078
|
+
hint: `${model.id === screen.plan.leadInstalledId ? "already on this machine, no download" : "already available on this machine"}${model.approxSizeBytes ? ` \xB7 ${formatDownloadSize(model.approxSizeBytes)}` : ""}`,
|
|
5079
|
+
value: `installed:${model.id}`
|
|
5080
|
+
}));
|
|
5081
|
+
const leadIsInstalled = screen.plan.leadInstalledId !== void 0 && screen.plan.leadInstalledId !== best?.id;
|
|
5082
|
+
const options = [
|
|
5083
|
+
...leadIsInstalled ? [...installedOptions, ...recommendedOptions] : [...recommendedOptions, ...installedOptions],
|
|
5037
5084
|
...screen.plan.chatModels.filter((model) => model.id !== best?.id).slice(0, MAX_ALTERNATIVE_MODELS).map((model) => ({
|
|
5038
5085
|
label: `Download ${bootstrapChatModelLabel(model)} only`,
|
|
5039
5086
|
hint: `${formatDownloadSize(model.approxSizeBytes)} \xB7 ${fitLabel(model.fit)}`,
|
|
@@ -5110,16 +5157,6 @@ function BootstrapFrame(props) {
|
|
|
5110
5157
|
/* @__PURE__ */ jsx6(Text7, { dimColor: true, children: "Ctrl+C exit" })
|
|
5111
5158
|
] });
|
|
5112
5159
|
}
|
|
5113
|
-
function recoDevice(memory) {
|
|
5114
|
-
return {
|
|
5115
|
-
platform: memory.platform,
|
|
5116
|
-
gpuVramBytes: memory.gpuVramBytes,
|
|
5117
|
-
...memory.gpuMemoryKind ? { gpuMemoryKind: memory.gpuMemoryKind } : {},
|
|
5118
|
-
totalRamBytes: memory.totalRamBytes,
|
|
5119
|
-
usableBytes: memory.usableBytes,
|
|
5120
|
-
...memory.budgetBytes !== void 0 ? { budgetBytes: memory.budgetBytes } : {}
|
|
5121
|
-
};
|
|
5122
|
-
}
|
|
5123
5160
|
function BootstrapChoiceList(props) {
|
|
5124
5161
|
const [index, setIndex] = useState6(0);
|
|
5125
5162
|
const options = props.options;
|
|
@@ -5323,7 +5360,7 @@ import { appendFile, mkdir as mkdir2 } from "fs/promises";
|
|
|
5323
5360
|
import { join as join2 } from "path";
|
|
5324
5361
|
import { performance } from "perf_hooks";
|
|
5325
5362
|
import { getHeapStatistics } from "v8";
|
|
5326
|
-
import { gezelHome, gezelPaths as gezelPaths2 } from "@bendyline/gezel/paths";
|
|
5363
|
+
import { gezelHome as gezelHome2, gezelPaths as gezelPaths2 } from "@bendyline/gezel/paths";
|
|
5327
5364
|
var DEFAULT_SAMPLE_INTERVAL_MS = 15e3;
|
|
5328
5365
|
var DEFAULT_MEASURE_LIMIT = 2e3;
|
|
5329
5366
|
var DEFAULT_PRESSURE_HEAP_BYTES = 256 * 1024 * 1024;
|
|
@@ -5336,7 +5373,7 @@ function clearRetainedPerformanceMeasures(timeline = performance, limit = DEFAUL
|
|
|
5336
5373
|
return count;
|
|
5337
5374
|
}
|
|
5338
5375
|
function startTuiRuntimeDiagnostics(options = {}) {
|
|
5339
|
-
const home = options.home ??
|
|
5376
|
+
const home = options.home ?? gezelHome2();
|
|
5340
5377
|
const logsDir = gezelPaths2(home).logs;
|
|
5341
5378
|
const timeline = options.timeline ?? performance;
|
|
5342
5379
|
const measureLimit = options.performanceMeasureLimit ?? DEFAULT_MEASURE_LIMIT;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/gezel-cli",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "The
|
|
3
|
+
"version": "1.2.6",
|
|
4
|
+
"description": "The gezel command-line tool: chat with your gezels, run craftbooks, and manage local models from the terminal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gezel",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"!dist/**/*.map"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@bendyline/gezel": "1.2.
|
|
48
|
-
"@bendyline/gezel-app-sdk": "1.1.
|
|
49
|
-
"@bendyline/gezel-catalog": "1.2.
|
|
50
|
-
"@bendyline/gezel-client": "1.2.
|
|
51
|
-
"@bendyline/gezel-knowledge": "1.2.
|
|
52
|
-
"@bendyline/gezel-service": "1.2.
|
|
53
|
-
"@bendyline/squisq": "2.11.
|
|
54
|
-
"@bendyline/squisq-formats": "2.6.
|
|
55
|
-
"@bendyline/squisq-react": "2.11.
|
|
47
|
+
"@bendyline/gezel": "1.2.6",
|
|
48
|
+
"@bendyline/gezel-app-sdk": "1.1.6",
|
|
49
|
+
"@bendyline/gezel-catalog": "1.2.6",
|
|
50
|
+
"@bendyline/gezel-client": "1.2.6",
|
|
51
|
+
"@bendyline/gezel-knowledge": "1.2.6",
|
|
52
|
+
"@bendyline/gezel-service": "1.2.6",
|
|
53
|
+
"@bendyline/squisq": "2.11.20",
|
|
54
|
+
"@bendyline/squisq-formats": "2.6.21",
|
|
55
|
+
"@bendyline/squisq-react": "2.11.25",
|
|
56
56
|
"commander": "^15.0.0",
|
|
57
57
|
"ink": "^7.1.1",
|
|
58
58
|
"ink-text-input": "^6.0.0",
|