@mmon-co/ncept-default-theory 3.0.33 → 3.0.34

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/dist/chat.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { renderSpeech } from "@mmon-co/ncept-core/theory/speaker";
2
2
  /* eslint-disable require-yield -- Chat setup is a zero-effect synchronous Program. */
3
- import { provenanceOf, lastMetadataContribution, metadataSetsForEntity, NODE_CRITERION_PROPERTY, NODE_LABEL_PROPERTY, PEDAGOGY_OPENING_PROPERTY, PEDAGOGY_FIRST_MESSAGE_PROPERTY, nodeCascadedProperty, route, } from "@mmon-co/ncept-core/patch";
3
+ import { provenanceOf, lastMetadataContribution, metadataSetsForEntity, NODE_CRITERION_PROPERTY, NODE_LABEL_PROPERTY, PEDAGOGY_OPENING_PROPERTY, PEDAGOGY_FIRST_MESSAGE_PROPERTY, nodeCascadedProperty, nodeGuidance, route, } from "@mmon-co/ncept-core/patch";
4
4
  import { CATALOG_MODE_TOOLS, CATALOG_MODE_TITLES, CATALOG_MODE_METADATA_KEYS } from "./catalog-contract.js";
5
5
  import { isDefaultObservation, isMemory, memoryDefault } from "./state.js";
6
6
  import { skillBody, skillResources, skillsForMode, tutorSystemPrompt } from "./skills.js";
@@ -155,6 +155,18 @@ function tutorOpening(ctx) {
155
155
  .filter(Boolean)
156
156
  .join("\n");
157
157
  }
158
+ /** Pool the focus Nodes' cascaded guidance by origin, keeping the Nodes each entry reaches. */
159
+ function lessonGuidance(graph, nodes) {
160
+ const pooled = new Map();
161
+ for (const node of nodes)
162
+ for (const { text, origin } of nodeGuidance(graph, node)) {
163
+ const key = `${origin.metadataSet}#${origin.entryIndex}`;
164
+ const entry = pooled.get(key) ?? { text, nodes: [] };
165
+ entry.nodes.push(node);
166
+ pooled.set(key, entry);
167
+ }
168
+ return pooled.size ? [...pooled.values()] : undefined;
169
+ }
158
170
  function dueNodes(ctx) {
159
171
  const { graph, state, entry } = ctx;
160
172
  const due = defaultQueryTokens["review:due"](state, graph);
@@ -220,6 +232,7 @@ function* setup(ctx, mode) {
220
232
  : [
221
233
  `Current Lesson progress (current theory reading):\n${JSON.stringify({
222
234
  lesson: here,
235
+ guidance: lessonGuidance(ctx.graph, here.nodes),
223
236
  ...progress,
224
237
  completion: here.nodes.map((node) => ({
225
238
  node,
package/dist/release.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const theoryContent = "f67d67d602c4260b5e004e5ac2b5d30b3bcc25650d8725b72bc5fa2c415ff6f7";
1
+ export declare const theoryContent = "f955661fdb8551d87ccf501461c95d55dbd5ac898eff07c46d691c405d631ccd";
package/dist/release.js CHANGED
@@ -1 +1 @@
1
- export const theoryContent = "f67d67d602c4260b5e004e5ac2b5d30b3bcc25650d8725b72bc5fa2c415ff6f7";
1
+ export const theoryContent = "f955661fdb8551d87ccf501461c95d55dbd5ac898eff07c46d691c405d631ccd";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmon-co/ncept-default-theory",
3
- "version": "3.0.33",
3
+ "version": "3.0.34",
4
4
  "license": "FSL-1.1-ALv2",
5
5
  "repository": {
6
6
  "type": "git",