@bendyline/gezel-cli 1.2.7 → 1.2.9
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 +1 -1
- package/dist/LICENSE-HankenGrotesk-OFL-1.1.txt +94 -0
- package/dist/LICENSE-PTSerif-OFL-1.1.txt +94 -0
- package/dist/app-author-command.js +394 -96
- package/dist/app-command.js +2 -1
- package/dist/bin/gezel-main.js +187 -20
- package/dist/handboek-export.js +114 -28
- package/dist/knowledge-command.js +1 -0
- package/dist/page-typography.css +88 -0
- package/dist/tui/index.js +26 -13
- package/package.json +11 -11
package/dist/tui/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
gezelNamesInUse,
|
|
24
24
|
pickUnusedGezelName,
|
|
25
25
|
projectLeadGezelId,
|
|
26
|
+
roleForMatching,
|
|
26
27
|
setLogLevel,
|
|
27
28
|
setLogOutput
|
|
28
29
|
} from "@bendyline/gezel";
|
|
@@ -84,7 +85,7 @@ async function ensureCliProjectLead(client, projectId) {
|
|
|
84
85
|
}
|
|
85
86
|
const { gezels } = await client.listGezels();
|
|
86
87
|
let voorman = gezels.find(
|
|
87
|
-
(gezel) => gezel.templateId === "voorman" || gezel.role?.trim().toLowerCase() === "voorman"
|
|
88
|
+
(gezel) => gezel.templateId === "voorman" || roleForMatching(gezel.role)?.trim().toLowerCase() === "voorman"
|
|
88
89
|
);
|
|
89
90
|
if (!voorman) {
|
|
90
91
|
const { name, gender } = pickUnusedGezelName(gezelNamesInUse(gezels));
|
|
@@ -92,7 +93,7 @@ async function ensureCliProjectLead(client, projectId) {
|
|
|
92
93
|
}
|
|
93
94
|
const updated = await client.updateProject(projectId, { voormanGezelId: voorman.id });
|
|
94
95
|
if (!updated.voormanGezelId) {
|
|
95
|
-
throw new CliError(`project "${updated.name}" has no
|
|
96
|
+
throw new CliError(`project "${updated.name}" has no crew lead`);
|
|
96
97
|
}
|
|
97
98
|
return updated.voormanGezelId;
|
|
98
99
|
}
|
|
@@ -340,7 +341,7 @@ async function connectVSCode(client) {
|
|
|
340
341
|
app: "vscode",
|
|
341
342
|
message: [
|
|
342
343
|
`connected VS Code${profile ? ` (${profile.label})` : ""} to Gezel at ${status.bridge.baseUrl}.`,
|
|
343
|
-
enabled ? "
|
|
344
|
+
enabled ? "Turned on \u201CAllow apps to connect\u201D in Settings \u2192 Integrations." : "",
|
|
344
345
|
"If VS Code is open, run \u201CDeveloper: Reload Window\u201D once to load the provider."
|
|
345
346
|
].filter(Boolean).join(" ")
|
|
346
347
|
};
|
|
@@ -428,7 +429,7 @@ function preferredModel(status) {
|
|
|
428
429
|
function assertSafeToConfigure(status, label) {
|
|
429
430
|
if (status.state === "conflict") {
|
|
430
431
|
throw new ManagedAppCommandError(
|
|
431
|
-
`${label} setup has a conflict${status.message ? `: ${status.message}` : "."} Nothing was overwritten; use Settings \u2192
|
|
432
|
+
`${label} setup has a conflict${status.message ? `: ${status.message}` : "."} Nothing was overwritten; use Settings \u2192 Integrations to review and repair it.`
|
|
432
433
|
);
|
|
433
434
|
}
|
|
434
435
|
if (status.state === "unavailable" || !status.canConfigure) {
|
|
@@ -442,7 +443,7 @@ function integrationSuccessMessage(label, status, enabled, extra = "") {
|
|
|
442
443
|
const selected = status.models.find((candidate) => candidate.id === status.configuredModel);
|
|
443
444
|
return [
|
|
444
445
|
`connected ${label} to Gezel at ${status.bridge.baseUrl}${selected ? `; default ${selected.label}` : ""}.`,
|
|
445
|
-
enabled ? "
|
|
446
|
+
enabled ? "Turned on \u201CAllow apps to connect\u201D in Settings \u2192 Integrations." : "",
|
|
446
447
|
extra,
|
|
447
448
|
`Start it with: ${status.launchCommand}`
|
|
448
449
|
].filter(Boolean).join(" ");
|
|
@@ -2334,6 +2335,8 @@ function craftbookStartRequest(book) {
|
|
|
2334
2335
|
// src/tui/gezel-picker.ts
|
|
2335
2336
|
import {
|
|
2336
2337
|
getProjectType,
|
|
2338
|
+
legacyRoleKey,
|
|
2339
|
+
plainRoleTitle,
|
|
2337
2340
|
resolveProjectTypeId
|
|
2338
2341
|
} from "@bendyline/gezel";
|
|
2339
2342
|
var GEZEL_VALUE_PREFIX = "gezel:";
|
|
@@ -2363,7 +2366,15 @@ function clip2(text, width) {
|
|
|
2363
2366
|
return `${flat.slice(0, Math.max(1, width - 1)).trimEnd()}\u2026`;
|
|
2364
2367
|
}
|
|
2365
2368
|
function roleIdentity(value) {
|
|
2366
|
-
|
|
2369
|
+
const raw = (value ?? "").trim();
|
|
2370
|
+
return (legacyRoleKey(raw) ?? legacyRoleKey(raw.replace(/-/g, " ")) ?? raw).toLowerCase();
|
|
2371
|
+
}
|
|
2372
|
+
function argKeys(values) {
|
|
2373
|
+
return [
|
|
2374
|
+
...new Set(
|
|
2375
|
+
values.flatMap((value) => [(value ?? "").trim().toLowerCase(), roleIdentity(value)])
|
|
2376
|
+
)
|
|
2377
|
+
].filter(Boolean);
|
|
2367
2378
|
}
|
|
2368
2379
|
function displayName(gezel, roleBasedNameOnly) {
|
|
2369
2380
|
if (roleBasedNameOnly) return gezel.roleBasedName ?? gezel.role ?? gezel.id;
|
|
@@ -2412,7 +2423,7 @@ function buildGezelPickerItems(inputs) {
|
|
|
2412
2423
|
hint: clip2(gezelHint(gezel, templatesById, roleBasedNameOnly), hintWidth)
|
|
2413
2424
|
});
|
|
2414
2425
|
const templateItem = (template, reason) => ({
|
|
2415
|
-
label: template.name,
|
|
2426
|
+
label: plainRoleTitle(template.name),
|
|
2416
2427
|
value: `${TEMPLATE_VALUE_PREFIX}${template.id}`,
|
|
2417
2428
|
hint: clip2(reason ?? template.description, hintWidth)
|
|
2418
2429
|
});
|
|
@@ -2459,7 +2470,7 @@ function buildGezelPickerItems(inputs) {
|
|
|
2459
2470
|
}
|
|
2460
2471
|
const remaining = availableTemplates.filter((t) => !recommendedTemplateIds.has(t.id));
|
|
2461
2472
|
const core = remaining.filter((t) => coreRank.has(t.id)).sort((a, b) => (coreRank.get(a.id) ?? 0) - (coreRank.get(b.id) ?? 0));
|
|
2462
|
-
const more = remaining.filter((t) => !coreRank.has(t.id)).sort((a, b) => a.name.localeCompare(b.name));
|
|
2473
|
+
const more = remaining.filter((t) => !coreRank.has(t.id)).sort((a, b) => plainRoleTitle(a.name).localeCompare(plainRoleTitle(b.name)));
|
|
2463
2474
|
for (const template of core) push(SECTION_CORE, templateItem(template));
|
|
2464
2475
|
for (const template of more) push(SECTION_MORE, templateItem(template));
|
|
2465
2476
|
return items;
|
|
@@ -2473,11 +2484,13 @@ function resolveGezelArg(arg, inputs) {
|
|
|
2473
2484
|
const query = arg.trim().toLowerCase();
|
|
2474
2485
|
if (!query) return { kind: "unknown" };
|
|
2475
2486
|
const { gezels, templates } = inputs;
|
|
2476
|
-
const
|
|
2477
|
-
const
|
|
2478
|
-
const
|
|
2487
|
+
const queryRole = roleIdentity(query);
|
|
2488
|
+
const gezelKeys = (g) => argKeys([g.id, g.name, g.roleBasedName, g.role]);
|
|
2489
|
+
const templateKeys = (t) => argKeys([t.id, t.role, t.name]);
|
|
2490
|
+
const exact = (keys) => keys.includes(query) || keys.includes(queryRole);
|
|
2491
|
+
const exactGezel = gezels.find((g) => exact(gezelKeys(g)));
|
|
2479
2492
|
if (exactGezel) return { kind: "gezel", gezelId: exactGezel.id };
|
|
2480
|
-
const exactTemplate = templates.find((t) => templateKeys(t)
|
|
2493
|
+
const exactTemplate = templates.find((t) => exact(templateKeys(t)));
|
|
2481
2494
|
if (exactTemplate) return { kind: "template", templateId: exactTemplate.id };
|
|
2482
2495
|
const prefixGezels = gezels.filter((g) => gezelKeys(g).some((k) => k.startsWith(query)));
|
|
2483
2496
|
if (prefixGezels.length === 1) return { kind: "gezel", gezelId: prefixGezels[0].id };
|
|
@@ -2487,7 +2500,7 @@ function resolveGezelArg(arg, inputs) {
|
|
|
2487
2500
|
const prefixTemplates = templates.filter((t) => templateKeys(t).some((k) => k.startsWith(query)));
|
|
2488
2501
|
if (prefixTemplates.length === 1) return { kind: "template", templateId: prefixTemplates[0].id };
|
|
2489
2502
|
if (prefixTemplates.length > 1) {
|
|
2490
|
-
return { kind: "ambiguous", labels: prefixTemplates.map((t) => t.name) };
|
|
2503
|
+
return { kind: "ambiguous", labels: prefixTemplates.map((t) => plainRoleTitle(t.name)) };
|
|
2491
2504
|
}
|
|
2492
2505
|
return { kind: "unknown" };
|
|
2493
2506
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/gezel-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
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": [
|
|
@@ -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.
|
|
54
|
-
"@bendyline/squisq-formats": "2.
|
|
55
|
-
"@bendyline/squisq-react": "2.12.
|
|
47
|
+
"@bendyline/gezel": "1.2.9",
|
|
48
|
+
"@bendyline/gezel-app-sdk": "1.1.9",
|
|
49
|
+
"@bendyline/gezel-catalog": "1.2.9",
|
|
50
|
+
"@bendyline/gezel-client": "1.2.9",
|
|
51
|
+
"@bendyline/gezel-knowledge": "1.2.9",
|
|
52
|
+
"@bendyline/gezel-service": "1.2.9",
|
|
53
|
+
"@bendyline/squisq": "2.13.3",
|
|
54
|
+
"@bendyline/squisq-formats": "2.8.4",
|
|
55
|
+
"@bendyline/squisq-react": "2.12.12",
|
|
56
56
|
"commander": "^15.0.0",
|
|
57
57
|
"ink": "^7.1.1",
|
|
58
58
|
"ink-text-input": "^6.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"build": "tsup && node scripts/verify-build.mjs",
|
|
70
70
|
"dev": "tsup --watch",
|
|
71
71
|
"typecheck": "tsc --noEmit",
|
|
72
|
-
"clean": "
|
|
72
|
+
"clean": "node ../../scripts/clean-dirs.mjs dist .turbo",
|
|
73
73
|
"test": "vitest run"
|
|
74
74
|
}
|
|
75
75
|
}
|