@polycode-projects/the-mechanical-code-talker 2.11.2 → 2.11.3
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/package.json +1 -1
- package/src/services/chat.mjs +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polycode-projects/the-mechanical-code-talker",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The Mechanical Code Talker (tmct) — a tolerant, offline, $0 chat surface that guides you toward precision queries about a software repository. ELIZA/PARRY-style but domain-obsessed with code. No model calls; no codebase index of its own.",
|
package/src/services/chat.mjs
CHANGED
|
@@ -3163,6 +3163,14 @@ async function unknownAdjectiveFallback(payload, { memoryDir, sessionId, lexicon
|
|
|
3163
3163
|
if (!m) return null;
|
|
3164
3164
|
const [, det, subjectRaw, verb, objectRaw] = m;
|
|
3165
3165
|
if (PLACE_ADVERB_OBJECT_RE.test(objectRaw)) return null; // a place adverb is never a property
|
|
3166
|
+
// An ARTICLED complement ("a dog is a mammal") is a noun-phrase kind claim,
|
|
3167
|
+
// never an adjective property — but UNKNOWN_SUBJECT_RE strips the object's
|
|
3168
|
+
// article before capture, so objectRaw alone can't show the difference from
|
|
3169
|
+
// "the cache is bespoke". Without this re-check, a fact-grounded subject
|
|
3170
|
+
// silently minted the kind claim as an mgx:hasProperty garble that the isa
|
|
3171
|
+
// read-back then denied. Declining here lands on the honest teach-miss,
|
|
3172
|
+
// whose nudge already names the storable form ("every dog is a mammal").
|
|
3173
|
+
if (/\s+(?:is|are)\s+an?\s+[\w-]+[.!?]*\s*$/i.test(String(payload).trim())) return null;
|
|
3166
3174
|
const { loadLexicon, lookupNoun, lookupAdjective, classify } = await import("../domain/grammar/lexicon.mjs");
|
|
3167
3175
|
const lex = lexicon || loadLexicon();
|
|
3168
3176
|
// Y already a known NOUN or a fact-grounded CLASS term — a genuine class-
|