@oml/cli 0.19.3 → 0.20.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/out/cli.js +55 -16
- package/out/cli.js.map +1 -1
- package/out/commands/export.js +3 -3
- package/out/commands/export.js.map +1 -1
- package/out/commands/reason.d.ts +2 -3
- package/out/commands/reason.js +181 -166
- package/out/commands/reason.js.map +1 -1
- package/package.json +3 -3
- package/src/cli.ts +57 -16
- package/src/commands/export.ts +6 -8
- package/src/commands/reason.ts +201 -192
package/out/commands/reason.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copyright (c) 2026 Modelware. All rights reserved.
|
|
2
|
-
import { checkConsistency } from '@oml/reasoner';
|
|
2
|
+
import { checkConsistency, checkConsistencyBatch } from '@oml/reasoner';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import * as fs from 'node:fs/promises';
|
|
5
5
|
import * as os from 'node:os';
|
|
@@ -9,14 +9,7 @@ import { failCli } from '../cli-error.js';
|
|
|
9
9
|
import { formatDuration } from '../util.js';
|
|
10
10
|
import { printLintDiagnostics } from './lint.js';
|
|
11
11
|
import { restPost } from './server/rest.js';
|
|
12
|
-
|
|
13
|
-
function normalizeRdfFormat(value) {
|
|
14
|
-
const normalized = String(value ?? 'ttl').trim().toLowerCase();
|
|
15
|
-
if (normalized === 'trig' || normalized === 'nt' || normalized === 'nq' || normalized === 'n3') {
|
|
16
|
-
return normalized;
|
|
17
|
-
}
|
|
18
|
-
return 'ttl';
|
|
19
|
-
}
|
|
12
|
+
/** Add a blank line between top-level statements for ttl/trig readability. */
|
|
20
13
|
function prettyPrintRdf(serialized, format) {
|
|
21
14
|
if (format !== 'ttl' && format !== 'trig') {
|
|
22
15
|
return serialized;
|
|
@@ -24,9 +17,8 @@ function prettyPrintRdf(serialized, format) {
|
|
|
24
17
|
const lines = serialized.split('\n');
|
|
25
18
|
const out = [];
|
|
26
19
|
for (let i = 0; i < lines.length; i += 1) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (line.trim().endsWith('.')) {
|
|
20
|
+
out.push(lines[i]);
|
|
21
|
+
if (lines[i].trim().endsWith('.')) {
|
|
30
22
|
const next = lines[i + 1];
|
|
31
23
|
if (next !== undefined && next.trim().length > 0) {
|
|
32
24
|
out.push('');
|
|
@@ -35,210 +27,233 @@ function prettyPrintRdf(serialized, format) {
|
|
|
35
27
|
}
|
|
36
28
|
return out.join('\n');
|
|
37
29
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
let statementMatch;
|
|
42
|
-
while ((statementMatch = statementPattern.exec(serialized)) !== null) {
|
|
43
|
-
const tail = statementMatch[1] ?? '';
|
|
44
|
-
const iriPattern = /<([^>]+)>/g;
|
|
45
|
-
let iriMatch;
|
|
46
|
-
while ((iriMatch = iriPattern.exec(tail)) !== null) {
|
|
47
|
-
const iri = iriMatch[1]?.trim();
|
|
48
|
-
if (iri) {
|
|
49
|
-
imports.add(iri);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
// Handle compact single-line N-Triples cases defensively.
|
|
54
|
-
if (imports.size === 0 && serialized.includes(OWL_IMPORTS_IRI)) {
|
|
55
|
-
const linePattern = /<http:\/\/www\.w3\.org\/2002\/07\/owl#imports>\s+<([^>]+)>/g;
|
|
56
|
-
let lineMatch;
|
|
57
|
-
while ((lineMatch = linePattern.exec(serialized)) !== null) {
|
|
58
|
-
const iri = lineMatch[1]?.trim();
|
|
59
|
-
if (iri) {
|
|
60
|
-
imports.add(iri);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return Array.from(imports);
|
|
30
|
+
function resolveEntailmentsPath(uri) {
|
|
31
|
+
const trimmed = uri.trim();
|
|
32
|
+
return trimmed.startsWith('file://') ? fileURLToPath(trimmed) : trimmed;
|
|
65
33
|
}
|
|
66
34
|
function sortFilesLeafToRoot(files) {
|
|
67
|
-
const
|
|
68
|
-
for (const file of files) {
|
|
69
|
-
filesByOntologyIri.set(file.ontologyIri, file);
|
|
70
|
-
}
|
|
71
|
-
const importsByOntologyIri = new Map();
|
|
72
|
-
for (const file of files) {
|
|
73
|
-
importsByOntologyIri.set(file.ontologyIri, extractImports(file.content));
|
|
74
|
-
}
|
|
35
|
+
const byPath = new Map(files.map(f => [f.path, f]));
|
|
75
36
|
const sorted = [];
|
|
76
37
|
const state = new Map();
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const current = state.get(ontologyIri) ?? 0;
|
|
80
|
-
if (current === 2) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
if (current === 1) {
|
|
38
|
+
const visit = (p) => {
|
|
39
|
+
if ((state.get(p) ?? 0) !== 0)
|
|
84
40
|
return;
|
|
41
|
+
state.set(p, 1);
|
|
42
|
+
for (const imp of byPath.get(p)?.imports ?? []) {
|
|
43
|
+
visit(imp);
|
|
85
44
|
}
|
|
86
|
-
state.set(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
state.set(ontologyIri, 2);
|
|
93
|
-
const file = filesByOntologyIri.get(ontologyIri);
|
|
94
|
-
if (file) {
|
|
95
|
-
sorted.push(file);
|
|
96
|
-
}
|
|
45
|
+
state.set(p, 2);
|
|
46
|
+
const f = byPath.get(p);
|
|
47
|
+
if (f)
|
|
48
|
+
sorted.push(f);
|
|
97
49
|
};
|
|
98
|
-
for (const
|
|
99
|
-
visit(
|
|
100
|
-
}
|
|
50
|
+
for (const p of [...byPath.keys()].sort())
|
|
51
|
+
visit(p);
|
|
101
52
|
return sorted;
|
|
102
53
|
}
|
|
103
|
-
function
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
54
|
+
function collectClosure(start, byPath, into) {
|
|
55
|
+
const stack = [start];
|
|
56
|
+
while (stack.length > 0) {
|
|
57
|
+
const p = stack.pop();
|
|
58
|
+
if (into.has(p))
|
|
59
|
+
continue;
|
|
60
|
+
into.add(p);
|
|
61
|
+
for (const imp of byPath.get(p)?.imports ?? [])
|
|
62
|
+
stack.push(imp);
|
|
107
63
|
}
|
|
108
|
-
return trimmed;
|
|
109
64
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
65
|
+
function closureFiles(start, byPath) {
|
|
66
|
+
const seen = new Set();
|
|
67
|
+
collectClosure(start, byPath, seen);
|
|
68
|
+
const result = [];
|
|
69
|
+
for (const p of seen) {
|
|
70
|
+
const f = byPath.get(p);
|
|
71
|
+
if (f)
|
|
72
|
+
result.push(f);
|
|
118
73
|
}
|
|
119
|
-
|
|
120
|
-
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Files imported by no other file (maximal nodes of the import graph).
|
|
78
|
+
* Checking only these establishes consistency of every file: OWL-DL
|
|
79
|
+
* consistency is monotonic, so a consistent import closure proves every
|
|
80
|
+
* imported (subset) ontology is consistent too. The roots' closures cover
|
|
81
|
+
* every file, so this is sufficient — and far cheaper than reasoning each
|
|
82
|
+
* file's closure independently.
|
|
83
|
+
*/
|
|
84
|
+
function computeConsistencyRoots(files) {
|
|
85
|
+
const byPath = new Map(files.map(f => [f.path, f]));
|
|
86
|
+
const imported = new Set();
|
|
87
|
+
for (const f of files) {
|
|
88
|
+
for (const imp of f.imports)
|
|
89
|
+
imported.add(imp);
|
|
121
90
|
}
|
|
91
|
+
const roots = files.filter(f => !imported.has(f.path));
|
|
92
|
+
// Guard against import cycles whose component is imported by nobody outside
|
|
93
|
+
// it: make sure every file is in some root's closure, else add it directly.
|
|
94
|
+
const covered = new Set();
|
|
95
|
+
for (const root of roots)
|
|
96
|
+
collectClosure(root.path, byPath, covered);
|
|
97
|
+
const uncovered = files.filter(f => !covered.has(f.path));
|
|
98
|
+
return sortFilesLeafToRoot([...roots, ...uncovered]);
|
|
122
99
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
100
|
+
function resolveTimeout(opts) {
|
|
101
|
+
return typeof opts.timeout === 'number' && Number.isFinite(opts.timeout) && opts.timeout > 0
|
|
102
|
+
? Math.floor(opts.timeout)
|
|
103
|
+
: 120000;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A root's import closure is inconsistent. Reason its closure file-by-file,
|
|
107
|
+
* leaf-to-root, to find the first file whose own closure is inconsistent —
|
|
108
|
+
* the precise point where the inconsistency is introduced.
|
|
109
|
+
*/
|
|
110
|
+
async function localizeInconsistency(root, byPath, workDir, opts) {
|
|
111
|
+
const closure = sortFilesLeafToRoot(closureFiles(root.path, byPath));
|
|
112
|
+
for (const file of closure) {
|
|
113
|
+
const result = await checkConsistency({
|
|
114
|
+
input: path.join(workDir, file.path),
|
|
115
|
+
inputRoot: workDir,
|
|
116
|
+
explanations: opts.explanation === true,
|
|
117
|
+
uniqueNamesAssumption: opts.uniqueNamesAssumption !== false,
|
|
118
|
+
checkOnly: true,
|
|
119
|
+
profile: false,
|
|
120
|
+
timeout: resolveTimeout(opts),
|
|
121
|
+
});
|
|
122
|
+
if (!result.consistent) {
|
|
123
|
+
return { file, result: result };
|
|
124
|
+
}
|
|
129
125
|
}
|
|
130
|
-
return
|
|
126
|
+
return undefined;
|
|
131
127
|
}
|
|
132
128
|
export const reasonAction = async (opts) => {
|
|
133
129
|
const startedAt = Date.now();
|
|
134
|
-
const
|
|
130
|
+
const persistDir = typeof opts.owl === 'string' && opts.owl.trim().length > 0
|
|
131
|
+
? path.resolve(opts.owl.trim())
|
|
132
|
+
: undefined;
|
|
133
|
+
const format = opts.format ?? 'ttl';
|
|
135
134
|
const pretty = opts.pretty === true;
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
// Always reason inside a private temp dir and only promote it to the user's
|
|
136
|
+
// output directory on full success, so a failed/inconsistent run never leaves
|
|
137
|
+
// partial or internally-inconsistent artifacts behind in persistDir.
|
|
138
|
+
const workDir = await fs.mkdtemp(path.join(os.tmpdir(), 'oml-reason-'));
|
|
139
|
+
const exported = await restPost('/v0/export', { owl: workDir, format, pretty }, opts.authToken);
|
|
140
|
+
if (!exported.success) {
|
|
141
|
+
await fs.rm(workDir, { recursive: true, force: true });
|
|
138
142
|
printLintDiagnostics({
|
|
139
143
|
success: false,
|
|
140
|
-
filesChecked: Number(
|
|
141
|
-
errors: Number(
|
|
142
|
-
warnings: Number(
|
|
143
|
-
problems:
|
|
144
|
+
filesChecked: Number(exported.filesChecked ?? 0),
|
|
145
|
+
errors: Number(exported.errors ?? 0),
|
|
146
|
+
warnings: Number(exported.warnings ?? 0),
|
|
147
|
+
problems: exported.problems,
|
|
144
148
|
});
|
|
145
|
-
|
|
146
|
-
failCli(chalk.red(summary));
|
|
149
|
+
failCli(chalk.red(exported.error?.trim() || 'reason failed.'));
|
|
147
150
|
}
|
|
148
151
|
printLintDiagnostics({
|
|
149
152
|
success: true,
|
|
150
|
-
filesChecked: Number(
|
|
151
|
-
errors: Number(
|
|
152
|
-
warnings: Number(
|
|
153
|
-
problems:
|
|
153
|
+
filesChecked: Number(exported.filesChecked ?? 0),
|
|
154
|
+
errors: Number(exported.errors ?? 0),
|
|
155
|
+
warnings: Number(exported.warnings ?? 0),
|
|
156
|
+
problems: exported.problems,
|
|
154
157
|
});
|
|
155
|
-
if (
|
|
158
|
+
if (exported.files.length === 0) {
|
|
159
|
+
await fs.rm(workDir, { recursive: true, force: true });
|
|
156
160
|
console.log(chalk.yellow(`No .oml files found under ${path.resolve('.')}.`));
|
|
157
161
|
return;
|
|
158
162
|
}
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
const byPath = new Map(exported.files.map(f => [f.path, f]));
|
|
164
|
+
// Check-only runs reason just the import-graph roots (consistency is
|
|
165
|
+
// monotonic, so the roots' closures prove every file consistent). Persisting
|
|
166
|
+
// entailments needs per-file output, so it still reasons every file.
|
|
167
|
+
const checkOnly = persistDir === undefined;
|
|
168
|
+
const targets = checkOnly
|
|
169
|
+
? computeConsistencyRoots(exported.files)
|
|
170
|
+
: sortFilesLeafToRoot(exported.files);
|
|
167
171
|
let firstInconsistent;
|
|
168
172
|
let firstFailure;
|
|
169
173
|
let entailmentsProduced = 0;
|
|
170
174
|
try {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
175
|
+
// Reason all targets in a single reasoner process: one JVM and one shared
|
|
176
|
+
// parse cache for the whole batch, instead of spawning a process and
|
|
177
|
+
// re-parsing every import closure per file.
|
|
178
|
+
const batchResults = await checkConsistencyBatch({
|
|
179
|
+
inputs: targets.map(f => path.join(workDir, f.path)),
|
|
180
|
+
inputRoot: workDir,
|
|
181
|
+
// Skip tracing on the batch scan; explanations are produced during
|
|
182
|
+
// localization on the culprit file instead.
|
|
183
|
+
explanations: false,
|
|
184
|
+
uniqueNamesAssumption: opts.uniqueNamesAssumption !== false,
|
|
185
|
+
checkOnly,
|
|
186
|
+
// Hoist shared entailments when persisting; targets are already
|
|
187
|
+
// ordered leaf-to-root, which hoisting requires. Ignored for
|
|
188
|
+
// check-only runs (no entailments are materialized).
|
|
189
|
+
hoist: opts.hoist === true && !checkOnly,
|
|
190
|
+
profile: opts.profile === true,
|
|
191
|
+
timeout: Math.max(opts.timeout ?? 0, 1800000),
|
|
192
|
+
});
|
|
193
|
+
const resultByInput = new Map(batchResults.map(r => [r.input, r]));
|
|
194
|
+
// Walk targets in leaf-to-root order so the first problem reported is the
|
|
195
|
+
// earliest (most-imported) point of failure or inconsistency.
|
|
196
|
+
for (const file of targets) {
|
|
197
|
+
const input = path.join(workDir, file.path);
|
|
198
|
+
const result = resultByInput.get(input);
|
|
199
|
+
if (!result) {
|
|
200
|
+
firstFailure = { path: file.path, error: 'Reasoner produced no result for this file.' };
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
if (typeof result.error === 'string' && result.error.length > 0) {
|
|
204
|
+
firstFailure = { path: file.path, error: result.error };
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
if (!result.consistent) {
|
|
208
|
+
firstInconsistent = checkOnly
|
|
209
|
+
? (await localizeInconsistency(file, byPath, workDir, opts))
|
|
210
|
+
?? { file, result: result }
|
|
211
|
+
: { file, result: result };
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
if (persistDir) {
|
|
215
|
+
if (typeof result.entailmentsUri !== 'string' || result.entailmentsUri.trim().length === 0) {
|
|
216
|
+
firstFailure = { path: file.path, error: 'Reasoner returned a consistent result but did not provide entailments URI.' };
|
|
195
217
|
break;
|
|
196
218
|
}
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (pretty) {
|
|
202
|
-
const entailmentsPath = resolveEntailmentsPath(result.entailmentsUri);
|
|
203
|
-
const entailmentsContent = await fs.readFile(entailmentsPath, 'utf-8');
|
|
204
|
-
await fs.writeFile(entailmentsPath, prettyPrintRdf(entailmentsContent, outputFormat), 'utf-8');
|
|
205
|
-
}
|
|
206
|
-
entailmentsProduced += 1;
|
|
219
|
+
if (pretty) {
|
|
220
|
+
const entailmentsPath = resolveEntailmentsPath(result.entailmentsUri);
|
|
221
|
+
const entailmentsContent = await fs.readFile(entailmentsPath, 'utf-8');
|
|
222
|
+
await fs.writeFile(entailmentsPath, prettyPrintRdf(entailmentsContent, format), 'utf-8');
|
|
207
223
|
}
|
|
224
|
+
entailmentsProduced += 1;
|
|
208
225
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
226
|
+
}
|
|
227
|
+
// Promote temp output to the user's directory only on a fully successful run.
|
|
228
|
+
if (persistDir && !firstFailure && !firstInconsistent) {
|
|
229
|
+
await fs.rm(persistDir, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
|
|
230
|
+
await fs.mkdir(persistDir, { recursive: true });
|
|
231
|
+
await fs.cp(workDir, persistDir, { recursive: true, force: true });
|
|
216
232
|
}
|
|
217
233
|
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
firstFailure = firstFailure ?? {
|
|
236
|
+
path: '(batch)',
|
|
237
|
+
error: error instanceof Error ? error.message : String(error),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
218
240
|
finally {
|
|
219
|
-
|
|
220
|
-
await fs.mkdir(outputDir, { recursive: true });
|
|
221
|
-
await fs.cp(tempRoot, outputDir, { recursive: true, force: true });
|
|
222
|
-
}
|
|
223
|
-
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
241
|
+
await fs.rm(workDir, { recursive: true, force: true });
|
|
224
242
|
}
|
|
225
243
|
if (firstFailure) {
|
|
226
|
-
|
|
227
|
-
failCli(chalk.red(`reason failed: ${modelUri}: ${firstFailure.error}`));
|
|
244
|
+
failCli(chalk.red(`reason failed: ${firstFailure.path}: ${firstFailure.error}`));
|
|
228
245
|
}
|
|
229
246
|
if (firstInconsistent) {
|
|
230
|
-
const where =
|
|
231
|
-
|| firstInconsistent.file.ontologyIri.trim()
|
|
232
|
-
|| '<unknown>';
|
|
247
|
+
const where = firstInconsistent.file.path;
|
|
233
248
|
if (opts.explanation === true) {
|
|
234
249
|
failCli(chalk.red(`Inconsistency found in: ${where}\n${JSON.stringify(firstInconsistent.result, null, 2)}`));
|
|
235
250
|
}
|
|
236
251
|
failCli(chalk.red(`Inconsistency found in: ${where}`));
|
|
237
252
|
}
|
|
238
|
-
if (
|
|
239
|
-
console.log(chalk.green(`reason: ${
|
|
253
|
+
if (persistDir) {
|
|
254
|
+
console.log(chalk.green(`reason: ${exported.files.length} ontology file(s) reasoned in ${path.relative(process.cwd(), persistDir) || persistDir} (${entailmentsProduced} entailment artifact file(s) written) [${formatDuration(Date.now() - startedAt)}]`));
|
|
240
255
|
return;
|
|
241
256
|
}
|
|
242
|
-
console.log(chalk.green(`reason: ${
|
|
257
|
+
console.log(chalk.green(`reason: ${exported.files.length} ontology file(s) checked via ${targets.length} import root(s) [${formatDuration(Date.now() - startedAt)}]`));
|
|
243
258
|
};
|
|
244
259
|
//# sourceMappingURL=reason.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reason.js","sourceRoot":"","sources":["../../src/commands/reason.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAsC,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8B5C,MAAM,eAAe,GAAG,yCAAyC,CAAC;AAElE,SAAS,kBAAkB,CAAC,KAAyB;IACjD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/D,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU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GAAG,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,UAAU,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CACnB,WAAW,QAAQ,CAAC,KAAK,CAAC,MAAM,iCAAiC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,IAAI,UAAU,KAAK,mBAAmB,0CAA0C,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,CACrO,CAAC,CAAC;QACH,OAAO;IACX,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,QAAQ,CAAC,KAAK,CAAC,MAAM,iCAAiC,OAAO,CAAC,MAAM,oBAAoB,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3K,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oml/cli",
|
|
3
3
|
"description": "The cli specific package",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.20.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.10.0",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@oml/platform": "^0.8.0",
|
|
25
|
-
"@oml/reasoner": "^0.
|
|
26
|
-
"@oml/server": "0.
|
|
25
|
+
"@oml/reasoner": "^0.4.0",
|
|
26
|
+
"@oml/server": "0.20.0",
|
|
27
27
|
"chalk": "~5.3.0",
|
|
28
28
|
"chevrotain": "11.1.2",
|
|
29
29
|
"commander": "~11.1.0",
|
package/src/cli.ts
CHANGED
|
@@ -168,16 +168,15 @@ export async function runCli(argv: string[] = process.argv): Promise<void> {
|
|
|
168
168
|
try {
|
|
169
169
|
const authToken = resolveServerRequestToken();
|
|
170
170
|
const cliOpts = args[0] as Record<string, unknown> | undefined ?? {};
|
|
171
|
-
const
|
|
172
|
-
const
|
|
173
|
-
const web = cliOpts['web'] ?? wsSettings.defaults?.render?.web;
|
|
171
|
+
const md = cliOpts['md'];
|
|
172
|
+
const web = cliOpts['web'];
|
|
174
173
|
if (!md) {
|
|
175
|
-
throw new CliExitError('Missing required option: -m, --md <input-folder>. Provide it on the command line or set defaults.render
|
|
174
|
+
throw new CliExitError('Missing required option: -m, --md <input-folder>. Provide it on the command line or set defaults.render in .oml/settings.yml.');
|
|
176
175
|
}
|
|
177
176
|
if (!web) {
|
|
178
|
-
throw new CliExitError('Missing required option: -b, --web <output-folder>. Provide it on the command line or set defaults.render
|
|
177
|
+
throw new CliExitError('Missing required option: -b, --web <output-folder>. Provide it on the command line or set defaults.render in .oml/settings.yml.');
|
|
179
178
|
}
|
|
180
|
-
const context = cliOpts['context']
|
|
179
|
+
const context = cliOpts['context'];
|
|
181
180
|
await renderAction({ md, web, context, authToken } as Parameters<typeof renderAction>[0]);
|
|
182
181
|
done();
|
|
183
182
|
} catch (err) {
|
|
@@ -197,10 +196,9 @@ export async function runCli(argv: string[] = process.argv): Promise<void> {
|
|
|
197
196
|
try {
|
|
198
197
|
const authToken = resolveServerRequestToken();
|
|
199
198
|
const cliOpts = args[0] as Record<string, unknown> | undefined ?? {};
|
|
200
|
-
const
|
|
201
|
-
const owl = cliOpts['owl'] ?? wsSettings.defaults?.build?.owl;
|
|
199
|
+
const owl = cliOpts['owl'];
|
|
202
200
|
if (!owl) {
|
|
203
|
-
throw new CliExitError('Missing required option: -o, --owl <dir>. Provide it on the command line or set defaults.
|
|
201
|
+
throw new CliExitError('Missing required option: -o, --owl <dir>. Provide it on the command line or set defaults.export in .oml/settings.yml.');
|
|
204
202
|
}
|
|
205
203
|
await exportAction({
|
|
206
204
|
...cliOpts,
|
|
@@ -236,22 +234,28 @@ export async function runCli(argv: string[] = process.argv): Promise<void> {
|
|
|
236
234
|
|
|
237
235
|
program
|
|
238
236
|
.command('reason')
|
|
239
|
-
.option('-o, --owl
|
|
237
|
+
.option('-o, --owl [dir]', 'persist assertions/entailments to folder; pass -o without a value to use build/owl (omit entirely for a fast check-only run)')
|
|
240
238
|
.option('-f, --format <ext>', 'RDF format extension: ttl, trig, nt, nq, or n3', 'ttl')
|
|
241
239
|
.option('--pretty', 'pretty-print Turtle/TriG output with blank lines between top-level blocks (only when --owl is provided)')
|
|
242
240
|
.option('-u, --unique-names-assumption [value]', 'enable or disable the unique names assumption', parseBooleanOption, true)
|
|
243
241
|
.option('-e, --explanation [value]', 'enable or disable inconsistency explanations', parseBooleanOption, false)
|
|
244
|
-
.
|
|
242
|
+
.option('-t, --hoist', 'store each entailment once in the lowest importing graph (entailment graphs import their imports\' entailment graphs); shrinks output but each file requires its import closure to be loaded (only with --owl)')
|
|
243
|
+
.description('run workspace consistency checks (fast check-only by default; persist entailments with --owl)')
|
|
245
244
|
.action(async (opts) => {
|
|
246
245
|
const done = trackCommand('oml-reason');
|
|
247
246
|
try {
|
|
248
247
|
const { reasonAction } = await import('./commands/reason.js');
|
|
249
248
|
const authToken = resolveServerRequestToken();
|
|
250
249
|
const cliOpts = opts as Record<string, unknown>;
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
const owlOpt = cliOpts['owl'];
|
|
251
|
+
// No -o flag => fast check-only (reasons only import-graph roots).
|
|
252
|
+
// -o without a value => persist to build/owl.
|
|
253
|
+
// -o <dir> => persist to <dir>.
|
|
254
|
+
let owl: string | undefined;
|
|
255
|
+
if (owlOpt === true) {
|
|
256
|
+
owl = 'build/owl';
|
|
257
|
+
} else if (typeof owlOpt === 'string' && owlOpt.trim().length > 0) {
|
|
258
|
+
owl = owlOpt;
|
|
255
259
|
}
|
|
256
260
|
await reasonAction({ ...cliOpts, owl, authToken } as Parameters<typeof reasonAction>[0]);
|
|
257
261
|
done();
|
|
@@ -297,10 +301,47 @@ export async function runCli(argv: string[] = process.argv): Promise<void> {
|
|
|
297
301
|
await assertServerRunning();
|
|
298
302
|
});
|
|
299
303
|
|
|
300
|
-
await program.parseAsync(argv);
|
|
304
|
+
await program.parseAsync(await applyWorkspaceDefaults(argv));
|
|
301
305
|
await updateCheck;
|
|
302
306
|
}
|
|
303
307
|
|
|
308
|
+
/** Commands whose `defaults.<command>` param line is applied before command-line arguments. */
|
|
309
|
+
const DEFAULTABLE_COMMANDS = new Set(['lint', 'render', 'export', 'codegen', 'reason', 'validate']);
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Inject `defaults.<command>` from .oml/settings.yml as argv tokens placed right after the
|
|
313
|
+
* subcommand name (before the user's arguments). Commander resolves a repeated option to its
|
|
314
|
+
* last occurrence, so any option the user passes on the command line overrides the same option
|
|
315
|
+
* from the defaults line while the remaining defaults still apply.
|
|
316
|
+
*/
|
|
317
|
+
async function applyWorkspaceDefaults(argv: string[]): Promise<string[]> {
|
|
318
|
+
const commandIndex = argv.findIndex((token, i) => i >= 2 && DEFAULTABLE_COMMANDS.has(token));
|
|
319
|
+
if (commandIndex === -1) {
|
|
320
|
+
return argv;
|
|
321
|
+
}
|
|
322
|
+
const settings = await readWorkspaceSettings(process.cwd());
|
|
323
|
+
const line = settings.defaults?.[argv[commandIndex]];
|
|
324
|
+
if (typeof line !== 'string' || line.trim().length === 0) {
|
|
325
|
+
return argv;
|
|
326
|
+
}
|
|
327
|
+
const tokens = tokenizeParams(line);
|
|
328
|
+
if (tokens.length === 0) {
|
|
329
|
+
return argv;
|
|
330
|
+
}
|
|
331
|
+
return [...argv.slice(0, commandIndex + 1), ...tokens, ...argv.slice(commandIndex + 1)];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/** Split a default param line into argv tokens, honoring single/double quotes around values. */
|
|
335
|
+
function tokenizeParams(line: string): string[] {
|
|
336
|
+
const tokens: string[] = [];
|
|
337
|
+
const pattern = /"([^"]*)"|'([^']*)'|(\S+)/g;
|
|
338
|
+
let match: RegExpExecArray | null;
|
|
339
|
+
while ((match = pattern.exec(line)) !== null) {
|
|
340
|
+
tokens.push(match[1] ?? match[2] ?? match[3]);
|
|
341
|
+
}
|
|
342
|
+
return tokens;
|
|
343
|
+
}
|
|
344
|
+
|
|
304
345
|
function assertNoMalformedShortFlags(argv: string[]): void {
|
|
305
346
|
// Enforce explicit short-flag syntax (`-m value`) and long flags (`--md`).
|
|
306
347
|
// This prevents accidental typos like `-md`, which Commander interprets as `-m d`.
|