mnemonica 1.2.8 → 1.2.9

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 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
 
@@ -314,8 +315,9 @@ The object carries none of the internal props as own properties — they live in
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.
316
317
  - **[`@mnemonica/topologica`](https://www.npmjs.com/package/@mnemonica/topologica)** — Module loader that self-defines directory trees of mnemonica types.
317
- - **nestjs-adapter** — NestJS integration (dive-powered flow tracing across DI boundaries); in active development.
318
- - **mnemographica** — VS Code extension that explores a project's `.tactica` output as tree views (definitions, usages, flow, generations) with go-to-definition navigation.
318
+ - **nestjs-adapter** (`@mnemonica/nestjs`) — NestJS integration (dive-powered flow tracing across DI boundaries, OTel/Jaeger spans); in active development.
319
+ - **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.
320
+ - **strategy** (`@mnemonica/strategy`) — the live bridge to a running application: trace streaming plus live-craft (define/swap constructors without a restart); in active development. See [`docs/tooling.md`](./docs/tooling.md).
319
321
 
320
322
  ---
321
323
 
@@ -328,8 +330,15 @@ npm run build # tsc only — lint is a separate gate
328
330
  npx eslint ./src # zero warnings allowed
329
331
  npm run test:cov # Mocha on built JS (100% coverage required)
330
332
  npm run test:jest:cov # Jest on TS source (100% coverage required)
333
+ npm run debug # step through the mocha suite under CDP (chrome://inspect)
331
334
  ```
332
335
 
336
+ Walking the test suite under a debugger is the fastest honest tour of the
337
+ internals — every `return` in `src/` goes through an intermediate variable
338
+ exactly so you can hover it at a breakpoint. See
339
+ [`docs/tooling.md`](./docs/tooling.md) for this and the rest of the
340
+ surrounding toolchain.
341
+
333
342
  `tsconfig.json` and `eslint.config.js` are off-limits without explicit user approval.
334
343
 
335
344
  ---
@@ -0,0 +1,50 @@
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
+ | [`typeomatica`](https://www.npmjs.com/package/typeomatica) | published | Runtime field-type enforcement via Proxy ([`./typeomatica.md`](./typeomatica.md)) |
11
+ | [`@mnemonica/topologica`](https://www.npmjs.com/package/@mnemonica/topologica) | published | Module loader that self-defines directory trees of types |
12
+ | `@mnemonica/nestjs` (nestjs-adapter) | in active development | NestJS wiring: DTO → validated mnemonica instance, dive tracing across DI boundaries, OTel spans (Jaeger) per request and per construction |
13
+ | mnemographica | in active development | VS Code extension: `.tactica` as tree views + interactive 3D type graph + a Live Trace sidebar fed by a running app |
14
+ | `@mnemonica/strategy` | in active development | 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) |
15
+
16
+ ## Two modes worth knowing about
17
+
18
+ ### Watch a running application
19
+
20
+ With the nestjs adapter installed, a running app emits dive trace events and
21
+ OTel spans. mnemographica's **Live Trace** view collects them (recent traces,
22
+ errored ones in red, click to isolate in the 3D graph or open in Jaeger), and
23
+ its **App Channel** tab connects straight to the app's embedded strategy WS
24
+ channel — no debugger involved.
25
+
26
+ ### Live-craft: change constructors without a restart
27
+
28
+ The strategy channel can also **define new types and swap their constructors
29
+ inside a running process** — a development mode: you craft a type and
30
+ immediately see it. Types born this way are *shimmed*: mnemonica keeps a
31
+ stable shell constructor forever while the real implementation lives behind
32
+ it, replaceable via `swap`. Source-born types are never swappable. The full
33
+ story lives in strategy's `docs/live-craft.md`.
34
+
35
+ ## Debug the library's own tests (and learn the internals)
36
+
37
+ Mnemonica's own mocha suite runs under the Chrome DevTools Protocol — the
38
+ same protocol the strategy bridge uses:
39
+
40
+ ```bash
41
+ npm run debug # builds src, then mocha --inspect-brk on test/
42
+ npm run test:jest:debug # the jest suite, likewise
43
+ ```
44
+
45
+ Then open `chrome://inspect` (or attach VS Code) and step through the suite
46
+ construction by construction. Every `return` in `src/` goes through an
47
+ intermediate variable exactly so you can hover it at a `return` breakpoint —
48
+ walking the tests this way is the fastest honest tour of the internals:
49
+ proxy construction, the Mnemosyne memory layer, hooks firing, error paths.
50
+ Much better than reading logs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnemonica",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
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",