@kernel.chat/kbot 3.99.24 → 3.99.25

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 +7 -2
  2. package/package.json +1 -1
package/dist/agent.js CHANGED
@@ -1331,10 +1331,15 @@ Always quote file paths that contain spaces. Never reference internal system nam
1331
1331
  description: t.description,
1332
1332
  input_schema: t.input_schema,
1333
1333
  }));
1334
- // Build messages with RLM-style context management
1334
+ // Build messages with RLM-style context management. Guards (math,
1335
+ // identity) are also injected into the system context for long-turn
1336
+ // coherence, but we repeat them here because small local models
1337
+ // (4B-class) ignore system context for deterministic queries.
1338
+ const guardPreamble = mathGuardSnippet + (mathGuardSnippet && identityGuardSnippet ? '\n' : '') + identityGuardSnippet;
1339
+ const guardedUserContent = guardPreamble ? guardPreamble + '\n' + message : message;
1335
1340
  const rawMessages = [
1336
1341
  ...getPreviousMessages(memSession),
1337
- { role: 'user', content: message },
1342
+ { role: 'user', content: guardedUserContent },
1338
1343
  ...loopMessages,
1339
1344
  ];
1340
1345
  // Auto-compact conversation history — entropy-aware compression
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernel.chat/kbot",
3
- "version": "3.99.24",
3
+ "version": "3.99.25",
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": {