@openuji/speculator 0.5.3 → 0.6.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.
Files changed (173) hide show
  1. package/dist/index.d.ts +3 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/parse/__tests__/assembler.test.js +29 -3
  6. package/dist/parse/__tests__/assembler.test.js.map +1 -1
  7. package/dist/parse/__tests__/html-in-markdown.test.d.ts +2 -0
  8. package/dist/parse/__tests__/html-in-markdown.test.d.ts.map +1 -0
  9. package/dist/parse/__tests__/html-in-markdown.test.js +83 -0
  10. package/dist/parse/__tests__/html-in-markdown.test.js.map +1 -0
  11. package/dist/parse/__tests__/pipeline.test.js +5 -11
  12. package/dist/parse/__tests__/pipeline.test.js.map +1 -1
  13. package/dist/parse/__tests__/respec.test.js +9 -9
  14. package/dist/parse/__tests__/respec.test.js.map +1 -1
  15. package/dist/parse/__tests__/shorthands.test.d.ts +5 -0
  16. package/dist/parse/__tests__/shorthands.test.d.ts.map +1 -0
  17. package/dist/parse/__tests__/shorthands.test.js +96 -0
  18. package/dist/parse/__tests__/shorthands.test.js.map +1 -0
  19. package/dist/parse/assembler.d.ts.map +1 -1
  20. package/dist/parse/assembler.js +35 -0
  21. package/dist/parse/assembler.js.map +1 -1
  22. package/dist/parse/html/InlinesHtmlParser.d.ts +2 -2
  23. package/dist/parse/html/InlinesHtmlParser.d.ts.map +1 -1
  24. package/dist/parse/html/InlinesHtmlParser.js +7 -75
  25. package/dist/parse/html/InlinesHtmlParser.js.map +1 -1
  26. package/dist/parse/html/ReferenceHtmlParser.d.ts +9 -0
  27. package/dist/parse/html/ReferenceHtmlParser.d.ts.map +1 -0
  28. package/dist/parse/html/ReferenceHtmlParser.js +128 -0
  29. package/dist/parse/html/ReferenceHtmlParser.js.map +1 -0
  30. package/dist/parse/html/parser.d.ts +1 -12
  31. package/dist/parse/html/parser.d.ts.map +1 -1
  32. package/dist/parse/html/parser.js +20 -49
  33. package/dist/parse/html/parser.js.map +1 -1
  34. package/dist/parse/index.d.ts +1 -1
  35. package/dist/parse/index.d.ts.map +1 -1
  36. package/dist/parse/index.js.map +1 -1
  37. package/dist/parse/markdown/HtmlBlockMarkdownParser.d.ts +13 -0
  38. package/dist/parse/markdown/HtmlBlockMarkdownParser.d.ts.map +1 -0
  39. package/dist/parse/markdown/HtmlBlockMarkdownParser.js +62 -0
  40. package/dist/parse/markdown/HtmlBlockMarkdownParser.js.map +1 -0
  41. package/dist/parse/markdown/HtmlInlinesMarkdownParser.d.ts +12 -0
  42. package/dist/parse/markdown/HtmlInlinesMarkdownParser.d.ts.map +1 -0
  43. package/dist/parse/markdown/HtmlInlinesMarkdownParser.js +187 -0
  44. package/dist/parse/markdown/HtmlInlinesMarkdownParser.js.map +1 -0
  45. package/dist/parse/markdown/HtmlParagraphMarkdownParser.d.ts +15 -0
  46. package/dist/parse/markdown/HtmlParagraphMarkdownParser.d.ts.map +1 -0
  47. package/dist/parse/markdown/HtmlParagraphMarkdownParser.js +67 -0
  48. package/dist/parse/markdown/HtmlParagraphMarkdownParser.js.map +1 -0
  49. package/dist/parse/markdown/ShorthandsMarkdownParser.d.ts +29 -0
  50. package/dist/parse/markdown/ShorthandsMarkdownParser.d.ts.map +1 -0
  51. package/dist/parse/markdown/ShorthandsMarkdownParser.js +198 -0
  52. package/dist/parse/markdown/ShorthandsMarkdownParser.js.map +1 -0
  53. package/dist/parse/markdown/parser.d.ts +3 -14
  54. package/dist/parse/markdown/parser.d.ts.map +1 -1
  55. package/dist/parse/markdown/parser.js +76 -49
  56. package/dist/parse/markdown/parser.js.map +1 -1
  57. package/dist/parse/parsers.d.ts +4 -1
  58. package/dist/parse/parsers.d.ts.map +1 -1
  59. package/dist/parse/parsers.js +13 -3
  60. package/dist/parse/parsers.js.map +1 -1
  61. package/dist/parse/pipeline.d.ts.map +1 -1
  62. package/dist/parse/pipeline.js +9 -21
  63. package/dist/parse/pipeline.js.map +1 -1
  64. package/dist/parse/registry.d.ts +53 -90
  65. package/dist/parse/registry.d.ts.map +1 -1
  66. package/dist/parse/registry.js +39 -58
  67. package/dist/parse/registry.js.map +1 -1
  68. package/dist/parse/types.d.ts +1 -23
  69. package/dist/parse/types.d.ts.map +1 -1
  70. package/dist/parse/types.js.map +1 -1
  71. package/dist/parse/utils/hast-utils.d.ts +33 -0
  72. package/dist/parse/utils/hast-utils.d.ts.map +1 -0
  73. package/dist/parse/utils/hast-utils.js +122 -0
  74. package/dist/parse/utils/hast-utils.js.map +1 -0
  75. package/dist/pipeline/__tests__/pipeline.test.js +1 -2
  76. package/dist/pipeline/__tests__/pipeline.test.js.map +1 -1
  77. package/dist/pipeline/__tests__/workspace.test.js +2 -1
  78. package/dist/pipeline/__tests__/workspace.test.js.map +1 -1
  79. package/dist/pipeline/runner.d.ts.map +1 -1
  80. package/dist/pipeline/runner.js +16 -12
  81. package/dist/pipeline/runner.js.map +1 -1
  82. package/dist/postprocess/__tests__/dfn-resolve.test.d.ts +0 -3
  83. package/dist/postprocess/__tests__/dfn-resolve.test.d.ts.map +1 -1
  84. package/dist/postprocess/__tests__/dfn-resolve.test.js +147 -127
  85. package/dist/postprocess/__tests__/dfn-resolve.test.js.map +1 -1
  86. package/dist/postprocess/__tests__/section-id.test.js +2 -1
  87. package/dist/postprocess/__tests__/section-id.test.js.map +1 -1
  88. package/dist/postprocess/__tests__/toc.test.js +3 -1
  89. package/dist/postprocess/__tests__/toc.test.js.map +1 -1
  90. package/dist/postprocess/index.d.ts +1 -1
  91. package/dist/postprocess/index.d.ts.map +1 -1
  92. package/dist/postprocess/index.js +3 -3
  93. package/dist/postprocess/index.js.map +1 -1
  94. package/dist/postprocess/plugins/citation-resolve.d.ts +8 -0
  95. package/dist/postprocess/plugins/citation-resolve.d.ts.map +1 -0
  96. package/dist/postprocess/plugins/citation-resolve.js +33 -0
  97. package/dist/postprocess/plugins/citation-resolve.js.map +1 -0
  98. package/dist/postprocess/plugins/dfn-index.d.ts.map +1 -1
  99. package/dist/postprocess/plugins/dfn-index.js +1 -0
  100. package/dist/postprocess/plugins/dfn-index.js.map +1 -1
  101. package/dist/postprocess/plugins/reference-resolve.d.ts +4 -4
  102. package/dist/postprocess/plugins/reference-resolve.d.ts.map +1 -1
  103. package/dist/postprocess/plugins/reference-resolve.js +28 -7
  104. package/dist/postprocess/plugins/reference-resolve.js.map +1 -1
  105. package/dist/postprocess/plugins/section-id.d.ts.map +1 -1
  106. package/dist/postprocess/plugins/section-id.js +8 -4
  107. package/dist/postprocess/plugins/section-id.js.map +1 -1
  108. package/dist/postprocess/plugins/toc.d.ts.map +1 -1
  109. package/dist/postprocess/plugins/toc.js +11 -4
  110. package/dist/postprocess/plugins/toc.js.map +1 -1
  111. package/dist/postprocess/walk-ast.d.ts.map +1 -1
  112. package/dist/postprocess/walk-ast.js +4 -1
  113. package/dist/postprocess/walk-ast.js.map +1 -1
  114. package/dist/preprocess/__tests__/pipeline.test.js +39 -47
  115. package/dist/preprocess/__tests__/pipeline.test.js.map +1 -1
  116. package/dist/preprocess/__tests__/resolver.test.js +38 -40
  117. package/dist/preprocess/__tests__/resolver.test.js.map +1 -1
  118. package/dist/preprocess/config/__tests__/rules.test.d.ts +2 -0
  119. package/dist/preprocess/config/__tests__/rules.test.d.ts.map +1 -0
  120. package/dist/preprocess/config/__tests__/rules.test.js +223 -0
  121. package/dist/preprocess/config/__tests__/rules.test.js.map +1 -0
  122. package/dist/preprocess/config/doc-config.js +2 -2
  123. package/dist/preprocess/config/doc-config.js.map +1 -1
  124. package/dist/preprocess/config/index.d.ts +3 -4
  125. package/dist/preprocess/config/index.d.ts.map +1 -1
  126. package/dist/preprocess/config/index.js +2 -2
  127. package/dist/preprocess/config/index.js.map +1 -1
  128. package/dist/preprocess/config/loader.d.ts +12 -48
  129. package/dist/preprocess/config/loader.d.ts.map +1 -1
  130. package/dist/preprocess/config/loader.js +23 -13
  131. package/dist/preprocess/config/loader.js.map +1 -1
  132. package/dist/preprocess/config/normalize.d.ts +11 -10
  133. package/dist/preprocess/config/normalize.d.ts.map +1 -1
  134. package/dist/preprocess/config/normalize.js +61 -18
  135. package/dist/preprocess/config/normalize.js.map +1 -1
  136. package/dist/preprocess/config/types.d.ts +57 -22
  137. package/dist/preprocess/config/types.d.ts.map +1 -1
  138. package/dist/preprocess/include/index.d.ts +1 -1
  139. package/dist/preprocess/include/index.d.ts.map +1 -1
  140. package/dist/preprocess/include/index.js +1 -1
  141. package/dist/preprocess/include/index.js.map +1 -1
  142. package/dist/preprocess/include/resolver.d.ts +14 -8
  143. package/dist/preprocess/include/resolver.d.ts.map +1 -1
  144. package/dist/preprocess/include/resolver.js +27 -18
  145. package/dist/preprocess/include/resolver.js.map +1 -1
  146. package/dist/preprocess/index.d.ts +6 -6
  147. package/dist/preprocess/index.d.ts.map +1 -1
  148. package/dist/preprocess/index.js +4 -4
  149. package/dist/preprocess/index.js.map +1 -1
  150. package/dist/preprocess/pipeline.d.ts +20 -17
  151. package/dist/preprocess/pipeline.d.ts.map +1 -1
  152. package/dist/preprocess/pipeline.js +45 -52
  153. package/dist/preprocess/pipeline.js.map +1 -1
  154. package/dist/preprocess/types.d.ts +33 -41
  155. package/dist/preprocess/types.d.ts.map +1 -1
  156. package/dist/preprocess/types.js +0 -6
  157. package/dist/preprocess/types.js.map +1 -1
  158. package/dist/types/ast.generated.d.ts +84 -34
  159. package/dist/types/ast.generated.d.ts.map +1 -1
  160. package/dist/types/ast.generated.js +9 -3
  161. package/dist/types/ast.generated.js.map +1 -1
  162. package/dist/workspace/__tests__/sort.test.js +8 -8
  163. package/dist/workspace/__tests__/sort.test.js.map +1 -1
  164. package/dist/workspace/builder.d.ts +23 -0
  165. package/dist/workspace/builder.d.ts.map +1 -0
  166. package/dist/workspace/builder.js +50 -0
  167. package/dist/workspace/builder.js.map +1 -0
  168. package/dist/workspace/index.d.ts +2 -0
  169. package/dist/workspace/index.d.ts.map +1 -1
  170. package/dist/workspace/index.js +1 -0
  171. package/dist/workspace/index.js.map +1 -1
  172. package/package.json +1 -2
  173. package/schema/spec-ast.schema.json +161 -68
@@ -2,7 +2,7 @@
2
2
  * AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
3
3
  *
4
4
  * Generated from: schema/spec-ast.schema.json
5
- * Generated at: 2026-01-02T15:58:42.008Z
5
+ * Generated at: 2026-01-27T16:58:52.776Z
6
6
  *
7
7
  * Regenerate with: npx ts-node scripts/generate-types.ts
8
8
  */
@@ -45,7 +45,9 @@ export function isInline(node) {
45
45
  const type = node.type;
46
46
  return [
47
47
  'text', 'emphasis', 'strong', 'inlineCode', 'link',
48
- 'image', 'definition', 'reference', 'requirement', 'issue'
48
+ 'image', 'definition', 'requirement', 'issue', 'cite', 'variable',
49
+ 'workspaceDfnReference', 'workspaceIdlReference', 'workspaceElementReference',
50
+ 'externalDfnReference', 'externalIdlReference', 'externalElementReference'
49
51
  ].includes(type);
50
52
  }
51
53
  /**
@@ -55,7 +57,11 @@ export function isIndexableInline(node) {
55
57
  if (typeof node !== 'object' || node === null)
56
58
  return false;
57
59
  const type = node.type;
58
- return ['definition', 'reference', 'requirement', 'issue'].includes(type);
60
+ return [
61
+ 'definition', 'requirement', 'issue',
62
+ 'workspaceDfnReference', 'workspaceIdlReference', 'workspaceElementReference',
63
+ 'externalDfnReference', 'externalIdlReference', 'externalElementReference'
64
+ ].includes(type);
59
65
  }
60
66
  /**
61
67
  * Type guard for BlockExample (indexable block)
@@ -1 +1 @@
1
- {"version":3,"file":"ast.generated.js","sourceRoot":"","sources":["../../src/types/ast.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4gBH;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAK,IAAY,CAAC,IAAI,KAAK,WAAW,CAAC;AACzF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAa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a;IACpC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5D,MAAM,IAAI,GAAI,IAAY,CAAC,IAAI,CAAC;IAChC,OAAO;QACL,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM;QAClD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU;QACjE,uBAAuB,EAAE,uBAAuB,EAAE,2BAA2B;QAC7E,sBAAsB,EAAE,sBAAsB,EAAE,0BAA0B;KAC3E,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAa;IAC7C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5D,MAAM,IAAI,GAAI,IAAY,CAAC,IAAI,CAAC;IAChC,OAAO;QACL,YAAY,EAAE,aAAa,EAAE,OAAO;QACpC,uBAAuB,EAAE,uBAAuB,EAAE,2BAA2B;QAC7E,sBAAsB,EAAE,sBAAsB,EAAE,0BAA0B;KAC3E,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,IAAa;IAC1C,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAK,IAAY,CAAC,IAAI,KAAK,SAAS,CAAC;AACvF,CAAC"}
@@ -3,17 +3,17 @@ import { MemoryFileProvider } from '#src/file-provider/memory';
3
3
  import { sortEntriesByDeps } from '../sort.js';
4
4
  import { generateIdFromPath, getConfigPath } from '#src/preprocess/config/doc-config';
5
5
  describe('generateIdFromPath', () => {
6
- it('should generate id from parent folder and filename', () => {
7
- expect(generateIdFromPath('/spec/workspace/pkg-a/index.html')).toBe('pkg-a-index');
8
- expect(generateIdFromPath('/spec/overview/intro.md')).toBe('overview-intro');
9
- expect(generateIdFromPath('/docs/api/reference.html')).toBe('api-reference');
6
+ it('should generate id from parent folder', () => {
7
+ expect(generateIdFromPath('/spec/workspace/pkg-a/index.html')).toBe('pkg-a');
8
+ expect(generateIdFromPath('/spec/overview/intro.md')).toBe('overview');
9
+ expect(generateIdFromPath('/docs/api/reference.html')).toBe('api');
10
10
  });
11
11
  it('should handle single-segment paths', () => {
12
12
  expect(generateIdFromPath('/index.html')).toBe('index');
13
13
  expect(generateIdFromPath('readme.md')).toBe('readme');
14
14
  });
15
15
  it('should handle Windows-style paths', () => {
16
- expect(generateIdFromPath('C:\\spec\\core\\index.html')).toBe('core-index');
16
+ expect(generateIdFromPath('C:\\spec\\core\\index.html')).toBe('core');
17
17
  });
18
18
  });
19
19
  describe('getConfigPath', () => {
@@ -62,14 +62,14 @@ describe('sortEntriesByDeps', () => {
62
62
  // Only core has config, depends on auto-generated ID
63
63
  fileProvider.setFile('/spec/core/config.json', JSON.stringify({
64
64
  id: 'core',
65
- deps: ['overview-index'] // auto-generated ID pattern
65
+ deps: ['overview'] // auto-generated ID is now just the parent folder
66
66
  }));
67
67
  const result = await sortEntriesByDeps([
68
68
  { entry: '/spec/core/index.html' },
69
- { entry: '/spec/overview/index.html' }, // will get auto-generated ID
69
+ { entry: '/spec/overview/index.html' }, // will get auto-generated ID 'overview'
70
70
  ], fileProvider);
71
71
  expect(result.errors).toHaveLength(0);
72
- // overview should come before core (core depends on overview-index)
72
+ // overview should come before core (core depends on overview)
73
73
  expect(result.entries[0].entry).toBe('/spec/overview/index.html');
74
74
  expect(result.entries[1].entry).toBe('/spec/core/index.html');
75
75
  });
@@ -1 +1 @@
1
- {"version":3,"file":"sort.test.js","sourceRoot":"","sources":["../../../src/workspace/__tests__/sort.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAA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AAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC3D,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { SpeculatorPipeline } from '#src/pipeline/runner';
2
+ import type { FileProvider } from '#src/file-provider/types';
3
+ import type { Workspace } from '#src/types/ast.generated';
4
+ import type { WorkspaceConfig } from '#src/preprocess/types';
5
+ /**
6
+ * Result of building workspaces
7
+ */
8
+ export interface BuildWorkspacesResult {
9
+ /** Map of workspace name -> built Workspace AST */
10
+ workspaces: Record<string, Workspace>;
11
+ /** Any errors encountered during process */
12
+ errors: string[];
13
+ }
14
+ /**
15
+ * Build multiple isolated workspaces from a configuration
16
+ *
17
+ * @param config - Workspace configuration (map of name -> entries)
18
+ * @param fileProvider - File provider for reading specs
19
+ * @param configPath - Optional path to the config file (for relative path resolution)
20
+ * @param pipeline - Optional pipeline instance (uses core plugins by default)
21
+ */
22
+ export declare function buildWorkspaces(config: WorkspaceConfig, _fileProvider?: FileProvider, configPath?: string, pipeline?: SpeculatorPipeline): Promise<BuildWorkspacesResult>;
23
+ //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/workspace/builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,mDAAmD;IACnD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACtC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACjC,MAAM,EAAE,eAAe,EACvB,aAAa,CAAC,EAAE,YAAY,EAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,kBAAkB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAwChC"}
@@ -0,0 +1,50 @@
1
+ import { resolve, dirname } from 'path';
2
+ import { SpeculatorPipeline } from '#src/pipeline/runner';
3
+ import { corePlugins } from '#src/postprocess/index';
4
+ import { sortEntriesByDeps } from '#src/workspace/sort';
5
+ import { NodeFileProvider } from '#src/file-provider/node';
6
+ /**
7
+ * Build multiple isolated workspaces from a configuration
8
+ *
9
+ * @param config - Workspace configuration (map of name -> entries)
10
+ * @param fileProvider - File provider for reading specs
11
+ * @param configPath - Optional path to the config file (for relative path resolution)
12
+ * @param pipeline - Optional pipeline instance (uses core plugins by default)
13
+ */
14
+ export async function buildWorkspaces(config, _fileProvider, configPath, pipeline) {
15
+ const fileProvider = _fileProvider ?? new NodeFileProvider();
16
+ const workspaces = {};
17
+ const errors = [];
18
+ const p = pipeline ?? new SpeculatorPipeline(corePlugins);
19
+ const configDir = configPath ? dirname(resolve(configPath)) : process.cwd();
20
+ for (const [name, entries] of Object.entries(config)) {
21
+ try {
22
+ // 1. Resolve entry paths relative to config file
23
+ const resolvedEntries = entries.map(e => ({
24
+ ...e,
25
+ entry: resolve(configDir, e.entry)
26
+ }));
27
+ // 2. Sort entries by dependencies
28
+ const sortResult = await sortEntriesByDeps(resolvedEntries, fileProvider);
29
+ if (sortResult.errors.length > 0) {
30
+ errors.push(...sortResult.errors.map(err => `[${name}] ${err}`));
31
+ continue;
32
+ }
33
+ // 3. Build workspace AST
34
+ const result = await p.runWorkspace({
35
+ entries: sortResult.entries,
36
+ fileProvider,
37
+ });
38
+ if (!result.workspace) {
39
+ errors.push(`[${name}] Failed to build workspace AST.`);
40
+ continue;
41
+ }
42
+ workspaces[name] = result.workspace;
43
+ }
44
+ catch (error) {
45
+ errors.push(`[${name}] ${error instanceof Error ? error.message : String(error)}`);
46
+ }
47
+ }
48
+ return { workspaces, errors };
49
+ }
50
+ //# sourceMappingURL=builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/workspace/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAY3D;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAuB,EACvB,aAA4B,EAC5B,UAAmB,EACnB,QAA6B;IAE7B,MAAM,YAAY,GAAG,aAAa,IAAI,IAAI,gBAAgB,EAAE,CAAC;IAC7D,MAAM,UAAU,GAA8B,EAAE,CAAC;IACjD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,CAAC,GAAG,QAAQ,IAAI,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAE5E,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,IAAI,CAAC;YACD,iDAAiD;YACjD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACtC,GAAG,CAAC;gBACJ,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC;aACrC,CAAC,CAAC,CAAC;YAEJ,kCAAkC;YAClC,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;YAC1E,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;gBACjE,SAAS;YACb,CAAC;YAED,yBAAyB;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,YAAY,CAAC;gBAChC,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,YAAY;aACf,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,kCAAkC,CAAC,CAAC;gBACxD,SAAS;YACb,CAAC;YAED,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;QACxC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACvF,CAAC;IACL,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AAClC,CAAC"}
@@ -5,4 +5,6 @@
5
5
  */
6
6
  export { sortEntriesByDeps } from './sort.js';
7
7
  export type { EntryWithConfig, SortResult } from './sort.js';
8
+ export { buildWorkspaces } from './builder.js';
9
+ export type { BuildWorkspacesResult } from './builder.js';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC"}
@@ -4,4 +4,5 @@
4
4
  * Utilities for working with multi-document workspaces.
5
5
  */
6
6
  export { sortEntriesByDeps } from './sort.js';
7
+ export { buildWorkspaces } from './builder.js';
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openuji/speculator",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "AST-first specification processor with schema-central architecture",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,6 @@
9
9
  "#src/*": "./dist/*.js"
10
10
  },
11
11
  "devDependencies": {
12
- "@changesets/cli": "^2.29.8",
13
12
  "@types/hast": "^3.0.4",
14
13
  "@types/mdast": "^4.0.4",
15
14
  "@types/node": "^20.10.0",
@@ -280,75 +280,71 @@
280
280
  }
281
281
  ]
282
282
  },
283
- "InlineReference": {
283
+ "WorkspaceReferenceBase": {
284
+ "type": "object",
285
+ "properties": {
286
+ "targetTerm": { "type": "string" },
287
+ "candidateTerms": { "type": "array", "items": { "type": "string" } },
288
+ "forContexts": { "type": "array", "items": { "type": ["string", "null"] } },
289
+ "targetId": { "type": "string" },
290
+ "targetDocumentId": { "type": "string" },
291
+ "children": { "type": "array", "items": { "$ref": "#/definitions/Inline" } }
292
+ },
293
+ "required": ["targetTerm", "children"]
294
+ },
295
+ "ExternalReferenceBase": {
296
+ "type": "object",
297
+ "properties": {
298
+ "targetTerm": { "type": "string" },
299
+ "candidateTerms": { "type": "array", "items": { "type": "string" } },
300
+ "forContexts": { "type": "array", "items": { "type": ["string", "null"] } },
301
+ "xrefSpec": { "type": "string" },
302
+ "targetId": { "type": "string" },
303
+ "url": { "type": "string" },
304
+ "children": { "type": "array", "items": { "$ref": "#/definitions/Inline" } }
305
+ },
306
+ "required": ["targetTerm", "xrefSpec", "children"]
307
+ },
308
+ "InlineWorkspaceDfnReference": {
284
309
  "allOf": [
285
- {
286
- "$ref": "#/definitions/BaseNode"
287
- },
288
- {
289
- "type": "object",
290
- "description": "Cross-reference marker. Parse requires targetTerm and children. Resolve may bind targetId after global dfn collection. Indexed during the indexing phase.",
291
- "properties": {
292
- "type": {
293
- "const": "reference"
294
- },
295
- "targetTerm": {
296
- "type": "string",
297
- "description": "Primary reference term used to resolve a target definition."
298
- },
299
- "candidateTerms": {
300
- "type": "array",
301
- "items": {
302
- "type": "string"
303
- },
304
- "description": "Alternative term candidates from data-lt. Parse fills from data-lt or [targetTerm]."
305
- },
306
- "forContexts": {
307
- "type": "array",
308
- "items": {
309
- "type": [
310
- "string",
311
- "null"
312
- ]
313
- },
314
- "description": "For-contexts from data-xref-for (e.g., owning interface). Parse fills from data-xref-for or [null]."
315
- },
316
- "preferredType": {
317
- "type": [
318
- "string",
319
- "null"
320
- ],
321
- "description": "Preferred definition type from data-link-type."
322
- },
323
- "xrefSpec": {
324
- "type": [
325
- "string",
326
- "null"
327
- ],
328
- "description": "Explicit spec to search from data-xref-spec. Restricts external search."
329
- },
330
- "allowExternal": {
331
- "type": "boolean",
332
- "description": "Whether external lookup is allowed. False if data-allow-external='no'.",
333
- "default": true
334
- },
335
- "targetId": {
336
- "type": "string",
337
- "description": "Resolved ID of the referenced definition. Filled during resolve phase."
338
- },
339
- "children": {
340
- "type": "array",
341
- "items": {
342
- "$ref": "#/definitions/Inline"
343
- }
344
- }
345
- },
346
- "required": [
347
- "type",
348
- "targetTerm",
349
- "children"
350
- ]
351
- }
310
+ { "$ref": "#/definitions/BaseNode" },
311
+ { "$ref": "#/definitions/WorkspaceReferenceBase" },
312
+ { "type": "object", "properties": { "type": { "const": "workspaceDfnReference" } }, "required": ["type"] }
313
+ ]
314
+ },
315
+ "InlineWorkspaceIdlReference": {
316
+ "allOf": [
317
+ { "$ref": "#/definitions/BaseNode" },
318
+ { "$ref": "#/definitions/WorkspaceReferenceBase" },
319
+ { "type": "object", "properties": { "type": { "const": "workspaceIdlReference" } }, "required": ["type"] }
320
+ ]
321
+ },
322
+ "InlineWorkspaceElementReference": {
323
+ "allOf": [
324
+ { "$ref": "#/definitions/BaseNode" },
325
+ { "$ref": "#/definitions/WorkspaceReferenceBase" },
326
+ { "type": "object", "properties": { "type": { "const": "workspaceElementReference" } }, "required": ["type"] }
327
+ ]
328
+ },
329
+ "InlineExternalDfnReference": {
330
+ "allOf": [
331
+ { "$ref": "#/definitions/BaseNode" },
332
+ { "$ref": "#/definitions/ExternalReferenceBase" },
333
+ { "type": "object", "properties": { "type": { "const": "externalDfnReference" } }, "required": ["type"] }
334
+ ]
335
+ },
336
+ "InlineExternalIdlReference": {
337
+ "allOf": [
338
+ { "$ref": "#/definitions/BaseNode" },
339
+ { "$ref": "#/definitions/ExternalReferenceBase" },
340
+ { "type": "object", "properties": { "type": { "const": "externalIdlReference" } }, "required": ["type"] }
341
+ ]
342
+ },
343
+ "InlineExternalElementReference": {
344
+ "allOf": [
345
+ { "$ref": "#/definitions/BaseNode" },
346
+ { "$ref": "#/definitions/ExternalReferenceBase" },
347
+ { "type": "object", "properties": { "type": { "const": "externalElementReference" } }, "required": ["type"] }
352
348
  ]
353
349
  },
354
350
  "InlineRequirement": {
@@ -485,6 +481,14 @@
485
481
  ],
486
482
  "description": "Fragment identifier from data-cite (e.g., 'the-a-element')."
487
483
  },
484
+ "targetId": {
485
+ "type": "string",
486
+ "description": "Resolved ID of the bibliography entry. Filled during resolve phase."
487
+ },
488
+ "url": {
489
+ "type": "string",
490
+ "description": "Resolved URL of the citation. Filled during resolve phase."
491
+ },
488
492
  "children": {
489
493
  "type": "array",
490
494
  "items": {
@@ -500,6 +504,30 @@
500
504
  }
501
505
  ]
502
506
  },
507
+ "InlineVariable": {
508
+ "allOf": [
509
+ {
510
+ "$ref": "#/definitions/BaseNode"
511
+ },
512
+ {
513
+ "type": "object",
514
+ "description": "Algorithm variable marker (e.g., |x| in ReSpec). Rendered as <var> in HTML.",
515
+ "properties": {
516
+ "type": {
517
+ "const": "variable"
518
+ },
519
+ "value": {
520
+ "type": "string",
521
+ "description": "The variable name or content."
522
+ }
523
+ },
524
+ "required": [
525
+ "type",
526
+ "value"
527
+ ]
528
+ }
529
+ ]
530
+ },
503
531
  "Inline": {
504
532
  "oneOf": [
505
533
  {
@@ -534,6 +562,9 @@
534
562
  },
535
563
  {
536
564
  "$ref": "#/definitions/InlineCite"
565
+ },
566
+ {
567
+ "$ref": "#/definitions/InlineVariable"
537
568
  }
538
569
  ]
539
570
  },
@@ -1051,6 +1082,10 @@
1051
1082
  "term": {
1052
1083
  "type": "string"
1053
1084
  },
1085
+ "documentId": {
1086
+ "type": "string",
1087
+ "description": "ID of the document containing this definition"
1088
+ },
1054
1089
  "linkTexts": {
1055
1090
  "type": "array",
1056
1091
  "items": {
@@ -1086,12 +1121,22 @@
1086
1121
  "type": "object",
1087
1122
  "description": "Entry in the references index, extracted from InlineReference nodes",
1088
1123
  "properties": {
1124
+ "type": {
1125
+ "type": "string",
1126
+ "description": "Concrete reference type (e.g., workspaceDfnReference, externalIdlReference)"
1127
+ },
1089
1128
  "targetId": {
1090
1129
  "type": "string"
1091
1130
  },
1092
1131
  "targetTerm": {
1093
1132
  "type": "string"
1094
1133
  },
1134
+ "targetDocumentId": {
1135
+ "type": "string"
1136
+ },
1137
+ "url": {
1138
+ "type": "string"
1139
+ },
1095
1140
  "sourcePos": {
1096
1141
  "$ref": "#/definitions/SourcePos"
1097
1142
  }
@@ -1318,6 +1363,29 @@
1318
1363
  }
1319
1364
  }
1320
1365
  },
1366
+ "InlineReference": {
1367
+ "description": "Union of all inline reference types",
1368
+ "oneOf": [
1369
+ {
1370
+ "$ref": "#/definitions/InlineWorkspaceDfnReference"
1371
+ },
1372
+ {
1373
+ "$ref": "#/definitions/InlineWorkspaceIdlReference"
1374
+ },
1375
+ {
1376
+ "$ref": "#/definitions/InlineWorkspaceElementReference"
1377
+ },
1378
+ {
1379
+ "$ref": "#/definitions/InlineExternalDfnReference"
1380
+ },
1381
+ {
1382
+ "$ref": "#/definitions/InlineExternalIdlReference"
1383
+ },
1384
+ {
1385
+ "$ref": "#/definitions/InlineExternalElementReference"
1386
+ }
1387
+ ]
1388
+ },
1321
1389
  "DocumentMetadata": {
1322
1390
  "type": "object",
1323
1391
  "description": "Document-level metadata from frontmatter or config",
@@ -1376,8 +1444,28 @@
1376
1444
  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
1377
1445
  "description": "ISO 8601 date format (YYYY-MM-DD)"
1378
1446
  },
1447
+ "lastUpdateDate": {
1448
+ "type": "string",
1449
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
1450
+ "description": "Last update date (YYYY-MM-DD)"
1451
+ },
1379
1452
  "abstract": {
1380
1453
  "type": "string"
1454
+ },
1455
+ "maturityLevel": {
1456
+ "type": "string",
1457
+ "enum": [
1458
+ "incubating",
1459
+ "draft",
1460
+ "prerelease",
1461
+ "stable"
1462
+ ],
1463
+ "description": "Normalized maturity level"
1464
+ },
1465
+ "custom": {
1466
+ "type": "object",
1467
+ "description": "Highest priority user-defined properties",
1468
+ "additionalProperties": true
1381
1469
  }
1382
1470
  }
1383
1471
  },
@@ -1388,6 +1476,10 @@
1388
1476
  "type": {
1389
1477
  "const": "document"
1390
1478
  },
1479
+ "id": {
1480
+ "type": "string",
1481
+ "description": "Document identifier, used as slug for internal link resolution. Synced from config.id"
1482
+ },
1391
1483
  "metadata": {
1392
1484
  "$ref": "#/definitions/DocumentMetadata"
1393
1485
  },
@@ -1418,6 +1510,7 @@
1418
1510
  },
1419
1511
  "required": [
1420
1512
  "type",
1513
+ "id",
1421
1514
  "children"
1422
1515
  ]
1423
1516
  }