@mozole/cli 1.4.2 → 2.0.0-b
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/LICENSE +16 -4
- package/README.md +85 -89
- package/dist/cli.d.ts +2 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +204 -157
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +5 -8
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +49 -812
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -7
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +69 -377
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/new.d.ts +8 -10
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +32 -149
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/phase.d.ts +11 -0
- package/dist/commands/phase.d.ts.map +1 -0
- package/dist/commands/phase.js +106 -0
- package/dist/commands/phase.js.map +1 -0
- package/dist/commands/prototype.d.ts +6 -0
- package/dist/commands/prototype.d.ts.map +1 -0
- package/dist/commands/prototype.js +28 -0
- package/dist/commands/prototype.js.map +1 -0
- package/dist/commands/repomap.d.ts +6 -0
- package/dist/commands/repomap.d.ts.map +1 -0
- package/dist/commands/repomap.js +71 -0
- package/dist/commands/repomap.js.map +1 -0
- package/dist/commands/test.d.ts +6 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +115 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/ui.d.ts +1 -37
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +75 -317
- package/dist/commands/ui.js.map +1 -1
- package/dist/commands/verify.d.ts +12 -7
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +148 -65
- package/dist/commands/verify.js.map +1 -1
- package/dist/qa/a11y.d.ts +24 -0
- package/dist/qa/a11y.d.ts.map +1 -0
- package/dist/qa/a11y.js +124 -0
- package/dist/qa/a11y.js.map +1 -0
- package/dist/qa/breakpoints.d.ts +16 -0
- package/dist/qa/breakpoints.d.ts.map +1 -0
- package/dist/qa/breakpoints.js +45 -0
- package/dist/qa/breakpoints.js.map +1 -0
- package/dist/qa/contract.d.ts +21 -0
- package/dist/qa/contract.d.ts.map +1 -0
- package/dist/qa/contract.js +116 -0
- package/dist/qa/contract.js.map +1 -0
- package/dist/qa/index.d.ts +6 -0
- package/dist/qa/index.d.ts.map +1 -0
- package/dist/qa/index.js +6 -0
- package/dist/qa/index.js.map +1 -0
- package/dist/qa/probe.d.ts +48 -0
- package/dist/qa/probe.d.ts.map +1 -0
- package/dist/qa/probe.js +206 -0
- package/dist/qa/probe.js.map +1 -0
- package/dist/qa/runner.d.ts +27 -32
- package/dist/qa/runner.d.ts.map +1 -1
- package/dist/qa/runner.js +286 -336
- package/dist/qa/runner.js.map +1 -1
- package/dist/scaffold/agents.d.ts +5 -0
- package/dist/scaffold/agents.d.ts.map +1 -0
- package/dist/scaffold/agents.js +84 -0
- package/dist/scaffold/agents.js.map +1 -0
- package/dist/scaffold/backend.d.ts +6 -8
- package/dist/scaffold/backend.d.ts.map +1 -1
- package/dist/scaffold/backend.js +318 -199
- package/dist/scaffold/backend.js.map +1 -1
- package/dist/scaffold/design.d.ts +4 -3
- package/dist/scaffold/design.d.ts.map +1 -1
- package/dist/scaffold/design.js +38 -47
- package/dist/scaffold/design.js.map +1 -1
- package/dist/scaffold/flagship.d.ts +8 -0
- package/dist/scaffold/flagship.d.ts.map +1 -0
- package/dist/scaffold/flagship.js +337 -0
- package/dist/scaffold/flagship.js.map +1 -0
- package/dist/scaffold/index.d.ts +9 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +48 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scaffold/phases.d.ts +10 -0
- package/dist/scaffold/phases.d.ts.map +1 -0
- package/dist/scaffold/phases.js +165 -0
- package/dist/scaffold/phases.js.map +1 -0
- package/dist/scaffold/repomap.d.ts +6 -0
- package/dist/scaffold/repomap.d.ts.map +1 -0
- package/dist/scaffold/repomap.js +89 -0
- package/dist/scaffold/repomap.js.map +1 -0
- package/dist/scaffold/standard.d.ts +13 -0
- package/dist/scaffold/standard.d.ts.map +1 -0
- package/dist/scaffold/standard.js +371 -0
- package/dist/scaffold/standard.js.map +1 -0
- package/dist/scaffold/tokens.d.ts +3 -0
- package/dist/scaffold/tokens.d.ts.map +1 -0
- package/dist/scaffold/tokens.js +126 -0
- package/dist/scaffold/tokens.js.map +1 -0
- package/dist/server/manager.d.ts +23 -0
- package/dist/server/manager.d.ts.map +1 -0
- package/dist/server/manager.js +96 -0
- package/dist/server/manager.js.map +1 -0
- package/dist/utils/ai-trace.d.ts +8 -0
- package/dist/utils/ai-trace.d.ts.map +1 -0
- package/dist/utils/ai-trace.js +69 -0
- package/dist/utils/ai-trace.js.map +1 -0
- package/dist/utils/browser.d.ts +10 -0
- package/dist/utils/browser.d.ts.map +1 -0
- package/dist/utils/browser.js +127 -0
- package/dist/utils/browser.js.map +1 -0
- package/dist/utils/fs.d.ts +11 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +166 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/git.d.ts +9 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +69 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/process.d.ts +21 -0
- package/dist/utils/process.d.ts.map +1 -0
- package/dist/utils/process.js +120 -0
- package/dist/utils/process.js.map +1 -0
- package/dist/version.d.ts +21 -36
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +21 -44
- package/dist/version.js.map +1 -1
- package/package.json +19 -38
- package/CHANGELOG.md +0 -30
- package/dist/commands/cce.d.ts +0 -7
- package/dist/commands/cce.d.ts.map +0 -1
- package/dist/commands/cce.js +0 -37
- package/dist/commands/cce.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -3
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -39
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/qa.d.ts +0 -12
- package/dist/commands/qa.d.ts.map +0 -1
- package/dist/commands/qa.js +0 -143
- package/dist/commands/qa.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -37
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js +0 -169
- package/dist/commands/stats.js.map +0 -1
- package/dist/config/project.d.ts +0 -51
- package/dist/config/project.d.ts.map +0 -1
- package/dist/config/project.js +0 -81
- package/dist/config/project.js.map +0 -1
- package/dist/context/cce.d.ts +0 -39
- package/dist/context/cce.d.ts.map +0 -1
- package/dist/context/cce.js +0 -455
- package/dist/context/cce.js.map +0 -1
- package/dist/governor/fingerprint.d.ts +0 -7
- package/dist/governor/fingerprint.d.ts.map +0 -1
- package/dist/governor/fingerprint.js +0 -129
- package/dist/governor/fingerprint.js.map +0 -1
- package/dist/governor/hook.d.ts +0 -13
- package/dist/governor/hook.d.ts.map +0 -1
- package/dist/governor/hook.js +0 -389
- package/dist/governor/hook.js.map +0 -1
- package/dist/governor/state.d.ts +0 -45
- package/dist/governor/state.d.ts.map +0 -1
- package/dist/governor/state.js +0 -60
- package/dist/governor/state.js.map +0 -1
- package/dist/integrations/antigravity.d.ts +0 -20
- package/dist/integrations/antigravity.d.ts.map +0 -1
- package/dist/integrations/antigravity.js +0 -153
- package/dist/integrations/antigravity.js.map +0 -1
- package/dist/output.d.ts +0 -5
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -2
- package/dist/output.js.map +0 -1
- package/dist/platform/executable.d.ts +0 -11
- package/dist/platform/executable.d.ts.map +0 -1
- package/dist/platform/executable.js +0 -69
- package/dist/platform/executable.js.map +0 -1
- package/dist/platform/process.d.ts +0 -25
- package/dist/platform/process.d.ts.map +0 -1
- package/dist/platform/process.js +0 -179
- package/dist/platform/process.js.map +0 -1
- package/dist/progress.d.ts +0 -44
- package/dist/progress.d.ts.map +0 -1
- package/dist/progress.js +0 -123
- package/dist/progress.js.map +0 -1
- package/dist/qa/diff.d.ts +0 -10
- package/dist/qa/diff.d.ts.map +0 -1
- package/dist/qa/diff.js +0 -91
- package/dist/qa/diff.js.map +0 -1
- package/dist/qa/server.d.ts +0 -10
- package/dist/qa/server.d.ts.map +0 -1
- package/dist/qa/server.js +0 -127
- package/dist/qa/server.js.map +0 -1
- package/dist/scaffold/adoption.d.ts +0 -17
- package/dist/scaffold/adoption.d.ts.map +0 -1
- package/dist/scaffold/adoption.js +0 -279
- package/dist/scaffold/adoption.js.map +0 -1
- package/dist/scaffold/legacy.d.ts +0 -4
- package/dist/scaffold/legacy.d.ts.map +0 -1
- package/dist/scaffold/legacy.js +0 -139
- package/dist/scaffold/legacy.js.map +0 -1
- package/dist/scaffold/routes.d.ts +0 -3
- package/dist/scaffold/routes.d.ts.map +0 -1
- package/dist/scaffold/routes.js +0 -37
- package/dist/scaffold/routes.js.map +0 -1
- package/dist/scaffold/standalone.d.ts +0 -7
- package/dist/scaffold/standalone.d.ts.map +0 -1
- package/dist/scaffold/standalone.js +0 -294
- package/dist/scaffold/standalone.js.map +0 -1
- package/dist/scaffold/templates.d.ts +0 -8
- package/dist/scaffold/templates.d.ts.map +0 -1
- package/dist/scaffold/templates.js +0 -312
- package/dist/scaffold/templates.js.map +0 -1
- package/dist/scaffold/write.d.ts +0 -2
- package/dist/scaffold/write.d.ts.map +0 -1
- package/dist/scaffold/write.js +0 -38
- package/dist/scaffold/write.js.map +0 -1
- package/dist/telemetry/store.d.ts +0 -33
- package/dist/telemetry/store.d.ts.map +0 -1
- package/dist/telemetry/store.js +0 -75
- package/dist/telemetry/store.js.map +0 -1
- package/dist/verify/runner.d.ts +0 -15
- package/dist/verify/runner.d.ts.map +0 -1
- package/dist/verify/runner.js +0 -112
- package/dist/verify/runner.js.map +0 -1
- package/docs/agent-audit.md +0 -24
package/LICENSE
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026 Mozole
|
|
3
|
+
Copyright (c) 2026 Mozole Studio
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
6
11
|
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
8
14
|
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,114 +1,110 @@
|
|
|
1
|
-
# Mozole CLI
|
|
2
|
-
|
|
3
|
-
Mozole
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# Mozole CLI (`@mozole/cli`)
|
|
2
|
+
|
|
3
|
+
> **Mozole Studio** internal project generator and development cockpit tailored for autonomous agentic engineering workflows.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Highlights
|
|
8
|
+
|
|
9
|
+
- **Vite-Powered Frontend Engines:**
|
|
10
|
+
- **Standard Profile:** React 19 + React Router 7 (Framework Mode Plugin) + Static Pre-rendering (SSG) + Tailwind CSS v4 + bespoke Radix UI primitives.
|
|
11
|
+
- **Flagship Creative Profile (`--flagship`):** React 19 + Wouter + Lenis (Smooth Scroll) + Motion + Persistent 60fps Canvas/WebGL layer.
|
|
12
|
+
- **Pure PHP 8.1+ Zero-Dependency Backend:**
|
|
13
|
+
- Engineered for budget shared hosting (cPanel 250k Inodes, 25 MB/s I/O, Imunify360).
|
|
14
|
+
- 5-Layer Security Architecture: Origin/Referer verification, honeypot spam protection, file-based IP rate-limiting, direct file access denial for `config.php`, input sanitization.
|
|
15
|
+
- **10-Step Phased Development Pipeline:**
|
|
16
|
+
- Sequential phases (Phase 00–10) with status tracking in `docs/phases/status.md` and automated phase advancement commits (`mozole phase next`).
|
|
17
|
+
- Post-launch maintenance workflow (`mozole phase reopen <id>`).
|
|
18
|
+
- **Architectural Fihrist (`docs/repomap/`):**
|
|
19
|
+
- Continuous mapping of architecture, bespoke UI primitives, application routes, and design tokens.
|
|
20
|
+
- **Mozole Quality Kit:**
|
|
21
|
+
- Static PostCSS AST contract auditor enforcing token integrity (`src/styles/tokens.css`), banning literal colors, raw font families, and `transition: all`.
|
|
22
|
+
- Headless in-browser DOM geometry probe detecting layout reflow defects, text clipping, and minimum touch target violations.
|
|
23
|
+
- Automated WCAG 2.1 AA landmark and accessibility auditor.
|
|
24
|
+
- **Interactive Terminal Cockpit (`mozole ui`):**
|
|
25
|
+
- Clean, lightweight TUI to inspect client projects, advance phases, and run deterministic verification.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Installation & Local Development
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Clone and install dependencies
|
|
33
|
+
git clone git@github.com:mozolestudio/cli.git
|
|
34
|
+
cd MozoleCli
|
|
35
|
+
npm install
|
|
36
|
+
|
|
37
|
+
# Run verification suite (Biome lint, TypeScript typecheck, Vitest, build)
|
|
22
38
|
npm run verify
|
|
23
|
-
npm run qa
|
|
24
|
-
npm run qa:interactive
|
|
25
|
-
npm run qa:visual
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
`verify` runs lint, strict TypeScript, tests, and production build every time. PHP projects also run PHP version and recursive syntax checks first. `qa` starts a loopback development server on an available port, checks the configured routes at three viewports, and closes its browser and server. Normal QA never captures screenshots. `qa:visual` explicitly captures screenshots under `.mozole/qa/`. Reinstall Chromium with `npx playwright install chromium` if necessary.
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## Design references and assets
|
|
33
|
-
|
|
34
|
-
Place exported `design.md`, images, icons, fonts and reference screens under `docs/design/`. Generated `AGENTS.md` treats these as design evidence, preserves their intent, and requires checks for spacing, loaded fonts, foreground/background contrast, responsive behavior and interaction states. It permits justified corrections instead of blindly copying tokens. `docs/design/README.md` explains the handoff; no provider-specific design is generated. Existing exports remain untouched during adoption. Routine QA stays screenshot-free; visual comparison remains opt-in.
|
|
35
|
-
|
|
36
|
-
## PHP backend
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
|
-
mozole new my-app --backend
|
|
40
|
-
cd my-app
|
|
41
|
-
npm run dev
|
|
42
|
-
# In a separate terminal:
|
|
43
|
-
npm run dev:api
|
|
40
|
+
# Run local development binary
|
|
41
|
+
npm run dev -- --help
|
|
44
42
|
```
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```sh
|
|
49
|
-
npm run check:php
|
|
50
|
-
npm run build:deploy
|
|
51
|
-
```
|
|
44
|
+
---
|
|
52
45
|
|
|
53
|
-
|
|
46
|
+
## Command Reference
|
|
54
47
|
|
|
55
|
-
|
|
48
|
+
### `mozole new <name> [--flagship] [--backend=php|node]`
|
|
49
|
+
Generates a client project with Mozole Studio governance and canonical design tokens. Install its dependencies with `npm install`, then run `mozole verify` to check the generated project in your environment.
|
|
56
50
|
|
|
57
|
-
|
|
51
|
+
```bash
|
|
52
|
+
# Standard React Router 7 + SSG + Tailwind v4 project
|
|
53
|
+
mozole new acme-corp
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
mozole
|
|
61
|
-
mozole new agent-site --cce-install
|
|
62
|
-
# --install-cce is an alias; --backend can be combined with either flag.
|
|
63
|
-
mozole adopt existing-site --cce-install
|
|
55
|
+
# Flagship creative project with smooth scroll & persistent canvas
|
|
56
|
+
mozole new studio-flagship --flagship
|
|
64
57
|
```
|
|
65
58
|
|
|
66
|
-
|
|
59
|
+
### `mozole prototype init`
|
|
60
|
+
Initializes a new prototype repository workspace with a multi-project `projects/` directory and shared token bridges.
|
|
67
61
|
|
|
68
|
-
|
|
62
|
+
### `mozole adopt [path]`
|
|
63
|
+
Adopts an existing web project into Mozole Studio governance, injecting `AGENTS.md`, `CLAUDE.md`, `docs/phases/status.md`, `docs/repomap/`, and design token foundations.
|
|
69
64
|
|
|
70
|
-
|
|
65
|
+
### `mozole phase [status|next|reopen]`
|
|
66
|
+
Manages project progression through the 10-step atomic development lifecycle:
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
- `mozole phase status` — Displays visual checklist and status for all phases.
|
|
69
|
+
- `mozole phase next` — Advances one phase and creates a conventional commit (`feat(phase-XX): ...`) when Git is initialized. Complete the checklist and run `mozole verify` first; checklist completion is a developer responsibility. Failed commits restore the previous phase file and Git index.
|
|
70
|
+
- `mozole phase reopen <id>` — Reopens a completed phase for post-launch maintenance.
|
|
73
71
|
|
|
74
|
-
|
|
72
|
+
### `mozole repomap [sync|check]`
|
|
73
|
+
Synchronizes and audits the `docs/repomap/` architectural index, component registry, and route catalog.
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
### `mozole test [contract|a11y|probe|all]`
|
|
76
|
+
Executes Mozole Quality Kit verification suites:
|
|
77
|
+
- `mozole test contract` — PostCSS AST design token contract audit (prohibits literal colors, `transition: all`, fixed viewport dimensions).
|
|
78
|
+
- `mozole test a11y` — Static HTML and accessibility landmark hierarchy validation.
|
|
79
|
+
- `mozole test probe` — Headless live DOM geometry and trace runner. Discovers local Brave/Chromium (or auto-provisions Playwright Chromium if absent). Measures live bounding boxes, horizontal overflow on mobile viewports (320px+), text clipping, touch targets (<24px), prefers-reduced-motion violations, and 200% text-zoom reflow stress. Strictly zero raster screenshots (`screenshots: false, snapshots: true`); emits full interactive trace packages to `docs/qa/trace.zip` for inspection via [trace.playwright.dev](https://trace.playwright.dev).
|
|
80
|
+
- `mozole test all` (default) — Executes static contract and accessibility audits.
|
|
77
81
|
|
|
78
|
-
|
|
82
|
+
### `mozole verify [--probe]`
|
|
83
|
+
The authoritative, multi-stage deterministic gate required before completing agentic tasks:
|
|
84
|
+
1. AI Trace Scanner (strictly prohibits synthetic watermarks and bot co-author trailers)
|
|
85
|
+
2. Biome lint & code style check
|
|
86
|
+
3. Project `typecheck` script (including React Router type generation), or local TypeScript compiler
|
|
87
|
+
4. Production build (`npm run build`)
|
|
88
|
+
5. PostCSS design token contract audit
|
|
89
|
+
6. Accessibility & landmark hierarchy validation against built HTML
|
|
90
|
+
7. *(Optional with `--probe`)* Live headless DOM geometry & trace probe across critical viewports
|
|
79
91
|
|
|
80
|
-
|
|
81
|
-
mozole adopt ../existing-app
|
|
82
|
-
```
|
|
92
|
+
Biome and TypeScript must be installed locally; verification never downloads missing CLI tools with `npx`. Standard projects emit static pages for `/`, `/about`, and `/contact` without requiring a Node server in production. See the [React Router pre-rendering documentation](https://reactrouter.com/how-to/pre-rendering) for hosting configuration.
|
|
83
93
|
|
|
84
|
-
|
|
94
|
+
The PHP contact backend requires an allowed Origin or a Referer with the same scheme, host and port as an allowed origin. Requests without either are rejected. Rate-limit storage errors return HTTP 503; mail transport failures return HTTP 502 with `success: false`. Configure `api/config.php` and the hosting mail transport before accepting real submissions.
|
|
85
95
|
|
|
86
|
-
|
|
96
|
+
### `mozole doctor`
|
|
97
|
+
Diagnoses workstation prerequisites: Node.js (>= 20), Git, PHP 8.1+ status, local Chromium/Brave browser engine availability, and network port availability.
|
|
87
98
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
mozole adopt <path> [--cce-install] [--verbose]
|
|
91
|
-
mozole doctor
|
|
92
|
-
mozole verify [--force]
|
|
93
|
-
mozole qa [--interactive | --visual [--diff]] [--force]
|
|
94
|
-
mozole logs [name] [--raw]
|
|
95
|
-
mozole cce install
|
|
96
|
-
mozole stats
|
|
97
|
-
mozole ui
|
|
98
|
-
```
|
|
99
|
+
### `mozole ui` (or bare `mozole`)
|
|
100
|
+
Launches the interactive terminal cockpit.
|
|
99
101
|
|
|
100
|
-
|
|
102
|
+
---
|
|
101
103
|
|
|
102
|
-
##
|
|
104
|
+
## Repository Governance
|
|
103
105
|
|
|
104
|
-
|
|
105
|
-
npm ci
|
|
106
|
-
npx playwright install chromium
|
|
107
|
-
npm run verify
|
|
108
|
-
npm run test:smoke
|
|
109
|
-
npm pack --dry-run
|
|
110
|
-
```
|
|
106
|
+
This project is governed by [AGENTS.md](./AGENTS.md). All automated agents and contributors must adhere to the rules therein.
|
|
111
107
|
|
|
112
|
-
|
|
108
|
+
## License
|
|
113
109
|
|
|
114
|
-
|
|
110
|
+
MIT © Mozole Studio
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export declare
|
|
3
|
-
export declare function
|
|
2
|
+
export declare const main: import("citty").CommandDef<import("citty").ArgsDef>;
|
|
3
|
+
export declare function runCli(argv?: string[]): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA+LA,eAAO,MAAM,IAAI,qDAuBf,CAAC;AAEH,wBAAgB,MAAM,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE"}
|
package/dist/cli.js
CHANGED
|
@@ -1,169 +1,216 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { adoptCommand } from "./commands/adopt.js";
|
|
5
|
-
import { cceInstallCommand } from "./commands/cce.js";
|
|
2
|
+
import { defineCommand, runMain } from "citty";
|
|
3
|
+
import { adoptProject } from "./commands/adopt.js";
|
|
6
4
|
import { doctorCommand } from "./commands/doctor.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { createNewProject } from "./commands/new.js";
|
|
6
|
+
import { phaseCommand } from "./commands/phase.js";
|
|
7
|
+
import { prototypeInit } from "./commands/prototype.js";
|
|
8
|
+
import { repomapCommand } from "./commands/repomap.js";
|
|
9
|
+
import { testCommand } from "./commands/test.js";
|
|
11
10
|
import { uiCommand } from "./commands/ui.js";
|
|
12
11
|
import { verifyCommand } from "./commands/verify.js";
|
|
13
|
-
import { governorHookCommand } from "./governor/hook.js";
|
|
14
12
|
import { CLI_VERSION } from "./version.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const allowed = new Set(["--verbose", "-v", ...allowedFlags]);
|
|
43
|
-
const unknown = flags.filter((flag) => !allowed.has(flag) && !isAllowedFlag?.(flag));
|
|
44
|
-
return { positional, flags, unknown, verbose };
|
|
45
|
-
}
|
|
46
|
-
export async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
47
|
-
const [command, value, ...rest] = args;
|
|
48
|
-
if (!command ||
|
|
49
|
-
command === "help" ||
|
|
50
|
-
command === "--help" ||
|
|
51
|
-
command === "-h") {
|
|
52
|
-
console.log(help);
|
|
53
|
-
return 0;
|
|
54
|
-
}
|
|
55
|
-
if (command === "--version" || (command === "-v" && !value)) {
|
|
56
|
-
console.log(CLI_VERSION);
|
|
57
|
-
return 0;
|
|
58
|
-
}
|
|
59
|
-
if (command === "new") {
|
|
60
|
-
const { positional, flags, unknown, verbose } = parseCliArgs([value, ...rest], ["--backend", "--cce-install", "--install-cce", "--scaffold"]);
|
|
61
|
-
if (unknown.length || positional.length > 1) {
|
|
62
|
-
console.error(`Unknown option: ${unknown[0] ?? positional[1]}`);
|
|
63
|
-
return 2;
|
|
64
|
-
}
|
|
65
|
-
const cceInstall = flags.includes("--cce-install") || flags.includes("--install-cce");
|
|
66
|
-
const backend = flags.includes("--backend");
|
|
67
|
-
const scaffold = flags.includes("--scaffold");
|
|
68
|
-
return newCommand(positional[0], cwd, console, {
|
|
69
|
-
verbose,
|
|
70
|
-
cceInstall,
|
|
71
|
-
backend,
|
|
72
|
-
scaffold,
|
|
13
|
+
const newCmd = defineCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "new",
|
|
16
|
+
description: "Generate a new client project (Standard React Router 7 or Flagship Creative)",
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
name: {
|
|
20
|
+
type: "positional",
|
|
21
|
+
description: "Project name",
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
flagship: {
|
|
25
|
+
type: "boolean",
|
|
26
|
+
description: "Enable Flagship profile (Wouter + Lenis + Canvas)",
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
backend: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Backend runtime: 'php' (default) or 'node'",
|
|
32
|
+
default: "php",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
async run({ args }) {
|
|
36
|
+
await createNewProject({
|
|
37
|
+
name: args.name,
|
|
38
|
+
flagship: args.flagship,
|
|
39
|
+
backend: args.backend || "php",
|
|
73
40
|
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const prototypeCmd = defineCommand({
|
|
44
|
+
meta: {
|
|
45
|
+
name: "prototype",
|
|
46
|
+
description: "Manage prototype repository workspace",
|
|
47
|
+
},
|
|
48
|
+
subCommands: {
|
|
49
|
+
init: defineCommand({
|
|
50
|
+
meta: {
|
|
51
|
+
name: "init",
|
|
52
|
+
description: "Initialize a new prototype workspace repository",
|
|
53
|
+
},
|
|
54
|
+
async run() {
|
|
55
|
+
await prototypeInit();
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
},
|
|
59
|
+
async run() {
|
|
60
|
+
await prototypeInit();
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
const adoptCmd = defineCommand({
|
|
64
|
+
meta: {
|
|
65
|
+
name: "adopt",
|
|
66
|
+
description: "Adopt an existing project into Mozole Studio governance",
|
|
67
|
+
},
|
|
68
|
+
args: {
|
|
69
|
+
path: {
|
|
70
|
+
type: "positional",
|
|
71
|
+
description: "Path to project root",
|
|
72
|
+
required: false,
|
|
73
|
+
default: ".",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
async run({ args }) {
|
|
77
|
+
await adoptProject({ targetDir: args.path });
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
const phaseCmd = defineCommand({
|
|
81
|
+
meta: {
|
|
82
|
+
name: "phase",
|
|
83
|
+
description: "Manage 10-step atomic development phases",
|
|
84
|
+
},
|
|
85
|
+
args: {
|
|
86
|
+
action: {
|
|
87
|
+
type: "positional",
|
|
88
|
+
description: "Phase action: 'status', 'next', or 'reopen'",
|
|
89
|
+
required: false,
|
|
90
|
+
default: "status",
|
|
91
|
+
},
|
|
92
|
+
id: {
|
|
93
|
+
type: "positional",
|
|
94
|
+
description: "Phase number (for reopen)",
|
|
95
|
+
required: false,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
async run({ args }) {
|
|
99
|
+
await phaseCommand({
|
|
100
|
+
action: args.action || "status",
|
|
101
|
+
phaseId: args.id,
|
|
84
102
|
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
if (command === "verify") {
|
|
105
|
-
const { flags, unknown, verbose } = parseCliArgs([value, ...rest], ["--force"]);
|
|
106
|
-
if (unknown.length) {
|
|
107
|
-
console.error(`Unknown verify option: ${unknown[0]}`);
|
|
108
|
-
return 2;
|
|
109
|
-
}
|
|
110
|
-
return verifyCommand(cwd, console, {
|
|
111
|
-
force: flags.includes("--force"),
|
|
112
|
-
verbose,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
const repomapCmd = defineCommand({
|
|
106
|
+
meta: {
|
|
107
|
+
name: "repomap",
|
|
108
|
+
description: "Manage docs/repomap architectural index and component registry",
|
|
109
|
+
},
|
|
110
|
+
args: {
|
|
111
|
+
action: {
|
|
112
|
+
type: "positional",
|
|
113
|
+
description: "Action: 'sync' (default) or 'check'",
|
|
114
|
+
required: false,
|
|
115
|
+
default: "sync",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
async run({ args }) {
|
|
119
|
+
await repomapCommand({
|
|
120
|
+
action: args.action || "sync",
|
|
113
121
|
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
const testCmd = defineCommand({
|
|
125
|
+
meta: {
|
|
126
|
+
name: "test",
|
|
127
|
+
description: "Run Mozole quality test suites (contract, a11y, probe, or all)",
|
|
128
|
+
},
|
|
129
|
+
args: {
|
|
130
|
+
type: {
|
|
131
|
+
type: "positional",
|
|
132
|
+
description: "Test type: 'contract', 'a11y', 'probe', or 'all'",
|
|
133
|
+
required: false,
|
|
134
|
+
default: "all",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
async run({ args }) {
|
|
138
|
+
await testCommand({
|
|
139
|
+
type: args.type || "all",
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
const verifyCmd = defineCommand({
|
|
144
|
+
meta: {
|
|
145
|
+
name: "verify",
|
|
146
|
+
description: "Run full deterministic verification (lint, typecheck, contracts, AI trace, optional probe)",
|
|
147
|
+
},
|
|
148
|
+
args: {
|
|
149
|
+
probe: {
|
|
150
|
+
type: "boolean",
|
|
151
|
+
description: "Also run headless live DOM geometry & trace probe",
|
|
152
|
+
required: false,
|
|
153
|
+
default: false,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
async run({ args }) {
|
|
157
|
+
const passed = await verifyCommand({ withProbe: Boolean(args.probe) });
|
|
158
|
+
if (!passed) {
|
|
159
|
+
process.exit(1);
|
|
146
160
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
const doctorCmd = defineCommand({
|
|
164
|
+
meta: {
|
|
165
|
+
name: "doctor",
|
|
166
|
+
description: "Diagnose local system environment, runtimes, and network ports",
|
|
167
|
+
},
|
|
168
|
+
async run() {
|
|
169
|
+
await doctorCommand();
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
const uiCmd = defineCommand({
|
|
173
|
+
meta: {
|
|
174
|
+
name: "ui",
|
|
175
|
+
description: "Launch interactive terminal cockpit",
|
|
176
|
+
},
|
|
177
|
+
async run() {
|
|
178
|
+
await uiCommand();
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
export const main = defineCommand({
|
|
182
|
+
meta: {
|
|
183
|
+
name: "mozole",
|
|
184
|
+
version: CLI_VERSION,
|
|
185
|
+
description: "Mozole Studio - Autonomous Development Engine & Process Cockpit",
|
|
186
|
+
},
|
|
187
|
+
subCommands: {
|
|
188
|
+
new: newCmd,
|
|
189
|
+
prototype: prototypeCmd,
|
|
190
|
+
adopt: adoptCmd,
|
|
191
|
+
phase: phaseCmd,
|
|
192
|
+
repomap: repomapCmd,
|
|
193
|
+
test: testCmd,
|
|
194
|
+
verify: verifyCmd,
|
|
195
|
+
doctor: doctorCmd,
|
|
196
|
+
ui: uiCmd,
|
|
197
|
+
},
|
|
198
|
+
async run({ rawArgs }) {
|
|
199
|
+
// If run without arguments, launch the interactive UI cockpit
|
|
200
|
+
if (rawArgs.length === 0) {
|
|
201
|
+
await uiCommand();
|
|
150
202
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
console.error(`Unknown command: ${command}\n\n${help}`);
|
|
165
|
-
return 2;
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
export function runCli(argv = process.argv.slice(2)) {
|
|
206
|
+
return runMain(main, { rawArgs: argv });
|
|
207
|
+
}
|
|
208
|
+
// Automatically invoke if executed as the main CLI entrypoint
|
|
209
|
+
const isEntry = Boolean(process.argv[1] &&
|
|
210
|
+
(process.argv[1].endsWith("/cli.js") ||
|
|
211
|
+
process.argv[1].endsWith("/cli.ts") ||
|
|
212
|
+
process.argv[1].endsWith("/mozole")));
|
|
213
|
+
if (isEntry) {
|
|
214
|
+
runCli();
|
|
166
215
|
}
|
|
167
|
-
if (isCliEntrypoint(import.meta.url, process.argv[1]))
|
|
168
|
-
process.exitCode = await main();
|
|
169
216
|
//# sourceMappingURL=cli.js.map
|