You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 65faaa7
Browse filesBrowse the repository at this point in the historyBrowse files
Start hooks through an .mjs launcher that enables Node's compile cache
- Each registered hook runs a small .mjs that calls enableCompileCache and imports its .mts, cutting ~30 ms of type stripping per start
- The .mts modules install as plain file components; a contract test keeps every node registration on .mjs
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The consequence that matters most: **nothing here executes from the repo.** Edit
25
25
26
26
**Run the suite twice when touching state handling** — CI does (`.github/workflows/ci.yml`). The gate's barrier is scoped by a monotonic turn counter rather than wall-clock time.
27
27
28
-
Node 22.6+ runs `.mts` files directly with `--experimental-strip-types --disable-warning=ExperimentalWarning`. `.mts` keeps the module format independent of the target project's `package.json`. Development dependencies are only for typechecking; hooks import Node built-ins and `hooks/shared.mts`. MCS installs that library as `hooks/memory/shared.mts` beside the entry points. `hooks/memory-loop-activator.sh` stays in shell because it only prints a static reminder on every prompt; its output is covered by the same contract fixtures.
28
+
Node 22.6+ runs `.mts` files directly with `--experimental-strip-types --disable-warning=ExperimentalWarning`. `.mts` keeps the module format independent of the target project's `package.json`. Development dependencies are only for typechecking; hooks import Node built-ins and `hooks/shared.mts`. MCS installs that library as `hooks/memory/shared.mts` beside the entry points. Every registered hook is an `.mjs` launcher (`hooks/kb-gate.mjs`, `hooks/sync-memories.mjs`) that calls `module.enableCompileCache()` and then imports its `.mts`, which is installed as a plain file component. Type stripping costs about 30 ms per start whatever the file's size, so a registered `.mts`, however small, pays it every time; the cache keeps the stripped module until its content changes. A contract test asserts every node registration is `.mjs`. `hooks/memory-loop-activator.sh` stays in shell because it only prints a static reminder on every prompt; its output is covered by the same contract fixtures.
29
29
30
30
Two harness details are load-bearing rather than incidental:
0 commit comments