@polycode-projects/the-mechanical-code-talker 7.0.0 → 7.1.1
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/adapters/corpus/wiktionary-live.mjs +8 -3
- package/src/domain/feed-normalize.mjs +3 -0
- package/src/services/chat-session.mjs +17 -9
- package/src/services/chat-voice.mjs +27 -0
- package/src/services/chat.mjs +274 -209
- package/src/services/world-teach.mjs +14 -7
- package/src/surfaces/web/chat-browser-entry.mjs +15 -4
- package/src/surfaces/web/memory-ask-browser.bundle.js +135 -135
- package/src/surfaces/web/turn-session.mjs +5 -3
|
@@ -67,9 +67,10 @@ function turnErrorFallback(message) {
|
|
|
67
67
|
* session was built over, exposed so a caller can put a question to the same
|
|
68
68
|
* graph its turns run against (engine-surface.mjs's `graphAsk`) without
|
|
69
69
|
* holding a second reference to it. `turn(line, callArgs)`
|
|
70
|
-
* resolves to `{ answer, end, record, plan, research }` — the union of every
|
|
70
|
+
* resolves to `{ answer, end, record, plan, research, taught }` — the union of every
|
|
71
71
|
* field any of the nine originals reads; a caller ignores what it doesn't
|
|
72
|
-
* need. `
|
|
72
|
+
* need. `taught` is runTurn's own flag: true when the turn stored or forgot a
|
|
73
|
+
* fact or a rule on the user's word, false otherwise (and false on a throw). `research` is passed through undefined/null/a queue snapshot exactly
|
|
73
74
|
* as `runTurn` returned it (a caller may distinguish "not a research turn"
|
|
74
75
|
* from "a research turn that just ended").
|
|
75
76
|
*
|
|
@@ -101,7 +102,7 @@ export function createTurnSession({
|
|
|
101
102
|
});
|
|
102
103
|
} catch (e) {
|
|
103
104
|
const message = e instanceof Error ? e.message : String(e);
|
|
104
|
-
return { answer: turnErrorFallback(message), end: false, record: null, plan: null, research: null };
|
|
105
|
+
return { answer: turnErrorFallback(message), end: false, record: null, plan: null, research: null, taught: false };
|
|
105
106
|
}
|
|
106
107
|
focus = result.focus;
|
|
107
108
|
last = result.last;
|
|
@@ -115,6 +116,7 @@ export function createTurnSession({
|
|
|
115
116
|
record: result.record ?? null,
|
|
116
117
|
plan: result.plan ?? null,
|
|
117
118
|
research: result.research,
|
|
119
|
+
taught: Boolean(result.taught),
|
|
118
120
|
};
|
|
119
121
|
}
|
|
120
122
|
|