@doxbrix/doxloop 0.1.5 → 0.2.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 (357) hide show
  1. package/CHANGELOG.md +1145 -0
  2. package/README.md +422 -227
  3. package/assets/doxbrix-preview.css +77 -15
  4. package/contracts/agent-events-v1.schema.json +1 -0
  5. package/contracts/coverage-v1.schema.json +59 -0
  6. package/contracts/drift-v1.schema.json +1 -0
  7. package/contracts/evaluation-v1.schema.json +62 -0
  8. package/contracts/quality-codes-v1.json +1 -0
  9. package/contracts/quality-report-v1.schema.json +1 -0
  10. package/contracts/validation-v1.schema.json +1 -0
  11. package/dist/agent-failure.d.ts +36 -0
  12. package/dist/agent-failure.js +98 -0
  13. package/dist/agent-isolation.d.ts +17 -0
  14. package/dist/agent-isolation.js +94 -0
  15. package/dist/agent-log.d.ts +197 -0
  16. package/dist/agent-log.js +1094 -0
  17. package/dist/agent-process.d.ts +63 -0
  18. package/dist/agent-process.js +128 -0
  19. package/dist/agent-reply.d.ts +47 -0
  20. package/dist/agent-reply.js +315 -0
  21. package/dist/agents.d.ts +24 -5
  22. package/dist/agents.js +60 -9
  23. package/dist/api-coverage.d.ts +11 -0
  24. package/dist/api-coverage.js +72 -0
  25. package/dist/application-probe.d.ts +28 -0
  26. package/dist/application-probe.js +93 -0
  27. package/dist/application-url.d.ts +14 -0
  28. package/dist/application-url.js +26 -0
  29. package/dist/args.js +15 -0
  30. package/dist/artifact-deploy.d.ts +9 -0
  31. package/dist/artifact-deploy.js +28 -8
  32. package/dist/assets.d.ts +72 -0
  33. package/dist/assets.js +382 -0
  34. package/dist/auth.d.ts +10 -0
  35. package/dist/auth.js +38 -9
  36. package/dist/author.d.ts +206 -4
  37. package/dist/author.js +1650 -52
  38. package/dist/authoring-batches.d.ts +190 -0
  39. package/dist/authoring-batches.js +489 -0
  40. package/dist/authoring-postpass.d.ts +79 -0
  41. package/dist/authoring-postpass.js +1289 -0
  42. package/dist/authoring-progress.d.ts +95 -0
  43. package/dist/authoring-progress.js +269 -0
  44. package/dist/autosync.d.ts +56 -0
  45. package/dist/autosync.js +442 -0
  46. package/dist/batch-artifacts.d.ts +81 -0
  47. package/dist/batch-artifacts.js +412 -0
  48. package/dist/batch-limits.d.ts +37 -0
  49. package/dist/batch-limits.js +80 -0
  50. package/dist/branding.d.ts +41 -0
  51. package/dist/branding.js +229 -0
  52. package/dist/bundle-upload.d.ts +26 -0
  53. package/dist/bundle-upload.js +99 -0
  54. package/dist/capture-auth.d.ts +95 -0
  55. package/dist/capture-auth.js +204 -0
  56. package/dist/capture.d.ts +48 -0
  57. package/dist/capture.js +20 -1
  58. package/dist/cli.js +839 -32
  59. package/dist/content-links.d.ts +10 -0
  60. package/dist/content-links.js +49 -0
  61. package/dist/contract-validation.d.ts +4 -0
  62. package/dist/contract-validation.js +25 -0
  63. package/dist/coverage-actions.d.ts +8 -0
  64. package/dist/coverage-actions.js +71 -0
  65. package/dist/coverage-resolutions.d.ts +16 -0
  66. package/dist/coverage-resolutions.js +58 -0
  67. package/dist/db.d.ts +37 -0
  68. package/dist/db.js +288 -0
  69. package/dist/demo.d.ts +12 -0
  70. package/dist/demo.js +122 -0
  71. package/dist/deploy-credentials.d.ts +7 -0
  72. package/dist/deploy-credentials.js +76 -0
  73. package/dist/deploy-targets/github-pages.d.ts +3 -0
  74. package/dist/deploy-targets/github-pages.js +100 -0
  75. package/dist/deploy-targets/index.d.ts +8 -0
  76. package/dist/deploy-targets/index.js +78 -0
  77. package/dist/deploy-targets/netlify.d.ts +3 -0
  78. package/dist/deploy-targets/netlify.js +49 -0
  79. package/dist/deploy-targets/types.d.ts +32 -0
  80. package/dist/deploy-targets/types.js +2 -0
  81. package/dist/deploy-targets/vercel.d.ts +3 -0
  82. package/dist/deploy-targets/vercel.js +95 -0
  83. package/dist/deploy.d.ts +9 -0
  84. package/dist/deploy.js +87 -13
  85. package/dist/deterministic-capture.d.ts +90 -0
  86. package/dist/deterministic-capture.js +435 -0
  87. package/dist/direct-edit.d.ts +40 -0
  88. package/dist/direct-edit.js +159 -0
  89. package/dist/docs-crawl.d.ts +86 -0
  90. package/dist/docs-crawl.js +536 -0
  91. package/dist/docs-site.d.ts +49 -0
  92. package/dist/docs-site.js +233 -0
  93. package/dist/doctor.js +8 -0
  94. package/dist/documentation-collections.d.ts +23 -0
  95. package/dist/documentation-collections.js +191 -0
  96. package/dist/documentation-plan.d.ts +253 -0
  97. package/dist/documentation-plan.js +2563 -0
  98. package/dist/doxbrix-build.d.ts +19 -0
  99. package/dist/doxbrix-build.js +167 -0
  100. package/dist/doxbrix-markdown.d.ts +9 -0
  101. package/dist/doxbrix-markdown.js +115 -14
  102. package/dist/drift.d.ts +10 -0
  103. package/dist/drift.js +164 -0
  104. package/dist/evaluation.d.ts +46 -0
  105. package/dist/evaluation.js +113 -0
  106. package/dist/evidence-pack.d.ts +47 -0
  107. package/dist/evidence-pack.js +358 -0
  108. package/dist/evidence.d.ts +25 -0
  109. package/dist/evidence.js +175 -0
  110. package/dist/fs.d.ts +8 -2
  111. package/dist/fs.js +41 -11
  112. package/dist/generator-api.d.ts +89 -0
  113. package/dist/generator-preflight.d.ts +27 -0
  114. package/dist/generator-preflight.js +105 -0
  115. package/dist/generator-runtime.d.ts +7 -0
  116. package/dist/generator-runtime.js +17 -1
  117. package/dist/generators.d.ts +24 -2
  118. package/dist/generators.js +54 -1
  119. package/dist/git-delivery.d.ts +17 -0
  120. package/dist/git-delivery.js +123 -0
  121. package/dist/globs.d.ts +16 -0
  122. package/dist/globs.js +65 -0
  123. package/dist/glossary.d.ts +26 -0
  124. package/dist/glossary.js +179 -0
  125. package/dist/history.d.ts +106 -0
  126. package/dist/history.js +600 -0
  127. package/dist/html-markdown.d.ts +46 -0
  128. package/dist/html-markdown.js +423 -0
  129. package/dist/interactive.js +3 -0
  130. package/dist/job-events.d.ts +74 -0
  131. package/dist/job-events.js +377 -0
  132. package/dist/keep-awake.d.ts +50 -0
  133. package/dist/keep-awake.js +123 -0
  134. package/dist/local-source-snapshot.d.ts +20 -0
  135. package/dist/local-source-snapshot.js +61 -0
  136. package/dist/mintlify-detect.d.ts +3 -0
  137. package/dist/mintlify-detect.js +18 -0
  138. package/dist/mintlify-import.d.ts +75 -0
  139. package/dist/mintlify-import.js +190 -0
  140. package/dist/navigation.d.ts +98 -0
  141. package/dist/navigation.js +310 -0
  142. package/dist/openapi.d.ts +60 -0
  143. package/dist/openapi.js +439 -0
  144. package/dist/page-editor-bridge.d.ts +3 -0
  145. package/dist/page-editor-bridge.js +109 -0
  146. package/dist/page-editor-preview.d.ts +10 -0
  147. package/dist/page-editor-preview.js +55 -0
  148. package/dist/page-extension.d.ts +9 -0
  149. package/dist/page-extension.js +15 -0
  150. package/dist/page-metadata.d.ts +28 -0
  151. package/dist/page-metadata.js +166 -0
  152. package/dist/page-operations.d.ts +34 -0
  153. package/dist/page-operations.js +215 -0
  154. package/dist/page-routes.d.ts +4 -0
  155. package/dist/page-routes.js +61 -0
  156. package/dist/pages.d.ts +20 -0
  157. package/dist/pages.js +184 -0
  158. package/dist/plan-generator.d.ts +3 -0
  159. package/dist/plan-generator.js +21 -0
  160. package/dist/plan-navigation.d.ts +11 -0
  161. package/dist/plan-navigation.js +30 -0
  162. package/dist/planning-captures.d.ts +20 -0
  163. package/dist/planning-captures.js +143 -0
  164. package/dist/planning-research.d.ts +135 -0
  165. package/dist/planning-research.js +472 -0
  166. package/dist/planning-triage.d.ts +23 -0
  167. package/dist/planning-triage.js +131 -0
  168. package/dist/preview.d.ts +24 -0
  169. package/dist/preview.js +280 -29
  170. package/dist/project-detect.d.ts +36 -0
  171. package/dist/project-detect.js +251 -0
  172. package/dist/project-import.d.ts +54 -0
  173. package/dist/project-import.js +157 -0
  174. package/dist/project-lock.d.ts +6 -0
  175. package/dist/project-lock.js +96 -0
  176. package/dist/project-registry.d.ts +25 -0
  177. package/dist/project-registry.js +79 -0
  178. package/dist/project.d.ts +35 -3
  179. package/dist/project.js +388 -38
  180. package/dist/prompts.d.ts +9 -0
  181. package/dist/prompts.js +25 -0
  182. package/dist/proposal-replay.d.ts +32 -0
  183. package/dist/proposal-replay.js +99 -0
  184. package/dist/quality-claims.d.ts +8 -0
  185. package/dist/quality-claims.js +168 -0
  186. package/dist/quality-config.d.ts +5 -0
  187. package/dist/quality-config.js +84 -0
  188. package/dist/quality-contract.d.ts +37 -0
  189. package/dist/quality-contract.js +46 -0
  190. package/dist/quality-examples.d.ts +4 -0
  191. package/dist/quality-examples.js +233 -0
  192. package/dist/quality-gates.d.ts +16 -0
  193. package/dist/quality-gates.js +192 -0
  194. package/dist/quality-links.d.ts +7 -0
  195. package/dist/quality-links.js +149 -0
  196. package/dist/quality-lint.d.ts +6 -0
  197. package/dist/quality-lint.js +124 -0
  198. package/dist/quality-rendered.d.ts +11 -0
  199. package/dist/quality-rendered.js +222 -0
  200. package/dist/quality-schema.d.ts +3 -0
  201. package/dist/quality-schema.js +71 -0
  202. package/dist/release-notes.d.ts +44 -0
  203. package/dist/release-notes.js +183 -0
  204. package/dist/remote-monitor.d.ts +16 -0
  205. package/dist/remote-monitor.js +74 -0
  206. package/dist/remote-source.d.ts +34 -0
  207. package/dist/remote-source.js +426 -0
  208. package/dist/review-diff.d.ts +82 -0
  209. package/dist/review-diff.js +400 -0
  210. package/dist/review-learning.d.ts +11 -0
  211. package/dist/review-learning.js +60 -0
  212. package/dist/review-render.d.ts +38 -0
  213. package/dist/review-render.js +224 -0
  214. package/dist/review-report.d.ts +9 -0
  215. package/dist/review-report.js +89 -0
  216. package/dist/review-ui.d.ts +14 -0
  217. package/dist/review-ui.js +1248 -0
  218. package/dist/schedule.d.ts +78 -0
  219. package/dist/schedule.js +480 -0
  220. package/dist/screen-capture-provider.d.ts +52 -0
  221. package/dist/screen-capture-provider.js +218 -0
  222. package/dist/screenshot-workflow.d.ts +167 -0
  223. package/dist/screenshot-workflow.js +1237 -0
  224. package/dist/settings.d.ts +1 -1
  225. package/dist/settings.js +95 -7
  226. package/dist/site-export.d.ts +18 -0
  227. package/dist/site-export.js +87 -0
  228. package/dist/source-connectors.d.ts +33 -0
  229. package/dist/source-connectors.js +268 -0
  230. package/dist/source-discovery.d.ts +132 -0
  231. package/dist/source-discovery.js +823 -0
  232. package/dist/source-intelligence.d.ts +9 -0
  233. package/dist/source-intelligence.js +306 -0
  234. package/dist/sync-review.d.ts +28 -0
  235. package/dist/sync-review.js +264 -0
  236. package/dist/sync-runs.d.ts +192 -0
  237. package/dist/sync-runs.js +2244 -0
  238. package/dist/sync.d.ts +35 -0
  239. package/dist/sync.js +298 -32
  240. package/dist/text-diff.d.ts +9 -0
  241. package/dist/text-diff.js +59 -0
  242. package/dist/types.d.ts +946 -1
  243. package/dist/ui/assets/doxloop-logo-light-De7Nx7j7.png +0 -0
  244. package/dist/ui/assets/index-BHBYU2aG.css +1 -0
  245. package/dist/ui/assets/index-Cq3RPQiC.js +33 -0
  246. package/dist/ui/index.html +18 -0
  247. package/dist/ui-server.d.ts +83 -0
  248. package/dist/ui-server.js +3532 -0
  249. package/dist/usage-budget.d.ts +28 -0
  250. package/dist/usage-budget.js +90 -0
  251. package/dist/validation.d.ts +25 -1
  252. package/dist/validation.js +312 -26
  253. package/dist/workspace-tools.d.ts +54 -0
  254. package/dist/workspace-tools.js +123 -0
  255. package/docs/agent-compatibility.md +49 -32
  256. package/docs/ci-and-automation.md +105 -66
  257. package/docs/doxbrix-http-api.md +8 -1
  258. package/docs/existing-documentation.md +80 -0
  259. package/docs/generation-performance.md +108 -0
  260. package/docs/generator-authoring.md +68 -5
  261. package/docs/generator-selection.md +50 -13
  262. package/docs/mintlify-import.md +71 -0
  263. package/docs/openapi-security.md +25 -0
  264. package/docs/project-format.md +331 -36
  265. package/docs/release-quality.md +158 -0
  266. package/docs/releasing.md +72 -0
  267. package/docs/review-workflows.md +51 -0
  268. package/docs/security-model.md +102 -39
  269. package/docs/troubleshooting.md +226 -93
  270. package/package.json +46 -15
  271. package/scripts/test-auto-screenshot.mjs +172 -0
  272. package/skills/doxloop-authoring/SKILL.md +242 -361
  273. package/skills/doxloop-authoring/references/existing-documentation.md +94 -0
  274. package/skills/doxloop-authoring/references/navigation-architecture.md +18 -7
  275. package/skills/doxloop-authoring/references/page-depth.md +169 -0
  276. package/skills/doxloop-authoring/references/project-format.md +106 -7
  277. package/skills/doxloop-authoring/references/quality.md +10 -0
  278. package/skills/doxloop-authoring/references/screenshot-manifest.md +113 -0
  279. package/skills/doxloop-authoring/references/screenshots.md +149 -235
  280. package/skills/doxloop-authoring/references/workflows.md +76 -0
  281. package/skills/doxloop-doxbrix/SKILL.md +38 -22
  282. package/skills/doxloop-doxbrix/references/api-endpoints.md +15 -14
  283. package/skills/doxloop-doxbrix/references/components.md +30 -3
  284. package/skills/doxloop-doxbrix/references/manifest.md +3 -2
  285. package/vendor/doxbrix-import/LICENSE +202 -0
  286. package/vendor/doxbrix-import/README.md +17 -0
  287. package/vendor/doxbrix-import/UPSTREAM.json +47 -0
  288. package/vendor/doxbrix-import/dist/docs/frontmatter.d.ts +13 -0
  289. package/vendor/doxbrix-import/dist/docs/frontmatter.js +83 -0
  290. package/vendor/doxbrix-import/dist/docs/import.d.ts +21 -0
  291. package/vendor/doxbrix-import/dist/docs/import.js +147 -0
  292. package/vendor/doxbrix-import/dist/docs/manifest.d.ts +163 -0
  293. package/vendor/doxbrix-import/dist/docs/manifest.js +64 -0
  294. package/vendor/doxbrix-import/dist/docs/project.d.ts +25 -0
  295. package/vendor/doxbrix-import/dist/docs/project.js +77 -0
  296. package/vendor/doxbrix-import/dist/docs/starter.d.ts +4 -0
  297. package/vendor/doxbrix-import/dist/docs/starter.js +11 -0
  298. package/vendor/doxbrix-import/dist/importer.d.ts +227 -0
  299. package/vendor/doxbrix-import/dist/importer.js +1567 -0
  300. package/vendor/doxbrix-import/dist/mintlify-openapi.d.ts +37 -0
  301. package/vendor/doxbrix-import/dist/mintlify-openapi.js +305 -0
  302. package/vendor/doxbrix-import/dist/safe-path.d.ts +9 -0
  303. package/vendor/doxbrix-import/dist/safe-path.js +47 -0
  304. package/dist/agents.d.ts.map +0 -1
  305. package/dist/agents.js.map +0 -1
  306. package/dist/args.d.ts.map +0 -1
  307. package/dist/args.js.map +0 -1
  308. package/dist/artifact-deploy.d.ts.map +0 -1
  309. package/dist/artifact-deploy.js.map +0 -1
  310. package/dist/auth.d.ts.map +0 -1
  311. package/dist/auth.js.map +0 -1
  312. package/dist/author.d.ts.map +0 -1
  313. package/dist/author.js.map +0 -1
  314. package/dist/capture.d.ts.map +0 -1
  315. package/dist/capture.js.map +0 -1
  316. package/dist/cli.d.ts.map +0 -1
  317. package/dist/cli.js.map +0 -1
  318. package/dist/deploy.d.ts.map +0 -1
  319. package/dist/deploy.js.map +0 -1
  320. package/dist/deployment-visibility.d.ts.map +0 -1
  321. package/dist/deployment-visibility.js.map +0 -1
  322. package/dist/doctor.d.ts.map +0 -1
  323. package/dist/doctor.js.map +0 -1
  324. package/dist/doxbrix-markdown.d.ts.map +0 -1
  325. package/dist/doxbrix-markdown.js.map +0 -1
  326. package/dist/errors.d.ts.map +0 -1
  327. package/dist/errors.js.map +0 -1
  328. package/dist/fs.d.ts.map +0 -1
  329. package/dist/fs.js.map +0 -1
  330. package/dist/generator-api.d.ts.map +0 -1
  331. package/dist/generator-api.js.map +0 -1
  332. package/dist/generator-manager.d.ts.map +0 -1
  333. package/dist/generator-manager.js.map +0 -1
  334. package/dist/generator-runtime.d.ts.map +0 -1
  335. package/dist/generator-runtime.js.map +0 -1
  336. package/dist/generators.d.ts.map +0 -1
  337. package/dist/generators.js.map +0 -1
  338. package/dist/interactive.d.ts.map +0 -1
  339. package/dist/interactive.js.map +0 -1
  340. package/dist/preview.d.ts.map +0 -1
  341. package/dist/preview.js.map +0 -1
  342. package/dist/progress.d.ts.map +0 -1
  343. package/dist/progress.js.map +0 -1
  344. package/dist/project.d.ts.map +0 -1
  345. package/dist/project.js.map +0 -1
  346. package/dist/prompts.d.ts.map +0 -1
  347. package/dist/prompts.js.map +0 -1
  348. package/dist/settings.d.ts.map +0 -1
  349. package/dist/settings.js.map +0 -1
  350. package/dist/sync.d.ts.map +0 -1
  351. package/dist/sync.js.map +0 -1
  352. package/dist/types.d.ts.map +0 -1
  353. package/dist/types.js.map +0 -1
  354. package/dist/validation.d.ts.map +0 -1
  355. package/dist/validation.js.map +0 -1
  356. package/dist/version.d.ts.map +0 -1
  357. package/dist/version.js.map +0 -1
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Local mirror of the Doxbrix `docs.json` manifest model. Kept in sync with the
3
+ * server's `git-sync/manifest.ts` shape (the CLI can't import server-only code).
4
+ * The manifest is authoritative for navigation; pages live in files referenced
5
+ * by `file` (without extension).
6
+ */
7
+ export type ManifestNavNode = {
8
+ type: 'page';
9
+ file: string;
10
+ title?: string;
11
+ icon?: string;
12
+ hidden?: boolean;
13
+ } | {
14
+ type: 'group';
15
+ label: string;
16
+ icon?: string;
17
+ hidden?: boolean;
18
+ items: ManifestNavNode[];
19
+ } | {
20
+ type: 'label';
21
+ text: string;
22
+ } | {
23
+ type: 'divider';
24
+ } | {
25
+ type: 'link';
26
+ title: string;
27
+ href: string;
28
+ icon?: string;
29
+ } | {
30
+ type: 'api';
31
+ title: string;
32
+ spec: string;
33
+ icon?: string;
34
+ };
35
+ export interface ManifestSpace {
36
+ name: string;
37
+ slug?: string;
38
+ locale?: string;
39
+ parent?: string;
40
+ icon?: string;
41
+ tag?: string;
42
+ /** Doc-version slug from the manifest `versions` catalog; absent = default. */
43
+ version?: string;
44
+ nav: ManifestNavNode[];
45
+ }
46
+ /** Product-docs version entry. First entry is the default unless one sets
47
+ * `default: true` (the Mintlify rule). `tag` renders as a badge. The SDK
48
+ * importer emits `isDefault`; hand-authored docs.json may use `default`. */
49
+ export interface ManifestDocVersion {
50
+ version: string;
51
+ label?: string;
52
+ tag?: string;
53
+ default?: boolean;
54
+ isDefault?: boolean;
55
+ }
56
+ export interface DocsManifest {
57
+ version: number;
58
+ name?: string;
59
+ description?: string;
60
+ openapiSources?: string[];
61
+ apiBaseUrl?: string;
62
+ /** Product-docs versions in switcher order; absent = unversioned project. */
63
+ versions?: ManifestDocVersion[];
64
+ spaces: ManifestSpace[];
65
+ /** Portable brand/layout settings produced by local migrations. */
66
+ theme?: {
67
+ source?: string;
68
+ preset?: string;
69
+ primaryColor?: string;
70
+ lightColor?: string;
71
+ darkColor?: string;
72
+ mode?: 'light' | 'dark' | 'system';
73
+ strictMode?: boolean;
74
+ font?: string;
75
+ headingFont?: string;
76
+ codeFont?: string;
77
+ typography?: {
78
+ titleWeight?: number;
79
+ titleSize?: number;
80
+ titleSizeMobile?: number;
81
+ titleLineHeight?: number;
82
+ titleLineHeightMobile?: number;
83
+ descriptionSize?: number;
84
+ descriptionLineHeight?: number;
85
+ bodyWeight?: number;
86
+ bodySize?: number;
87
+ bodyLineHeight?: number;
88
+ fontFeatures?: string[];
89
+ fontVariationSettings?: 'normal';
90
+ fontSmoothing?: 'auto' | 'antialiased';
91
+ headingWeight?: number;
92
+ h2Size?: number;
93
+ h2LineHeight?: number;
94
+ h2MarginTop?: number;
95
+ h2MarginBottom?: number;
96
+ h3Size?: number;
97
+ h3LineHeight?: number;
98
+ h3MarginTop?: number;
99
+ h3MarginBottom?: number;
100
+ h4Size?: number;
101
+ h4LineHeight?: number;
102
+ h4MarginTop?: number;
103
+ h4MarginBottom?: number;
104
+ strongWeight?: number;
105
+ apiFieldWeight?: number;
106
+ };
107
+ textColors?: {
108
+ light?: {
109
+ heading?: string;
110
+ body?: string;
111
+ muted?: string;
112
+ };
113
+ dark?: {
114
+ heading?: string;
115
+ body?: string;
116
+ muted?: string;
117
+ };
118
+ };
119
+ fontSources?: Array<{
120
+ family: string;
121
+ source: string;
122
+ format?: string;
123
+ weight?: number;
124
+ role: 'body' | 'heading' | 'code';
125
+ }>;
126
+ logoLight?: string;
127
+ logoDark?: string;
128
+ logoHref?: string;
129
+ favicon?: string;
130
+ faviconLight?: string;
131
+ faviconDark?: string;
132
+ backgroundColorLight?: string;
133
+ backgroundColorDark?: string;
134
+ backgroundImage?: string;
135
+ backgroundDecoration?: string;
136
+ codeTheme?: string;
137
+ codeThemeLight?: string;
138
+ codeThemeDark?: string;
139
+ eyebrow?: string;
140
+ layout?: {
141
+ headerHeight: number;
142
+ sidebarWidth: number;
143
+ tocWidth: number;
144
+ contentMaxWidth: number;
145
+ contentPadding: number;
146
+ navPadding: number;
147
+ tabsHeight?: number;
148
+ shellMaxWidth?: number;
149
+ };
150
+ };
151
+ site?: Record<string, unknown>;
152
+ }
153
+ export declare const PAGE_EXTENSIONS: string[];
154
+ export declare function isPageFile(path: string): boolean;
155
+ export declare function stripPageExtension(path: string): string;
156
+ export declare function withPageExtension(file: string, ext?: string): string;
157
+ /** Parse + lightly validate a `docs.json` string. Throws on malformed JSON. */
158
+ export declare function parseManifest(jsonText: string): DocsManifest;
159
+ export declare function stringifyManifest(manifest: DocsManifest): string;
160
+ /** Every page `file` referenced in the manifest (without extension). */
161
+ export declare function manifestPageFiles(manifest: DocsManifest): string[];
162
+ /** Walk every nav node (for validation), depth-first. */
163
+ export declare function walkNav(manifest: DocsManifest, visit: (node: ManifestNavNode, spaceIndex: number) => void): void;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Local mirror of the Doxbrix `docs.json` manifest model. Kept in sync with the
3
+ * server's `git-sync/manifest.ts` shape (the CLI can't import server-only code).
4
+ * The manifest is authoritative for navigation; pages live in files referenced
5
+ * by `file` (without extension).
6
+ */
7
+ export const PAGE_EXTENSIONS = ['.mdx', '.md', '.markdown'];
8
+ export function isPageFile(path) {
9
+ const lower = path.toLowerCase();
10
+ return PAGE_EXTENSIONS.some((ext) => lower.endsWith(ext));
11
+ }
12
+ export function stripPageExtension(path) {
13
+ for (const ext of PAGE_EXTENSIONS) {
14
+ if (path.toLowerCase().endsWith(ext))
15
+ return path.slice(0, -ext.length);
16
+ }
17
+ return path;
18
+ }
19
+ export function withPageExtension(file, ext = '.mdx') {
20
+ return isPageFile(file) ? file : `${file}${ext}`;
21
+ }
22
+ /** Parse + lightly validate a `docs.json` string. Throws on malformed JSON. */
23
+ export function parseManifest(jsonText) {
24
+ const raw = JSON.parse(jsonText);
25
+ if (!raw || typeof raw !== 'object')
26
+ throw new Error('docs.json must be a JSON object');
27
+ const spaces = Array.isArray(raw.spaces) ? raw.spaces : [];
28
+ return {
29
+ ...raw,
30
+ version: typeof raw.version === 'number' ? raw.version : 1,
31
+ spaces: spaces,
32
+ };
33
+ }
34
+ export function stringifyManifest(manifest) {
35
+ return `${JSON.stringify(manifest, null, 2)}\n`;
36
+ }
37
+ /** Every page `file` referenced in the manifest (without extension). */
38
+ export function manifestPageFiles(manifest) {
39
+ const out = [];
40
+ const walk = (nodes) => {
41
+ for (const node of nodes) {
42
+ if (node.type === 'page')
43
+ out.push(node.file);
44
+ else if (node.type === 'group')
45
+ walk(node.items);
46
+ }
47
+ };
48
+ for (const space of manifest.spaces)
49
+ walk(space.nav);
50
+ return out;
51
+ }
52
+ /** Walk every nav node (for validation), depth-first. */
53
+ export function walkNav(manifest, visit) {
54
+ manifest.spaces.forEach((space, i) => {
55
+ const walk = (nodes) => {
56
+ for (const node of nodes) {
57
+ visit(node, i);
58
+ if (node.type === 'group')
59
+ walk(node.items);
60
+ }
61
+ };
62
+ walk(space.nav);
63
+ });
64
+ }
@@ -0,0 +1,25 @@
1
+ import { type DocsManifest } from './manifest.js';
2
+ export interface LocalPageFile {
3
+ /** Path relative to the docs dir, POSIX-separated, with extension. */
4
+ relPath: string;
5
+ absPath: string;
6
+ frontmatter: Record<string, unknown>;
7
+ body: string;
8
+ raw: string;
9
+ }
10
+ export interface LocalDocsProject {
11
+ /** Project root (folder containing `.doxbrix`). */
12
+ root: string;
13
+ /** Docs directory: `root/basePath`. */
14
+ docsDir: string;
15
+ basePath: string;
16
+ manifestPath: string | null;
17
+ manifest: DocsManifest;
18
+ pages: LocalPageFile[];
19
+ /** Media file paths relative to docsDir (POSIX). */
20
+ media: string[];
21
+ }
22
+ /** List all files under `dir` recursively, returned as POSIX paths relative to `dir`. */
23
+ export declare function listFilesRecursive(dir: string): string[];
24
+ /** Load and parse a local docs project rooted at `root` with `basePath`. */
25
+ export declare function loadLocalProject(root: string, basePath: string): LocalDocsProject;
@@ -0,0 +1,77 @@
1
+ import { readFileSync, readdirSync, existsSync, lstatSync } from 'node:fs';
2
+ import { join, relative, sep, posix } from 'node:path';
3
+ import { parseManifest, isPageFile } from './manifest.js';
4
+ import { parseFrontmatter } from './frontmatter.js';
5
+ const MEDIA_DIRS = ['images', 'assets', 'media', 'img', 'static'];
6
+ const ASSET_RE = /\.(png|jpe?g|gif|svg|webp|avif|ico|bmp|woff2?|ttf|otf|eot|mp4|webm|mov|mp3|wav|ogg|pdf)$/i;
7
+ const IGNORED_DIRS = new Set(['.doxbrix', '.agents', '.claude', '.gemini', 'node_modules']);
8
+ /** List all files under `dir` recursively, returned as POSIX paths relative to `dir`. */
9
+ export function listFilesRecursive(dir) {
10
+ const out = [];
11
+ const walk = (current) => {
12
+ let entries;
13
+ try {
14
+ entries = readdirSync(current);
15
+ }
16
+ catch {
17
+ return;
18
+ }
19
+ for (const name of entries) {
20
+ if (IGNORED_DIRS.has(name) || name.startsWith('.git'))
21
+ continue;
22
+ const abs = join(current, name);
23
+ let stat;
24
+ try {
25
+ stat = lstatSync(abs);
26
+ }
27
+ catch {
28
+ continue;
29
+ }
30
+ if (stat.isSymbolicLink())
31
+ continue;
32
+ if (stat.isDirectory())
33
+ walk(abs);
34
+ else
35
+ out.push(toPosix(relative(dir, abs)));
36
+ }
37
+ };
38
+ walk(dir);
39
+ return out;
40
+ }
41
+ function toPosix(p) {
42
+ return p.split(sep).join(posix.sep);
43
+ }
44
+ /** Load and parse a local docs project rooted at `root` with `basePath`. */
45
+ export function loadLocalProject(root, basePath) {
46
+ const docsDir = basePath ? join(root, basePath) : root;
47
+ if (!existsSync(docsDir)) {
48
+ throw new Error(`Docs directory not found: ${docsDir}`);
49
+ }
50
+ const manifestPath = join(docsDir, 'docs.json');
51
+ let manifest;
52
+ let resolvedManifestPath = null;
53
+ if (existsSync(manifestPath)) {
54
+ manifest = parseManifest(readFileSync(manifestPath, 'utf8'));
55
+ resolvedManifestPath = manifestPath;
56
+ }
57
+ else {
58
+ manifest = { version: 1, spaces: [] };
59
+ }
60
+ const allFiles = listFilesRecursive(docsDir);
61
+ const pages = [];
62
+ const media = [];
63
+ for (const rel of allFiles) {
64
+ if (rel === 'docs.json')
65
+ continue;
66
+ if (isPageFile(rel)) {
67
+ const abs = join(docsDir, rel);
68
+ const raw = readFileSync(abs, 'utf8');
69
+ const { data, body } = parseFrontmatter(raw);
70
+ pages.push({ relPath: rel, absPath: abs, frontmatter: data, body, raw });
71
+ }
72
+ else if (ASSET_RE.test(rel) || MEDIA_DIRS.some((d) => rel.startsWith(`${d}/`))) {
73
+ media.push(rel);
74
+ }
75
+ }
76
+ return { root, docsDir, basePath, manifestPath: resolvedManifestPath, manifest, pages, media };
77
+ }
@@ -0,0 +1,4 @@
1
+ /** Invisible marker added to page scaffolds until researched content replaces them. */
2
+ export declare const STARTER_PAGE_MARKER = "<!-- doxbrix:starter-page -->";
3
+ /** Detect current marked scaffolds and legacy starter text created by older CLI builds. */
4
+ export declare function hasStarterPageContent(body: string): boolean;
@@ -0,0 +1,11 @@
1
+ /** Invisible marker added to page scaffolds until researched content replaces them. */
2
+ export const STARTER_PAGE_MARKER = '<!-- doxbrix:starter-page -->';
3
+ /** Detect current marked scaffolds and legacy starter text created by older CLI builds. */
4
+ export function hasStarterPageContent(body) {
5
+ const normalized = body.replace(/\r\n/g, '\n').trim();
6
+ if (normalized.includes(STARTER_PAGE_MARKER))
7
+ return true;
8
+ return (/^#\s+Introduction\s*\n+\s*Welcome to (?:\*\*)?.+?(?:\*\*)?\.\s*$/i.test(normalized) ||
9
+ /^#\s+Quickstart\s*\n+\s*Get started in a few minutes\.\s*$/i.test(normalized) ||
10
+ /^#\s+.+?\s*\n+\s*Start writing here\.\s*$/i.test(normalized));
11
+ }
@@ -0,0 +1,227 @@
1
+ export type ImportDialect = 'native' | 'mintlify' | 'gitbook' | 'generic';
2
+ export type ImportNavNode = {
3
+ type: 'page';
4
+ file: string;
5
+ title?: string;
6
+ icon?: string;
7
+ hidden?: boolean;
8
+ } | {
9
+ type: 'group';
10
+ label: string;
11
+ icon?: string;
12
+ hidden?: boolean;
13
+ items: ImportNavNode[];
14
+ } | {
15
+ type: 'label';
16
+ text: string;
17
+ } | {
18
+ type: 'divider';
19
+ } | {
20
+ type: 'link';
21
+ title: string;
22
+ href: string;
23
+ icon?: string;
24
+ } | {
25
+ type: 'api';
26
+ title: string;
27
+ spec: string;
28
+ icon?: string;
29
+ };
30
+ export interface ImportSpace {
31
+ name: string;
32
+ slug?: string;
33
+ locale?: string;
34
+ parent?: string;
35
+ icon?: string;
36
+ tag?: string;
37
+ /** ImportVersion.version this space belongs to; absent = default/unversioned. */
38
+ version?: string;
39
+ nav: ImportNavNode[];
40
+ }
41
+ /** A product-docs version from the source config (Mintlify navigation.versions,
42
+ * GitBook variants). The first entry is the default unless another entry sets
43
+ * `default: true` — Mintlify's rule, adopted verbatim. */
44
+ export interface ImportVersion {
45
+ version: string;
46
+ label: string;
47
+ tag?: string;
48
+ isDefault?: boolean;
49
+ }
50
+ export interface ImportedTheme {
51
+ /** Doxbrix-owned theme generated by a source-format conversion. The legacy
52
+ * provider-specific value remains readable in consumers for old projects. */
53
+ source: 'doxbrix-import';
54
+ preset?: string;
55
+ primaryColor?: string;
56
+ lightColor?: string;
57
+ darkColor?: string;
58
+ mode?: 'system' | 'light' | 'dark';
59
+ strictMode?: boolean;
60
+ font?: string;
61
+ headingFont?: string;
62
+ codeFont?: string;
63
+ typography?: {
64
+ titleWeight?: number;
65
+ titleSize?: number;
66
+ titleSizeMobile?: number;
67
+ titleLineHeight?: number;
68
+ titleLineHeightMobile?: number;
69
+ descriptionSize?: number;
70
+ descriptionLineHeight?: number;
71
+ bodyWeight?: number;
72
+ bodySize?: number;
73
+ bodyLineHeight?: number;
74
+ fontFeatures?: string[];
75
+ fontVariationSettings?: 'normal';
76
+ fontSmoothing?: 'auto' | 'antialiased';
77
+ headingWeight?: number;
78
+ h2Size?: number;
79
+ h2LineHeight?: number;
80
+ h2MarginTop?: number;
81
+ h2MarginBottom?: number;
82
+ h3Size?: number;
83
+ h3LineHeight?: number;
84
+ h3MarginTop?: number;
85
+ h3MarginBottom?: number;
86
+ h4Size?: number;
87
+ h4LineHeight?: number;
88
+ h4MarginTop?: number;
89
+ h4MarginBottom?: number;
90
+ strongWeight?: number;
91
+ apiFieldWeight?: number;
92
+ };
93
+ textColors?: {
94
+ light?: {
95
+ heading?: string;
96
+ body?: string;
97
+ muted?: string;
98
+ };
99
+ dark?: {
100
+ heading?: string;
101
+ body?: string;
102
+ muted?: string;
103
+ };
104
+ };
105
+ fontSources?: Array<{
106
+ family: string;
107
+ source: string;
108
+ format?: string;
109
+ weight?: number;
110
+ role: 'body' | 'heading' | 'code';
111
+ }>;
112
+ logoLight?: string;
113
+ logoDark?: string;
114
+ logoHref?: string;
115
+ favicon?: string;
116
+ faviconLight?: string;
117
+ faviconDark?: string;
118
+ backgroundColorLight?: string;
119
+ backgroundColorDark?: string;
120
+ backgroundImage?: string;
121
+ backgroundDecoration?: string;
122
+ codeTheme?: string;
123
+ codeThemeLight?: string;
124
+ codeThemeDark?: string;
125
+ eyebrow?: string;
126
+ layout?: {
127
+ headerHeight: number;
128
+ sidebarWidth: number;
129
+ tocWidth: number;
130
+ contentMaxWidth: number;
131
+ contentPadding: number;
132
+ navPadding: number;
133
+ tabsHeight?: number;
134
+ shellMaxWidth?: number;
135
+ };
136
+ }
137
+ export interface ImportedSiteChrome {
138
+ navbar?: {
139
+ links: Array<{
140
+ label: string;
141
+ href: string;
142
+ icon?: string;
143
+ }>;
144
+ primary?: {
145
+ label: string;
146
+ href: string;
147
+ type?: string;
148
+ };
149
+ };
150
+ footer?: {
151
+ groups: Array<{
152
+ title: string;
153
+ links: Array<{
154
+ label: string;
155
+ url: string;
156
+ }>;
157
+ }>;
158
+ socials: Array<{
159
+ platform: string;
160
+ label: string;
161
+ url: string;
162
+ }>;
163
+ };
164
+ banner?: {
165
+ content: string;
166
+ dismissible: boolean;
167
+ type: 'info' | 'warning' | 'critical';
168
+ colorLight?: string;
169
+ colorDark?: string;
170
+ };
171
+ }
172
+ export interface ImportedManifest {
173
+ version: number;
174
+ name?: string;
175
+ description?: string;
176
+ /** OpenAPI documents configured by the source site, in preference order. */
177
+ openapiSources?: string[];
178
+ /** Fallback server for page-level API operations when a spec omits servers. */
179
+ apiBaseUrl?: string;
180
+ spaces: ImportSpace[];
181
+ /** Product-docs versions in source order; absent when the source is unversioned. */
182
+ versions?: ImportVersion[];
183
+ theme?: ImportedTheme;
184
+ site?: ImportedSiteChrome;
185
+ }
186
+ export interface LocalImportFile {
187
+ path: string;
188
+ content: string;
189
+ }
190
+ export interface LocalConvertResult {
191
+ dialect: ImportDialect;
192
+ manifest: ImportedManifest;
193
+ pages: Array<{
194
+ path: string;
195
+ markdown: string;
196
+ }>;
197
+ redirects: Array<{
198
+ from: string;
199
+ to: string;
200
+ }>;
201
+ unmapped: string[];
202
+ }
203
+ /**
204
+ * Decode an SVG icon produced by the importer for safe inline rendering.
205
+ *
206
+ * SVGs that use `currentColor` must remain in the document tree to inherit the
207
+ * card or navigation color. Rendering the same data URL through `<img>` creates
208
+ * an isolated document and silently turns those icons black. Only the encoded
209
+ * SVG form emitted by this importer is accepted, and it is sanitized again at
210
+ * the rendering boundary before callers use it as markup.
211
+ */
212
+ export declare function decodeImportedSvgIconDataUrl(value: string): string | null;
213
+ /** Normalize current Mintlify components into Doxbrix's supported MDX vocabulary. */
214
+ export declare function transformMintlifyMdx(input: string): string;
215
+ export declare function convertSourceTree(inputFiles: LocalImportFile[]): LocalConvertResult;
216
+ /** Materialize navigation-level OpenAPI markers into generated endpoint pages.
217
+ * Local documents are read from the source tree; callers may provide a guarded
218
+ * loader for public URL sources. Unavailable specs remain as API markers and
219
+ * are reported without dropping their navigation entry. */
220
+ export declare function materializeMintlifyOpenApiNavigation(params: {
221
+ result: LocalConvertResult;
222
+ files: LocalImportFile[];
223
+ loadRemote?: (url: string) => Promise<string | null>;
224
+ }): Promise<{
225
+ result: LocalConvertResult;
226
+ warnings: string[];
227
+ }>;