@mozole/cli 1.3.1 → 1.4.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/CHANGELOG.md +13 -0
- package/README.md +52 -168
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +31 -45
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +1 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +192 -23
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +312 -271
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +10 -3
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/new.d.ts +7 -4
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +39 -26
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/qa.d.ts.map +1 -1
- package/dist/commands/qa.js +18 -12
- package/dist/commands/qa.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +6 -1
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +12 -8
- package/dist/commands/verify.js.map +1 -1
- package/dist/config/project.d.ts +8 -7
- package/dist/config/project.d.ts.map +1 -1
- package/dist/config/project.js +39 -26
- package/dist/config/project.js.map +1 -1
- package/dist/context/cce.d.ts +0 -7
- package/dist/context/cce.d.ts.map +1 -1
- package/dist/context/cce.js +12 -43
- package/dist/context/cce.js.map +1 -1
- package/dist/governor/fingerprint.d.ts.map +1 -1
- package/dist/governor/fingerprint.js +38 -20
- package/dist/governor/fingerprint.js.map +1 -1
- package/dist/governor/hook.d.ts +2 -1
- package/dist/governor/hook.d.ts.map +1 -1
- package/dist/governor/hook.js +20 -11
- package/dist/governor/hook.js.map +1 -1
- package/dist/platform/executable.d.ts.map +1 -1
- package/dist/platform/executable.js +12 -4
- package/dist/platform/executable.js.map +1 -1
- package/dist/platform/process.d.ts.map +1 -1
- package/dist/platform/process.js +46 -66
- package/dist/platform/process.js.map +1 -1
- package/dist/qa/diff.d.ts +3 -3
- package/dist/qa/diff.d.ts.map +1 -1
- package/dist/qa/diff.js +13 -1
- package/dist/qa/diff.js.map +1 -1
- package/dist/qa/runner.d.ts +9 -9
- package/dist/qa/runner.d.ts.map +1 -1
- package/dist/qa/runner.js +46 -23
- package/dist/qa/runner.js.map +1 -1
- package/dist/qa/server.d.ts.map +1 -1
- package/dist/qa/server.js +6 -1
- package/dist/qa/server.js.map +1 -1
- package/dist/scaffold/backend.d.ts +9 -0
- package/dist/scaffold/backend.d.ts.map +1 -0
- package/dist/scaffold/backend.js +224 -0
- package/dist/scaffold/backend.js.map +1 -0
- package/dist/scaffold/standalone.d.ts +6 -0
- package/dist/scaffold/standalone.d.ts.map +1 -0
- package/dist/scaffold/standalone.js +270 -0
- package/dist/scaffold/standalone.js.map +1 -0
- package/dist/scaffold/templates.d.ts +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +122 -81
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/scaffold/write.d.ts.map +1 -1
- package/dist/scaffold/write.js +19 -5
- package/dist/scaffold/write.js.map +1 -1
- package/dist/telemetry/store.js +7 -3
- package/dist/telemetry/store.js.map +1 -1
- package/dist/verify/runner.d.ts.map +1 -1
- package/dist/verify/runner.js +15 -17
- package/dist/verify/runner.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/docs/agent-audit.md +24 -0
- package/package.json +7 -2
- package/dist/scaffold/admin.d.ts +0 -8
- package/dist/scaffold/admin.d.ts.map +0 -1
- package/dist/scaffold/admin.js +0 -45
- package/dist/scaffold/admin.js.map +0 -1
package/dist/version.js
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Agent integration audit — 1.4.0
|
|
2
|
+
|
|
3
|
+
## Findings and changes
|
|
4
|
+
|
|
5
|
+
1. Default scaffold removed agent files but still serialized CCE/governor/telemetry settings and CCE toolchain metadata. Its CLI dependency also installed optimization code. Plain output now contains neither that metadata nor the CLI dependency; project scripts run independently. Regression tests scan generated files and installed dependency locks.
|
|
6
|
+
2. Verification and QA loaded fingerprints and wrote governor state even when the governor was disabled. Both paths now bypass that work unless explicitly enabled. Repeated-run tests assert no state or telemetry files are created.
|
|
7
|
+
3. Default adoption installed CCE integrations without flags. Plain adoption now uses standalone scripts and basic guidance. Explicit `--cce-install` selects managed integration adoption. Already optimized projects require that flag for updates; user integrations are not silently deleted.
|
|
8
|
+
4. AGENTS.md was absent by default, depriving agents of useful commands and architecture. Plain projects now include concise, integration-free guidance. CLAUDE.md imports it with `@AGENTS.md`. Tests check that every documented npm command actually exists, including PHP commands.
|
|
9
|
+
5. PreToolUse matchers did not observe CCE MCP retrieval. Optional hooks now register matching PostToolUse handlers. Retrieval is recorded after execution; explicit tool-error responses are ignored. PreToolUse retains read/command enforcement.
|
|
10
|
+
6. Existing managed instruction blocks and hook groups were skipped during adoption, preserving obsolete policies. They now update idempotently while preserving unowned content and handlers. An unclosed managed block fails instead of truncating user text.
|
|
11
|
+
7. The visual workflow called a command that could be rejected after successful normal QA. It now supplies `--reason=explicit-workflow`.
|
|
12
|
+
8. README described enforcing hooks as advisory-only. Documentation now reflects denial behavior and host trust requirements.
|
|
13
|
+
|
|
14
|
+
## Scope and evidence
|
|
15
|
+
|
|
16
|
+
- Tested generated guidance, hook event wiring, successful/error retrieval handling, default/adopt isolation, repeated verification/QA without state, and preservation/idempotency.
|
|
17
|
+
- Plain frontend and PHP projects are built and browser-tested using their own npm scripts. Optimized smoke covers managed workspace files and CLI QA; it deliberately skips live CCE indexing.
|
|
18
|
+
- AGENTS.md is instruction input, not proof that an agent has followed it. Nested `AGENTS.override.md`, host settings, and hook trust can change behavior. Codex/Claude/Antigravity interactive host sessions were not launched as part of this audit. The tests validate generated contracts and executable hook handlers, not every host's activation state.
|
|
19
|
+
- An unavailable optional CCE runtime is reported during creation; enabling the integration is not a claim that indexing succeeded. Repair commands are printed.
|
|
20
|
+
|
|
21
|
+
## Primary references checked
|
|
22
|
+
|
|
23
|
+
- [Codex AGENTS.md discovery and scope](https://learn.chatgpt.com/docs/agent-configuration/agents-md): root-to-current-directory discovery; overrides and size limits.
|
|
24
|
+
- [Codex hooks](https://learn.chatgpt.com/docs/hooks): PreToolUse/PostToolUse matchers, MCP coverage, permission decisions, and project hook trust.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozole/cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "React + Vite project scaffolder with optional PHP backend and explicit agent integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mozole": "dist/cli.js"
|
|
@@ -9,8 +9,13 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
11
|
"README.md",
|
|
12
|
+
"CHANGELOG.md",
|
|
13
|
+
"docs/agent-audit.md",
|
|
12
14
|
"LICENSE"
|
|
13
15
|
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
14
19
|
"engines": {
|
|
15
20
|
"node": ">=22"
|
|
16
21
|
},
|
package/dist/scaffold/admin.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { MozoleConfig } from "../config/project.js";
|
|
2
|
-
export interface AdminScaffoldInspection {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
healthy: boolean;
|
|
5
|
-
detail: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function inspectAdminScaffold(root: string, config: MozoleConfig): Promise<AdminScaffoldInspection>;
|
|
8
|
-
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/scaffold/admin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,uBAAuB,CAAC,CAkDlC"}
|
package/dist/scaffold/admin.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
export async function inspectAdminScaffold(root, config) {
|
|
4
|
-
if (!config.admin?.enabled)
|
|
5
|
-
return { enabled: false, healthy: true, detail: "static-only project" };
|
|
6
|
-
const requiredFiles = [
|
|
7
|
-
"app/admin/session.server.ts",
|
|
8
|
-
"app/admin/layout.tsx",
|
|
9
|
-
"app/admin/login.tsx",
|
|
10
|
-
"app/admin/dashboard.tsx",
|
|
11
|
-
];
|
|
12
|
-
try {
|
|
13
|
-
const [routerConfig, routes, packageText, ...adminFiles] = await Promise.all([
|
|
14
|
-
readFile(path.join(root, "react-router.config.ts"), "utf8"),
|
|
15
|
-
readFile(path.join(root, "app", "routes.ts"), "utf8"),
|
|
16
|
-
readFile(path.join(root, "package.json"), "utf8"),
|
|
17
|
-
...requiredFiles.map((relative) => readFile(path.join(root, ...relative.split("/")), "utf8")),
|
|
18
|
-
]);
|
|
19
|
-
const pkg = JSON.parse(packageText);
|
|
20
|
-
const prerendered = ["/", "/about", "/contact"].every((route) => routerConfig.includes(`"${route}"`));
|
|
21
|
-
const healthy = /ssr:\s*true/.test(routerConfig) &&
|
|
22
|
-
prerendered &&
|
|
23
|
-
!routerConfig.includes('"/admin"') &&
|
|
24
|
-
routes.includes('route("admin"') &&
|
|
25
|
-
routes.includes('route("admin/login"') &&
|
|
26
|
-
adminFiles.every((contents) => contents.length > 0) &&
|
|
27
|
-
Boolean(pkg.dependencies?.["@react-router/serve"]) &&
|
|
28
|
-
pkg.scripts?.start === "react-router-serve build/server/index.js";
|
|
29
|
-
return {
|
|
30
|
-
enabled: true,
|
|
31
|
-
healthy,
|
|
32
|
-
detail: healthy
|
|
33
|
-
? "Node runtime required; /admin excluded from prerender"
|
|
34
|
-
: "admin runtime files or hybrid rendering config are incomplete",
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
return {
|
|
39
|
-
enabled: true,
|
|
40
|
-
healthy: false,
|
|
41
|
-
detail: `admin runtime files missing: ${error instanceof Error ? error.message : String(error)}`,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=admin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/scaffold/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAAY,EACZ,MAAoB;IAEpB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;QACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAE1E,MAAM,aAAa,GAAG;QACpB,6BAA6B;QAC7B,sBAAsB;QACtB,qBAAqB;QACrB,yBAAyB;KAC1B,CAAC;IACF,IAAI,CAAC;QACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC,GACtD,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,wBAAwB,CAAC,EA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