@bike4mind/cli 0.2.28 → 0.2.29-cli-resume-command.18763

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +22 -15
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -101,7 +101,7 @@ While in interactive mode:
101
101
 
102
102
  **Session Management:**
103
103
  - `/save <name>` - Save current session
104
- - `/sessions` - List saved sessions
104
+ - `/resume` - List and resume saved sessions
105
105
 
106
106
  **API Configuration:**
107
107
  - `/set-api <url>` - Connect to self-hosted Bike4Mind instance
package/dist/index.js CHANGED
@@ -551,8 +551,9 @@ var COMMANDS = [
551
551
  args: "<name>"
552
552
  },
553
553
  {
554
- name: "sessions",
555
- description: "List saved sessions"
554
+ name: "resume",
555
+ description: "List and resume saved sessions",
556
+ aliases: ["sessions"]
556
557
  },
557
558
  {
558
559
  name: "config",
@@ -3717,18 +3718,23 @@ Remember: You are an autonomous AGENT. Act independently and solve problems proa
3717
3718
  async executeToolWithQueueFallback(toolUse) {
3718
3719
  const queuedObs = this.observationQueue.find((obs) => obs.toolId === getToolId(toolUse));
3719
3720
  if (queuedObs) {
3720
- const result2 = queuedObs.result;
3721
+ const result = queuedObs.result;
3721
3722
  const index = this.observationQueue.indexOf(queuedObs);
3722
3723
  this.observationQueue.splice(index, 1);
3723
- return typeof result2 === "string" ? result2 : JSON.stringify(result2);
3724
+ return typeof result === "string" ? result : JSON.stringify(result);
3724
3725
  }
3725
3726
  const tool = this.context.tools.find((t) => t.toolSchema.name === toolUse.name);
3726
3727
  if (!tool) {
3727
- throw new Error(`Tool ${toolUse.name} not found in agent context`);
3728
+ return `Error: Tool ${toolUse.name} not found in agent context`;
3729
+ }
3730
+ try {
3731
+ const params = this.parseToolArguments(toolUse.arguments);
3732
+ const result = await tool.toolFn(params);
3733
+ return typeof result === "string" ? result : JSON.stringify(result);
3734
+ } catch (error) {
3735
+ const message = error instanceof Error ? error.message : String(error);
3736
+ return `Error: ${message}`;
3728
3737
  }
3729
- const params = this.parseToolArguments(toolUse.arguments);
3730
- const result = await tool.toolFn(params);
3731
- return typeof result === "string" ? result : JSON.stringify(result);
3732
3738
  }
3733
3739
  /**
3734
3740
  * Build and append tool call/result messages for the conversation history
@@ -13801,7 +13807,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
13801
13807
  // package.json
13802
13808
  var package_default = {
13803
13809
  name: "@bike4mind/cli",
13804
- version: "0.2.28",
13810
+ version: "0.2.29-cli-resume-command.18763+9e3ccc640",
13805
13811
  type: "module",
13806
13812
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
13807
13813
  license: "UNLICENSED",
@@ -13909,10 +13915,10 @@ var package_default = {
13909
13915
  },
13910
13916
  devDependencies: {
13911
13917
  "@bike4mind/agents": "0.1.0",
13912
- "@bike4mind/common": "2.50.0",
13913
- "@bike4mind/mcp": "1.29.0",
13914
- "@bike4mind/services": "2.48.0",
13915
- "@bike4mind/utils": "2.5.0",
13918
+ "@bike4mind/common": "2.50.1-cli-resume-command.18763+9e3ccc640",
13919
+ "@bike4mind/mcp": "1.29.1-cli-resume-command.18763+9e3ccc640",
13920
+ "@bike4mind/services": "2.48.1-cli-resume-command.18763+9e3ccc640",
13921
+ "@bike4mind/utils": "2.5.1-cli-resume-command.18763+9e3ccc640",
13916
13922
  "@types/better-sqlite3": "^7.6.13",
13917
13923
  "@types/diff": "^5.0.9",
13918
13924
  "@types/jsonwebtoken": "^9.0.4",
@@ -13929,7 +13935,7 @@ var package_default = {
13929
13935
  optionalDependencies: {
13930
13936
  "@vscode/ripgrep": "^1.17.0"
13931
13937
  },
13932
- gitHead: "28d4afd2bd097efcd751a14cbda1eee68cae2ad2"
13938
+ gitHead: "9e3ccc640da244f7528fa1a479d00e8b40b415a4"
13933
13939
  };
13934
13940
 
13935
13941
  // src/config/constants.ts
@@ -16675,7 +16681,7 @@ Available commands:
16675
16681
  /whoami - Show current authenticated user
16676
16682
  /usage - Show credit usage and balance
16677
16683
  /save <name> - Save current session
16678
- /sessions - List saved sessions
16684
+ /resume - List and resume saved sessions
16679
16685
  /config - Show configuration
16680
16686
 
16681
16687
  API Configuration:
@@ -16724,6 +16730,7 @@ Custom Commands:
16724
16730
  console.log(`\u2705 Session saved as "${sessionName}"`);
16725
16731
  break;
16726
16732
  }
16733
+ case "resume":
16727
16734
  case "sessions": {
16728
16735
  const sessions = await state.sessionStore.list(20);
16729
16736
  if (sessions.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.28",
3
+ "version": "0.2.29-cli-resume-command.18763+9e3ccc640",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -108,10 +108,10 @@
108
108
  },
109
109
  "devDependencies": {
110
110
  "@bike4mind/agents": "0.1.0",
111
- "@bike4mind/common": "2.50.0",
112
- "@bike4mind/mcp": "1.29.0",
113
- "@bike4mind/services": "2.48.0",
114
- "@bike4mind/utils": "2.5.0",
111
+ "@bike4mind/common": "2.50.1-cli-resume-command.18763+9e3ccc640",
112
+ "@bike4mind/mcp": "1.29.1-cli-resume-command.18763+9e3ccc640",
113
+ "@bike4mind/services": "2.48.1-cli-resume-command.18763+9e3ccc640",
114
+ "@bike4mind/utils": "2.5.1-cli-resume-command.18763+9e3ccc640",
115
115
  "@types/better-sqlite3": "^7.6.13",
116
116
  "@types/diff": "^5.0.9",
117
117
  "@types/jsonwebtoken": "^9.0.4",
@@ -128,5 +128,5 @@
128
128
  "optionalDependencies": {
129
129
  "@vscode/ripgrep": "^1.17.0"
130
130
  },
131
- "gitHead": "28d4afd2bd097efcd751a14cbda1eee68cae2ad2"
131
+ "gitHead": "9e3ccc640da244f7528fa1a479d00e8b40b415a4"
132
132
  }