@polycode-projects/the-mechanical-code-talker 2.7.15 → 2.7.16

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.15",
3
+ "version": "2.7.16",
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.",
@@ -651,6 +651,18 @@ export async function runSpiderFlyTick(memoryDir, opts = {}) {
651
651
  }
652
652
 
653
653
  const ecology = runEcologyPass({ state, postMovePlacements, postMoveMassByFly, postMoveMassBySpider, turn: k });
654
+ // A fly eaten or starved THIS tick was already assigned a pre-ecology
655
+ // goal/position above (movement runs before the ecology pass resolves
656
+ // eating) — left as-is, the same response would both announce "fly-5 was
657
+ // eaten" and still list fly-5's stale "trapped, can't move" goal one clause
658
+ // later, as if it were still on the board. Drop it from `agents` (its own
659
+ // goal is moot) and let the eating spider's line say what actually
660
+ // happened instead of the now-false "co-located with fly-5 in the web".
661
+ for (const { fly, spider } of ecology.events.eaten) {
662
+ delete agents[fly];
663
+ if (agents[spider]) agents[spider].goal = `just ate ${fly} in the web.`;
664
+ }
665
+ for (const flyId of ecology.events.starved) delete agents[flyId];
654
666
  const writes = [...movementWrites, ...ecology.writes];
655
667
  const provenance = `${worldProvenanceTag(WORLD_NAME)}:turn${k}`;
656
668
  await appendFacts(memoryDir, writes.map((f) => ({ ...f, provenance })));