@aqaf/cli 1.1.0 → 1.1.1
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 +22 -3
- package/index.js +20 -1
- package/package.json +3 -2
- package/vendor/aqaf/__init__.py +1 -1
- package/vendor/aqaf/adapters.py +583 -0
- package/vendor/aqaf/artifacts.py +28 -0
- package/vendor/aqaf/calibration.py +29 -0
- package/vendor/aqaf/catalogue.py +257 -0
- package/vendor/aqaf/cli.py +171 -33
- package/vendor/aqaf/cursor.py +56 -0
- package/vendor/aqaf/data/book_review_knowledge.json +1574 -0
- package/vendor/aqaf/data/documentation_checks.json +52 -0
- package/vendor/aqaf/data/review_checks.json +319 -0
- package/vendor/aqaf/data/source_registry.json +513 -1
- package/vendor/aqaf/discovery.py +580 -0
- package/vendor/aqaf/documentation.py +210 -0
- package/vendor/aqaf/evidence.py +132 -0
- package/vendor/aqaf/facets.py +63 -0
- package/vendor/aqaf/ignore.py +109 -0
- package/vendor/aqaf/knowledge.py +110 -0
- package/vendor/aqaf/markup.py +96 -0
- package/vendor/aqaf/matching.py +22 -0
- package/vendor/aqaf/portfolio.py +145 -0
- package/vendor/aqaf/project_commands.py +132 -0
- package/vendor/aqaf/projects.py +157 -0
- package/vendor/aqaf/registry.py +4 -3
- package/vendor/aqaf/review.py +446 -0
- package/vendor/aqaf/scope.py +401 -0
- package/vendor/aqaf/swift_review.py +99 -0
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# @aqaf/cli — npm distribution
|
|
1
|
+
# @aqaf/cli — published npm distribution
|
|
2
2
|
|
|
3
3
|
This package exposes the **same Python AQAF analyzer** to JS/TS projects, not a second independent scoring implementation. Requires **Node 18+ and Python 3.9+**. No `postinstall` scripts, network calls or execution of target project code. Never run the analyzer on an untrusted repository via arbitrary user hooks: AQAF only reads data.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install
|
|
6
|
+
npm install @aqaf/cli@1.1.1
|
|
7
7
|
npx aqaf . --format json
|
|
8
8
|
```
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ const report = scan(process.cwd(), { pack: 'web', profile: 'npm_library' });
|
|
|
15
15
|
console.log(report.findings);
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
For a Windows terminal with multiple Python installations set `AQAF_PYTHON`.
|
|
18
|
+
For a Windows terminal with multiple Python installations set `AQAF_PYTHON`. The public package is https://www.npmjs.com/package/@aqaf/cli The 1.1.1 release includes project discovery, scope filtering, optional documentation and book-informed reviews. See the release evidence for channel installation verification. The hosted cross-platform matrix remains pending; do not infer those results from this local check. For a global CLI use `npm install --global @aqaf/cli@1.1.1`. Further publication requires owner approval.
|
|
19
19
|
|
|
20
20
|
## Owner release preparation
|
|
21
21
|
|
|
@@ -42,3 +42,22 @@ To recheck an existing trusted candidate, pass its exact `.tgz` path to that
|
|
|
42
42
|
script. It never uploads and does not need npm registry credentials. The active
|
|
43
43
|
build-only npm candidate workflow tests Linux/macOS/Windows with Node 18/24 and
|
|
44
44
|
Python 3.9/3.12; configuration alone is not proof those jobs have passed.
|
|
45
|
+
|
|
46
|
+
## Experimental review option (unreleased 1.2.0)
|
|
47
|
+
|
|
48
|
+
Use `scan(repo, {reviewSignals: true})` or CLI `--review-signals` for bounded JS/TS
|
|
49
|
+
review observations. `reviewSignals` must be boolean. The separate `review` result
|
|
50
|
+
is experimental, unreviewed and unscored; normal findings, scores and baseline
|
|
51
|
+
gates are unchanged. Default calls omit it. No target code or credential decoding
|
|
52
|
+
is performed. This source candidate has not been published.
|
|
53
|
+
|
|
54
|
+
Source candidate 1.3.0 respects `.gitignore` by default. Use
|
|
55
|
+
`scan(repo, {respectGitignore: false})` for an explicit opt-out. Candidate scope
|
|
56
|
+
options include `scopePolicy`, `scopeConfig`, `inventoryAll`, `component`,
|
|
57
|
+
`reviewMaxFiles`, `reviewMaxBytes`, `reviewFileBytes`, `reviewOffset`,
|
|
58
|
+
`reviewCursorIn` and `reviewCursorOut`. `reviewSignals` remains opt-in and unscored.
|
|
59
|
+
The archive includes only Python/JSON runtime files; bytecode caches are excluded.
|
|
60
|
+
|
|
61
|
+
The bundled Python runtime also supports `aqaf projects discover ROOT`, the opt-in local `projects` catalogue commands, and `aqaf docs check ROOT`. Use `invoke(['projects', 'discover', root])` from the Node API for additive commands. Discovery and documentation checks never execute target code; catalogue storage uses Python's standard-library SQLite. Experimental probabilities and observations are uncalibrated and unscored.
|
|
62
|
+
|
|
63
|
+
Add `--review-knowledge` to an assessment for the optional book-informed human review agenda. It uses 31 attributed secondary notes and leaves questions unknown until reviewed; it does not change scores or run target checks.
|
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ function invoke(args, opts = {}) {
|
|
|
8
8
|
const pythonCandidates = opts.python ? [opts.python] : process.env.AQAF_PYTHON ? [process.env.AQAF_PYTHON] : (process.platform === 'win32' ? ['py', 'python', 'python3'] : ['python3','python']);
|
|
9
9
|
for (const command of pythonCandidates) {
|
|
10
10
|
const pre = command === 'py' ? ['-3'] : [];
|
|
11
|
-
const env = { ...process.env, ...(opts.env || {}), PYTHONPATH: [vendor, process.env.PYTHONPATH].filter(Boolean).join(path.delimiter) };
|
|
11
|
+
const env = { ...process.env, ...(opts.env || {}), PYTHONDONTWRITEBYTECODE: '1', PYTHONPATH: [vendor, process.env.PYTHONPATH].filter(Boolean).join(path.delimiter) };
|
|
12
12
|
const result = spawnSync(command, [...pre, '-m', 'aqaf', ...args], {
|
|
13
13
|
cwd: opts.cwd || process.cwd(), env, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024,
|
|
14
14
|
stdio: opts.stdio || 'pipe', windowsHide: true
|
|
@@ -23,6 +23,25 @@ function scan(repo, options = {}) {
|
|
|
23
23
|
const argv = [repo, '--format', 'json', '--output', '-'];
|
|
24
24
|
if (options.profile) argv.push('--profile', options.profile);
|
|
25
25
|
if (options.pack) argv.push('--pack', options.pack);
|
|
26
|
+
if (options.reviewSignals !== undefined && typeof options.reviewSignals !== 'boolean') throw new TypeError('reviewSignals must be boolean');
|
|
27
|
+
if (options.reviewSignals) argv.push('--review-signals');
|
|
28
|
+
for (const [name, flag] of [['respectGitignore','gitignore'],['inventoryAll','inventory-all']]) {
|
|
29
|
+
if (options[name] !== undefined && typeof options[name] !== 'boolean') throw new TypeError(`${name} must be boolean`);
|
|
30
|
+
if (options[name] === true) argv.push(`--${flag}`);
|
|
31
|
+
if (name === 'respectGitignore' && options[name] === false) argv.push('--no-gitignore');
|
|
32
|
+
}
|
|
33
|
+
for (const [name,flag] of [['scopePolicy','scope-policy'],['scopeConfig','scope-config'],['component','component'],['reviewCursorIn','review-cursor-in'],['reviewCursorOut','review-cursor-out']]) {
|
|
34
|
+
if (options[name] !== undefined) {
|
|
35
|
+
if (typeof options[name] !== 'string') throw new TypeError(`${name} must be a string`);
|
|
36
|
+
argv.push(`--${flag}`, options[name]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
for (const [name,flag] of [['reviewMaxFiles','review-max-files'],['reviewMaxBytes','review-max-bytes'],['reviewFileBytes','review-file-bytes'],['reviewOffset','review-offset']]) {
|
|
40
|
+
if (options[name] !== undefined) {
|
|
41
|
+
if (!Number.isSafeInteger(options[name]) || options[name] < (name === 'reviewOffset' ? 0 : 1)) throw new TypeError(`${name} must be a bounded integer`);
|
|
42
|
+
argv.push(`--${flag}`, String(options[name]));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
26
45
|
for (const capability of (options.capabilities || [])) argv.push('--capability', capability);
|
|
27
46
|
if (options.profileDir) argv.push('--profile-dir', options.profileDir);
|
|
28
47
|
const result = invoke(argv, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aqaf/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Local-first architecture assessment, Node.js distribution wrapper around the bundled AQAF Python engine",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin/",
|
|
15
|
-
"vendor
|
|
15
|
+
"vendor/**/*.py",
|
|
16
|
+
"vendor/**/*.json",
|
|
16
17
|
"index.js",
|
|
17
18
|
"README.md",
|
|
18
19
|
"LICENSE"
|
package/vendor/aqaf/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""AQAF local, offline, heuristic architecture assessment."""
|
|
2
|
-
__version__ = '1.1.
|
|
2
|
+
__version__ = '1.1.1'
|