@cleocode/cant 2026.11.17 → 2026.11.18-rc.ci.735

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 CHANGED
@@ -147,11 +147,18 @@ form back to `.cant` text. `cleo cant migrate` uses them.
147
147
  `cant-core`'s validator (`crates/cant-core/src/validate/`) numbers 42 rules:
148
148
  S01–S13 (scope, imports, permissions), P01–P07 (pipeline purity), T01–T07
149
149
  (types), H01–H04 (hooks) and W01–W11 (workflow limits), plus hierarchy rules.
150
- S04 has no implementation, so 41 of the 42 are emitted. `cleo cant validate`
151
- passes the file path to the validator, so it also walks the file's imports
152
- and runs the cross-file rules S03 (circular imports), S11 (import depth) and
153
- S12 (permission escalation). `cantValidateDocumentNative(content)` without a
154
- `filePath` cannot resolve imports and skips those three.
150
+ All 42 are emitted. `cleo cant validate` passes the file path to the
151
+ validator, so it also walks the file's imports and runs the cross-file rules
152
+ S03 (circular imports), S04 (import target existence), S11 (import depth) and
153
+ S12 (permission escalation). A diagnostic raised in an imported file names
154
+ that file in `file` with its own line/col, and `compileBundle` reports it at
155
+ that file. `cantValidateDocumentNative(content)` without a `filePath` cannot
156
+ resolve imports and skips those four. An addon without the `cantValidateFile`
157
+ export gets the path through `cantValidateDocument`: a v2026.11.17 addon still
158
+ runs S03, S11 and S12 (no S04, no `file`; `importRuleCoverage: 'partial'`,
159
+ and `cleo cant validate` warns `W_CANT_IMPORT_RULES_PARTIAL`); an older one ignores it, so
160
+ `validateDocument` returns `importRulesRun: false` and `cleo cant validate`
161
+ warns.
155
162
 
156
163
  ## Architecture
157
164
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schema": 2,
3
- "sourceHash": "82ca92d206ccae80e39a815955fc8257e77a9d539ff2cd181a49d4f3ebecbd90"
3
+ "sourceHash": "e72d8883dc2591c5d706846365265225fb9f4ce469cd6e4b92a2ab6597ee2300"
4
4
  }
package/dist/bundle.d.ts CHANGED
@@ -58,7 +58,10 @@ export interface BundleDiagnostic {
58
58
  message: string;
59
59
  /** Severity: `"error"`, `"warning"`, `"info"`, or `"hint"`. */
60
60
  severity: string;
61
- /** Source file path. */
61
+ /**
62
+ * The file the diagnostic lies in: the compiled file, or, for a diagnostic
63
+ * raised in a file it imports, that imported file.
64
+ */
62
65
  sourcePath: string;
63
66
  /** Line number (1-based) where the diagnostic occurred, or `undefined` if unavailable. */
64
67
  line?: number;
package/dist/bundle.js CHANGED
@@ -82,6 +82,46 @@ function extractProperties(rawProps) {
82
82
  }
83
83
  return result;
84
84
  }
85
+ /**
86
+ * Rebuild the keyed `context_sources:` block from cant-core's flat property
87
+ * list (T14654).
88
+ *
89
+ * @remarks
90
+ * A key at the block's outer column whose value is empty opens a source named
91
+ * by that key; keys at a deeper column belong to the open source. The outer
92
+ * `on_overflow:` key is returned separately. Any other outer key closes the
93
+ * open source.
94
+ *
95
+ * @param rawProps - The `context_sources` property list from the AST.
96
+ * @returns The sources as `{ source, ...fields }` records plus `on_overflow`.
97
+ */
98
+ function groupContextSources(rawProps) {
99
+ const sources = [];
100
+ let onOverflow;
101
+ const cols = rawProps.map((p) => p.key?.span?.col ?? 0);
102
+ const outerCol = cols.length > 0 ? Math.min(...cols) : 0;
103
+ let current = null;
104
+ for (const [i, prop] of rawProps.entries()) {
105
+ const key = prop.key?.value;
106
+ if (typeof key !== 'string')
107
+ continue;
108
+ const value = simplifyValue(prop.value);
109
+ if ((cols[i] ?? 0) > outerCol) {
110
+ if (current !== null)
111
+ current[key] = value;
112
+ continue;
113
+ }
114
+ current = null;
115
+ if (key === 'on_overflow') {
116
+ onOverflow = value;
117
+ }
118
+ else if (value === '') {
119
+ current = { source: key };
120
+ sources.push(current);
121
+ }
122
+ }
123
+ return { sources, onOverflow };
124
+ }
85
125
  /**
86
126
  * Extract agents from a parsed document AST.
87
127
  *
@@ -118,6 +158,15 @@ function extractAgents(doc, sourcePath) {
118
158
  }
119
159
  properties['permissions'] = permMap;
120
160
  }
161
+ if (Array.isArray(agentData.context_sources) && agentData.context_sources.length > 0) {
162
+ const { sources, onOverflow } = groupContextSources(agentData.context_sources);
163
+ if (sources.length > 0 && properties['context_sources'] === undefined) {
164
+ properties['context_sources'] = sources;
165
+ }
166
+ if (onOverflow !== undefined && properties['on_overflow'] === undefined) {
167
+ properties['on_overflow'] = onOverflow;
168
+ }
169
+ }
121
170
  agents.push({ name: nameValue, sourcePath, properties });
122
171
  }
123
172
  return agents;
@@ -213,11 +262,9 @@ function extractContracts(value) {
213
262
  }
214
263
  /**
215
264
  * Map the raw `context_sources` property value to an array of
216
- * {@link CantContextSourceDef}. Supports the list form
217
- * `[{source, query, max_entries}]` today; dict form (`patterns: {...}`) is
218
- * flattened by the Wave 0 parser into sibling properties and therefore
219
- * requires a follow-up grammar pass to reconstruct. Returns an empty array
220
- * when the value is absent, malformed, or dict-flattened.
265
+ * {@link CantContextSourceDef}. Takes the `[{source, query, max_entries}]`
266
+ * list that {@link groupContextSources} rebuilds from the keyed block.
267
+ * Returns an empty array when the value is absent or malformed.
221
268
  */
222
269
  function extractContextSources(value) {
223
270
  if (!Array.isArray(value))
@@ -626,13 +673,15 @@ async function compileBundle(filePaths) {
626
673
  allValid = false;
627
674
  continue;
628
675
  }
629
- // Convert validation diagnostics (preserving line/col from the native binding)
676
+ // Convert validation diagnostics (preserving line/col from the native
677
+ // binding). A diagnostic raised in an imported file is reported at that
678
+ // file, whose own line/col it carries.
630
679
  for (const diag of validationResult.diagnostics) {
631
680
  fileDiagnostics.push({
632
681
  ruleId: diag.ruleId,
633
682
  message: diag.message,
634
683
  severity: diag.severity,
635
- sourcePath: filePath,
684
+ sourcePath: diag.file ?? filePath,
636
685
  line: diag.line,
637
686
  col: diag.col,
638
687
  });
@@ -39,6 +39,21 @@ export interface CantValidationResult {
39
39
  warningCount: number;
40
40
  /** All diagnostics emitted by the 42-rule validator. */
41
41
  diagnostics: NativeDiagnostic[];
42
+ /**
43
+ * Whether the cross-file import rules ran. `false` only when the loaded
44
+ * cant-napi addon cannot walk imports at all (it predates T14603); only the
45
+ * single-document rules ran then. An addon from v2026.11.17 runs S03, S11
46
+ * and S12 (`true`) but not S04, and sets no diagnostic `file`; see
47
+ * `importRuleCoverage`.
48
+ */
49
+ importRulesRun: boolean;
50
+ /**
51
+ * How much of the import-graph validation ran: `full` (S03, S04, S11, S12
52
+ * and imported-file locations), `partial` (an addon without
53
+ * `cantValidateFile` that still walks imports: S03, S11 and S12, but no S04
54
+ * and no diagnostic `file`), or `none` (single-document rules only).
55
+ */
56
+ importRuleCoverage: 'full' | 'partial' | 'none';
42
57
  }
43
58
  /** Result of {@link listSections}. */
44
59
  export interface CantListResult {
@@ -74,10 +89,15 @@ export interface CantPipelineResult {
74
89
  */
75
90
  export declare function parseDocument(filePath: string): Promise<CantDocumentResult>;
76
91
  /**
77
- * Validate a `.cant` file with cant-core's validator: the 41 implemented
78
- * numbered rules (S04 has no validator) plus the hierarchy lints. Imports
79
- * resolve relative to `filePath`, so the cross-file rules S03 (circular
80
- * imports), S11 (import depth) and S12 (permission escalation) run too.
92
+ * Validate a `.cant` file with cant-core's validator: the 42 numbered rules
93
+ * plus the hierarchy lints. Imports resolve relative to `filePath`, so the
94
+ * cross-file rules S03 (circular imports), S04 (import target existence),
95
+ * S11 (import depth) and S12 (permission escalation) run too, and a
96
+ * diagnostic raised in an imported file names that file in `file`. An addon
97
+ * without the `cantValidateFile` entry point falls back to
98
+ * `cantValidateDocument(content, filePath)`: one from v2026.11.17 still runs
99
+ * S03, S11 and S12 (`importRuleCoverage: 'partial'`); an older one ignores the
100
+ * path, and `importRulesRun` is then `false` (`importRuleCoverage: 'none'`).
81
101
  *
82
102
  * @param filePath - Absolute path to the `.cant` file.
83
103
  * @returns A {@link CantValidationResult} with all diagnostics.
package/dist/document.js CHANGED
@@ -38,10 +38,15 @@ async function parseDocument(filePath) {
38
38
  };
39
39
  }
40
40
  /**
41
- * Validate a `.cant` file with cant-core's validator: the 41 implemented
42
- * numbered rules (S04 has no validator) plus the hierarchy lints. Imports
43
- * resolve relative to `filePath`, so the cross-file rules S03 (circular
44
- * imports), S11 (import depth) and S12 (permission escalation) run too.
41
+ * Validate a `.cant` file with cant-core's validator: the 42 numbered rules
42
+ * plus the hierarchy lints. Imports resolve relative to `filePath`, so the
43
+ * cross-file rules S03 (circular imports), S04 (import target existence),
44
+ * S11 (import depth) and S12 (permission escalation) run too, and a
45
+ * diagnostic raised in an imported file names that file in `file`. An addon
46
+ * without the `cantValidateFile` entry point falls back to
47
+ * `cantValidateDocument(content, filePath)`: one from v2026.11.17 still runs
48
+ * S03, S11 and S12 (`importRuleCoverage: 'partial'`); an older one ignores the
49
+ * path, and `importRulesRun` is then `false` (`importRuleCoverage: 'none'`).
45
50
  *
46
51
  * @param filePath - Absolute path to the `.cant` file.
47
52
  * @returns A {@link CantValidationResult} with all diagnostics.
@@ -50,7 +55,9 @@ async function validateDocument(filePath) {
50
55
  // Normalize CRLF → LF so the Rust validator sees consistent line endings
51
56
  // on Windows runners that check out files with core.autocrlf=true.
52
57
  const content = (await (0, promises_1.readFile)(filePath, 'utf-8')).replace(/\r\n/g, '\n');
53
- const result = (0, native_loader_1.cantValidateDocumentNative)(content, filePath);
58
+ const graphResult = (0, native_loader_1.cantValidateFileNative)(content, filePath);
59
+ const result = graphResult ?? (0, native_loader_1.cantValidateDocumentNative)(content, filePath);
60
+ const coverage = graphResult !== null ? 'full' : (0, native_loader_1.cantLegacyEntryPointWalksImports)() ? 'partial' : 'none';
54
61
  return {
55
62
  file: filePath,
56
63
  valid: result.valid,
@@ -58,6 +65,8 @@ async function validateDocument(filePath) {
58
65
  errorCount: result.errorCount,
59
66
  warningCount: result.warningCount,
60
67
  diagnostics: result.diagnostics,
68
+ importRulesRun: coverage !== 'none',
69
+ importRuleCoverage: coverage,
61
70
  };
62
71
  }
63
72
  /**
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export { consolidate, createEmptyModel, harvestObservations, renderMentalModel,
13
13
  export type { ConvertedFile, MigrationOptions, MigrationResult, UnconvertedSection, } from './migrate/index';
14
14
  export { migrateMarkdown, serializeCantDocument, showDiff, showSummary } from './migrate/index';
15
15
  export type { AgentProfile, CantAddonBackend, NativeDiagnostic, NativeParseDocumentResult, NativeParseError, NativeParseResult, NativePipelineResult, NativePipelineStep, NativeValidateResult, SeedPersonaId, } from './native-loader';
16
- export { cantAddonBackend, cantAddonBuildInfo, cantClassifyDirectiveNative, cantExecutePipelineNative, cantExtractAgentProfilesNative, cantParseDocumentNative, cantParseNative, cantValidateDocumentNative, extractAgentProfilesTyped, extractAgentSkills, initWasm, isNativeAvailable, isWasmAvailable, loadSeedAgentIdentities, SEED_PERSONA_IDS, validateAgentCantPath, } from './native-loader';
16
+ export { cantAddonBackend, cantAddonBuildInfo, cantClassifyDirectiveNative, cantExecutePipelineNative, cantExtractAgentProfilesNative, cantParseDocumentNative, cantParseNative, cantValidateDocumentNative, cantValidateFileNative, extractAgentProfilesTyped, extractAgentSkills, initWasm, isNativeAvailable, isWasmAvailable, loadSeedAgentIdentities, SEED_PERSONA_IDS, validateAgentCantPath, } from './native-loader';
17
17
  export type { ParsedCANTMessage } from './parse';
18
18
  export { initCantParser, parseCANTMessage } from './parse';
19
19
  export type { CantAgentV3, CantContextSourceDef, CantContractBlock, CantContractClause, CantMentalModelRef, CantOverflowStrategy, CantPathPermissions, CantTier, DirectiveType, } from './types';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // JIT Agent Composer (ULTRAPLAN Wave 5)
3
3
  // Wave 7a: BRAIN-backed ContextProvider (T432)
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.isCantAgentV3 = exports.parseCANTMessage = exports.initCantParser = exports.validateAgentCantPath = exports.SEED_PERSONA_IDS = exports.loadSeedAgentIdentities = exports.isWasmAvailable = exports.isNativeAvailable = exports.initWasm = exports.extractAgentSkills = exports.extractAgentProfilesTyped = exports.cantValidateDocumentNative = exports.cantParseNative = exports.cantParseDocumentNative = exports.cantExtractAgentProfilesNative = exports.cantExecutePipelineNative = exports.cantClassifyDirectiveNative = exports.cantAddonBuildInfo = exports.cantAddonBackend = exports.showSummary = exports.showDiff = exports.serializeCantDocument = exports.migrateMarkdown = exports.renderMentalModel = exports.harvestObservations = exports.createEmptyModel = exports.consolidate = exports.WORKER_FORBIDDEN_SPAWN_TOOLS = exports.validateSpawnRequest = exports.THIN_AGENT_TOOLS_STRIPPED = exports.stripSpawnToolsForWorker = exports.ORCHESTRATOR_FORBIDDEN_TOOLS = exports.LEAD_FORBIDDEN_TOOLS = exports.filterToolsForRole = exports.validateDocument = exports.parseDocument = exports.listSections = exports.executePipeline = exports.brainContextProvider = exports.TIER_CAPS = exports.estimateTokens = exports.escalateTier = exports.composeSpawnPayload = exports.toCantAgentV3 = exports.compileBundle = void 0;
5
+ exports.isCantAgentV3 = exports.parseCANTMessage = exports.initCantParser = exports.validateAgentCantPath = exports.SEED_PERSONA_IDS = exports.loadSeedAgentIdentities = exports.isWasmAvailable = exports.isNativeAvailable = exports.initWasm = exports.extractAgentSkills = exports.extractAgentProfilesTyped = exports.cantValidateFileNative = exports.cantValidateDocumentNative = exports.cantParseNative = exports.cantParseDocumentNative = exports.cantExtractAgentProfilesNative = exports.cantExecutePipelineNative = exports.cantClassifyDirectiveNative = exports.cantAddonBuildInfo = exports.cantAddonBackend = exports.showSummary = exports.showDiff = exports.serializeCantDocument = exports.migrateMarkdown = exports.renderMentalModel = exports.harvestObservations = exports.createEmptyModel = exports.consolidate = exports.WORKER_FORBIDDEN_SPAWN_TOOLS = exports.validateSpawnRequest = exports.THIN_AGENT_TOOLS_STRIPPED = exports.stripSpawnToolsForWorker = exports.ORCHESTRATOR_FORBIDDEN_TOOLS = exports.LEAD_FORBIDDEN_TOOLS = exports.filterToolsForRole = exports.validateDocument = exports.parseDocument = exports.listSections = exports.executePipeline = exports.brainContextProvider = exports.TIER_CAPS = exports.estimateTokens = exports.escalateTier = exports.composeSpawnPayload = exports.toCantAgentV3 = exports.compileBundle = void 0;
6
6
  // Bundle compiler
7
7
  var bundle_1 = require("./bundle");
8
8
  Object.defineProperty(exports, "compileBundle", { enumerable: true, get: function () { return bundle_1.compileBundle; } });
@@ -51,6 +51,7 @@ Object.defineProperty(exports, "cantExtractAgentProfilesNative", { enumerable: t
51
51
  Object.defineProperty(exports, "cantParseDocumentNative", { enumerable: true, get: function () { return native_loader_1.cantParseDocumentNative; } });
52
52
  Object.defineProperty(exports, "cantParseNative", { enumerable: true, get: function () { return native_loader_1.cantParseNative; } });
53
53
  Object.defineProperty(exports, "cantValidateDocumentNative", { enumerable: true, get: function () { return native_loader_1.cantValidateDocumentNative; } });
54
+ Object.defineProperty(exports, "cantValidateFileNative", { enumerable: true, get: function () { return native_loader_1.cantValidateFileNative; } });
54
55
  Object.defineProperty(exports, "extractAgentProfilesTyped", { enumerable: true, get: function () { return native_loader_1.extractAgentProfilesTyped; } });
55
56
  Object.defineProperty(exports, "extractAgentSkills", { enumerable: true, get: function () { return native_loader_1.extractAgentSkills; } });
56
57
  Object.defineProperty(exports, "initWasm", { enumerable: true, get: function () { return native_loader_1.initWasm; } });
@@ -74,6 +74,12 @@ export interface NativeDiagnostic {
74
74
  line: number;
75
75
  /** Column number (1-based). */
76
76
  col: number;
77
+ /**
78
+ * The file `line`/`col` refer to when it is not the validated file: the
79
+ * resolved path of an imported file. Absent (or `null`) for the validated
80
+ * file itself.
81
+ */
82
+ file?: string | null;
77
83
  }
78
84
  /** Result of validating a `.cant` document via the native binding. */
79
85
  export interface NativeValidateResult {
@@ -176,15 +182,51 @@ export declare function cantClassifyDirectiveNative(verb: string): string;
176
182
  */
177
183
  export declare function cantParseDocumentNative(content: string): NativeParseDocumentResult;
178
184
  /**
179
- * Parse and validate a `.cant` document via the native addon: the 41
180
- * implemented numbered rules (S04 has no validator) plus the hierarchy lints.
185
+ * Parse and validate a `.cant` document via the native addon: the 42
186
+ * numbered rules plus the hierarchy lints.
187
+ *
188
+ * @remarks
189
+ * An addon built before the import-graph walk ignores `filePath` silently;
190
+ * use {@link cantValidateFileNative}, which reports whether it ran.
181
191
  *
182
192
  * @param content - The raw `.cant` file content to parse and validate.
183
193
  * @param filePath - The path `content` was read from. When given, imports
184
194
  * resolve relative to it and the cross-file rules S03 (circular imports),
185
- * S11 (import depth) and S12 (permission escalation) run as well.
195
+ * S04 (import target existence), S11 (import depth) and S12 (permission
196
+ * escalation) run as well.
186
197
  */
187
198
  export declare function cantValidateDocumentNative(content: string, filePath?: string): NativeValidateResult;
199
+ /**
200
+ * Validate a `.cant` file and its imports through the addon's import-graph
201
+ * entry point (`cantValidateFile`): every rule, including S03, S04, S11 and
202
+ * S12 across the resolved imports. A diagnostic raised in an imported file
203
+ * carries that file's path in `file` with its own line/col.
204
+ *
205
+ * @param content - The raw `.cant` file content to parse and validate.
206
+ * @param filePath - The path `content` was read from; imports resolve from it.
207
+ * @returns The validation result, or `null` when the loaded addon predates
208
+ * the import-graph entry point (the import rules cannot run; validate with
209
+ * {@link cantValidateDocumentNative} and say so).
210
+ */
211
+ export declare function cantValidateFileNative(content: string, filePath: string): NativeValidateResult | null;
212
+ /**
213
+ * Whether the loaded addon's `cantValidateDocument` honours its `filePath`
214
+ * argument, i.e. walks imports and runs S03, S11 and S12.
215
+ *
216
+ * @remarks
217
+ * Addons from v2026.11.17 (T14603) honour it but lack `cantValidateFile`
218
+ * (so S04 and `NativeDiagnostic.file` are absent); older ones ignore it
219
+ * silently. A probe tells them apart: a root-file import of `@/…` names an
220
+ * absolute path, which only the import-graph walk refuses (S10; the
221
+ * single-document check sees no leading `/`). The probe reads no file
222
+ * contents; a walking addon does read-only metadata lookups for it
223
+ * (`canonicalize` of the probe path and `.cleo`/`.git` checks on its
224
+ * ancestors to find the project root). The answer is cached for the
225
+ * process.
226
+ *
227
+ * @returns `true` when import rules run through `cantValidateDocument`.
228
+ */
229
+ export declare function cantLegacyEntryPointWalksImports(): boolean;
188
230
  /**
189
231
  * A single agent profile extracted from a `.cant` document.
190
232
  *
@@ -30,6 +30,8 @@ exports.cantParseNative = cantParseNative;
30
30
  exports.cantClassifyDirectiveNative = cantClassifyDirectiveNative;
31
31
  exports.cantParseDocumentNative = cantParseDocumentNative;
32
32
  exports.cantValidateDocumentNative = cantValidateDocumentNative;
33
+ exports.cantValidateFileNative = cantValidateFileNative;
34
+ exports.cantLegacyEntryPointWalksImports = cantLegacyEntryPointWalksImports;
33
35
  exports.cantExtractAgentProfilesNative = cantExtractAgentProfilesNative;
34
36
  exports.extractAgentProfilesTyped = extractAgentProfilesTyped;
35
37
  exports.extractAgentSkills = extractAgentSkills;
@@ -147,17 +149,65 @@ function cantParseDocumentNative(content) {
147
149
  return requireNative().cantParseDocument(content);
148
150
  }
149
151
  /**
150
- * Parse and validate a `.cant` document via the native addon: the 41
151
- * implemented numbered rules (S04 has no validator) plus the hierarchy lints.
152
+ * Parse and validate a `.cant` document via the native addon: the 42
153
+ * numbered rules plus the hierarchy lints.
154
+ *
155
+ * @remarks
156
+ * An addon built before the import-graph walk ignores `filePath` silently;
157
+ * use {@link cantValidateFileNative}, which reports whether it ran.
152
158
  *
153
159
  * @param content - The raw `.cant` file content to parse and validate.
154
160
  * @param filePath - The path `content` was read from. When given, imports
155
161
  * resolve relative to it and the cross-file rules S03 (circular imports),
156
- * S11 (import depth) and S12 (permission escalation) run as well.
162
+ * S04 (import target existence), S11 (import depth) and S12 (permission
163
+ * escalation) run as well.
157
164
  */
158
165
  function cantValidateDocumentNative(content, filePath) {
159
166
  return requireNative().cantValidateDocument(content, filePath);
160
167
  }
168
+ /**
169
+ * Validate a `.cant` file and its imports through the addon's import-graph
170
+ * entry point (`cantValidateFile`): every rule, including S03, S04, S11 and
171
+ * S12 across the resolved imports. A diagnostic raised in an imported file
172
+ * carries that file's path in `file` with its own line/col.
173
+ *
174
+ * @param content - The raw `.cant` file content to parse and validate.
175
+ * @param filePath - The path `content` was read from; imports resolve from it.
176
+ * @returns The validation result, or `null` when the loaded addon predates
177
+ * the import-graph entry point (the import rules cannot run; validate with
178
+ * {@link cantValidateDocumentNative} and say so).
179
+ */
180
+ function cantValidateFileNative(content, filePath) {
181
+ const native = requireNative();
182
+ if (typeof native.cantValidateFile !== 'function')
183
+ return null;
184
+ return native.cantValidateFile(content, filePath);
185
+ }
186
+ let legacyFilePathSupport = null;
187
+ /**
188
+ * Whether the loaded addon's `cantValidateDocument` honours its `filePath`
189
+ * argument, i.e. walks imports and runs S03, S11 and S12.
190
+ *
191
+ * @remarks
192
+ * Addons from v2026.11.17 (T14603) honour it but lack `cantValidateFile`
193
+ * (so S04 and `NativeDiagnostic.file` are absent); older ones ignore it
194
+ * silently. A probe tells them apart: a root-file import of `@/…` names an
195
+ * absolute path, which only the import-graph walk refuses (S10; the
196
+ * single-document check sees no leading `/`). The probe reads no file
197
+ * contents; a walking addon does read-only metadata lookups for it
198
+ * (`canonicalize` of the probe path and `.cleo`/`.git` checks on its
199
+ * ancestors to find the project root). The answer is cached for the
200
+ * process.
201
+ *
202
+ * @returns `true` when import rules run through `cantValidateDocument`.
203
+ */
204
+ function cantLegacyEntryPointWalksImports() {
205
+ if (legacyFilePathSupport === null) {
206
+ const probe = requireNative().cantValidateDocument('@import "@/cant-import-graph-probe"\n', (0, node_path_1.join)(__dirname, 'cant-import-graph-probe.cant'));
207
+ legacyFilePathSupport = probe.diagnostics.some((d) => d.ruleId === 'S10');
208
+ }
209
+ return legacyFilePathSupport;
210
+ }
161
211
  /**
162
212
  * Extract agent profiles from a `.cant` document via the native addon.
163
213
  *
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- // napi-rs-artifact-metadata:{"version":2,"rootEntry":"index.cjs","exports":["cantBackend","cantBuildInfo","cantClassifyDirective","cantExecutePipeline","cantExtractAgentProfiles","cantParse","cantParseDocument","cantValidateDocument","JsDirectiveType"],"managedRootEntries":["browser.js","index.cjs","cant.wasm","cant.debug.wasm"]}
1
+ // napi-rs-artifact-metadata:{"version":2,"rootEntry":"index.cjs","exports":["cantBackend","cantBuildInfo","cantClassifyDirective","cantExecutePipeline","cantExtractAgentProfiles","cantParse","cantParseDocument","cantValidateDocument","cantValidateFile","JsDirectiveType"],"managedRootEntries":["browser.js","index.cjs","cant.wasm","cant.debug.wasm"]}
2
2
  /* eslint-disable */
3
3
  /* auto-generated by NAPI-RS */
4
4
 
@@ -1754,4 +1754,5 @@ module.exports.cantExtractAgentProfiles = __napiModule.exports.cantExtractAgentP
1754
1754
  module.exports.cantParse = __napiModule.exports.cantParse
1755
1755
  module.exports.cantParseDocument = __napiModule.exports.cantParseDocument
1756
1756
  module.exports.cantValidateDocument = __napiModule.exports.cantValidateDocument
1757
+ module.exports.cantValidateFile = __napiModule.exports.cantValidateFile
1757
1758
  module.exports.JsDirectiveType = __napiModule.exports.JsDirectiveType
Binary file
Binary file
Binary file
package/napi/index.cjs CHANGED
@@ -89,8 +89,8 @@ function requireNative() {
89
89
  try {
90
90
  const binding = require('@cleocode/cant-android-arm64')
91
91
  const bindingPackageVersion = require('@cleocode/cant-android-arm64/package.json').version
92
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
93
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
92
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
93
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
94
94
  }
95
95
  return binding
96
96
  } catch (e) {
@@ -105,8 +105,8 @@ function requireNative() {
105
105
  try {
106
106
  const binding = require('@cleocode/cant-android-arm-eabi')
107
107
  const bindingPackageVersion = require('@cleocode/cant-android-arm-eabi/package.json').version
108
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
109
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
108
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
109
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
110
110
  }
111
111
  return binding
112
112
  } catch (e) {
@@ -126,8 +126,8 @@ function requireNative() {
126
126
  try {
127
127
  const binding = require('@cleocode/cant-win32-x64-gnu')
128
128
  const bindingPackageVersion = require('@cleocode/cant-win32-x64-gnu/package.json').version
129
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
129
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
131
131
  }
132
132
  return binding
133
133
  } catch (e) {
@@ -142,8 +142,8 @@ function requireNative() {
142
142
  try {
143
143
  const binding = require('@cleocode/cant-win32-x64-msvc')
144
144
  const bindingPackageVersion = require('@cleocode/cant-win32-x64-msvc/package.json').version
145
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
145
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
147
147
  }
148
148
  return binding
149
149
  } catch (e) {
@@ -159,8 +159,8 @@ function requireNative() {
159
159
  try {
160
160
  const binding = require('@cleocode/cant-win32-ia32-msvc')
161
161
  const bindingPackageVersion = require('@cleocode/cant-win32-ia32-msvc/package.json').version
162
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
162
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
164
  }
165
165
  return binding
166
166
  } catch (e) {
@@ -175,8 +175,8 @@ function requireNative() {
175
175
  try {
176
176
  const binding = require('@cleocode/cant-win32-arm64-msvc')
177
177
  const bindingPackageVersion = require('@cleocode/cant-win32-arm64-msvc/package.json').version
178
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
179
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
178
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
179
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
180
180
  }
181
181
  return binding
182
182
  } catch (e) {
@@ -194,8 +194,8 @@ function requireNative() {
194
194
  try {
195
195
  const binding = require('@cleocode/cant-darwin-universal')
196
196
  const bindingPackageVersion = require('@cleocode/cant-darwin-universal/package.json').version
197
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
198
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
197
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
198
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
199
199
  }
200
200
  return binding
201
201
  } catch (e) {
@@ -210,8 +210,8 @@ function requireNative() {
210
210
  try {
211
211
  const binding = require('@cleocode/cant-darwin-x64')
212
212
  const bindingPackageVersion = require('@cleocode/cant-darwin-x64/package.json').version
213
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
214
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
213
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
214
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
215
215
  }
216
216
  return binding
217
217
  } catch (e) {
@@ -226,8 +226,8 @@ function requireNative() {
226
226
  try {
227
227
  const binding = require('@cleocode/cant-darwin-arm64')
228
228
  const bindingPackageVersion = require('@cleocode/cant-darwin-arm64/package.json').version
229
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
230
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
229
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
230
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
231
231
  }
232
232
  return binding
233
233
  } catch (e) {
@@ -246,8 +246,8 @@ function requireNative() {
246
246
  try {
247
247
  const binding = require('@cleocode/cant-freebsd-x64')
248
248
  const bindingPackageVersion = require('@cleocode/cant-freebsd-x64/package.json').version
249
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
250
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
249
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
250
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
251
251
  }
252
252
  return binding
253
253
  } catch (e) {
@@ -262,8 +262,8 @@ function requireNative() {
262
262
  try {
263
263
  const binding = require('@cleocode/cant-freebsd-arm64')
264
264
  const bindingPackageVersion = require('@cleocode/cant-freebsd-arm64/package.json').version
265
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
265
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
267
267
  }
268
268
  return binding
269
269
  } catch (e) {
@@ -283,8 +283,8 @@ function requireNative() {
283
283
  try {
284
284
  const binding = require('@cleocode/cant-linux-x64-musl')
285
285
  const bindingPackageVersion = require('@cleocode/cant-linux-x64-musl/package.json').version
286
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
286
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
288
  }
289
289
  return binding
290
290
  } catch (e) {
@@ -299,8 +299,8 @@ function requireNative() {
299
299
  try {
300
300
  const binding = require('@cleocode/cant-linux-x64-gnu')
301
301
  const bindingPackageVersion = require('@cleocode/cant-linux-x64-gnu/package.json').version
302
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
303
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
302
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
303
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
304
304
  }
305
305
  return binding
306
306
  } catch (e) {
@@ -317,8 +317,8 @@ function requireNative() {
317
317
  try {
318
318
  const binding = require('@cleocode/cant-linux-arm64-musl')
319
319
  const bindingPackageVersion = require('@cleocode/cant-linux-arm64-musl/package.json').version
320
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
321
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
320
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
321
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
322
322
  }
323
323
  return binding
324
324
  } catch (e) {
@@ -333,8 +333,8 @@ function requireNative() {
333
333
  try {
334
334
  const binding = require('@cleocode/cant-linux-arm64-gnu')
335
335
  const bindingPackageVersion = require('@cleocode/cant-linux-arm64-gnu/package.json').version
336
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
337
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
336
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
337
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
338
338
  }
339
339
  return binding
340
340
  } catch (e) {
@@ -351,8 +351,8 @@ function requireNative() {
351
351
  try {
352
352
  const binding = require('@cleocode/cant-linux-arm-musleabihf')
353
353
  const bindingPackageVersion = require('@cleocode/cant-linux-arm-musleabihf/package.json').version
354
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
355
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
354
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
355
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
356
356
  }
357
357
  return binding
358
358
  } catch (e) {
@@ -367,8 +367,8 @@ function requireNative() {
367
367
  try {
368
368
  const binding = require('@cleocode/cant-linux-arm-gnueabihf')
369
369
  const bindingPackageVersion = require('@cleocode/cant-linux-arm-gnueabihf/package.json').version
370
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
371
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
370
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
371
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
372
372
  }
373
373
  return binding
374
374
  } catch (e) {
@@ -385,8 +385,8 @@ function requireNative() {
385
385
  try {
386
386
  const binding = require('@cleocode/cant-linux-loong64-musl')
387
387
  const bindingPackageVersion = require('@cleocode/cant-linux-loong64-musl/package.json').version
388
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
388
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
390
390
  }
391
391
  return binding
392
392
  } catch (e) {
@@ -401,8 +401,8 @@ function requireNative() {
401
401
  try {
402
402
  const binding = require('@cleocode/cant-linux-loong64-gnu')
403
403
  const bindingPackageVersion = require('@cleocode/cant-linux-loong64-gnu/package.json').version
404
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
404
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
406
406
  }
407
407
  return binding
408
408
  } catch (e) {
@@ -419,8 +419,8 @@ function requireNative() {
419
419
  try {
420
420
  const binding = require('@cleocode/cant-linux-riscv64-musl')
421
421
  const bindingPackageVersion = require('@cleocode/cant-linux-riscv64-musl/package.json').version
422
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
423
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
422
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
423
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
424
  }
425
425
  return binding
426
426
  } catch (e) {
@@ -435,8 +435,8 @@ function requireNative() {
435
435
  try {
436
436
  const binding = require('@cleocode/cant-linux-riscv64-gnu')
437
437
  const bindingPackageVersion = require('@cleocode/cant-linux-riscv64-gnu/package.json').version
438
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
439
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
438
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
439
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
440
440
  }
441
441
  return binding
442
442
  } catch (e) {
@@ -452,8 +452,8 @@ function requireNative() {
452
452
  try {
453
453
  const binding = require('@cleocode/cant-linux-ppc64-gnu')
454
454
  const bindingPackageVersion = require('@cleocode/cant-linux-ppc64-gnu/package.json').version
455
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
456
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
455
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
456
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
457
457
  }
458
458
  return binding
459
459
  } catch (e) {
@@ -468,8 +468,8 @@ function requireNative() {
468
468
  try {
469
469
  const binding = require('@cleocode/cant-linux-s390x-gnu')
470
470
  const bindingPackageVersion = require('@cleocode/cant-linux-s390x-gnu/package.json').version
471
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
472
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
471
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
472
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
473
473
  }
474
474
  return binding
475
475
  } catch (e) {
@@ -488,8 +488,8 @@ function requireNative() {
488
488
  try {
489
489
  const binding = require('@cleocode/cant-openharmony-arm64')
490
490
  const bindingPackageVersion = require('@cleocode/cant-openharmony-arm64/package.json').version
491
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
492
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
491
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
492
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
493
493
  }
494
494
  return binding
495
495
  } catch (e) {
@@ -504,8 +504,8 @@ function requireNative() {
504
504
  try {
505
505
  const binding = require('@cleocode/cant-openharmony-x64')
506
506
  const bindingPackageVersion = require('@cleocode/cant-openharmony-x64/package.json').version
507
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
508
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
507
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
508
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
509
509
  }
510
510
  return binding
511
511
  } catch (e) {
@@ -520,8 +520,8 @@ function requireNative() {
520
520
  try {
521
521
  const binding = require('@cleocode/cant-openharmony-arm')
522
522
  const bindingPackageVersion = require('@cleocode/cant-openharmony-arm/package.json').version
523
- if (bindingPackageVersion !== '2026.11.16' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
524
- throw new Error(`Native binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
523
+ if (bindingPackageVersion !== '2026.11.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
524
+ throw new Error(`Native binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
525
525
  }
526
526
  return binding
527
527
  } catch (e) {
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
661
661
  if (!candidateFailed) {
662
662
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
663
663
  const bindingPackageVersion = require('@cleocode/cant-wasm32-wasi/package.json').version
664
- if (bindingPackageVersion !== '2026.11.16') {
665
- throw new Error(`WASI binding package version mismatch, expected 2026.11.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
664
+ if (bindingPackageVersion !== '2026.11.17') {
665
+ throw new Error(`WASI binding package version mismatch, expected 2026.11.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
666
666
  }
667
667
  }
668
668
  wasiBinding = require('@cleocode/cant-wasm32-wasi')
@@ -786,4 +786,5 @@ module.exports.cantExtractAgentProfiles = nativeBinding.cantExtractAgentProfiles
786
786
  module.exports.cantParse = nativeBinding.cantParse
787
787
  module.exports.cantParseDocument = nativeBinding.cantParseDocument
788
788
  module.exports.cantValidateDocument = nativeBinding.cantValidateDocument
789
+ module.exports.cantValidateFile = nativeBinding.cantValidateFile
789
790
  module.exports.JsDirectiveType = nativeBinding.JsDirectiveType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/cant",
3
- "version": "2026.11.17",
3
+ "version": "2026.11.18-rc.ci.735",
4
4
  "description": "CANT DSL — cant-core (SSoT) parser, validator, and pipeline executor via napi-rs; agent identity, message parsing, and migration utilities",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,9 +16,9 @@
16
16
  "@emnapi/core": "1.11.3",
17
17
  "@emnapi/runtime": "1.11.3",
18
18
  "@napi-rs/wasm-runtime": "1.2.4",
19
- "@cleocode/contracts": "2026.11.17",
20
- "@cleocode/core": "2026.11.17",
21
- "@cleocode/lafs": "2026.11.17"
19
+ "@cleocode/contracts": "2026.11.18-rc.ci.735",
20
+ "@cleocode/core": "2026.11.18-rc.ci.735",
21
+ "@cleocode/lafs": "2026.11.18-rc.ci.735"
22
22
  },
23
23
  "devDependencies": {
24
24
  "typescript": "^6.0.2",