aontu 0.65.0 → 0.67.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/README.md +4 -1
- package/dist/allow.js +2 -2
- package/dist/allow.js.map +1 -1
- package/dist/aontu.d.ts +1 -1
- package/dist/aontu.js +1 -1
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +344 -23
- package/dist/cli.js.map +1 -1
- package/dist/helpdoc.js +1 -1
- package/dist/helpdoc.js.map +1 -1
- package/dist/hints.js +2 -1
- package/dist/hints.js.map +1 -1
- package/dist/lang.js +6 -3
- package/dist/lang.js.map +1 -1
- package/dist/lsp.d.ts +1 -1
- package/dist/mcp-server.js +1 -1
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/mcp.js.map +1 -1
- package/dist/query.d.ts +1 -1
- package/dist/query.js +7 -9
- package/dist/query.js.map +1 -1
- package/dist/vet.d.ts +1 -0
- package/dist/vet.js +39 -9
- package/dist/vet.js.map +1 -1
- package/dist/view.js +2 -4
- package/dist/view.js.map +1 -1
- package/grammar/aontu.gbnf +8 -18
- package/grammar/aontu.lark +6 -14
- package/grammar/aontu.tmLanguage.json +4 -6
- package/package.json +4 -3
- package/skill/tasks.md +12 -7
- package/src/allow.ts +3 -3
- package/src/aontu.ts +1 -1
- package/src/cli.ts +380 -24
- package/src/helpdoc.ts +1 -1
- package/src/hints.ts +2 -1
- package/src/lang.ts +7 -3
- package/src/mcp-server.ts +1 -1
- package/src/mcp.ts +1 -1
- package/src/query.ts +8 -13
- package/src/tsconfig.json +2 -1
- package/src/vet.ts +47 -9
- package/src/view.ts +3 -7
- package/dist/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -75,8 +75,11 @@ the same thing in a Node agent harness and a Go gateway.
|
|
|
75
75
|
## Documentation
|
|
76
76
|
|
|
77
77
|
- [Documentation home](https://github.com/aontu-lang/aontu/blob/main/docs/index.md)
|
|
78
|
-
- [
|
|
78
|
+
- [Tutorials](https://github.com/aontu-lang/aontu/blob/main/docs/tutorial.md)
|
|
79
79
|
- [Language reference](https://github.com/aontu-lang/aontu/blob/main/docs/reference-language.md)
|
|
80
|
+
- [Generation reference](https://github.com/aontu-lang/aontu/blob/main/docs/reference-generation.md)
|
|
81
|
+
- [Functions reference](https://github.com/aontu-lang/aontu/blob/main/docs/reference-functions.md)
|
|
82
|
+
- [Error reference](https://github.com/aontu-lang/aontu/blob/main/docs/reference-errors.md)
|
|
80
83
|
- [API and CLI reference](https://github.com/aontu-lang/aontu/blob/main/docs/reference-api.md)
|
|
81
84
|
- [Agent skill](https://github.com/aontu-lang/aontu/blob/main/docs/skill/SKILL.md)
|
|
82
85
|
|
package/dist/allow.js
CHANGED
|
@@ -44,7 +44,7 @@ function readEntries(list, by, ctx) {
|
|
|
44
44
|
const text = true === el.isString ? el.peg : el.gen(ctx);
|
|
45
45
|
if (before < ctx.err.length) {
|
|
46
46
|
const err = ctx.err[before];
|
|
47
|
-
return { entries, finding:
|
|
47
|
+
return { entries, finding: (0, vet_1.engineFinding)(err, ctx, `${by}.${i}`) };
|
|
48
48
|
}
|
|
49
49
|
entries.push({ parts: (0, query_1.pathParts)(text), text, by: `${by}.${i}` });
|
|
50
50
|
}
|
|
@@ -99,7 +99,7 @@ function allow(src, role, paths, opts) {
|
|
|
99
99
|
}
|
|
100
100
|
const root = aontu.unify(new ConjunctVal_1.ConjunctVal({ peg: [model, shape] }, ctx), undefined, ctx);
|
|
101
101
|
if (0 < ctx.err.length || true === root.isNil) {
|
|
102
|
-
return errorReport(role, (0, query_1.evalFailure)(ctx));
|
|
102
|
+
return errorReport(role, (0, query_1.evalFailure)(ctx, root));
|
|
103
103
|
}
|
|
104
104
|
const roles = (0, vet_1.anchorAt)(root, at);
|
|
105
105
|
const atRole = `${at}.${role}`;
|
package/dist/allow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allow.js","sourceRoot":"","sources":["../src/allow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file } from './profile';
|
|
|
23
23
|
import { desugarTemplate, resugarTemplate, markerFor } from './template';
|
|
24
24
|
import { format, unifiedDiff } from './format';
|
|
25
25
|
export type { LintFinding, FormatReport, FormatOptions } from './format';
|
|
26
|
-
declare const VERSION = "0.
|
|
26
|
+
declare const VERSION = "0.67.0";
|
|
27
27
|
declare class Aontu {
|
|
28
28
|
opts: AontuOptions;
|
|
29
29
|
lang: Lang;
|
package/dist/aontu.js
CHANGED
|
@@ -58,7 +58,7 @@ Object.defineProperty(exports, "markerFor", { enumerable: true, get: function ()
|
|
|
58
58
|
const format_1 = require("./format");
|
|
59
59
|
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return format_1.format; } });
|
|
60
60
|
Object.defineProperty(exports, "unifiedDiff", { enumerable: true, get: function () { return format_1.unifiedDiff; } });
|
|
61
|
-
const VERSION = '0.
|
|
61
|
+
const VERSION = '0.67.0';
|
|
62
62
|
exports.VERSION = VERSION;
|
|
63
63
|
function genQuiet(val, aontu) {
|
|
64
64
|
return val.gen(aontu.ctx({ collect: true }));
|
package/dist/cli.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ declare function runPackageVerb(verb: string, argv: string[], servers: Servers):
|
|
|
49
49
|
declare function runModel(argv: string[]): number;
|
|
50
50
|
declare function runRelations(argv: string[]): number;
|
|
51
51
|
declare function runTrace(argv: string[]): number;
|
|
52
|
+
declare function renderSkipped(folder: string, since: number): string[];
|
|
53
|
+
declare function runRender(argv: string[]): Promise<number>;
|
|
52
54
|
declare function runReaches(argv: string[]): number;
|
|
53
55
|
declare function runView(argv: string[]): number;
|
|
54
56
|
declare function runJsonSchema(argv: string[]): number;
|
|
@@ -80,4 +82,4 @@ declare const KNOWN_VERBS: string[];
|
|
|
80
82
|
declare function looksLikeVerb(arg: string): boolean;
|
|
81
83
|
declare function nearestVerb(word: string, verbs: string[]): string;
|
|
82
84
|
declare function main(argv: string[], servers?: Servers): void;
|
|
83
|
-
export { evalSource, main, runVet, runSubsume, runBreaking, runTrim, runRelations, runReaches, runView, runJsonSchema, runTemplate, runTrace, runPkg, runModel, runPackageVerb, pkgToolOptions, serveUntilInterrupted, runHash, runGet, runHelp, runExplain, runInit, nearestVerb, looksLikeVerb, KNOWN_VERBS, runWhy, renderWhyText, runSet, runAllow, runAgentsMd, runFmt, watchChange, watchSignature, vetWaiter, deprecatedAt, };
|
|
85
|
+
export { evalSource, main, runVet, runSubsume, runBreaking, runTrim, runRelations, runReaches, runView, runJsonSchema, runTemplate, runTrace, runRender, renderSkipped, runPkg, runModel, runPackageVerb, pkgToolOptions, serveUntilInterrupted, runHash, runGet, runHelp, runExplain, runInit, nearestVerb, looksLikeVerb, KNOWN_VERBS, runWhy, renderWhyText, runSet, runAllow, runAgentsMd, runFmt, watchChange, watchSignature, vetWaiter, deprecatedAt, };
|
package/dist/cli.js
CHANGED
|
@@ -15,6 +15,8 @@ exports.runView = runView;
|
|
|
15
15
|
exports.runJsonSchema = runJsonSchema;
|
|
16
16
|
exports.runTemplate = runTemplate;
|
|
17
17
|
exports.runTrace = runTrace;
|
|
18
|
+
exports.runRender = runRender;
|
|
19
|
+
exports.renderSkipped = renderSkipped;
|
|
18
20
|
exports.runPkg = runPkg;
|
|
19
21
|
exports.runModel = runModel;
|
|
20
22
|
exports.runPackageVerb = runPackageVerb;
|
|
@@ -76,6 +78,9 @@ const HELP = `Usage: aontu [options] [file]
|
|
|
76
78
|
[--profile <file>] <file>
|
|
77
79
|
aontu trace [--at <path>] [--format json] [--marker <token>]
|
|
78
80
|
[--profile <file>] <file>
|
|
81
|
+
aontu render [--check] [--at <path>] [--format json]
|
|
82
|
+
[--marker <token>] [--profile <file>]
|
|
83
|
+
<file|folder> <path>
|
|
79
84
|
aontu hash [options] <file>
|
|
80
85
|
aontu sync [--frozen] [options] [dir]
|
|
81
86
|
aontu add <pkg>[@<version>] [options] [dir]
|
|
@@ -140,22 +145,30 @@ query between a document and its own earlier versions.
|
|
|
140
145
|
|
|
141
146
|
Options:
|
|
142
147
|
-c, --canon Print the canonical form instead of generated JSON
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
(the bare command's, as --jsonl is; model get has
|
|
149
|
+
its own)
|
|
150
|
+
--format <f> text (default) or json, on every verb that answers a
|
|
151
|
+
report. The json form is one object opening with an
|
|
152
|
+
aontu block; the bare command's carries findings, ok
|
|
153
|
+
and out
|
|
146
154
|
-h, --help Show this help and exit (the verbs and their flags);
|
|
147
155
|
aontu help is the LANGUAGE, and lists its own topics
|
|
148
156
|
--jsonl REPL: answer every command as one JSON line
|
|
149
157
|
-v, --version Print the version and exit
|
|
150
|
-
--trust <t> Include capability: system
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
158
|
+
--trust <t> Include capability: system, none, or root[:dir] to
|
|
159
|
+
confine @"..." below a directory. A bare root means
|
|
160
|
+
the entry root: the document's own directory, or the
|
|
161
|
+
project's for the package verbs. Every verb takes it
|
|
162
|
+
but help, explain, init and lsp, which read no
|
|
163
|
+
document, and mcp, which is the npm build's server
|
|
164
|
+
and confines with --root. Unset, a run behaves as
|
|
165
|
+
system, and the bare command warns once for an
|
|
166
|
+
include that leaves the entry root
|
|
154
167
|
--include-root <dir> Shorthand for --trust root:<dir>
|
|
155
|
-
--text-ext <e> Read these extensions as text too, comma-separated
|
|
156
|
-
|
|
168
|
+
--text-ext <e> Read these extensions as text too, comma-separated,
|
|
169
|
+
with or without dots (md,sql). .txt needs no flag; a
|
|
157
170
|
named format keeps its meaning, and .js stays
|
|
158
|
-
refused.
|
|
171
|
+
refused. The verbs that take --trust take it too
|
|
159
172
|
|
|
160
173
|
Package verbs (a module is imported; a package is published):
|
|
161
174
|
sync Make the project correct: resolve by minimum version
|
|
@@ -390,6 +403,31 @@ every other line is a line of output.
|
|
|
390
403
|
|
|
391
404
|
Template exit codes: 0 written, 1 --check drift, 2 usage or I/O.
|
|
392
405
|
|
|
406
|
+
Render options:
|
|
407
|
+
--check Compare what the generator writes with what <path>
|
|
408
|
+
holds, write nothing, and exit 1 on drift
|
|
409
|
+
--at <path> Where the component tree lives in the document
|
|
410
|
+
(default $.out)
|
|
411
|
+
--format json Print the files written, or the drift, as JSON
|
|
412
|
+
--marker <t> The file is a generator, and this is its marker
|
|
413
|
+
(default //-, and #- --- /*- <!--- by extension)
|
|
414
|
+
--profile <f> A profile file, whose template.ext names the
|
|
415
|
+
extensions it marks and template.marker the marker
|
|
416
|
+
|
|
417
|
+
The render verb writes the component tree a generator answers. The
|
|
418
|
+
tree is handed to jostraca, the generator runtime, which writes the
|
|
419
|
+
files: a tree that is one file is written to <path> itself, unless
|
|
420
|
+
<path> is a directory, and any other tree is written below <path>.
|
|
421
|
+
With --check nothing is written and <path> is compared with what the
|
|
422
|
+
generator writes, one "kind: file" line per difference.
|
|
423
|
+
A folder as the generator is a set: every regular file directly in
|
|
424
|
+
it, dotfiles aside, in name order, and their trees are written below
|
|
425
|
+
<path> as one run, so a path two of them claim is refused. A file with
|
|
426
|
+
no marker line in it is refused by name.
|
|
427
|
+
|
|
428
|
+
Render exit codes: 0 written or clean, 1 --check drift, 2 usage or
|
|
429
|
+
I/O, 4 the document does not stand up, or --at names nothing.
|
|
430
|
+
|
|
393
431
|
Model set options:
|
|
394
432
|
--entry <file> The document the change is checked against
|
|
395
433
|
--overlay <file> The file the change is appended to (created if
|
|
@@ -624,7 +662,7 @@ function takeTrust(argv, io = PROCESS_IO) {
|
|
|
624
662
|
}
|
|
625
663
|
else if ('--include-root' === arg) {
|
|
626
664
|
const dir = argv[++i];
|
|
627
|
-
if (null == dir) {
|
|
665
|
+
if (null == dir || '' === dir) {
|
|
628
666
|
io.err('aontu: --include-root needs a directory\n');
|
|
629
667
|
return undefined;
|
|
630
668
|
}
|
|
@@ -2263,20 +2301,38 @@ function pkgNetText(verb, report) {
|
|
|
2263
2301
|
}
|
|
2264
2302
|
const MODEL_HELP = 'aontu model get|why|set ... (try --help)';
|
|
2265
2303
|
// One document, interrogated or edited (ADR-039 part 5).
|
|
2304
|
+
// Where the subcommand is, past any global flag that precedes it.
|
|
2305
|
+
// `takeTrust` strips those anywhere in a tail, so the subcommand has
|
|
2306
|
+
// to be found past a flag AND past its value: in `--text-ext get` the
|
|
2307
|
+
// `get` is the extension list, not the subcommand.
|
|
2308
|
+
const MODEL_SUBS = ['get', 'why', 'set'];
|
|
2309
|
+
const GLOBAL_VALUED = ['--trust', '--include-root', '--text-ext'];
|
|
2310
|
+
function modelSubAt(argv) {
|
|
2311
|
+
for (let i = 0; i < argv.length; i++) {
|
|
2312
|
+
if (GLOBAL_VALUED.includes(argv[i])) {
|
|
2313
|
+
i++;
|
|
2314
|
+
continue;
|
|
2315
|
+
}
|
|
2316
|
+
return MODEL_SUBS.includes(argv[i]) ? i : -1;
|
|
2317
|
+
}
|
|
2318
|
+
return -1;
|
|
2319
|
+
}
|
|
2266
2320
|
function runModel(argv) {
|
|
2267
2321
|
const sub = argv[0];
|
|
2268
2322
|
if ('-h' === sub || '--help' === sub) {
|
|
2269
2323
|
process.stdout.write(HELP);
|
|
2270
2324
|
return 0;
|
|
2271
2325
|
}
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2326
|
+
const at = modelSubAt(argv);
|
|
2327
|
+
if (0 <= at) {
|
|
2328
|
+
const tail = argv.slice(0, at).concat(argv.slice(at + 1));
|
|
2329
|
+
if ('get' === argv[at]) {
|
|
2330
|
+
return runGet(tail);
|
|
2331
|
+
}
|
|
2332
|
+
if ('why' === argv[at]) {
|
|
2333
|
+
return runWhy(tail);
|
|
2334
|
+
}
|
|
2335
|
+
return runSet(tail);
|
|
2280
2336
|
}
|
|
2281
2337
|
process.stderr.write(`aontu: model needs get, why or set\n${MODEL_HELP}\n`);
|
|
2282
2338
|
return 2;
|
|
@@ -2446,6 +2502,268 @@ function runTrace(argv) {
|
|
|
2446
2502
|
}
|
|
2447
2503
|
return 0;
|
|
2448
2504
|
}
|
|
2505
|
+
// ---------------------------------------------------------------------
|
|
2506
|
+
// The writer (ADR-040). A generator answers a component tree; this verb
|
|
2507
|
+
// hands it to jostraca, which writes the files below a path or holds
|
|
2508
|
+
// them to it.
|
|
2509
|
+
const RENDER_HELP = 'aontu render [--check] [--at <path>] [--format json] ' +
|
|
2510
|
+
'[--marker <token>] [--profile <file>] <file|folder> <path> (try --help)';
|
|
2511
|
+
// Loaded at the call, so every other verb starts without it.
|
|
2512
|
+
function generatorRuntime() {
|
|
2513
|
+
return require('jostraca');
|
|
2514
|
+
}
|
|
2515
|
+
function isDirectory(path) {
|
|
2516
|
+
return true === (0, node_fs_1.statSync)(path, { throwIfNoEntry: false })?.isDirectory();
|
|
2517
|
+
}
|
|
2518
|
+
// A `File` the write path skips, RENAMED rather than removed: dropping
|
|
2519
|
+
// the node would take its children's claims with it and hide drift the
|
|
2520
|
+
// write path does make. The skip is the File's own save alone, so what
|
|
2521
|
+
// separates the runs is its output path, composed by the runtime rather
|
|
2522
|
+
// than here.
|
|
2523
|
+
const EXCLUDED_NAME = '.aontu-check-excluded-';
|
|
2524
|
+
// `exclude` as the runtime reads it: `true`, or a string or list member
|
|
2525
|
+
// equal to the node's COMPONENT path, the chain of `name` props above
|
|
2526
|
+
// it, which a Project's `folder` is not part of. The Go runtime honours
|
|
2527
|
+
// the boolean alone, so the ports' `--check` answers differ for the
|
|
2528
|
+
// path forms (test/spec/divergent.tsv).
|
|
2529
|
+
function excludedFile(exclude, at) {
|
|
2530
|
+
if (true === exclude) {
|
|
2531
|
+
return true;
|
|
2532
|
+
}
|
|
2533
|
+
const path = at.join('/');
|
|
2534
|
+
if ('string' === typeof exclude) {
|
|
2535
|
+
return exclude === path;
|
|
2536
|
+
}
|
|
2537
|
+
return Array.isArray(exclude) && exclude.includes(path);
|
|
2538
|
+
}
|
|
2539
|
+
function renameExcluded(node, at, cut) {
|
|
2540
|
+
if (Array.isArray(node)) {
|
|
2541
|
+
return node.map((child) => renameExcluded(child, at, cut));
|
|
2542
|
+
}
|
|
2543
|
+
// A hand-written tree carries nodes with no `props` and nodes with
|
|
2544
|
+
// no `children`, and neither needs an arm of its own.
|
|
2545
|
+
const props = node.props ?? {};
|
|
2546
|
+
const below = 'string' === typeof props.name ? at.concat(props.name) : at;
|
|
2547
|
+
if ('File' === node.cmp && excludedFile(props.exclude, below)) {
|
|
2548
|
+
cut.push(1);
|
|
2549
|
+
return { ...node, props: { ...props, name: EXCLUDED_NAME + cut.length } };
|
|
2550
|
+
}
|
|
2551
|
+
if (!Array.isArray(node.children)) {
|
|
2552
|
+
return node;
|
|
2553
|
+
}
|
|
2554
|
+
return { ...node, children: renameExcluded(node.children, below, cut) };
|
|
2555
|
+
}
|
|
2556
|
+
// A file the runtime declined to touch, its copy on disk carrying the
|
|
2557
|
+
// protect marker, is in none of the lists it answers with: they hold
|
|
2558
|
+
// what was DONE to a file, and nothing was. The run's own record names
|
|
2559
|
+
// it. `since` drops what earlier runs left.
|
|
2560
|
+
function renderSkipped(folder, since) {
|
|
2561
|
+
const at = (0, node_path_1.join)(folder, '.jostraca', 'jostraca.meta.log');
|
|
2562
|
+
let meta;
|
|
2563
|
+
try {
|
|
2564
|
+
meta = JSON.parse((0, node_fs_1.readFileSync)(at, 'utf8'));
|
|
2565
|
+
}
|
|
2566
|
+
catch (err) {
|
|
2567
|
+
return [];
|
|
2568
|
+
}
|
|
2569
|
+
return Object.entries(meta?.files ?? {})
|
|
2570
|
+
.filter(([_, f]) => 'skip' === f?.action && since <= f?.when)
|
|
2571
|
+
.map(([path]) => path)
|
|
2572
|
+
.sort(keyorder_1.cmpCodePoint);
|
|
2573
|
+
}
|
|
2574
|
+
async function runRender(argv) {
|
|
2575
|
+
const trusted = takeTrust(argv);
|
|
2576
|
+
if (null == trusted) {
|
|
2577
|
+
return 2;
|
|
2578
|
+
}
|
|
2579
|
+
argv = trusted.argv;
|
|
2580
|
+
const trust = trusted.trust;
|
|
2581
|
+
const rest = [];
|
|
2582
|
+
const profileFiles = [];
|
|
2583
|
+
let format = 'text';
|
|
2584
|
+
let at = undefined;
|
|
2585
|
+
let marker = undefined;
|
|
2586
|
+
let check = false;
|
|
2587
|
+
for (let i = 0; i < argv.length; i++) {
|
|
2588
|
+
const arg = argv[i];
|
|
2589
|
+
if ('-h' === arg || '--help' === arg) {
|
|
2590
|
+
process.stdout.write(HELP);
|
|
2591
|
+
return 0;
|
|
2592
|
+
}
|
|
2593
|
+
if ('--check' === arg) {
|
|
2594
|
+
check = true;
|
|
2595
|
+
}
|
|
2596
|
+
else if ('--format' === arg) {
|
|
2597
|
+
const f = argv[++i];
|
|
2598
|
+
if ('text' !== f && 'json' !== f) {
|
|
2599
|
+
process.stderr.write('aontu: --format needs text or json\n');
|
|
2600
|
+
return 2;
|
|
2601
|
+
}
|
|
2602
|
+
format = f;
|
|
2603
|
+
}
|
|
2604
|
+
else if ('--at' === arg) {
|
|
2605
|
+
at = argv[++i];
|
|
2606
|
+
if (null == at || '' === at) {
|
|
2607
|
+
process.stderr.write('aontu: --at needs a path\n');
|
|
2608
|
+
return 2;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
else if ('--marker' === arg) {
|
|
2612
|
+
marker = argv[++i];
|
|
2613
|
+
if (null == marker || '' === marker) {
|
|
2614
|
+
process.stderr.write('aontu: --marker needs a token\n');
|
|
2615
|
+
return 2;
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
else if ('--profile' === arg) {
|
|
2619
|
+
const pf = argv[++i];
|
|
2620
|
+
if (null == pf || '' === pf) {
|
|
2621
|
+
process.stderr.write('aontu: --profile needs a file\n');
|
|
2622
|
+
return 2;
|
|
2623
|
+
}
|
|
2624
|
+
profileFiles.push(pf);
|
|
2625
|
+
}
|
|
2626
|
+
else if (arg.startsWith('-')) {
|
|
2627
|
+
process.stderr.write(`aontu: unknown render option ${arg} (try --help)\n`);
|
|
2628
|
+
return 2;
|
|
2629
|
+
}
|
|
2630
|
+
else {
|
|
2631
|
+
rest.push(arg);
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
if (2 !== rest.length) {
|
|
2635
|
+
process.stderr.write(`aontu: render needs a file and a path\n${RENDER_HELP}\n`);
|
|
2636
|
+
return 2;
|
|
2637
|
+
}
|
|
2638
|
+
const [file, dest] = rest;
|
|
2639
|
+
const declared = loadProfiles(profileFiles, trust);
|
|
2640
|
+
if ('number' === typeof declared) {
|
|
2641
|
+
return declared;
|
|
2642
|
+
}
|
|
2643
|
+
// A FOLDER IS A SET OF GENERATORS: every regular file directly in it,
|
|
2644
|
+
// dotfiles aside, in code-point order, written as one tree.
|
|
2645
|
+
let entries;
|
|
2646
|
+
try {
|
|
2647
|
+
entries = (0, node_fs_1.readdirSync)(file, { withFileTypes: true });
|
|
2648
|
+
}
|
|
2649
|
+
catch (err) {
|
|
2650
|
+
entries = undefined;
|
|
2651
|
+
}
|
|
2652
|
+
const set = undefined !== entries;
|
|
2653
|
+
const files = undefined === entries ? [file] :
|
|
2654
|
+
entries.filter((e) => e.isFile() && !e.name.startsWith('.'))
|
|
2655
|
+
.map((e) => e.name).sort(keyorder_1.cmpCodePoint).map((n) => (0, node_path_1.join)(file, n));
|
|
2656
|
+
if (0 === files.length) {
|
|
2657
|
+
process.stderr.write(`aontu: ${file} holds no generator\n`);
|
|
2658
|
+
return 2;
|
|
2659
|
+
}
|
|
2660
|
+
const trees = [];
|
|
2661
|
+
for (const f of files) {
|
|
2662
|
+
let src;
|
|
2663
|
+
try {
|
|
2664
|
+
src = (0, node_fs_1.readFileSync)(f, 'utf8');
|
|
2665
|
+
}
|
|
2666
|
+
catch (err) {
|
|
2667
|
+
process.stderr.write(`aontu: cannot read ${err.path}: ${err.message}\n`);
|
|
2668
|
+
return 2;
|
|
2669
|
+
}
|
|
2670
|
+
if (!/[.](aon|aontu)$/.test(f)) {
|
|
2671
|
+
const mark = marker ?? (0, template_1.markerFromProfiles)(declared, f) ?? (0, template_1.markerFor)(f);
|
|
2672
|
+
if (!(0, template_1.templateOutputs)(src, mark).some((out) => !out)) {
|
|
2673
|
+
process.stderr.write(`aontu: ${f} carries no ${mark} marker line, ` +
|
|
2674
|
+
'so there is no aontu in it to render\n');
|
|
2675
|
+
return 2;
|
|
2676
|
+
}
|
|
2677
|
+
src = (0, template_1.desugarTemplate)(src, mark);
|
|
2678
|
+
}
|
|
2679
|
+
const report = (0, aontu_1.get)(src, at ?? '$.out', {
|
|
2680
|
+
view: 'json', path: f, ...verbOpts(trust, entryRootOf(f)),
|
|
2681
|
+
});
|
|
2682
|
+
if (!report.ok) {
|
|
2683
|
+
process.stderr.write(report.findings.map(renderFinding).join('\n') + '\n');
|
|
2684
|
+
return 4;
|
|
2685
|
+
}
|
|
2686
|
+
const tree = JSON.parse(report.out);
|
|
2687
|
+
// A `File` without a name is refused: the runtime ports disagree
|
|
2688
|
+
// about it.
|
|
2689
|
+
if ('File' === tree?.cmp && 'string' !== typeof tree.props?.name) {
|
|
2690
|
+
process.stderr.write(`aontu: ${f}: the file at ${at ?? '$.out'} has no name\n`);
|
|
2691
|
+
return 4;
|
|
2692
|
+
}
|
|
2693
|
+
trees.push(tree);
|
|
2694
|
+
}
|
|
2695
|
+
// ONE FILE GOES TO THE PATH ITSELF, unless the path is a directory; a
|
|
2696
|
+
// set is written below the path whatever its trees are.
|
|
2697
|
+
let folder = dest;
|
|
2698
|
+
const tree = set ? trees.flatMap((t) => Array.isArray(t) ? t : [t]) : trees[0];
|
|
2699
|
+
if (!set && 'File' === tree?.cmp && !isDirectory(dest)) {
|
|
2700
|
+
tree.props.name = (0, node_path_1.basename)(dest);
|
|
2701
|
+
folder = (0, node_path_1.dirname)(dest);
|
|
2702
|
+
}
|
|
2703
|
+
const { cmpTree, Jostraca } = generatorRuntime();
|
|
2704
|
+
let root;
|
|
2705
|
+
try {
|
|
2706
|
+
root = cmpTree(tree, { raw: true });
|
|
2707
|
+
}
|
|
2708
|
+
catch (err) {
|
|
2709
|
+
process.stderr.write(`aontu: ${file}: ${err.message}\n`);
|
|
2710
|
+
return 4;
|
|
2711
|
+
}
|
|
2712
|
+
const runtime = Jostraca();
|
|
2713
|
+
try {
|
|
2714
|
+
if (check) {
|
|
2715
|
+
const res = await runtime.check({ folder }, root);
|
|
2716
|
+
let drift = res.drift.map((d) => ({ kind: d.kind, path: d.path }));
|
|
2717
|
+
// `--check` answers "would `render` change anything", so a file
|
|
2718
|
+
// the write path leaves alone is not held to the generator's
|
|
2719
|
+
// bytes. The skip is gated on the target BEING there -- `render`
|
|
2720
|
+
// writes an absent one -- so drift at a path with nothing at it
|
|
2721
|
+
// survives, which is the `missing` a deleted file reports.
|
|
2722
|
+
const cut = [];
|
|
2723
|
+
const renamed = renameExcluded(tree, [], cut);
|
|
2724
|
+
if (0 < cut.length) {
|
|
2725
|
+
const kept = new Set((await Jostraca().check({ folder }, cmpTree(renamed, { raw: true }))).checked);
|
|
2726
|
+
const skipped = new Set(res.checked.filter((p) => !kept.has(p)));
|
|
2727
|
+
drift = drift.filter((d) => !skipped.has(d.path) ||
|
|
2728
|
+
!(0, node_fs_1.existsSync)((0, node_path_1.join)(folder, d.path)));
|
|
2729
|
+
}
|
|
2730
|
+
if ('json' === format) {
|
|
2731
|
+
process.stdout.write((0, aontu_1.exactJSON)({
|
|
2732
|
+
aontu: { version: version(), verb: 'render' },
|
|
2733
|
+
verdict: 0 === drift.length ? 'ok' : 'drift',
|
|
2734
|
+
checked: res.checked,
|
|
2735
|
+
drift,
|
|
2736
|
+
}, 2) + '\n');
|
|
2737
|
+
}
|
|
2738
|
+
else {
|
|
2739
|
+
for (const d of drift) {
|
|
2740
|
+
process.stdout.write(`${d.kind}: ${d.path}\n`);
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
return 0 === drift.length ? 0 : 1;
|
|
2744
|
+
}
|
|
2745
|
+
const since = Date.now();
|
|
2746
|
+
const res = await runtime.generate({ folder }, root);
|
|
2747
|
+
const skipped = renderSkipped(folder, since);
|
|
2748
|
+
if ('json' === format) {
|
|
2749
|
+
process.stdout.write((0, aontu_1.exactJSON)({
|
|
2750
|
+
aontu: { version: version(), verb: 'render' },
|
|
2751
|
+
verdict: 'ok',
|
|
2752
|
+
files: { ...res.files, skipped },
|
|
2753
|
+
}, 2) + '\n');
|
|
2754
|
+
}
|
|
2755
|
+
else {
|
|
2756
|
+
for (const path of skipped) {
|
|
2757
|
+
process.stdout.write(`skipped: ${path}\n`);
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
return 0;
|
|
2761
|
+
}
|
|
2762
|
+
catch (err) {
|
|
2763
|
+
process.stderr.write(`aontu: ${err.message}\n`);
|
|
2764
|
+
return 2;
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2449
2767
|
function runReaches(argv) {
|
|
2450
2768
|
const trusted = takeTrust(argv);
|
|
2451
2769
|
if (null == trusted) {
|
|
@@ -3172,7 +3490,7 @@ function runHash(argv) {
|
|
|
3172
3490
|
const v = aontu.unify(src, { path: files[0] }, ctx);
|
|
3173
3491
|
if (0 < ctx.err.length || true === v?.isNil) {
|
|
3174
3492
|
process.stderr.write(`aontu: ${files[0]} does not evaluate on its own; nothing to hash\n` +
|
|
3175
|
-
renderFinding((0, query_1.evalFailure)(ctx)) + '\n');
|
|
3493
|
+
renderFinding((0, query_1.evalFailure)(ctx, v)) + '\n');
|
|
3176
3494
|
return 4;
|
|
3177
3495
|
}
|
|
3178
3496
|
const text = 'json' === format
|
|
@@ -4191,8 +4509,8 @@ function runInit(argv) {
|
|
|
4191
4509
|
const KNOWN_VERBS = [
|
|
4192
4510
|
'add', 'agentsmd', 'allow', 'breaking', 'explain', 'fmt', 'get', 'hash',
|
|
4193
4511
|
'help', 'init', 'jsonschema', 'lsp', 'mcp', 'model', 'pkg', 'publish',
|
|
4194
|
-
'reaches', 'relations', 'remove', '
|
|
4195
|
-
'trim', 'vet', 'view', 'why',
|
|
4512
|
+
'reaches', 'relations', 'remove', 'render', 'subsume', 'sync', 'template',
|
|
4513
|
+
'trace', 'trim', 'vet', 'view', 'why',
|
|
4196
4514
|
];
|
|
4197
4515
|
exports.KNOWN_VERBS = KNOWN_VERBS;
|
|
4198
4516
|
// looksLikeVerb reports whether an unreadable argument was meant as a
|
|
@@ -4316,6 +4634,9 @@ function main(argv, servers = SERVERS) {
|
|
|
4316
4634
|
if ('trace' === argv[2]) {
|
|
4317
4635
|
return finish(runTrace(argv.slice(3)));
|
|
4318
4636
|
}
|
|
4637
|
+
if ('render' === argv[2]) {
|
|
4638
|
+
return void runRender(argv.slice(3)).then(finish);
|
|
4639
|
+
}
|
|
4319
4640
|
if ('reaches' === argv[2]) {
|
|
4320
4641
|
return finish(runReaches(argv.slice(3)));
|
|
4321
4642
|
}
|
|
@@ -4366,7 +4687,7 @@ function main(argv, servers = SERVERS) {
|
|
|
4366
4687
|
}
|
|
4367
4688
|
else if ('--include-root' === arg) {
|
|
4368
4689
|
const dir = args[++i];
|
|
4369
|
-
if (null == dir) {
|
|
4690
|
+
if (null == dir || '' === dir) {
|
|
4370
4691
|
process.stderr.write('aontu: --include-root needs a directory\n');
|
|
4371
4692
|
return finish(2);
|
|
4372
4693
|
}
|