mnemonica 1.2.8 → 1.3.0
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 +12 -2
- package/docs/tooling.md +51 -0
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -296,6 +296,7 @@ The full API reference — every signature, config option, hook data shape, the
|
|
|
296
296
|
| HoTT framing, with an honesty table | [`docs/hott-primer.md`](./docs/hott-primer.md) |
|
|
297
297
|
| HoTT correspondence, citable and CI-verified | [`docs/hott-correspondence.md`](./docs/hott-correspondence.md) |
|
|
298
298
|
| Why lineage is infrastructure for empathetic AI | [`docs/empathy-in-ai.md`](./docs/empathy-in-ai.md) |
|
|
299
|
+
| The toolchain around the library: tracing, live-craft, test debugging | [`docs/tooling.md`](./docs/tooling.md) |
|
|
299
300
|
|
|
300
301
|
How construction flows, in one line:
|
|
301
302
|
|
|
@@ -313,9 +314,11 @@ The object carries none of the internal props as own properties — they live in
|
|
|
313
314
|
- **[`@mnemonica/tactica`](https://www.npmjs.com/package/@mnemonica/tactica)** — CLI/codegen. Scans your `define()` and `@decorate()` calls and generates the `TypeRegistry` augmentation that makes `lookup()` fully typed (plus `types.ts`, definitions/usages/flow/hierarchy JSON).
|
|
314
315
|
- **[`typeomatica`](https://www.npmjs.com/package/typeomatica)** — Runtime field-type enforcement via Proxy, with the `@Strict` decorator. See [`docs/typeomatica.md`](./docs/typeomatica.md).
|
|
315
316
|
- **[`@mnemonica/dive`](https://www.npmjs.com/package/@mnemonica/dive)** — Execution-flow tracing: a palette of wrappers that let you see which request/flow a failure belongs to, without AsyncLocalStorage.
|
|
317
|
+
- **[`@mnemonica/otel`](https://www.npmjs.com/package/@mnemonica/otel)** — the framework-free observability engine: the dive ↔ mnemonica lifecycle wiring (`attachHooks`), OpenTelemetry providers, the ALS async-flow backbone, and the pre-root forensics store — usable from Express, Fastify, raw `http`, queues, CLIs.
|
|
316
318
|
- **[`@mnemonica/topologica`](https://www.npmjs.com/package/@mnemonica/topologica)** — Module loader that self-defines directory trees of mnemonica types.
|
|
317
|
-
- **nestjs
|
|
318
|
-
- **mnemographica** — VS Code extension
|
|
319
|
+
- **[`@mnemonica/nestjs`](https://www.npmjs.com/package/@mnemonica/nestjs)** — NestJS integration (dive-powered flow tracing across DI boundaries, OTel/Jaeger spans per request and per construction), layered over `@mnemonica/otel`.
|
|
320
|
+
- **mnemographica** ([GitHub](https://github.com/mythographica/mnemographica)) — VS Code extension: `.tactica` tree views with go-to-definition, an interactive 3D type graph, and a Live Trace sidebar fed by a running app; in active development.
|
|
321
|
+
- **[`@mnemonica/strategy`](https://www.npmjs.com/package/@mnemonica/strategy)** — the live bridge to a running application: trace streaming plus live-craft (define/swap constructors without a restart). See [`docs/tooling.md`](./docs/tooling.md).
|
|
319
322
|
|
|
320
323
|
---
|
|
321
324
|
|
|
@@ -328,8 +331,15 @@ npm run build # tsc only — lint is a separate gate
|
|
|
328
331
|
npx eslint ./src # zero warnings allowed
|
|
329
332
|
npm run test:cov # Mocha on built JS (100% coverage required)
|
|
330
333
|
npm run test:jest:cov # Jest on TS source (100% coverage required)
|
|
334
|
+
npm run debug # step through the mocha suite under CDP (chrome://inspect)
|
|
331
335
|
```
|
|
332
336
|
|
|
337
|
+
Walking the test suite under a debugger is the fastest honest tour of the
|
|
338
|
+
internals — every `return` in `src/` goes through an intermediate variable
|
|
339
|
+
exactly so you can hover it at a breakpoint. See
|
|
340
|
+
[`docs/tooling.md`](./docs/tooling.md) for this and the rest of the
|
|
341
|
+
surrounding toolchain.
|
|
342
|
+
|
|
333
343
|
`tsconfig.json` and `eslint.config.js` are off-limits without explicit user approval.
|
|
334
344
|
|
|
335
345
|
---
|
package/docs/tooling.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Tooling around mnemonica
|
|
2
|
+
|
|
3
|
+
The library itself is runtime-only — but the ecosystem around it has grown
|
|
4
|
+
a toolchain for **seeing** what your type graph does. This page is the map.
|
|
5
|
+
|
|
6
|
+
| Tool | Status | What it gives you |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| [`@mnemonica/tactica`](https://www.npmjs.com/package/@mnemonica/tactica) | published | Static analysis + codegen: scans `define()`/`@decorate()` and emits `.tactica/` artifacts (types.ts, hierarchy/definitions/usages/flow JSON) |
|
|
9
|
+
| [`@mnemonica/dive`](https://www.npmjs.com/package/@mnemonica/dive) | published | Execution-flow tracing: wrapped calls/creations as a trace ring, errors pinned to the instance that carried them — no AsyncLocalStorage |
|
|
10
|
+
| [`@mnemonica/otel`](https://www.npmjs.com/package/@mnemonica/otel) | published | The framework-free observability engine: `attachHooks` (the dive ↔ mnemonica lifecycle wiring), OTel providers, the ALS async-flow backbone, the pre-root forensics store |
|
|
11
|
+
| [`typeomatica`](https://www.npmjs.com/package/typeomatica) | published | Runtime field-type enforcement via Proxy ([`./typeomatica.md`](./typeomatica.md)) |
|
|
12
|
+
| [`@mnemonica/topologica`](https://www.npmjs.com/package/@mnemonica/topologica) | published | Module loader that self-defines directory trees of types |
|
|
13
|
+
| [`@mnemonica/nestjs`](https://www.npmjs.com/package/@mnemonica/nestjs) | published | NestJS wiring: DTO → validated mnemonica instance, dive tracing across DI boundaries, OTel spans (Jaeger) per request and per construction — layered over `@mnemonica/otel` |
|
|
14
|
+
| [mnemographica](https://github.com/mythographica/mnemographica) | in active development | VS Code extension: `.tactica` as tree views + interactive 3D type graph + a Live Trace sidebar fed by a running app |
|
|
15
|
+
| [`@mnemonica/strategy`](https://www.npmjs.com/package/@mnemonica/strategy) | published | The live bridge: attaches to a running app (CDP, or the app's own embedded WS channel) and exposes it to agents/tooling — trace streaming, and live-craft (below) |
|
|
16
|
+
|
|
17
|
+
## Two modes worth knowing about
|
|
18
|
+
|
|
19
|
+
### Watch a running application
|
|
20
|
+
|
|
21
|
+
With the nestjs adapter installed, a running app emits dive trace events and
|
|
22
|
+
OTel spans. mnemographica's **Live Trace** view collects them (recent traces,
|
|
23
|
+
errored ones in red, click to isolate in the 3D graph or open in Jaeger), and
|
|
24
|
+
its **App Channel** tab connects straight to the app's embedded strategy WS
|
|
25
|
+
channel — no debugger involved.
|
|
26
|
+
|
|
27
|
+
### Live-craft: change constructors without a restart
|
|
28
|
+
|
|
29
|
+
The strategy channel can also **define new types and swap their constructors
|
|
30
|
+
inside a running process** — a development mode: you craft a type and
|
|
31
|
+
immediately see it. Types born this way are *shimmed*: mnemonica keeps a
|
|
32
|
+
stable shell constructor forever while the real implementation lives behind
|
|
33
|
+
it, replaceable via `swap`. Source-born types are never swappable. The full
|
|
34
|
+
story lives in strategy's `docs/live-craft.md`.
|
|
35
|
+
|
|
36
|
+
## Debug the library's own tests (and learn the internals)
|
|
37
|
+
|
|
38
|
+
Mnemonica's own mocha suite runs under the Chrome DevTools Protocol — the
|
|
39
|
+
same protocol the strategy bridge uses:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run debug # builds src, then mocha --inspect-brk on test/
|
|
43
|
+
npm run test:jest:debug # the jest suite, likewise
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then open `chrome://inspect` (or attach VS Code) and step through the suite
|
|
47
|
+
construction by construction. Every `return` in `src/` goes through an
|
|
48
|
+
intermediate variable exactly so you can hover it at a `return` breakpoint —
|
|
49
|
+
walking the tests this way is the fastest honest tour of the internals:
|
|
50
|
+
proxy construction, the Mnemosyne memory layer, hooks firing, error paths.
|
|
51
|
+
Much better than reading logs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnemonica",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "AI-agent ready instance inheritance system for JavaScript/TypeScript via prototype chains",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"browser": "./module/index.js",
|
|
17
17
|
"require": "./build/index.js",
|
|
18
18
|
"default": "./build/index.js"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
20
21
|
},
|
|
21
22
|
"files": [
|
|
22
23
|
"README.md",
|
|
@@ -91,13 +92,13 @@
|
|
|
91
92
|
},
|
|
92
93
|
"homepage": "https://github.com/wentout/mnemonica#readme",
|
|
93
94
|
"devDependencies": {
|
|
94
|
-
"@eslint/eslintrc": "^3.3.
|
|
95
|
+
"@eslint/eslintrc": "^3.3.7",
|
|
95
96
|
"@eslint/js": "^9.21.0",
|
|
96
|
-
"@mnemonica/tactica": "^0.1.
|
|
97
|
+
"@mnemonica/tactica": "^0.1.15",
|
|
97
98
|
"@types/jest": "^29.5.14",
|
|
98
99
|
"@types/node": "^22.20.1",
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
100
|
-
"@typescript-eslint/parser": "^8.
|
|
100
|
+
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
101
|
+
"@typescript-eslint/parser": "^8.70.0",
|
|
101
102
|
"chai": "^5.3.3",
|
|
102
103
|
"eslint": "^9.39.5",
|
|
103
104
|
"eslint-plugin-import": "^2.32.0",
|