@kernel.chat/kbot 3.99.27 → 3.99.28

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 +25 -0
  2. package/package.json +1 -1
package/dist/agent.js CHANGED
@@ -172,6 +172,31 @@ async function tryLocalFirst(message) {
172
172
  if (lower === 'pwd' || lower === 'where am i') {
173
173
  return process.cwd();
174
174
  }
175
+ // Identity short-circuit — deterministic answers for self-queries that
176
+ // small models confabulate on. Eval 2026-04-20 showed gemma4:latest
177
+ // answering "v3.99.14" for "what version are you" even with the IDENTITY
178
+ // GUARD block prepended to the user message. If the answer is derivable
179
+ // from package.json + config, return it directly.
180
+ if (message.length < 120) {
181
+ const { detectIdentityQuery } = await import('./identity-guard.js');
182
+ const kinds = detectIdentityQuery(message);
183
+ if (kinds.size > 0) {
184
+ try {
185
+ const { readFileSync } = await import('node:fs');
186
+ const { fileURLToPath } = await import('node:url');
187
+ const { dirname, join } = await import('node:path');
188
+ const here = dirname(fileURLToPath(import.meta.url));
189
+ const pkg = JSON.parse(readFileSync(join(here, '..', 'package.json'), 'utf-8'));
190
+ if (kinds.has('version') && !kinds.has('product') && !kinds.has('model') && !kinds.has('provider')) {
191
+ return `v${pkg.version}`;
192
+ }
193
+ if (kinds.has('product') || kinds.has('version')) {
194
+ return `@kernel.chat/kbot v${pkg.version} — an open-source terminal AI agent.`;
195
+ }
196
+ }
197
+ catch { /* fall through to LLM */ }
198
+ }
199
+ }
175
200
  return null;
176
201
  }
177
202
  /** Anthropic Messages API (Claude) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernel.chat/kbot",
3
- "version": "3.99.27",
3
+ "version": "3.99.28",
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": {