@a16njs/engine 0.7.0 → 0.8.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.
@@ -5,6 +5,15 @@ import type { WrittenFile } from '@a16njs/models';
5
5
  * Used to rewrite path references in content during format conversion.
6
6
  */
7
7
  export type PathMapping = Map<string, string>;
8
+ /**
9
+ * Result of building a source-to-target path mapping.
10
+ */
11
+ export interface BuildMappingResult {
12
+ /** The computed path mapping */
13
+ mapping: PathMapping;
14
+ /** Warnings produced during mapping construction (e.g., ambiguous collisions) */
15
+ warnings: Warning[];
16
+ }
8
17
  /**
9
18
  * Result of a path rewriting operation.
10
19
  */
@@ -19,20 +28,31 @@ export interface RewriteResult {
19
28
  *
20
29
  * Given the discovered items (with sourcePaths relative to sourceRoot)
21
30
  * and the written files (with absolute paths under targetRoot), produces
22
- * a Map where keys are source-relative paths and values are target-relative paths.
31
+ * a Map where keys are source-relative paths and values are target-relative
32
+ * paths, along with any warnings produced during construction.
23
33
  *
24
- * The mapping is derived from the `sourceItems` array on each WrittenFile,
25
- * which links each output file back to the source AgentCustomization(s) that
26
- * produced it. This handles merges, extension changes, and directory flattening
27
- * naturally because the mapping is derived from actual emit output.
34
+ * Per-WrittenFile source-path derivation:
35
+ * - If `file.sourcePaths` is set and non-empty, those explicit paths are used
36
+ * (and `sourceItems[*].sourcePath` is NOT added as a mapping key for that
37
+ * file). This is the correct behaviour for outputs that represent source
38
+ * paths which are not first-class `AgentCustomization`s — e.g., AgentSkillIO
39
+ * resource files whose underlying `sourceItems` points at the skill's
40
+ * SKILL.md rather than at the resource file itself.
41
+ * - Otherwise, falls back to `sourceItems[*].sourcePath` (legacy behaviour,
42
+ * used by every plugin that doesn't populate `sourcePaths`).
28
43
  *
29
- * @param _discovered - Items discovered from the source plugin (unused directly; mapping comes from written.sourceItems)
44
+ * Collision detection: if two WrittenFiles derive the same source-path key
45
+ * but map to DIFFERENT target paths, an `Approximated` warning is emitted
46
+ * and last-writer-wins for the mapping itself (historical behaviour).
47
+ * Same-target duplicates are silently idempotent.
48
+ *
49
+ * @param _discovered - Items discovered from the source plugin (unused directly; mapping comes from written)
30
50
  * @param written - Files written (or planned) by the target plugin
31
51
  * @param _sourceRoot - Root directory used for discovery (unused; sourcePaths are already relative)
32
52
  * @param targetRoot - Root directory used for emission
33
- * @returns A map of source-relative path to target-relative path
53
+ * @returns `{ mapping, warnings }` — source-to-target map and any collision warnings
34
54
  */
35
- export declare function buildMapping(_discovered: AgentCustomization[], written: WrittenFile[], _sourceRoot: string, targetRoot: string): PathMapping;
55
+ export declare function buildMapping(_discovered: AgentCustomization[], written: WrittenFile[], _sourceRoot: string, targetRoot: string): BuildMappingResult;
36
56
  /**
37
57
  * Rewrite file path references in item content.
38
58
  *
@@ -41,6 +61,12 @@ export declare function buildMapping(_discovered: AgentCustomization[], written:
41
61
  * longest-first to prevent partial match corruption (e.g., replacing
42
62
  * "foo/bar.mdc.bak" before "foo/bar.mdc").
43
63
  *
64
+ * For `AgentSkillIO` items this ALSO rewrites content inside the `files` map
65
+ * for entries whose key sits under a spec-designated text subtree (`scripts/`
66
+ * or `references/`). Entries under `assets/` and any other subtree are NOT
67
+ * rewritten (they may be binary or contain placeholder strings). See
68
+ * `isRewritableSkillResource`.
69
+ *
44
70
  * Items are cloned before modification; originals are not mutated.
45
71
  *
46
72
  * @param items - The items whose content should be rewritten
@@ -56,6 +82,15 @@ export declare function rewriteContent(items: AgentCustomization[], mapping: Pat
56
82
  * and file extensions) but is NOT present in the mapping (i.e., it
57
83
  * wasn't converted).
58
84
  *
85
+ * For `AgentSkillIO` items this ALSO scans ride-along files under the two
86
+ * spec-designated text subtrees (`scripts/` and `references/`) using the same
87
+ * rules. `assets/` and unknown subtrees are intentionally skipped — rewriting
88
+ * their content is out of scope, so flagging orphans there would be a false
89
+ * positive (a placeholder string in a template is not an "orphan", it's
90
+ * intentional content). Skill-level attribution (via `item.sourcePath`) is
91
+ * used for orphans found inside ride-along files; per-file attribution is
92
+ * not currently plumbed.
93
+ *
59
94
  * @param items - The items to scan for orphan references
60
95
  * @param mapping - The source-to-target path mapping
61
96
  * @param sourcePluginPrefixes - Known directory prefixes for the source format
@@ -1 +1 @@
1
- {"version":3,"file":"path-rewriter.d.ts","sourceRoot":"","sources":["../src/path-rewriter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,kBAAkB,EAAE,EACjC,OAAO,EAAE,WAAW,EAAE,EACtB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,WAAW,CAoBb;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,kBAAkB,EAAE,EAC3B,OAAO,EAAE,WAAW,GACnB,aAAa,CAgDf;AASD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,kBAAkB,EAAE,EAC3B,OAAO,EAAE,WAAW,EACpB,oBAAoB,EAAE,MAAM,EAAE,EAC9B,gBAAgB,EAAE,MAAM,EAAE,GACzB,OAAO,EAAE,CAmCX"}
1
+ {"version":3,"file":"path-rewriter.d.ts","sourceRoot":"","sources":["../src/path-rewriter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,iFAAiF;IACjF,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAyBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,kBAAkB,EAAE,EACjC,OAAO,EAAE,WAAW,EAAE,EACtB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,kBAAkB,CAiDpB;AAoCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,kBAAkB,EAAE,EAC3B,OAAO,EAAE,WAAW,GACnB,aAAa,CAiDf;AASD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,kBAAkB,EAAE,EAC3B,OAAO,EAAE,WAAW,EACpB,oBAAoB,EAAE,MAAM,EAAE,EAC9B,gBAAgB,EAAE,MAAM,EAAE,GACzB,OAAO,EAAE,CAmDX"}
@@ -1,40 +1,133 @@
1
1
  import * as path from 'path';
2
- import { WarningCode } from '@a16njs/models';
2
+ import { WarningCode, isAgentSkillIO } from '@a16njs/models';
3
+ /**
4
+ * Per the AgentSkills.io specification (§Optional directories), a skill
5
+ * directory may contain ride-along files under a few conventional subtrees:
6
+ *
7
+ * - `scripts/` — executable code (shell, python, etc.); text by convention.
8
+ * - `references/` — additional documentation (markdown); text by convention.
9
+ * - `assets/` — templates, images, data files; may be binary or contain
10
+ * intentional placeholder strings that must NOT be rewritten.
11
+ * - Any other directory — freeform, not guaranteed to be text.
12
+ *
13
+ * Content rewriting (and orphan scanning) of ride-along files is bounded to
14
+ * the two spec-designated text subtrees (`scripts/` and `references/`) so we
15
+ * do not corrupt binary/placeholder content in `assets/` or unknown subtrees.
16
+ *
17
+ * See https://agentskills.io/specification#optional-directories
18
+ *
19
+ * Kept private to this module; promote to `@a16njs/models` only if a second
20
+ * caller appears.
21
+ */
22
+ function isRewritableSkillResource(key) {
23
+ return key.startsWith('scripts/') || key.startsWith('references/');
24
+ }
3
25
  /**
4
26
  * Build a mapping from source-relative paths to target-relative paths.
5
27
  *
6
28
  * Given the discovered items (with sourcePaths relative to sourceRoot)
7
29
  * and the written files (with absolute paths under targetRoot), produces
8
- * a Map where keys are source-relative paths and values are target-relative paths.
30
+ * a Map where keys are source-relative paths and values are target-relative
31
+ * paths, along with any warnings produced during construction.
9
32
  *
10
- * The mapping is derived from the `sourceItems` array on each WrittenFile,
11
- * which links each output file back to the source AgentCustomization(s) that
12
- * produced it. This handles merges, extension changes, and directory flattening
13
- * naturally because the mapping is derived from actual emit output.
33
+ * Per-WrittenFile source-path derivation:
34
+ * - If `file.sourcePaths` is set and non-empty, those explicit paths are used
35
+ * (and `sourceItems[*].sourcePath` is NOT added as a mapping key for that
36
+ * file). This is the correct behaviour for outputs that represent source
37
+ * paths which are not first-class `AgentCustomization`s — e.g., AgentSkillIO
38
+ * resource files whose underlying `sourceItems` points at the skill's
39
+ * SKILL.md rather than at the resource file itself.
40
+ * - Otherwise, falls back to `sourceItems[*].sourcePath` (legacy behaviour,
41
+ * used by every plugin that doesn't populate `sourcePaths`).
14
42
  *
15
- * @param _discovered - Items discovered from the source plugin (unused directly; mapping comes from written.sourceItems)
43
+ * Collision detection: if two WrittenFiles derive the same source-path key
44
+ * but map to DIFFERENT target paths, an `Approximated` warning is emitted
45
+ * and last-writer-wins for the mapping itself (historical behaviour).
46
+ * Same-target duplicates are silently idempotent.
47
+ *
48
+ * @param _discovered - Items discovered from the source plugin (unused directly; mapping comes from written)
16
49
  * @param written - Files written (or planned) by the target plugin
17
50
  * @param _sourceRoot - Root directory used for discovery (unused; sourcePaths are already relative)
18
51
  * @param targetRoot - Root directory used for emission
19
- * @returns A map of source-relative path to target-relative path
52
+ * @returns `{ mapping, warnings }` — source-to-target map and any collision warnings
20
53
  */
21
54
  export function buildMapping(_discovered, written, _sourceRoot, targetRoot) {
22
55
  const mapping = new Map();
56
+ const warnings = [];
23
57
  for (const file of written) {
24
58
  // Compute target-relative path using POSIX separators for consistency
25
59
  const targetRelative = path.relative(targetRoot, file.path).split(path.sep).join('/');
26
- // Map each source item's sourcePath to this target path
27
- if (file.sourceItems) {
28
- for (const sourceItem of file.sourceItems) {
29
- if (sourceItem.sourcePath) {
30
- // Normalize to POSIX separators
31
- const normalizedSourcePath = sourceItem.sourcePath.split(path.sep).join('/');
32
- mapping.set(normalizedSourcePath, targetRelative);
33
- }
60
+ // Prefer explicit sourcePaths when populated; otherwise fall back to
61
+ // sourceItems[*].sourcePath (legacy behaviour). Explicit sourcePaths
62
+ // REPLACE the sourceItems-based derivation for this file (see JSDoc).
63
+ //
64
+ // Empty-string entries are filtered from BOTH branches: an empty mapping
65
+ // key would hang `applyMapping`, since `indexOf('')` always returns 0 and
66
+ // `idx += 0` never advances. The fallback branch has always filtered
67
+ // falsy values; mirror that defence in the explicit branch since
68
+ // `WrittenFile.sourcePaths` is part of `@a16njs/models`'s public API and
69
+ // a third-party plugin could populate it with ''.
70
+ let sourcePathCandidates;
71
+ if (file.sourcePaths && file.sourcePaths.length > 0) {
72
+ sourcePathCandidates = file.sourcePaths.filter((p) => p.length > 0);
73
+ }
74
+ else if (file.sourceItems) {
75
+ sourcePathCandidates = file.sourceItems
76
+ .map((s) => s.sourcePath)
77
+ .filter((p) => Boolean(p));
78
+ }
79
+ else {
80
+ sourcePathCandidates = [];
81
+ }
82
+ for (const rawSourcePath of sourcePathCandidates) {
83
+ const normalized = rawSourcePath.split(path.sep).join('/');
84
+ const existing = mapping.get(normalized);
85
+ if (existing !== undefined && existing !== targetRelative) {
86
+ warnings.push({
87
+ code: WarningCode.Approximated,
88
+ message: `Ambiguous path mapping: '${normalized}' maps to both ` +
89
+ `'${existing}' and '${targetRelative}'. The plugin emitting ` +
90
+ `these WrittenFiles should populate 'sourcePaths' explicitly ` +
91
+ `to disambiguate.`,
92
+ sources: [normalized],
93
+ });
34
94
  }
95
+ // Last-writer-wins for mapping (preserves historical behaviour)
96
+ mapping.set(normalized, targetRelative);
35
97
  }
36
98
  }
37
- return mapping;
99
+ return { mapping, warnings };
100
+ }
101
+ /**
102
+ * Apply a path mapping to a single string, returning the rewritten string
103
+ * and the count of replacements made.
104
+ *
105
+ * `sortedEntries` must be pre-sorted longest-first to prevent partial-match
106
+ * corruption (e.g., replacing "foo/bar.mdc.bak" before "foo/bar.mdc").
107
+ */
108
+ function applyMapping(content, sortedEntries) {
109
+ let current = content;
110
+ let replaced = 0;
111
+ for (const [sourcePath, targetPath] of sortedEntries) {
112
+ // Defence-in-depth against an empty key slipping past buildMapping:
113
+ // `indexOf('')` returns 0 and `idx += 0` never advances, producing an
114
+ // infinite loop. buildMapping filters empties at the boundary; this
115
+ // second guard means `applyMapping` is safe against any caller that
116
+ // constructs a mapping by hand.
117
+ if (sourcePath.length === 0)
118
+ continue;
119
+ let count = 0;
120
+ let idx = 0;
121
+ while ((idx = current.indexOf(sourcePath, idx)) !== -1) {
122
+ count++;
123
+ idx += sourcePath.length;
124
+ }
125
+ if (count > 0) {
126
+ current = current.split(sourcePath).join(targetPath);
127
+ replaced += count;
128
+ }
129
+ }
130
+ return { content: current, replaced };
38
131
  }
39
132
  /**
40
133
  * Rewrite file path references in item content.
@@ -44,6 +137,12 @@ export function buildMapping(_discovered, written, _sourceRoot, targetRoot) {
44
137
  * longest-first to prevent partial match corruption (e.g., replacing
45
138
  * "foo/bar.mdc.bak" before "foo/bar.mdc").
46
139
  *
140
+ * For `AgentSkillIO` items this ALSO rewrites content inside the `files` map
141
+ * for entries whose key sits under a spec-designated text subtree (`scripts/`
142
+ * or `references/`). Entries under `assets/` and any other subtree are NOT
143
+ * rewritten (they may be binary or contain placeholder strings). See
144
+ * `isRewritableSkillResource`.
145
+ *
47
146
  * Items are cloned before modification; originals are not mutated.
48
147
  *
49
148
  * @param items - The items whose content should be rewritten
@@ -62,27 +161,29 @@ export function rewriteContent(items, mapping) {
62
161
  const sortedEntries = Array.from(mapping.entries()).sort((a, b) => b[0].length - a[0].length);
63
162
  let totalReplacements = 0;
64
163
  const rewrittenItems = items.map((item) => {
65
- // Clone the item (shallow clone is sufficient since we only modify content)
164
+ // Shallow clone we only mutate content and files on the clone.
66
165
  const clone = { ...item };
67
- let content = clone.content;
68
- // NOTE: Replacements are applied sequentially. This is safe because source
69
- // and target paths use different plugin directory prefixes, so a target path
70
- // won't match a subsequent source key.
71
- for (const [sourcePath, targetPath] of sortedEntries) {
72
- // Count occurrences before replacement
73
- let count = 0;
74
- let idx = 0;
75
- while ((idx = content.indexOf(sourcePath, idx)) !== -1) {
76
- count++;
77
- idx += sourcePath.length;
78
- }
79
- if (count > 0) {
80
- // Use split+join for exact string replacement (no regex escaping needed)
81
- content = content.split(sourcePath).join(targetPath);
82
- totalReplacements += count;
166
+ const bodyResult = applyMapping(clone.content, sortedEntries);
167
+ clone.content = bodyResult.content;
168
+ totalReplacements += bodyResult.replaced;
169
+ // AgentSkillIO ride-along files under scripts/ and references/:
170
+ // clone the files map so originals are never mutated, and rewrite
171
+ // eligible entries.
172
+ if (isAgentSkillIO(clone)) {
173
+ const originalFiles = clone.files ?? {};
174
+ const newFiles = {};
175
+ for (const [key, value] of Object.entries(originalFiles)) {
176
+ if (isRewritableSkillResource(key)) {
177
+ const fileResult = applyMapping(value, sortedEntries);
178
+ newFiles[key] = fileResult.content;
179
+ totalReplacements += fileResult.replaced;
180
+ }
181
+ else {
182
+ newFiles[key] = value;
183
+ }
83
184
  }
185
+ clone.files = newFiles;
84
186
  }
85
- clone.content = content;
86
187
  return clone;
87
188
  });
88
189
  return {
@@ -104,6 +205,15 @@ function escapeRegExp(str) {
104
205
  * and file extensions) but is NOT present in the mapping (i.e., it
105
206
  * wasn't converted).
106
207
  *
208
+ * For `AgentSkillIO` items this ALSO scans ride-along files under the two
209
+ * spec-designated text subtrees (`scripts/` and `references/`) using the same
210
+ * rules. `assets/` and unknown subtrees are intentionally skipped — rewriting
211
+ * their content is out of scope, so flagging orphans there would be a false
212
+ * positive (a placeholder string in a template is not an "orphan", it's
213
+ * intentional content). Skill-level attribution (via `item.sourcePath`) is
214
+ * used for orphans found inside ride-along files; per-file attribution is
215
+ * not currently plumbed.
216
+ *
107
217
  * @param items - The items to scan for orphan references
108
218
  * @param mapping - The source-to-target path mapping
109
219
  * @param sourcePluginPrefixes - Known directory prefixes for the source format
@@ -124,20 +234,34 @@ export function detectOrphans(items, mapping, sourcePluginPrefixes, sourceExtens
124
234
  const escapedPrefixes = sourcePluginPrefixes.map(escapeRegExp).join('|');
125
235
  const escapedExtensions = sourceExtensions.map(escapeRegExp).join('|');
126
236
  const pattern = new RegExp(`(?:${escapedPrefixes})[^\\s)\\]}>,"']+(?:${escapedExtensions})`, 'g');
127
- for (const item of items) {
128
- const matches = item.content.matchAll(pattern);
237
+ const scanString = (content, attributionSource) => {
238
+ const matches = content.matchAll(pattern);
129
239
  for (const match of matches) {
130
240
  const foundPath = match[0];
131
- const key = `${item.sourcePath ?? ''}::${foundPath}`;
241
+ const key = `${attributionSource ?? ''}::${foundPath}`;
132
242
  if (!mappedPaths.has(foundPath) && !seen.has(key)) {
133
243
  seen.add(key);
134
244
  warnings.push({
135
245
  code: WarningCode.OrphanPathRef,
136
246
  message: `Orphan path reference: '${foundPath}' is not in the conversion set`,
137
- sources: item.sourcePath ? [item.sourcePath] : undefined,
247
+ sources: attributionSource ? [attributionSource] : undefined,
138
248
  });
139
249
  }
140
250
  }
251
+ };
252
+ for (const item of items) {
253
+ scanString(item.content, item.sourcePath);
254
+ // AgentSkillIO ride-along files under scripts/ and references/:
255
+ // scan content for orphans. Skill-level attribution via item.sourcePath;
256
+ // per-file attribution is not plumbed today.
257
+ if (isAgentSkillIO(item)) {
258
+ const files = item.files ?? {};
259
+ for (const [key, value] of Object.entries(files)) {
260
+ if (isRewritableSkillResource(key)) {
261
+ scanString(value, item.sourcePath);
262
+ }
263
+ }
264
+ }
141
265
  }
142
266
  return warnings;
143
267
  }
@@ -1 +1 @@
1
- {"version":3,"file":"path-rewriter.js","sourceRoot":"","sources":["../src/path-rewriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAmB7C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAC1B,WAAiC,EACjC,OAAsB,EACtB,WAAmB,EACnB,UAAkB;IAElB,MAAM,OAAO,GAAgB,IAAI,GAAG,EAAE,CAAC;IAEvC,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,sEAAsE;QACtE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEtF,wDAAwD;QACxD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC1C,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;oBAC1B,gCAAgC;oBAChC,MAAM,oBAAoB,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAC7E,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,cAAc,CAAC,C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I,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC1E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,2BAA4B,YAAW,qBAAqB;IACvE,QAAQ,CAAC,EAAE,oBAAoB;IAC/B,QAAQ,CAAC,IAAI,8BAA8B;IAErC,SAAS,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;CA8C/E"}
@@ -37,8 +37,12 @@ export class PathRewritingTransformation {
37
37
  warnings,
38
38
  };
39
39
  }
40
- // Build mapping from source paths to target paths
41
- const mapping = buildMapping(context.items, trialResult.written, context.sourceRoot, context.targetRoot);
40
+ // Build mapping from source paths to target paths. Any collision
41
+ // warnings emitted during mapping construction (ambiguous source-path
42
+ // keys mapping to different targets) are merged into the conversion
43
+ // result warnings so the operator sees them.
44
+ const { mapping, warnings: mappingWarnings } = buildMapping(context.items, trialResult.written, context.sourceRoot, context.targetRoot);
45
+ warnings.push(...mappingWarnings);
42
46
  // Rewrite path references in content
43
47
  const rewriteResult = rewriteContent(context.items, mapping);
44
48
  // Detect orphan references using plugin-provided path patterns
@@ -1 +1 @@
1
- {"version":3,"file":"transformation.js","sourceRoot":"","sources":["../src/transformation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAmEjF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,2BAA2B;IAC7B,EAAE,GAAG,gBAAgB,CAAC;IACtB,IAAI,GAAG,0BAA0B,CAAC;IAE3C,KAAK,CAAC,SAAS,CAAC,OAA8B;QAC5C,MAAM,QAAQ,GAAc,EAAE,CAAC;QAE/B,0CAA0C;QAC1C,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAA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,cAAc,CAAC,CAAC;QACnC,CAAC;QAED,OAAO;YACL,KAAK,EAAE,aAAa,CAAC,KAAK;YAC1B,QAAQ;SACT,CAAC;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a16njs/engine",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Conversion engine for a16n",
5
5
  "license": "AGPL-3.0",
6
6
  "author": "Texarkanine",
@@ -31,14 +31,14 @@
31
31
  "dist"
32
32
  ],
33
33
  "dependencies": {
34
- "@a16njs/models": "0.12.0"
34
+ "@a16njs/models": "0.13.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.0.0",
38
38
  "typescript": "^5.4.0",
39
39
  "vitest": "^2.0.0",
40
- "@a16njs/plugin-cursor": "0.12.0",
41
- "@a16njs/plugin-claude": "0.12.0"
40
+ "@a16njs/plugin-cursor": "0.13.0",
41
+ "@a16njs/plugin-claude": "0.13.0"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=22.0.0"