@kernel.chat/kbot 3.99.6 → 3.99.7

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 (2) hide show
  1. package/dist/agent.js +5 -3
  2. package/package.json +1 -1
package/dist/agent.js CHANGED
@@ -108,9 +108,11 @@ async function safeReadBody(res, maxBytes = MAX_RESPONSE_BODY) {
108
108
  // ── Local-first execution ──
109
109
  async function tryLocalFirst(message) {
110
110
  const lower = message.toLowerCase().trim();
111
- // Only match file-like paths — avoid intercepting "open chrome" or "show me how to..."
112
- const readMatch = lower.match(/^(?:read|cat|view)\s+(.+)$/i)
113
- || lower.match(/^(?:show|open)\s+((?:\.{0,2}\/|~\/|\w+\.\w+).+)$/i);
111
+ // Only match simple "read <single-filepath>" reject anything with trailing
112
+ // conversational text. Prevents "Read package.json and tell me X" from
113
+ // feeding the whole prompt to read_file as a filename.
114
+ const readMatch = lower.match(/^(?:read|cat|view)\s+(\S+)\s*$/i)
115
+ || lower.match(/^(?:show|open)\s+((?:\.{0,2}\/|~\/|[\w.-]+\.[\w-]+))\s*$/i);
114
116
  if (readMatch) {
115
117
  const tool = getTool('read_file');
116
118
  if (tool)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernel.chat/kbot",
3
- "version": "3.99.6",
3
+ "version": "3.99.7",
4
4
  "description": "Open-source terminal AI agent. 787+ tools, 35 agents, 20 providers. Dreams, learns, watches your system. Controls your phone. Fully local, fully sovereign. MIT.",
5
5
  "type": "module",
6
6
  "repository": {