MEOW RUNTIME AND TOOLCHAIN SPECIFICATION (LLMS.TXT) INDEX 1. SYSTEM OVERVIEW & CORE PHILOSOPHY 2. INSTALLATION & DIRECTORY STRUCTURE 3. CONFIGURATION SPECIFICATION (meow.config.json & package.json) 4. RUNTIME MODES & DETERMINISM MECHANICS 5. THE PACKAGE MANAGER (Commands, Cache, Materialization, Lockfile) 6. THE EXECUTION LAYER (Runners, Shims, Workers, Permissions) 7. MODULE RESOLUTION & INTEROP 8. BUILT-IN MODULES (meow:http, meow:ui, meow:test) 9. TYPESCRIPT COMPILATION PIPELINE 10. STATIC ANALYSIS & TOOLING (Check, Lint, Fmt, Bundle) 11. OBSERVABILITY DIAGNOSTICS 12. CLI COMPLETE COMMAND & FLAG REFERENCE 1. SYSTEM OVERVIEW & CORE PHILOSOPHY meow is a single-binary JavaScript/TypeScript runtime, package manager, and development toolchain built in Rust. - Engine: Built on a tuned V8 build embedded via deno_core. - AST Shared Model: Uses a single lossless parse via Oxc [9] to drive the formatter, linter, type-stripping runtime, and bundler [12]. No redundant parsing passes [12]. - Execution: Multi-isolate cooperative single-threaded scheduling on a Tokio LocalSet [12]. Offloads file writing, SHA-512 verification, and tarball decompression to background OS threads to preserve event loop latency [12]. - Design Tension: "Floof" (terminal UX, Bento-panels, diagnostic frames) paired with "Teeth" (zero-copy, copy-on-write, fat-LTO Rust engineering) [12]. 2. INSTALLATION & DIRECTORY STRUCTURE Installer curl -fsSL https://meow.style/install | sh [15] drops the binary into ~/.meow/bin and updates the environment PATH [15]. Global State Directory (~/.meow / relocatable via MEOW_HOME [11]) - ~/.meow/bin: Main executable and the node/npm/npx/bun/yarn shims [15]. - ~/.meow/cache//: Content-addressed store for package tarball blobs [3, 15]. - ~/.meow/cache/metadata: Unpacked npm registry metadata with a 5-minute freshness cache [3, 15]. - ~/.meow/cache/unpacked: Extracted store of package files [15]. - ~/.meow/global: Globally installed package links via meow add -g [4, 15]. Project Directory Structure project/ ├── meow.config.json # Workspace, lint, and runtime configuration (User Edited) ├── package.json # Dependency authority, metadata, scripts (User/CLI Edited) ├── meow.lock.jsonl # Resolved deterministic dependency graph (Auto-Generated, Commit) ├── tsconfig.json # Editor shim referencing .meow/tsconfig.json (Auto-Generated, Commit) ├── .meow/ # Internal compiler artifact cache (Gitignored) │ ├── tsconfig.json # Absolute compiler settings for LSP / tsc │ ├── strict-web.d.ts # Ambient global declarations for strict-web mode │ └── types/meow/ # Types for first-party meow:* modules └── node_modules/ # Materialized runtime dependency targets (Gitignored) └── .meow/ # Copy-on-write store and flat layout edges 3. CONFIGURATION SPECIFICATION meow.config.json A closed-schema, camelCase JSON file [1]. Unknown keys raise parsing errors [1]. Typing meow.config.ts yields a descriptive meow.config.ts evaluation is not yet supported error without executing [1]. { "mode": "strict-web", // "strict-web" | "node-compat" | "legacy" (Active) "workspace": { "packages": ["apps/*", "packages/*"] // Glob roots for monorepo (Accepted) }, "runtime": { "typescript": "strip" // Type handling strategy. Only "strip" is supported (Active) }, "install": { "mode": "pnp" // "pnp" | "vfs" | "materialized" | "vendor" (Accepted) }, "lint": { "rules": { "no-debugger": "error" // Rule mappings to "off" | "warn" | "error" (Active) } }, "format": { "style": "meow" // Formatting rules style. Only "meow" supported (Active) }, "types": { "strict": true // Directly maps to tsconfig.json "strict" parameter (Active) }, "test": { "isolate": true, // Run test suites in distinct hermetic V8 isolates (Accepted) "clock": "deterministic", // "deterministic" | "system" (Accepted) "network": "fake" // "fake" | "real" (Accepted) }, "permissions": { "default": [], // Capability grant defaults (Accepted/Reserved) "packages": {} // Map of package names to capability strings (Accepted/Reserved) } } package.json Authority for metadata, script definitions, and dependencies [2]. meow only modifies dependency objects during direct CLI mutating commands (add, remove, install) [2]. - Duplicate Specifiers: Declaring the same package across dependencies and devDependencies with divergent version specifiers causes meow to reject resolution with an error [2]. - Compatibility Lockfile: Executing meow install --compat-lockfile writes a minimal placeholder package-lock.json containing "meowCompatibilityLockfile": true to appease external framework detectors, keeping meow.lock.jsonl as the source of truth [2, 12]. 4. RUNTIME MODES & DETERMINISM MECHANICS | Capability / Behavior | `strict-web` Mode | `node-compat` Mode | | :-------------------- | :-------------------------------------------------------------------------- | :------------------------------------------------------------------------ | | **Web Globals** | Fetch, URL, URLPattern, Encoding, SubtleCrypto, AbortController \[8, 13\] | Fetch, URL, URLPattern, Encoding, SubtleCrypto, AbortController \[8, 13\] | | **Node.js Surface** | Withdrawn. Imports trigger `ERR_STRICT_WEB_WITHDRAWN` at execution \[14\] | `node:*` built-ins, CommonJS `require()`, N-API native addons \[12\] | | **Host Environment** | Sandbox. `process` is absent; env hidden unless granted \[11, 14\] | Full host `process.env` exposed automatically \[11, 14\] | | **Wall Clock** | Frozen virtual origin: `2026-06-07T00:00:00Z` (Unix `1780790400000`) \[21\] | Evaluates real system host clock \[21\] | | **Time Progression** | Moves only when asynchronous timer queues (`setTimeout`) dispatch \[21\] | Native real-time wall-clock progression \[21\] | | **Randomness** | ChaCha20 CSPRNG driven by a fixed, stable 32-byte seed \[21\] | Native OS entropy \[21\] | | **Locale / Timezone** | Pinned to `TZ=UTC` and `en_US.UTF-8` on Isolate instantiation \[21\] | System host locale and host timezone settings \[21\] | Note: meow test isolates always enforce strict-web deterministic defaults regardless of the global project mode configuration [14, 21]. 5. THE PACKAGE MANAGER Core CLI Commands - meow install (alias i): Resolves dependency graph, writes lockfile, materializes node_modules [3, 17]. - meow add : Appends dependency to package.json (unversioned defaults to latest tag) and triggers install [3, 17]. Use -D or --dev for devDependencies, -g or --global for global installation [17]. - meow remove (aliases rm, del, delete, uninstall): Removes entry from package.json and runs install [3, 17]. Optimization Architecture - Mathematical Resolve: Tarball URLs are mathematically constructed from package name and version [3]. Does not trust arbitrary URLs returned by registry endpoints to prevent cache-poisoning [3]. - Concurrent Pipelines: High metadata fan-out and up to 40 concurrent tarball downloads with exponential-backoff retries for status codes 429 and 5xx [3]. - EMFILE Semaphore: High-concurrency filesystem writes pass through an internal semaphore to prevent exceeding OS open file descriptors limits [3]. - Self-Healing Cache: Every read from ~/.meow/cache re-computes and asserts SHA-512 Subresource-Integrity [3]. Atomic writes (temp file write followed by rename) guarantee crash-safety [3]. node_modules Materialization Layout Packages populate node_modules/.meow/@/node_modules// [5]. Imports resolve to top-level names pointing into this path to construct a deduplicated flat dependency graph [5]. - macOS (APFS): Clones package files using clonefile for O(1) copy-on-write [5]. Edges materialized via symlinks [5]. - Linux: Clones via recursive hardlinks [5]. Edges materialized via symlinks [5]. - Windows: Clones via recursive hardlinks [5]. Edges materialized via NTFS directory junctions [5]. - State Tracking: Sidecar file .materialized logs tree state [5]. If identical to current lockfile, materialization is bypassed [5]. - Vendor Mode: meow install --vendor copies actual package contents into ./vendor/ (or custom --vendor-dir), normalizing mtimes for absolute binary reproducibility [5, 17]. The Lockfile (meow.lock.jsonl) A JSON-Lines serialized document. Lines are strictly ordered lexicographically by (name, version) to prevent git merge conflicts [6]. - Canonical Form: Read checks are strictly canonical [6]. The parser rejects any lockfile that contains blank lines, non-canonical formatting (spaces/indent differences, modified key orders), duplicate records, or unsorted items [6]. - JSON-Line Properties (Fixed Order Keys): {"name":"is-odd","version":"3.0.1","integrity":"sha512-...","dependencies":{"is-number":"6.0.0"},"registry":{"registry":"https://registry.npmjs.org"},"meow":"^0.1"} 6. THE EXECUTION LAYER The Omni-Router CLI command parser matching unknown subcommands against rules to map parameters without throwing syntax exceptions [10]: - Matches script names defined in package.json -> routes to meow run