@bike4mind/cli 0.2.57-feat-cli-tavern-integration.21486 → 0.2.57-feat-cli-tavern-integration.21487
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-4O2FO5KZ.js → chunk-335VL3VS.js} +7 -7
- package/dist/{chunk-N4LOBIJ6.js → chunk-P7BYCV4P.js} +2 -7
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/headlessCommand.js +1 -1
- package/dist/commands/updateCommand.js +1 -1
- package/dist/index.js +86 -57
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.57-feat-cli-tavern-integration.
|
|
6
|
+
version: "0.2.57-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -118,11 +118,11 @@ var package_default = {
|
|
|
118
118
|
zustand: "^4.5.4"
|
|
119
119
|
},
|
|
120
120
|
devDependencies: {
|
|
121
|
-
"@bike4mind/agents": "0.2.2-feat-cli-tavern-integration.
|
|
122
|
-
"@bike4mind/common": "2.70.2-feat-cli-tavern-integration.
|
|
123
|
-
"@bike4mind/mcp": "1.33.16-feat-cli-tavern-integration.
|
|
124
|
-
"@bike4mind/services": "2.64.4-feat-cli-tavern-integration.
|
|
125
|
-
"@bike4mind/utils": "2.15.10-feat-cli-tavern-integration.
|
|
121
|
+
"@bike4mind/agents": "0.2.2-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
122
|
+
"@bike4mind/common": "2.70.2-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
123
|
+
"@bike4mind/mcp": "1.33.16-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
124
|
+
"@bike4mind/services": "2.64.4-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
125
|
+
"@bike4mind/utils": "2.15.10-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
126
126
|
"@types/better-sqlite3": "^7.6.13",
|
|
127
127
|
"@types/jsonwebtoken": "^9.0.4",
|
|
128
128
|
"@types/node": "^22.9.0",
|
|
@@ -139,7 +139,7 @@ var package_default = {
|
|
|
139
139
|
optionalDependencies: {
|
|
140
140
|
"@vscode/ripgrep": "^1.17.1"
|
|
141
141
|
},
|
|
142
|
-
gitHead: "
|
|
142
|
+
gitHead: "a58bc0c829ca160854e9c3194b000747d33a0117"
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
// src/utils/updateChecker.ts
|
|
@@ -467,11 +467,6 @@ var COMMANDS = [
|
|
|
467
467
|
description: "Compact conversation into new session",
|
|
468
468
|
args: "[instructions]"
|
|
469
469
|
},
|
|
470
|
-
// Tavern commands
|
|
471
|
-
{
|
|
472
|
-
name: "tavern",
|
|
473
|
-
description: "Show recent Tavern agent activity stream"
|
|
474
|
-
},
|
|
475
470
|
// Sandbox commands
|
|
476
471
|
{
|
|
477
472
|
name: "sandbox",
|
|
@@ -548,7 +543,7 @@ function customCommandToDefinition(customCommand) {
|
|
|
548
543
|
source: customCommand.source
|
|
549
544
|
};
|
|
550
545
|
}
|
|
551
|
-
function mergeCommands(customCommands) {
|
|
546
|
+
function mergeCommands(customCommands, featureCommands) {
|
|
552
547
|
const builtInCommands = COMMANDS.map((cmd) => ({ ...cmd, source: "built-in" }));
|
|
553
548
|
const customDefinitions = customCommands.filter((cmd) => !isBuiltInCommand(cmd.name)).map(customCommandToDefinition);
|
|
554
549
|
const conflicts = customCommands.filter((cmd) => isBuiltInCommand(cmd.name));
|
|
@@ -558,7 +553,7 @@ function mergeCommands(customCommands) {
|
|
|
558
553
|
conflicts.map((cmd) => cmd.name).join(", ")
|
|
559
554
|
);
|
|
560
555
|
}
|
|
561
|
-
return [...builtInCommands, ...customDefinitions];
|
|
556
|
+
return [...builtInCommands, ...featureCommands ?? [], ...customDefinitions];
|
|
562
557
|
}
|
|
563
558
|
|
|
564
559
|
// src/utils/processFileReferences.ts
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
setWebSocketToolExecutor,
|
|
49
49
|
substituteArguments,
|
|
50
50
|
warmFileCache
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-P7BYCV4P.js";
|
|
52
52
|
import "./chunk-BDQBOLYG.js";
|
|
53
53
|
import "./chunk-XACIOJZ7.js";
|
|
54
54
|
import "./chunk-GQGOWACU.js";
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
import {
|
|
67
67
|
checkForUpdate,
|
|
68
68
|
package_default
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-335VL3VS.js";
|
|
70
70
|
import {
|
|
71
71
|
selectActiveBackgroundAgents,
|
|
72
72
|
useCliStore
|
|
@@ -2734,6 +2734,22 @@ var FeatureModuleRegistry = class {
|
|
|
2734
2734
|
module.registerWsHandlers?.(wsManager);
|
|
2735
2735
|
}
|
|
2736
2736
|
}
|
|
2737
|
+
/** Collect all slash commands from all registered modules */
|
|
2738
|
+
getAllCommands() {
|
|
2739
|
+
return this.modules.flatMap((m) => m.getCommands?.() ?? []);
|
|
2740
|
+
}
|
|
2741
|
+
/** Try to execute a slash command. Returns true if handled. */
|
|
2742
|
+
executeCommand(name, args) {
|
|
2743
|
+
for (const module of this.modules) {
|
|
2744
|
+
const commands = module.getCommands?.() ?? [];
|
|
2745
|
+
const command = commands.find((c) => c.name === name);
|
|
2746
|
+
if (command) {
|
|
2747
|
+
command.execute(args);
|
|
2748
|
+
return true;
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
return false;
|
|
2752
|
+
}
|
|
2737
2753
|
/** Cleanup all modules */
|
|
2738
2754
|
disposeAll() {
|
|
2739
2755
|
for (const module of this.modules) {
|
|
@@ -3525,12 +3541,32 @@ function createStatusTool(service) {
|
|
|
3525
3541
|
}
|
|
3526
3542
|
|
|
3527
3543
|
// src/features/tavern/TavernModule.ts
|
|
3544
|
+
var ACTION_ICONS = {
|
|
3545
|
+
speech: "\u{1F4AC}",
|
|
3546
|
+
thought: "\u{1F4AD}",
|
|
3547
|
+
memory: "\u{1F9E0}",
|
|
3548
|
+
move: "\u{1F6B6}",
|
|
3549
|
+
reply: "\u{1F4E9}",
|
|
3550
|
+
post_quest: "\u{1F4DC}",
|
|
3551
|
+
claim_quest: "\u2694\uFE0F",
|
|
3552
|
+
complete_quest: "\u2705",
|
|
3553
|
+
tool_use: "\u{1F527}",
|
|
3554
|
+
email: "\u{1F4E7}",
|
|
3555
|
+
gate_paused: "\u23F8\uFE0F",
|
|
3556
|
+
gate_timed: "\u23F3",
|
|
3557
|
+
gate_proceed: "\u25B6\uFE0F",
|
|
3558
|
+
idle: "\u{1F4A4}",
|
|
3559
|
+
intent: "\u{1F3AF}",
|
|
3560
|
+
report: "\u{1F4CB}",
|
|
3561
|
+
credits: "\u{1FA99}"
|
|
3562
|
+
};
|
|
3528
3563
|
var TavernModule = class {
|
|
3529
|
-
constructor(apiClient, onLogEntry) {
|
|
3564
|
+
constructor(apiClient, onLogEntry, getActivityLog) {
|
|
3530
3565
|
this.name = "tavern";
|
|
3531
3566
|
this.description = "Interact with autonomous AI agents in the B4M Tavern";
|
|
3532
3567
|
this.service = new TavernService(apiClient);
|
|
3533
3568
|
this.activityStream = new TavernActivityStream(onLogEntry);
|
|
3569
|
+
this.getActivityLog = getActivityLog;
|
|
3534
3570
|
}
|
|
3535
3571
|
getTools() {
|
|
3536
3572
|
return createTavernTools(this.service);
|
|
@@ -3561,6 +3597,35 @@ Available actions:
|
|
|
3561
3597
|
When the user mentions talking to agents, checking the quest board, or managing the tavern, use these tools.
|
|
3562
3598
|
Agents have personalities, moods, quests, and memories \u2014 they are autonomous entities, not chatbots.`;
|
|
3563
3599
|
}
|
|
3600
|
+
getCommands() {
|
|
3601
|
+
return [
|
|
3602
|
+
{
|
|
3603
|
+
name: "tavern",
|
|
3604
|
+
description: "Show recent Tavern agent activity stream",
|
|
3605
|
+
execute: () => {
|
|
3606
|
+
const activityLog = this.getActivityLog();
|
|
3607
|
+
if (activityLog.length === 0) {
|
|
3608
|
+
console.log("\nTavern Activity: No activity yet.");
|
|
3609
|
+
console.log(" Agents broadcast activity during heartbeats.");
|
|
3610
|
+
console.log(' Try: "trigger a heartbeat cycle" to generate activity.\n');
|
|
3611
|
+
return;
|
|
3612
|
+
}
|
|
3613
|
+
const recentEntries = activityLog.slice(-20);
|
|
3614
|
+
console.log(`
|
|
3615
|
+
Tavern Activity (last ${recentEntries.length} of ${activityLog.length} entries):
|
|
3616
|
+
`);
|
|
3617
|
+
for (const entry of recentEntries) {
|
|
3618
|
+
const time = new Date(entry.timestamp).toLocaleTimeString();
|
|
3619
|
+
const icon = ACTION_ICONS[entry.action] ?? "\xB7";
|
|
3620
|
+
const target = entry.targetAgentName ? ` \u2192 ${entry.targetAgentName}` : "";
|
|
3621
|
+
const text = entry.text ? `: ${entry.text.slice(0, 120)}${entry.text.length > 120 ? "..." : ""}` : "";
|
|
3622
|
+
console.log(` ${time} ${icon} ${entry.agentName}${target} [${entry.action}]${text}`);
|
|
3623
|
+
}
|
|
3624
|
+
console.log("");
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
];
|
|
3628
|
+
}
|
|
3564
3629
|
registerWsHandlers(wsManager) {
|
|
3565
3630
|
this.activityStream.registerHandlers(wsManager);
|
|
3566
3631
|
}
|
|
@@ -3577,25 +3642,6 @@ process.on("warning", (warning) => {
|
|
|
3577
3642
|
}
|
|
3578
3643
|
console.warn(warning);
|
|
3579
3644
|
});
|
|
3580
|
-
var TAVERN_ACTION_ICONS = {
|
|
3581
|
-
speech: "\u{1F4AC}",
|
|
3582
|
-
thought: "\u{1F4AD}",
|
|
3583
|
-
memory: "\u{1F9E0}",
|
|
3584
|
-
move: "\u{1F6B6}",
|
|
3585
|
-
reply: "\u{1F4E9}",
|
|
3586
|
-
post_quest: "\u{1F4DC}",
|
|
3587
|
-
claim_quest: "\u2694\uFE0F",
|
|
3588
|
-
complete_quest: "\u2705",
|
|
3589
|
-
tool_use: "\u{1F527}",
|
|
3590
|
-
email: "\u{1F4E7}",
|
|
3591
|
-
gate_paused: "\u23F8\uFE0F",
|
|
3592
|
-
gate_timed: "\u23F3",
|
|
3593
|
-
gate_proceed: "\u25B6\uFE0F",
|
|
3594
|
-
idle: "\u{1F4A4}",
|
|
3595
|
-
intent: "\u{1F3AF}",
|
|
3596
|
-
report: "\u{1F4CB}",
|
|
3597
|
-
credits: "\u{1FA99}"
|
|
3598
|
-
};
|
|
3599
3645
|
var exitTimestamp = null;
|
|
3600
3646
|
var EXIT_TIMEOUT_MS = 2e3;
|
|
3601
3647
|
var usageCache = null;
|
|
@@ -4121,9 +4167,11 @@ Pull a model: ollama pull qwen3.5`
|
|
|
4121
4167
|
const featureRegistry = new FeatureModuleRegistry();
|
|
4122
4168
|
if (config.features?.tavern) {
|
|
4123
4169
|
featureRegistry.register(
|
|
4124
|
-
new TavernModule(
|
|
4125
|
-
|
|
4126
|
-
|
|
4170
|
+
new TavernModule(
|
|
4171
|
+
apiClient,
|
|
4172
|
+
(entry) => useCliStore.getState().addTavernLogEntry(entry),
|
|
4173
|
+
() => useCliStore.getState().tavernActivityLog
|
|
4174
|
+
)
|
|
4127
4175
|
);
|
|
4128
4176
|
}
|
|
4129
4177
|
const featureModuleToolNames = featureRegistry.getAllToolNames();
|
|
@@ -4982,9 +5030,6 @@ Tool Permissions:
|
|
|
4982
5030
|
Project Configuration:
|
|
4983
5031
|
/project-config - Show merged project configuration
|
|
4984
5032
|
|
|
4985
|
-
Tavern:
|
|
4986
|
-
/tavern - Show recent agent activity stream
|
|
4987
|
-
|
|
4988
5033
|
Custom Commands:
|
|
4989
5034
|
/commands - List all custom commands
|
|
4990
5035
|
/commands:new <name> - Create a new custom command
|
|
@@ -6143,35 +6188,13 @@ Allowed domains (${domains.length}):`);
|
|
|
6143
6188
|
console.log("Violation log cleared.");
|
|
6144
6189
|
break;
|
|
6145
6190
|
}
|
|
6146
|
-
|
|
6147
|
-
if (
|
|
6148
|
-
console.log("\nTavern is not enabled. Toggle it on in /config.");
|
|
6191
|
+
default: {
|
|
6192
|
+
if (state.featureRegistry?.executeCommand(command, args)) {
|
|
6149
6193
|
break;
|
|
6150
6194
|
}
|
|
6151
|
-
const activityLog = useCliStore.getState().tavernActivityLog;
|
|
6152
|
-
if (activityLog.length === 0) {
|
|
6153
|
-
console.log("\nTavern Activity: No activity yet.");
|
|
6154
|
-
console.log(" Agents broadcast activity during heartbeats.");
|
|
6155
|
-
console.log(' Try: "trigger a heartbeat cycle" to generate activity.\n');
|
|
6156
|
-
break;
|
|
6157
|
-
}
|
|
6158
|
-
const recentEntries = activityLog.slice(-20);
|
|
6159
|
-
console.log(`
|
|
6160
|
-
Tavern Activity (last ${recentEntries.length} of ${activityLog.length} entries):
|
|
6161
|
-
`);
|
|
6162
|
-
for (const entry of recentEntries) {
|
|
6163
|
-
const time = new Date(entry.timestamp).toLocaleTimeString();
|
|
6164
|
-
const icon = TAVERN_ACTION_ICONS[entry.action] ?? "\xB7";
|
|
6165
|
-
const target = entry.targetAgentName ? ` \u2192 ${entry.targetAgentName}` : "";
|
|
6166
|
-
const text = entry.text ? `: ${entry.text.slice(0, 120)}${entry.text.length > 120 ? "..." : ""}` : "";
|
|
6167
|
-
console.log(` ${time} ${icon} ${entry.agentName}${target} [${entry.action}]${text}`);
|
|
6168
|
-
}
|
|
6169
|
-
console.log("");
|
|
6170
|
-
break;
|
|
6171
|
-
}
|
|
6172
|
-
default:
|
|
6173
6195
|
console.log(`Unknown command: /${command}`);
|
|
6174
6196
|
console.log("Type /help for available commands");
|
|
6197
|
+
}
|
|
6175
6198
|
}
|
|
6176
6199
|
};
|
|
6177
6200
|
const handleSaveConfig = async (updatedConfig) => {
|
|
@@ -6186,9 +6209,11 @@ Tavern Activity (last ${recentEntries.length} of ${activityLog.length} entries):
|
|
|
6186
6209
|
const apiClient = new ApiClient(getApiUrl(updatedConfig.apiConfig), state.configStore);
|
|
6187
6210
|
if (updatedConfig.features?.tavern) {
|
|
6188
6211
|
newFeatureRegistry.register(
|
|
6189
|
-
new TavernModule(
|
|
6190
|
-
|
|
6191
|
-
|
|
6212
|
+
new TavernModule(
|
|
6213
|
+
apiClient,
|
|
6214
|
+
(entry) => useCliStore.getState().addTavernLogEntry(entry),
|
|
6215
|
+
() => useCliStore.getState().tavernActivityLog
|
|
6216
|
+
)
|
|
6192
6217
|
);
|
|
6193
6218
|
}
|
|
6194
6219
|
const newToolNames = newFeatureRegistry.getAllToolNames();
|
|
@@ -6335,7 +6360,11 @@ Tavern Activity (last ${recentEntries.length} of ${activityLog.length} entries):
|
|
|
6335
6360
|
if (!isInitialized) {
|
|
6336
6361
|
return /* @__PURE__ */ React22.createElement(Box21, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React22.createElement(Text21, null, "\u{1F680} Initializing..."));
|
|
6337
6362
|
}
|
|
6338
|
-
const
|
|
6363
|
+
const featureCommandDefs = (state.featureRegistry?.getAllCommands() ?? []).map((cmd) => ({
|
|
6364
|
+
name: cmd.name,
|
|
6365
|
+
description: cmd.description
|
|
6366
|
+
}));
|
|
6367
|
+
const allCommands = mergeCommands(state.customCommandStore.getAllCommands(), featureCommandDefs);
|
|
6339
6368
|
return /* @__PURE__ */ React22.createElement(
|
|
6340
6369
|
App,
|
|
6341
6370
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.57-feat-cli-tavern-integration.
|
|
3
|
+
"version": "0.2.57-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"zustand": "^4.5.4"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@bike4mind/agents": "0.2.2-feat-cli-tavern-integration.
|
|
119
|
-
"@bike4mind/common": "2.70.2-feat-cli-tavern-integration.
|
|
120
|
-
"@bike4mind/mcp": "1.33.16-feat-cli-tavern-integration.
|
|
121
|
-
"@bike4mind/services": "2.64.4-feat-cli-tavern-integration.
|
|
122
|
-
"@bike4mind/utils": "2.15.10-feat-cli-tavern-integration.
|
|
118
|
+
"@bike4mind/agents": "0.2.2-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
119
|
+
"@bike4mind/common": "2.70.2-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
120
|
+
"@bike4mind/mcp": "1.33.16-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
121
|
+
"@bike4mind/services": "2.64.4-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
122
|
+
"@bike4mind/utils": "2.15.10-feat-cli-tavern-integration.21487+a58bc0c82",
|
|
123
123
|
"@types/better-sqlite3": "^7.6.13",
|
|
124
124
|
"@types/jsonwebtoken": "^9.0.4",
|
|
125
125
|
"@types/node": "^22.9.0",
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
"optionalDependencies": {
|
|
137
137
|
"@vscode/ripgrep": "^1.17.1"
|
|
138
138
|
},
|
|
139
|
-
"gitHead": "
|
|
139
|
+
"gitHead": "a58bc0c829ca160854e9c3194b000747d33a0117"
|
|
140
140
|
}
|