@polycode-projects/the-mechanical-code-talker 2.7.16 → 2.7.18
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polycode-projects/the-mechanical-code-talker",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.18",
|
|
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.",
|
|
@@ -370,6 +370,11 @@ async function writeWorldTurn(memoryDir, world, k, facts, cache) {
|
|
|
370
370
|
const VIEW_EXCLUDED_PREDICATES = new Set([
|
|
371
371
|
"mgx:hidden-in", "mgx:is-open", "mgx:is-npc", "mgx:is-container",
|
|
372
372
|
"mgx:unlocks-with", "mgx:acts-on-turn", "mgx:acts-toward",
|
|
373
|
+
// mgx:is-objective (PLAN_GAMES_UPLIFT_V2.md Part B) is an internal marker
|
|
374
|
+
// for auto-play's goal inference — the same information the opening
|
|
375
|
+
// narration already tells a human player in prose, never meant to surface
|
|
376
|
+
// as a raw, unphrased triple ("Letter mgx:is-objective true.") itself.
|
|
377
|
+
"mgx:is-objective",
|
|
373
378
|
]);
|
|
374
379
|
|
|
375
380
|
const sentenceCase = (term) => String(term).charAt(0).toUpperCase() + String(term).slice(1);
|
|
@@ -651,6 +651,25 @@ export async function runSpiderFlyTick(memoryDir, opts = {}) {
|
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
const ecology = runEcologyPass({ state, postMovePlacements, postMoveMassByFly, postMoveMassBySpider, turn: k });
|
|
654
|
+
// Every agent's goal was assigned during movement, before this same tick's
|
|
655
|
+
// ecology pass resolves eating/starving — so a THIRD agent's goal can name
|
|
656
|
+
// a subject that dies in this exact tick just as easily as the dying
|
|
657
|
+
// subject's own goal can (a fly's "evading — last saw spider-1 ..." is
|
|
658
|
+
// just as stale as spider-1's own entry once spider-1 starves this tick).
|
|
659
|
+
// Scrub every remaining agent's goal of a died-this-tick reference BEFORE
|
|
660
|
+
// the specific eaten-pair handling below, so that handling's own nicer
|
|
661
|
+
// "just ate X" message (set second) always wins for the eating spider,
|
|
662
|
+
// whose pre-scrub goal also names its prey. `(?!\d)` keeps "fly-1" from
|
|
663
|
+
// false-matching inside "fly-10".
|
|
664
|
+
const diedThisTick = [...ecology.events.eaten.map((e) => e.fly), ...ecology.events.starved];
|
|
665
|
+
for (const id of Object.keys(agents)) {
|
|
666
|
+
for (const deadId of diedThisTick) {
|
|
667
|
+
if (new RegExp(`${deadId}(?!\\d)`).test(agents[id].goal)) {
|
|
668
|
+
agents[id].goal = `${deadId} is gone — re-evaluating.`;
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
654
673
|
// A fly eaten or starved THIS tick was already assigned a pre-ecology
|
|
655
674
|
// goal/position above (movement runs before the ecology pass resolves
|
|
656
675
|
// eating) — left as-is, the same response would both announce "fly-5 was
|