@polycode-projects/the-mechanical-code-talker 6.0.21 → 6.0.22
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/README.md +5 -15
- package/bin/tmct.mjs +8 -3
- package/package.json +1 -5
- package/src/adapters/memory/core.mjs +108 -96
- package/src/domain/agent-traits.mjs +1 -1
- package/src/domain/answer-variants.json +1 -1
- package/src/domain/cli-verbs.mjs +1 -0
- package/src/domain/memory/causal-stability.mjs +22 -5
- package/src/domain/memory/fact-order.mjs +3 -3
- package/src/domain/memory/provenance-time.mjs +35 -0
- package/src/domain/memory/retraction.mjs +3 -5
- package/src/domain/memory/trust.mjs +11 -11
- package/src/domain/news-feed.mjs +1 -1
- package/src/domain/seeded-random.mjs +6 -6
- package/src/services/adventure.mjs +10 -41
- package/src/services/chat-page-viz.mjs +12 -1111
- package/src/services/chat-session.mjs +20 -6
- package/src/services/chat.mjs +269 -197
- package/src/services/extract-facts.mjs +1 -1
- package/src/services/import-file.mjs +1 -1
- package/src/services/mud-viz.mjs +21 -1082
- package/src/services/mudiii-viz.mjs +0 -4
- package/src/services/pill-complete.mjs +5 -8
- package/src/services/predator-prey.mjs +3 -5
- package/src/surfaces/web/memory-ask-browser.bundle.js +107 -107
- package/src/surfaces/web/mud-browser-entry.mjs +8 -48
- package/test-benchmarks/agentbench/README.md +7 -10
- package/src/adapters/p2p/webrtc-transport.mjs +0 -169
- package/src/domain/p2p/facts.mjs +0 -102
- package/src/domain/p2p/peer-id.mjs +0 -47
- package/src/domain/p2p/provenance-relabel.mjs +0 -37
- package/src/domain/p2p/sync-filter.mjs +0 -43
- package/src/domain/p2p/wire.mjs +0 -126
- package/src/services/p2p-room.mjs +0 -848
- package/src/services/share-overlay-viz.mjs +0 -623
- package/src/surfaces/web/p2p-browser-entry.mjs +0 -39
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
// scenario swaps those first two calls for `.bootRiver(...)` once and
|
|
25
25
|
// `.applyRiver(...)` per crossing; the same stage draws the river.
|
|
26
26
|
//
|
|
27
|
-
// Deliberately absent, all P2P (mud.html's #statePill, share/join buttons,
|
|
28
|
-
// the share overlay, the wave button): this is the 1-player page. A later
|
|
29
|
-
// document adds sharing back from the same bundle.
|
|
30
|
-
//
|
|
31
27
|
// The page publishes through the ONE `globalThis.tmct` surface
|
|
32
28
|
// (tmct-surface.mjs), never a page-scoped bag of its own, and
|
|
33
29
|
// `createTicker`/`createSerialQueue` are spliced into the page script from
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
// these exact names, because createPillComplete calls the other two by bare
|
|
33
33
|
// name at runtime and that call only resolves if all three sit as siblings
|
|
34
34
|
// in the same inline script. `pillCompleteMarkup` is different: it is a
|
|
35
|
-
// markup BUILDER
|
|
36
|
-
// share-overlay-viz.mjs — it runs once, server/module-side, to produce the
|
|
35
|
+
// markup BUILDER — it runs once, server/module-side, to produce the
|
|
37
36
|
// initial HTML string a page embeds, and is never spliced into the client
|
|
38
37
|
// script. That is the only reason it may (and does) import `escapeHtml`.
|
|
39
38
|
//
|
|
@@ -189,10 +188,9 @@ export function matchPills(candidates, typed, opts = {}) {
|
|
|
189
188
|
* caller can `getElementById` them right after inserting this markup, before
|
|
190
189
|
* constructing `createPillComplete`.
|
|
191
190
|
*
|
|
192
|
-
* Runs once at page-render time (module- or server-side)
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* the one export in this module allowed to import `escapeHtml`.
|
|
191
|
+
* Runs once at page-render time (module- or server-side) — it is NOT one of
|
|
192
|
+
* the three functions an adopting page splices into its inline script, so it
|
|
193
|
+
* is the one export in this module allowed to import `escapeHtml`.
|
|
196
194
|
*/
|
|
197
195
|
export function pillCompleteMarkup({ inputId, inputHtml }) {
|
|
198
196
|
const esc = escapeHtml;
|
|
@@ -446,8 +444,7 @@ export function createPillComplete({ input, ghostEl, statusEl, railEl, getCandid
|
|
|
446
444
|
* the one exception: it is structural, not a themed colour choice — the
|
|
447
445
|
* ghost text sits in a layer BEHIND the input, so the input has to be
|
|
448
446
|
* see-through for the ghost's suffix to read at all. Themed through `--pc-*`
|
|
449
|
-
* custom properties defaulting to the site's shared tokens
|
|
450
|
-
* share-overlay-viz.mjs's `--so-*` variables do.
|
|
447
|
+
* custom properties defaulting to the site's shared tokens.
|
|
451
448
|
*/
|
|
452
449
|
export const PILL_COMPLETE_CSS = `
|
|
453
450
|
.pc-field {
|
|
@@ -168,9 +168,7 @@ const MUDIII_STATE_PREDICATE_SET = new Set([
|
|
|
168
168
|
* board, who put it there, and the class and model a mid-play mint needs. */
|
|
169
169
|
export const MUDIII_STATE_PREDICATES = Object.freeze([...MUDIII_STATE_PREDICATE_SET].sort());
|
|
170
170
|
|
|
171
|
-
/** Whether `predicate` carries live town-square state.
|
|
172
|
-
* reads this to tell a fact a turn produced from the page chrome around it.
|
|
173
|
-
* Pure. */
|
|
171
|
+
/** Whether `predicate` carries live town-square state. Pure. */
|
|
174
172
|
export function isMudiiiStatePredicate(predicate) {
|
|
175
173
|
const p = String(predicate || "");
|
|
176
174
|
return MUDIII_STATE_PREDICATE_SET.has(p) || EXIT_PREDICATE_RE.test(p);
|
|
@@ -204,8 +202,8 @@ export function seededSpawnCell(options, { layoutName, epoch = 0, turn = 0, id }
|
|
|
204
202
|
*
|
|
205
203
|
* Rows rank by the (epoch, turn) pair, exactly as adventure.mjs's
|
|
206
204
|
* foldWorldState does, so a recast can never be outranked by the run it
|
|
207
|
-
* replaced: a
|
|
208
|
-
*
|
|
205
|
+
* replaced: a turn-9 row written before the recast loses to a turn-1 row
|
|
206
|
+
* written after it. An unstamped row carries no stamp of its own and
|
|
209
207
|
* ranks as turn 0 of the CURRENT epoch — the world pack's own rows are
|
|
210
208
|
* exactly the state a fresh run starts from.
|
|
211
209
|
*
|