@bendyline/gezel-cli 1.2.14 → 1.3.1
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 +63 -16
- package/dist/app-author-command.js +4 -4
- package/dist/app-command.js +10 -3
- package/dist/app-guide.js +1 -1
- package/dist/bin/gezel-main.js +1156 -380
- package/dist/handboek-export.js +99 -37
- package/dist/knowledge-command.js +29 -9
- package/dist/tui/index.js +61 -31
- package/package.json +7 -7
package/dist/tui/index.js
CHANGED
|
@@ -126,7 +126,7 @@ var CLI_ENGAGEMENT_MODES = [
|
|
|
126
126
|
name: "full-play",
|
|
127
127
|
mode: "proactive",
|
|
128
128
|
label: "Full play",
|
|
129
|
-
description: "Everything runs, including proactive nudges and
|
|
129
|
+
description: "Everything runs, including proactive nudges and handoffs."
|
|
130
130
|
}
|
|
131
131
|
];
|
|
132
132
|
var MODE_ALIASES = {
|
|
@@ -425,7 +425,7 @@ function preferredModel(status) {
|
|
|
425
425
|
const model = status.models.find((candidate) => candidate.id === status.configuredModel) ?? status.models.find((candidate) => candidate.id === status.recommendedModel) ?? status.models[0];
|
|
426
426
|
if (!model) {
|
|
427
427
|
throw new ManagedAppCommandError(
|
|
428
|
-
"No compatible local
|
|
428
|
+
"No compatible local crew member or tool-capable model is available for this integration."
|
|
429
429
|
);
|
|
430
430
|
}
|
|
431
431
|
return model;
|
|
@@ -567,7 +567,7 @@ var SLASH_COMMAND_WORDWHEEL_SIZE = 4;
|
|
|
567
567
|
var SLASH_COMMANDS = [
|
|
568
568
|
{ name: "help", description: "show the command reference" },
|
|
569
569
|
{ name: "project", description: "switch active project" },
|
|
570
|
-
{ name: "gezel", description: "switch
|
|
570
|
+
{ name: "gezel", description: "switch crew member, or bring a role onto the project" },
|
|
571
571
|
{ name: "allow", description: "allow a project permission" },
|
|
572
572
|
{ name: "disallow", description: "disallow a project permission" },
|
|
573
573
|
{ name: "show", description: "show optional chat details" },
|
|
@@ -584,7 +584,7 @@ var SLASH_COMMANDS = [
|
|
|
584
584
|
{ name: "disconnect", description: "remove Gezel from a connected local app" },
|
|
585
585
|
{ name: "focus", description: "send into another active chat" },
|
|
586
586
|
{ name: "cli", description: "make bare input run shell commands" },
|
|
587
|
-
{ name: "chat", description: "make bare input message
|
|
587
|
+
{ name: "chat", description: "make bare input a message to Gezel" },
|
|
588
588
|
{ name: "clear", description: "clear the visible feed" },
|
|
589
589
|
{ name: "quit", description: "exit the TUI" }
|
|
590
590
|
];
|
|
@@ -1062,7 +1062,7 @@ function reduceFeed(rows, env, opts = {}) {
|
|
|
1062
1062
|
sessionId,
|
|
1063
1063
|
gezelId,
|
|
1064
1064
|
kind: "note",
|
|
1065
|
-
text:
|
|
1065
|
+
text: `\u23F3 waiting for ${event.targetGezelName || "someone on the crew"}\u2026`,
|
|
1066
1066
|
open: false
|
|
1067
1067
|
}
|
|
1068
1068
|
]);
|
|
@@ -1193,7 +1193,7 @@ function reduceTurns(turns, env) {
|
|
|
1193
1193
|
case "heartbeat":
|
|
1194
1194
|
return event.label ? set(heartbeatLabel(event.label), void 0, null) : turns;
|
|
1195
1195
|
case "awaiting_gezel":
|
|
1196
|
-
return set("
|
|
1196
|
+
return set(`waiting for ${event.targetGezelName || "a reply"}`, void 0, null);
|
|
1197
1197
|
case "error":
|
|
1198
1198
|
case "done":
|
|
1199
1199
|
return clear();
|
|
@@ -1401,7 +1401,7 @@ function toolRowText(call) {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
function gezelLabel(gezelId, gezels, boring) {
|
|
1403
1403
|
const g = gezels.find((x) => x.id === gezelId);
|
|
1404
|
-
if (!g) return boring ? "
|
|
1404
|
+
if (!g) return boring ? "Gezel" : gezelId;
|
|
1405
1405
|
if (boring) return g.roleBasedName ?? g.role ?? g.id;
|
|
1406
1406
|
return g.role ? `${g.name} \xB7 ${g.role}` : g.name;
|
|
1407
1407
|
}
|
|
@@ -2181,7 +2181,7 @@ function NpmInstallApprovalPrompt(props) {
|
|
|
2181
2181
|
/* @__PURE__ */ jsx4(Text5, { bold: true, color: "yellow", children: "npm package approval" }),
|
|
2182
2182
|
currentPackage ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
2183
2183
|
/* @__PURE__ */ jsxs5(Text5, { wrap: "wrap", children: [
|
|
2184
|
-
"
|
|
2184
|
+
"Gezel wants to install ",
|
|
2185
2185
|
packages.length === 1 ? "this package" : "packages",
|
|
2186
2186
|
" outside the pre-vetted list."
|
|
2187
2187
|
] }),
|
|
@@ -2360,7 +2360,7 @@ var CORE_ROLE_ORDER = [
|
|
|
2360
2360
|
];
|
|
2361
2361
|
var SECTION_IN_PROJECT = "In this project";
|
|
2362
2362
|
var SECTION_RECOMMENDED = "Recommended for this project";
|
|
2363
|
-
var SECTION_OTHER_GEZELS = "
|
|
2363
|
+
var SECTION_OTHER_GEZELS = "The rest of your crew";
|
|
2364
2364
|
var SECTION_CORE = "Core roles";
|
|
2365
2365
|
var SECTION_MORE = "More roles";
|
|
2366
2366
|
var DEFAULT_HINT_WIDTH = 76;
|
|
@@ -2976,7 +2976,7 @@ function useTerminalSize() {
|
|
|
2976
2976
|
}
|
|
2977
2977
|
var HELP = [
|
|
2978
2978
|
"/project \u2014 switch project /model \u2014 switch engine + model",
|
|
2979
|
-
"/gezel \u2014 switch
|
|
2979
|
+
"/gezel \u2014 switch crew member or bring on a role /gezel <role or name> \u2014 go straight there",
|
|
2980
2980
|
"/model download \u2014 choose and download a new on-device model",
|
|
2981
2981
|
"/allow edits \u2014 allow tool edits /disallow edits \u2014 make tool edits read-only",
|
|
2982
2982
|
"/allow codexedits|claudeedits \u2014 allow provider-native project edits",
|
|
@@ -3291,7 +3291,7 @@ function App(props) {
|
|
|
3291
3291
|
if (project.mode !== "solo") return;
|
|
3292
3292
|
if (project.voormanGezelId === joinedGezelId) return;
|
|
3293
3293
|
await client.updateProject(projectId, { mode: "crew" });
|
|
3294
|
-
note("this job is now a crew project \u2014
|
|
3294
|
+
note("this job is now a crew project \u2014 crew members here can delegate and recruit.");
|
|
3295
3295
|
} catch (err) {
|
|
3296
3296
|
note(`could not switch this job to a crew project: ${errMsg(err)}`, "error");
|
|
3297
3297
|
}
|
|
@@ -3370,15 +3370,15 @@ function App(props) {
|
|
|
3370
3370
|
"error"
|
|
3371
3371
|
);
|
|
3372
3372
|
default:
|
|
3373
|
-
return note(`no
|
|
3373
|
+
return note(`no crew member or role matches "${arg}". Type /gezel to browse.`, "error");
|
|
3374
3374
|
}
|
|
3375
3375
|
},
|
|
3376
3376
|
[gezels, loadRoleTemplates, note, recruitGezel, useGezel]
|
|
3377
3377
|
);
|
|
3378
3378
|
const openModelPicker = useCallback2(async () => {
|
|
3379
|
-
if (!activeGezelId || !activeGezel) return note("no active
|
|
3379
|
+
if (!activeGezelId || !activeGezel) return note("no active crew member yet.", "error");
|
|
3380
3380
|
if (activeGezel.fixedFunction) {
|
|
3381
|
-
return note(
|
|
3381
|
+
return note(`${activeGezel.name} runs a fixed tool and does not use a chat model.`, "error");
|
|
3382
3382
|
}
|
|
3383
3383
|
if (modelChoicesLoading) return note("model choices are already loading.");
|
|
3384
3384
|
setModelChoicesLoading(true);
|
|
@@ -3395,9 +3395,12 @@ function App(props) {
|
|
|
3395
3395
|
}, [activeGezel, activeGezelId, client, config, modelChoicesLoading, note]);
|
|
3396
3396
|
const openModelDownloadPicker = useCallback2(
|
|
3397
3397
|
async (returnTo = null) => {
|
|
3398
|
-
if (!activeGezelId || !activeGezel) return note("no active
|
|
3398
|
+
if (!activeGezelId || !activeGezel) return note("no active crew member yet.", "error");
|
|
3399
3399
|
if (activeGezel.fixedFunction) {
|
|
3400
|
-
return note(
|
|
3400
|
+
return note(
|
|
3401
|
+
`${activeGezel.name} runs a fixed tool and does not use a chat model.`,
|
|
3402
|
+
"error"
|
|
3403
|
+
);
|
|
3401
3404
|
}
|
|
3402
3405
|
if (modelChoicesLoading) return note("model choices are already loading.");
|
|
3403
3406
|
setOverlay(null);
|
|
@@ -3426,7 +3429,7 @@ function App(props) {
|
|
|
3426
3429
|
[activeGezel, activeGezelId, client, config, modelChoicesLoading, note, openModelPicker]
|
|
3427
3430
|
);
|
|
3428
3431
|
const openThreadPicker = useCallback2(async () => {
|
|
3429
|
-
if (!activeGezelId) return note("no active
|
|
3432
|
+
if (!activeGezelId) return note("no active crew member yet.", "error");
|
|
3430
3433
|
if (threadsLoading) return;
|
|
3431
3434
|
setThreadsLoading(true);
|
|
3432
3435
|
try {
|
|
@@ -3449,7 +3452,7 @@ function App(props) {
|
|
|
3449
3452
|
try {
|
|
3450
3453
|
const session = await client.getChatSession(sessionId);
|
|
3451
3454
|
if (session.gezelId !== activeGezelId || session.projectId !== projectId) {
|
|
3452
|
-
throw new Error("thread no longer belongs to the active
|
|
3455
|
+
throw new Error("thread no longer belongs to the active crew member and project");
|
|
3453
3456
|
}
|
|
3454
3457
|
setOwnSessionId(session.id);
|
|
3455
3458
|
setFocusedSessionId(session.id);
|
|
@@ -3464,7 +3467,7 @@ function App(props) {
|
|
|
3464
3467
|
);
|
|
3465
3468
|
const startNewThread = useCallback2(async () => {
|
|
3466
3469
|
setOverlay(null);
|
|
3467
|
-
if (!activeGezelId) return note("no active
|
|
3470
|
+
if (!activeGezelId) return note("no active crew member yet.", "error");
|
|
3468
3471
|
try {
|
|
3469
3472
|
const session = await client.createChatSession({
|
|
3470
3473
|
gezelId: activeGezelId,
|
|
@@ -3986,7 +3989,7 @@ function App(props) {
|
|
|
3986
3989
|
if (result.projectStatus !== "active") {
|
|
3987
3990
|
note(`${projectName} is ${result.projectStatus}; no project work was started.`);
|
|
3988
3991
|
} else {
|
|
3989
|
-
note(`no due schedules or
|
|
3992
|
+
note(`no due schedules or active tasks for Gezel found in ${projectName}.`);
|
|
3990
3993
|
}
|
|
3991
3994
|
} else {
|
|
3992
3995
|
note(`continue: ${parts.join("; ")}.`);
|
|
@@ -4097,7 +4100,7 @@ function App(props) {
|
|
|
4097
4100
|
return note("CLI mode \u2014 bare input runs as a shell command. /chat to exit.");
|
|
4098
4101
|
case "chat":
|
|
4099
4102
|
setMode("chat");
|
|
4100
|
-
return note("chat mode \u2014 bare input is a prompt to
|
|
4103
|
+
return note("chat mode \u2014 bare input is a prompt to Gezel.");
|
|
4101
4104
|
case "clear":
|
|
4102
4105
|
setTurns(/* @__PURE__ */ new Map());
|
|
4103
4106
|
setPendingInput(null);
|
|
@@ -4216,14 +4219,14 @@ function App(props) {
|
|
|
4216
4219
|
setModelDownloadProgress(null);
|
|
4217
4220
|
if (companionResult.name && companionResult.error) {
|
|
4218
4221
|
note(
|
|
4219
|
-
`downloaded ${choice.model.name}; ${companionResult.name} image reader could not be added: ${companionResult.error}. Switching
|
|
4222
|
+
`downloaded ${choice.model.name}; ${companionResult.name} image reader could not be added: ${companionResult.error}. Switching to ${choice.model.name}\u2026`
|
|
4220
4223
|
);
|
|
4221
4224
|
} else if (companionResult.name) {
|
|
4222
4225
|
note(
|
|
4223
|
-
`downloaded ${choice.model.name} with ${companionResult.name} for image reading; switching
|
|
4226
|
+
`downloaded ${choice.model.name} with ${companionResult.name} for image reading; switching to it\u2026`
|
|
4224
4227
|
);
|
|
4225
4228
|
} else {
|
|
4226
|
-
note(`downloaded ${choice.model.name}; switching
|
|
4229
|
+
note(`downloaded ${choice.model.name}; switching to it\u2026`);
|
|
4227
4230
|
}
|
|
4228
4231
|
await applyModelSelection(installedChoice);
|
|
4229
4232
|
} catch (err) {
|
|
@@ -4321,7 +4324,7 @@ function App(props) {
|
|
|
4321
4324
|
overlay === "gezel" ? /* @__PURE__ */ jsx5(
|
|
4322
4325
|
Picker,
|
|
4323
4326
|
{
|
|
4324
|
-
title: "Switch
|
|
4327
|
+
title: "Switch crew member, or bring on a role",
|
|
4325
4328
|
items: gezelPickerItems,
|
|
4326
4329
|
windowSize: gezelPickerWindowSize,
|
|
4327
4330
|
onCancel: () => setOverlay(null),
|
|
@@ -4723,7 +4726,7 @@ function taskAssigneeLabel(task, gezels, boring) {
|
|
|
4723
4726
|
if (task.assignee.kind === "user") return "you";
|
|
4724
4727
|
const gezelId = task.assignee.gezelId;
|
|
4725
4728
|
const gezel = gezels.find((item) => item.id === gezelId);
|
|
4726
|
-
if (!gezel) return boring ? "
|
|
4729
|
+
if (!gezel) return boring ? "Gezel" : gezelId;
|
|
4727
4730
|
return boring ? gezel.roleBasedName ?? gezel.role ?? gezel.id : gezel.name;
|
|
4728
4731
|
}
|
|
4729
4732
|
function taskStatusChoices(task) {
|
|
@@ -4756,8 +4759,35 @@ import { Box as Box7, Text as Text7, useApp as useApp2, useInput as useInput5 }
|
|
|
4756
4759
|
import { useCallback as useCallback3, useEffect as useEffect5, useState as useState6 } from "react";
|
|
4757
4760
|
|
|
4758
4761
|
// src/run-readiness.ts
|
|
4762
|
+
import { resolveOnDeviceProvider as resolveOnDeviceProvider3 } from "@bendyline/gezel/native";
|
|
4763
|
+
|
|
4764
|
+
// src/craftbook-setup.ts
|
|
4765
|
+
import { Writable } from "stream";
|
|
4766
|
+
import {
|
|
4767
|
+
craftbookSetupGaps,
|
|
4768
|
+
isCraftbookModelEngine,
|
|
4769
|
+
resolveCraftbookModelNeeds,
|
|
4770
|
+
resolveSecurityPolicy as resolveSecurityPolicy2
|
|
4771
|
+
} from "@bendyline/gezel";
|
|
4759
4772
|
import { resolveOnDeviceProvider as resolveOnDeviceProvider2 } from "@bendyline/gezel/native";
|
|
4760
4773
|
|
|
4774
|
+
// src/model-pull.ts
|
|
4775
|
+
import { dirname as dirname2 } from "path";
|
|
4776
|
+
|
|
4777
|
+
// src/native-command.ts
|
|
4778
|
+
import {
|
|
4779
|
+
NativeEngineNameSchema
|
|
4780
|
+
} from "@bendyline/gezel";
|
|
4781
|
+
|
|
4782
|
+
// src/settings-command.ts
|
|
4783
|
+
import {
|
|
4784
|
+
classifySecurityLevel,
|
|
4785
|
+
projectManagedWorkspaceWritable,
|
|
4786
|
+
resolveSecurityPolicy,
|
|
4787
|
+
securityCapabilitiesOf,
|
|
4788
|
+
securityPolicyForLevel
|
|
4789
|
+
} from "@bendyline/gezel";
|
|
4790
|
+
|
|
4761
4791
|
// src/model-choice.ts
|
|
4762
4792
|
import {
|
|
4763
4793
|
measuredClaim,
|
|
@@ -4957,7 +4987,7 @@ function BootstrapGate(props) {
|
|
|
4957
4987
|
return;
|
|
4958
4988
|
}
|
|
4959
4989
|
try {
|
|
4960
|
-
await
|
|
4990
|
+
await installNativeToolkit2(client, context.nativeStatus, missing, setScreen);
|
|
4961
4991
|
const [nativeStatus, memory] = await Promise.all([
|
|
4962
4992
|
client.getNativeEngineStatus(),
|
|
4963
4993
|
client.getMemoryProfile()
|
|
@@ -5002,7 +5032,7 @@ function BootstrapGate(props) {
|
|
|
5002
5032
|
if (choice.kind === "bundle") {
|
|
5003
5033
|
const missing = missingToolkit(await client.getNativeEngineStatus());
|
|
5004
5034
|
if (missing.length > 0) {
|
|
5005
|
-
await
|
|
5035
|
+
await installNativeToolkit2(client, plan.context.nativeStatus, missing, setScreen);
|
|
5006
5036
|
}
|
|
5007
5037
|
}
|
|
5008
5038
|
const chatAlreadyInstalled = choice.kind === "bundle" && plan.installedChatModels.some((model) => model.id === choice.model.id);
|
|
@@ -5052,7 +5082,7 @@ function BootstrapGate(props) {
|
|
|
5052
5082
|
);
|
|
5053
5083
|
if (screen.kind === "ready") return /* @__PURE__ */ jsx6(Fragment4, { children });
|
|
5054
5084
|
if (screen.kind === "loading") {
|
|
5055
|
-
return /* @__PURE__ */ jsx6(BootstrapFrame, { title: "
|
|
5085
|
+
return /* @__PURE__ */ jsx6(BootstrapFrame, { title: "Getting Gezel ready", children: /* @__PURE__ */ jsxs7(Text7, { color: "yellow", children: [
|
|
5056
5086
|
"\u25CF ",
|
|
5057
5087
|
screen.message
|
|
5058
5088
|
] }) });
|
|
@@ -5120,7 +5150,7 @@ function BootstrapGate(props) {
|
|
|
5120
5150
|
},
|
|
5121
5151
|
...screen.plan.accessories.length > 0 ? [
|
|
5122
5152
|
{
|
|
5123
|
-
label: `Complete
|
|
5153
|
+
label: `Complete set \u2014 ${bootstrapChatModelLabel(best)} + ${screen.plan.accessories.length} ${screen.plan.accessories.length === 1 ? "helper" : "helpers"}`,
|
|
5124
5154
|
hint: `optional \xB7 ${bestInstalled ? "chat model already available \xB7 " : ""}${workshopDownloadBytes > 0 ? formatDownloadSize(workshopDownloadBytes) : "already available"}${workshopHelperLabels ? ` \xB7 includes ${workshopHelperLabels}` : ""}`,
|
|
5125
5155
|
value: "bundle"
|
|
5126
5156
|
}
|
|
@@ -5269,7 +5299,7 @@ function ProgressBar({ pct }) {
|
|
|
5269
5299
|
"]"
|
|
5270
5300
|
] });
|
|
5271
5301
|
}
|
|
5272
|
-
async function
|
|
5302
|
+
async function installNativeToolkit2(client, status, missing, setScreen) {
|
|
5273
5303
|
for (let index = 0; index < missing.length; index += 1) {
|
|
5274
5304
|
const engine = missing[index];
|
|
5275
5305
|
let terminalError = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/gezel-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
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,12 +44,12 @@
|
|
|
44
44
|
"!dist/**/*.map"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@bendyline/gezel": "1.
|
|
48
|
-
"@bendyline/gezel-app-sdk": "1.1
|
|
49
|
-
"@bendyline/gezel-catalog": "1.
|
|
50
|
-
"@bendyline/gezel-client": "1.
|
|
51
|
-
"@bendyline/gezel-knowledge": "1.2.
|
|
52
|
-
"@bendyline/gezel-service": "1.
|
|
47
|
+
"@bendyline/gezel": "1.3.1",
|
|
48
|
+
"@bendyline/gezel-app-sdk": "1.2.1",
|
|
49
|
+
"@bendyline/gezel-catalog": "1.3.1",
|
|
50
|
+
"@bendyline/gezel-client": "1.3.1",
|
|
51
|
+
"@bendyline/gezel-knowledge": "1.2.11",
|
|
52
|
+
"@bendyline/gezel-service": "1.3.1",
|
|
53
53
|
"@bendyline/squisq": "2.13.12",
|
|
54
54
|
"@bendyline/squisq-formats": "2.8.14",
|
|
55
55
|
"@bendyline/squisq-react": "2.12.24",
|