@kernel.chat/kbot 3.99.29 → 3.99.31
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/agent.js +4 -1
- package/dist/doctor.js +6 -3
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -183,7 +183,10 @@ async function tryLocalFirst(message) {
|
|
|
183
183
|
// Fake-tool lookup. "Do you have a tool called X?" should be answered
|
|
184
184
|
// against the tool registry, not the LLM's priors. Probe-flake ("No" →
|
|
185
185
|
// "Yes" on the same question) observed on 2026-04-20.
|
|
186
|
-
|
|
186
|
+
// Require "called" or "named" before the tool name — otherwise a prompt
|
|
187
|
+
// like "a tool that reads files" matches with "that" as the tool name,
|
|
188
|
+
// which is a different question entirely.
|
|
189
|
+
const toolQuery = message.match(/do\s+you\s+have\s+a\s+tool\s+(?:called|named)\s+['"]?([\w-]+)['"]?\??/i);
|
|
187
190
|
if (toolQuery) {
|
|
188
191
|
const name = toolQuery[1];
|
|
189
192
|
const exists = !!getTool(name);
|
package/dist/doctor.js
CHANGED
|
@@ -164,7 +164,7 @@ async function checkLocalProviderReachable(providerId, providerConfig) {
|
|
|
164
164
|
else {
|
|
165
165
|
checkUrl = providerConfig.apiUrl.replace('/v1/chat/completions', '/v1/models');
|
|
166
166
|
}
|
|
167
|
-
const res = await fetch(checkUrl, { signal: AbortSignal.timeout(
|
|
167
|
+
const res = await fetch(checkUrl, { signal: AbortSignal.timeout(5000) });
|
|
168
168
|
if (!res.ok) {
|
|
169
169
|
return { name: providerConfig.name, status: 'fail', message: `returned ${res.status}` };
|
|
170
170
|
}
|
|
@@ -194,8 +194,11 @@ async function checkLocalProviderReachable(providerId, providerConfig) {
|
|
|
194
194
|
}
|
|
195
195
|
return { name: providerConfig.name, status: 'pass', message: 'running' };
|
|
196
196
|
}
|
|
197
|
-
catch {
|
|
198
|
-
|
|
197
|
+
catch (err) {
|
|
198
|
+
const reason = err instanceof Error
|
|
199
|
+
? (err.name === 'TimeoutError' ? 'timed out (>5s)' : err.message)
|
|
200
|
+
: 'not responding';
|
|
201
|
+
return { name: providerConfig.name, status: 'fail', message: reason };
|
|
199
202
|
}
|
|
200
203
|
}
|
|
201
204
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernel.chat/kbot",
|
|
3
|
-
"version": "3.99.
|
|
3
|
+
"version": "3.99.31",
|
|
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": {
|