@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
package/dist/types.d.ts CHANGED
@@ -1,15 +1,83 @@
1
1
  export type AgentName = 'codex' | 'claude' | 'gemini';
2
2
  export type GeneratorName = 'doxbrix' | 'docusaurus' | 'mkdocs' | 'sphinx' | 'hugo' | 'vitepress' | 'markdoc' | 'nextra' | 'starlight' | 'jekyll' | 'static';
3
- export type SourceKind = 'directory' | 'openapi';
3
+ export type SourceKind = 'directory' | 'openapi' | 'docs-site';
4
+ /**
5
+ * Provenance of an existing documentation website bound as a `docs-site`
6
+ * source. The binding's `path` is the read-only Markdown snapshot Doxloop
7
+ * crawled from `url`; the agent reads that snapshot as evidence of the
8
+ * documentation being rewritten.
9
+ */
10
+ export interface DocsSiteSource {
11
+ url: string;
12
+ crawledAt: string;
13
+ pages: number;
14
+ words: number;
15
+ /** Content hash of the crawled pages; changes when a re-crawl finds different content. */
16
+ hash: string;
17
+ /** Documentation generator detected from the site, when recognizable. */
18
+ generator?: string;
19
+ /** True when discovery found more pages than the crawl limit allowed. */
20
+ truncated?: boolean;
21
+ }
22
+ export interface RemoteSource {
23
+ /** `github` is retained for projects created before generic Git support. */
24
+ provider: 'git' | 'github';
25
+ /** Clone URL for generic Git, or owner/name for legacy GitHub sources. */
26
+ repository: string;
27
+ branch: string;
28
+ /** Optional repository-relative directory used as the evidence root. */
29
+ subdirectory?: string;
30
+ /** Legacy GitHub authentication option. New credentials are session-only. */
31
+ tokenEnv?: string;
32
+ /** Primarily for GitHub Enterprise Server. */
33
+ apiBaseUrl?: string;
34
+ }
4
35
  export interface SourceBinding {
5
36
  name: string;
6
37
  path: string;
7
38
  kind?: SourceKind;
39
+ remote?: RemoteSource;
40
+ /** Present on `docs-site` sources: the crawled documentation website. */
41
+ site?: DocsSiteSource;
42
+ /** Optional ownership boundary for monorepos and multi-source documentation. */
43
+ scope?: {
44
+ space?: string;
45
+ routePrefix?: string;
46
+ navigationGroup?: string;
47
+ /** Page paths or globs that this source explicitly shares with another source. */
48
+ sharedPages?: string[];
49
+ };
8
50
  }
9
51
  export interface DesignReference {
10
52
  url: string;
11
53
  }
12
54
  export type ScreenshotPolicy = 'requested' | 'auto' | 'off';
55
+ export type ScreenshotIntent = 'auto' | 'enabled' | 'disabled';
56
+ export interface DocumentationPlanVisuals {
57
+ mode: 'none' | 'recommended' | 'required';
58
+ rationale: string;
59
+ estimatedCaptures: number;
60
+ /** Application-relative route where the documented workflow begins. */
61
+ startPath?: string;
62
+ /** Ordered actions, fixture assumptions, and visible outcomes to capture. */
63
+ workflow?: string;
64
+ /** One reader-useful visible state for every planned screenshot, in capture order. */
65
+ captureSequence?: string[];
66
+ /** Planning capture IDs aligned with captureSequence; empty means not captured yet. */
67
+ captureIds?: string[];
68
+ }
69
+ export interface ScreenshotRunSummary {
70
+ intent: ScreenshotIntent;
71
+ status: 'not-requested' | 'planned' | 'verified' | 'skipped' | 'failed';
72
+ planned: number;
73
+ captured: number;
74
+ textOnly: number;
75
+ guides: number;
76
+ manifest?: string;
77
+ message?: string;
78
+ /** Screenshot problems the reviewer chose to accept instead of failing the run. */
79
+ ignoredProblems?: number;
80
+ }
13
81
  export interface ApplicationScreenshots {
14
82
  policy: ScreenshotPolicy;
15
83
  viewport?: {
@@ -17,6 +85,10 @@ export interface ApplicationScreenshots {
17
85
  height: number;
18
86
  };
19
87
  highlight?: boolean;
88
+ /** Default application-relative route used when planning visual guides. */
89
+ startPath?: string;
90
+ /** Safe fixture, authentication, and workflow guidance supplied by the user. */
91
+ workflow?: string;
20
92
  }
21
93
  export interface ApplicationConfig {
22
94
  baseUrl: string;
@@ -24,19 +96,39 @@ export interface ApplicationConfig {
24
96
  startCommand?: string;
25
97
  readyPath?: string;
26
98
  screenshots?: ApplicationScreenshots;
99
+ /**
100
+ * Shareable sign-in details. Secrets never live here: saved credentials and
101
+ * the recorded browser session are kept in the user's Doxloop config home.
102
+ */
103
+ authentication?: ApplicationAuthentication;
104
+ }
105
+ export interface ApplicationAuthentication {
106
+ /** Application-relative route of the sign-in page, used by the browser sign-in and the agent. */
107
+ loginPath?: string;
27
108
  }
28
109
  export type DeploymentVisibilitySetting = 'private' | 'public';
110
+ export type DeploymentTargetSetting = 'doxbrix' | 'github-pages' | 'netlify' | 'vercel';
29
111
  export interface DeploymentConfig {
112
+ target?: DeploymentTargetSetting;
30
113
  name?: string;
31
114
  slug?: string;
32
115
  visibility?: DeploymentVisibilitySetting;
33
116
  apiUrl?: string;
117
+ siteId?: string;
118
+ projectId?: string;
119
+ teamId?: string;
120
+ branch?: string;
121
+ basePath?: string;
34
122
  }
35
123
  export type DocumentationExperienceLevel = 'beginner' | 'intermediate' | 'advanced' | 'mixed';
36
124
  export interface DocumentationBrief {
37
125
  primaryAudience?: string;
126
+ audiences?: string[];
127
+ customInstructions?: string;
38
128
  experienceLevel?: DocumentationExperienceLevel;
39
129
  priorityOutcomes?: string[];
130
+ preferredExamples?: string[];
131
+ designDirection?: string;
40
132
  locale: string;
41
133
  tone: string[];
42
134
  standardsProfile: string;
@@ -45,6 +137,297 @@ export interface DocumentationBrief {
45
137
  exclusions: string[];
46
138
  accessibilityTarget: string;
47
139
  }
140
+ export type DocumentationPlanMode = 'create' | 'update';
141
+ export type DocumentationPlanScope = 'starter' | 'standard' | 'comprehensive' | 'custom';
142
+ export type DocumentationPlanStatus = 'planning' | 'revising' | 'needs-input' | 'ready-for-review' | 'approved' | 'generating' | 'generated' | 'failed' | 'stale' | 'cancelled';
143
+ export type DocumentationPlanPageAction = 'create' | 'update' | 'preserve' | 'remove';
144
+ export type DocumentationPlanPagePriority = 'must-have' | 'next' | 'later';
145
+ export interface DocumentationPlanEvidence {
146
+ source: string;
147
+ path: string;
148
+ kind?: string;
149
+ label?: string;
150
+ line?: number;
151
+ }
152
+ export interface DocumentationPlanPage {
153
+ id: string;
154
+ title: string;
155
+ path: string;
156
+ type: string;
157
+ priority: DocumentationPlanPagePriority;
158
+ action: DocumentationPlanPageAction;
159
+ purpose: string;
160
+ rationale: string;
161
+ evidence: string[];
162
+ evidenceDetails: DocumentationPlanEvidence[];
163
+ /** Planned reader-facing application images for this page. */
164
+ visuals?: DocumentationPlanVisuals;
165
+ /**
166
+ * Whether the writer must include a Mermaid diagram. Concept pages default
167
+ * to `required`; the reviewer can change it per page in plan review.
168
+ */
169
+ diagram?: DocumentationPlanDiagram;
170
+ }
171
+ export type DocumentationPlanDiagram = 'required' | 'none';
172
+ /** One commit between the two release refs of a Git-backed source. */
173
+ export interface ReleaseCommit {
174
+ hash: string;
175
+ date: string;
176
+ author: string;
177
+ subject: string;
178
+ body?: string;
179
+ }
180
+ export interface ReleaseSourceInventory {
181
+ source: string;
182
+ from: string;
183
+ to: string;
184
+ commits: ReleaseCommit[];
185
+ /** `A`, `M`, `D`, or `R` plus the source-relative path, capped for prompt size. */
186
+ changedFiles: string[];
187
+ truncated: boolean;
188
+ changelog?: {
189
+ path: string;
190
+ excerpt: string;
191
+ };
192
+ }
193
+ export interface ReleaseInventory {
194
+ version: string;
195
+ from: string;
196
+ to: string;
197
+ collectedAt: string;
198
+ sources: ReleaseSourceInventory[];
199
+ }
200
+ /**
201
+ * A content-type template that feeds deterministic inputs to the planner.
202
+ * Release notes are grounded in the Git log between two refs plus the
203
+ * product's own changelog, so the planned page never restates guesses.
204
+ */
205
+ export interface DocumentationPlanTemplate {
206
+ kind: 'release-notes';
207
+ version: string;
208
+ from: string;
209
+ to: string;
210
+ /** Source names the inventory was collected from; empty means every Git-backed source. */
211
+ sources: string[];
212
+ inventory: ReleaseInventory;
213
+ }
214
+ export interface DocumentationPlanQuestion {
215
+ id: string;
216
+ question: string;
217
+ whyItMatters: string;
218
+ recommendation?: string;
219
+ }
220
+ export interface DocumentationPlanExecution {
221
+ limits?: {
222
+ maxPages: number;
223
+ maxScreenshots: number;
224
+ maxMinutes: number;
225
+ };
226
+ agent?: AgentName;
227
+ model?: string;
228
+ reasoning?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
229
+ effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
230
+ /** Booleans are accepted only for persisted v2 plan compatibility. */
231
+ screenshots: ScreenshotIntent | boolean;
232
+ }
233
+ export interface DocumentationPlanCapability {
234
+ id: string;
235
+ title: string;
236
+ kind: string;
237
+ evidence: DocumentationPlanEvidence[];
238
+ pageIds: string[];
239
+ disposition: 'planned' | 'existing' | 'excluded' | 'needs-human';
240
+ }
241
+ export interface DocumentationPlanNavigationSection {
242
+ id: string;
243
+ title: string;
244
+ pageIds: string[];
245
+ /** The top-level space (one of `navigation.top`) this section's group lives in. */
246
+ space?: string;
247
+ }
248
+ export interface DocumentationPlanNavigation {
249
+ top: string[];
250
+ sections: DocumentationPlanNavigationSection[];
251
+ }
252
+ /**
253
+ * How much research an update request needs, decided before any research
254
+ * session starts. `navigation` changes only navigation, icons, branding, or
255
+ * page metadata and reads nothing; `pages` names existing pages and audits
256
+ * only the product surface behind them; `product` is a product-wide update
257
+ * and runs every research session, as a create run does.
258
+ */
259
+ export type PlanResearchScope = 'navigation' | 'pages' | 'product';
260
+ export interface DocumentationPlanResearch {
261
+ scope: PlanResearchScope;
262
+ /** One sentence for the reviewer: what in the request decided the scope. */
263
+ reason: string;
264
+ /** Existing documentation pages the request names (project-relative paths), for the `pages` scope. */
265
+ pages: string[];
266
+ /** `rules` for the deterministic triage, `agent` when a short session resolved an ambiguous request, `mode` for create runs. */
267
+ decidedBy: 'rules' | 'agent' | 'mode';
268
+ }
269
+ export interface DocumentationPlanTarget {
270
+ generator: GeneratorName;
271
+ contentDir: string;
272
+ contentFormat: 'markdown' | 'rst' | 'html';
273
+ pageExtensions: string[];
274
+ navigationFiles: string[];
275
+ }
276
+ /** What the planner decided to do with one page of an existing documentation site. */
277
+ export type ExistingDocumentationDisposition = 'rewrite' | 'merge' | 'preserve' | 'drop';
278
+ export interface ExistingDocumentationPageDisposition {
279
+ /** Snapshot-relative page file, such as `pages/guides/install.md`. */
280
+ path: string;
281
+ title?: string;
282
+ /** Original URL on the existing site, used to derive redirects. */
283
+ url?: string;
284
+ disposition: ExistingDocumentationDisposition;
285
+ /** Planned page ids that absorb this page. Empty for `drop`. */
286
+ into: string[];
287
+ reason: string;
288
+ }
289
+ export interface ExistingDocumentationFinding {
290
+ severity: ReviewFindingSeverity;
291
+ title: string;
292
+ description: string;
293
+ /** Snapshot-relative page files the finding applies to. */
294
+ pages: string[];
295
+ }
296
+ /**
297
+ * The planner's audit of one `docs-site` source: how well the existing
298
+ * documentation covers the product, what it gets wrong, and where every
299
+ * existing page lands in the new plan. Reviewed before generation.
300
+ */
301
+ export interface ExistingDocumentationAssessment {
302
+ source: string;
303
+ summary: string;
304
+ strengths: string[];
305
+ findings: ExistingDocumentationFinding[];
306
+ coverage: {
307
+ /** Product surfaces found in code sources that the existing documentation never covers. */
308
+ gaps: string[];
309
+ /** Existing pages or claims that describe behavior no longer present in the product. */
310
+ obsolete: string[];
311
+ /** Existing knowledge that code cannot show and the rewrite must carry over. */
312
+ preserved: string[];
313
+ /** Existing claims the product sources contradict; the rewrite corrects them. */
314
+ contradicted: string[];
315
+ };
316
+ pages: ExistingDocumentationPageDisposition[];
317
+ }
318
+ export interface DocumentationPlanFailure {
319
+ stage: 'propose' | 'revise' | 'generate';
320
+ /** The preserved proposal workspace a generation failure left behind. */
321
+ proposalId?: string;
322
+ /** The agent can continue in the preserved workspace without redoing finished work. */
323
+ resumable: boolean;
324
+ /** The output that exists can be accepted with the reported problems recorded for review. */
325
+ ignorable: boolean;
326
+ }
327
+ /**
328
+ * The UI-owned checkpoint between source research and document authoring.
329
+ * Terminal agents may propose or revise this contract, but only Doxloop can
330
+ * persist edits, approve a version, or authorize generation.
331
+ */
332
+ export interface DocumentationPlan {
333
+ schemaVersion: 2;
334
+ id: string;
335
+ version: number;
336
+ mode: DocumentationPlanMode;
337
+ status: DocumentationPlanStatus;
338
+ scope: DocumentationPlanScope;
339
+ createdAt: string;
340
+ updatedAt: string;
341
+ request: string;
342
+ sourceSnapshot: string;
343
+ productProfile: string;
344
+ summary: string;
345
+ audiences: string[];
346
+ outcomes: string[];
347
+ terminology: Record<string, string>;
348
+ exclusions: string[];
349
+ instructions: string;
350
+ experienceLevel: DocumentationExperienceLevel;
351
+ preferredExamples: string[];
352
+ locale: string;
353
+ accessibilityTarget: string;
354
+ styleGuide: string;
355
+ capabilities: DocumentationPlanCapability[];
356
+ navigation: DocumentationPlanNavigation;
357
+ pages: DocumentationPlanPage[];
358
+ questions: DocumentationPlanQuestion[];
359
+ estimatedPages: number;
360
+ /**
361
+ * Reviewer-requested minimum number of pages to write. The planner must
362
+ * reach it with distinct evidence-backed pages or record a scope exception.
363
+ */
364
+ targetPages?: number;
365
+ estimatedEffort: 'small' | 'medium' | 'large';
366
+ discovery: {
367
+ cacheKey: string;
368
+ generatedAt: string;
369
+ deterministic: true;
370
+ publicSignals: number;
371
+ suggestedPages: {
372
+ starter: number;
373
+ standard: number;
374
+ comprehensive: number;
375
+ };
376
+ };
377
+ target: DocumentationPlanTarget;
378
+ clarification: {
379
+ mode: 'review' | 'defaults' | 'stop';
380
+ answers: Record<string, string>;
381
+ };
382
+ execution: DocumentationPlanExecution;
383
+ /** Present when the plan was started from a content-type template such as release notes. */
384
+ template?: DocumentationPlanTemplate;
385
+ approvedAt?: string;
386
+ approvedHash?: string;
387
+ proposalId?: string;
388
+ error?: string;
389
+ /**
390
+ * Where the last workflow stage stopped and which continuation is possible,
391
+ * so a failed run can be resumed or accepted as-is instead of started over.
392
+ */
393
+ failure?: DocumentationPlanFailure;
394
+ /** Non-blocking findings a reviewer should weigh before approving. */
395
+ advisories?: string[];
396
+ /** Present when a `docs-site` source is configured: one audit per existing documentation site. */
397
+ existingDocumentation?: ExistingDocumentationAssessment[];
398
+ /** How much research this plan ran; absent on plans made before request triage existed. */
399
+ research?: DocumentationPlanResearch;
400
+ /**
401
+ * A change to the workspace rather than to any page's content: navigation
402
+ * icons, ordering, group names, branding. Generation applies it in one
403
+ * short session after the pages are written, so a plan whose pages are all
404
+ * preserved still does the requested work.
405
+ */
406
+ workspaceInstructions?: string;
407
+ }
408
+ /**
409
+ * `check` reports drift and never starts an agent. Authoring modes generate an
410
+ * isolated proposal; neither changes the real documentation before approval.
411
+ */
412
+ export type SyncMode = 'check' | 'propose' | 'auto';
413
+ /** Remote polling runs at a user-friendly calendar cadence or fixed interval. */
414
+ export type SyncTrigger = `every@${number}m` | `every@${number}h` | `daily@${string}` | `weekdays@${string}` | `weekly@${string}@${string}` | `monthly@${number}@${string}`;
415
+ export interface SyncBudget {
416
+ maxRunsPerDay?: number;
417
+ maxMinutes?: number;
418
+ /** Claude Code spending cap per run in US dollars. Codex and Gemini expose no equivalent. */
419
+ maxUsd?: number;
420
+ }
421
+ export interface SyncConfig {
422
+ mode: SyncMode;
423
+ branch?: string;
424
+ on: SyncTrigger[];
425
+ watch: string[];
426
+ ignore: string[];
427
+ budget?: SyncBudget;
428
+ maxVerificationAgeDays?: number;
429
+ maxVerificationAgeSeverity?: 'warn' | 'fail';
430
+ }
48
431
  export interface DoxloopProject {
49
432
  schemaVersion: 1;
50
433
  title: string;
@@ -52,11 +435,14 @@ export interface DoxloopProject {
52
435
  generator: GeneratorName;
53
436
  generatorPackage?: string;
54
437
  defaultAgent?: AgentName;
438
+ /** Model passed to the default agent when a run does not pick one. */
439
+ defaultModel?: string;
55
440
  sources: SourceBinding[];
56
441
  designReferences: DesignReference[];
57
442
  application?: ApplicationConfig;
58
443
  deployment?: DeploymentConfig;
59
444
  documentation: DocumentationBrief;
445
+ sync: SyncConfig;
60
446
  }
61
447
  export type DoxbrixNavNode = {
62
448
  type: 'page';
@@ -88,6 +474,7 @@ export type DoxbrixNavNode = {
88
474
  };
89
475
  export interface DoxbrixSpace {
90
476
  name: string;
477
+ version?: string;
91
478
  slug?: string;
92
479
  locale?: string;
93
480
  parent?: string;
@@ -97,6 +484,13 @@ export interface DoxbrixSpace {
97
484
  }
98
485
  export interface DoxbrixSiteConfig {
99
486
  version: 1;
487
+ versions?: Array<{
488
+ version: string;
489
+ label?: string;
490
+ tag?: string;
491
+ default?: boolean;
492
+ isDefault?: boolean;
493
+ }>;
100
494
  name?: string;
101
495
  description?: string;
102
496
  spaces: DoxbrixSpace[];
@@ -107,11 +501,172 @@ export interface SourceSyncRecord {
107
501
  commit: string;
108
502
  recordedAt: string;
109
503
  contentFingerprint?: string;
504
+ /** Per-file digests, recorded for folders without Git history. */
505
+ files?: Record<string, string>;
506
+ connector?: {
507
+ id: string;
508
+ version: 1;
509
+ etag?: string;
510
+ lastModified?: string;
511
+ openapi?: OpenApiSnapshot;
512
+ };
110
513
  }
111
514
  export interface SyncState {
112
515
  schemaVersion: 1;
113
516
  sources: Record<string, SourceSyncRecord>;
114
517
  }
518
+ export type SyncRunStatus = 'generating' | 'awaiting-review' | 'partially-applied' | 'applied' | 'rejected' | 'failed' | 'conflicted' | 'stale' | 'superseded' | 'undone';
519
+ export type SyncRunTrigger = 'manual' | 'schedule' | 'edit';
520
+ export type SyncChangeKind = 'added' | 'modified' | 'deleted';
521
+ export type SyncChangeCategory = 'page' | 'navigation' | 'configuration' | 'evidence' | 'asset';
522
+ export interface SyncChangeHunk {
523
+ id: string;
524
+ oldStart: number;
525
+ oldLines: string[];
526
+ newStart: number;
527
+ newLines: string[];
528
+ acceptedAt?: string;
529
+ rejectedAt?: string;
530
+ rejectionReason?: string;
531
+ }
532
+ export interface SyncEvidenceReference {
533
+ source: string;
534
+ path?: string;
535
+ operation?: string;
536
+ revision?: string;
537
+ available: boolean;
538
+ }
539
+ export interface SyncChangeRationale {
540
+ reason: string;
541
+ evidence: SyncEvidenceReference[];
542
+ affectedInterfaces: string[];
543
+ claims: {
544
+ added: string[];
545
+ changed: string[];
546
+ removed: string[];
547
+ };
548
+ validation: {
549
+ errors: number;
550
+ warnings: number;
551
+ };
552
+ confidence: EvidenceConfidence;
553
+ assumptions: string[];
554
+ planId?: string;
555
+ planPageId?: string;
556
+ request?: string;
557
+ authorship: 'agent' | 'human';
558
+ }
559
+ export interface SyncFileChange {
560
+ id: string;
561
+ path: string;
562
+ title: string;
563
+ kind: SyncChangeKind;
564
+ category: SyncChangeCategory;
565
+ binary: boolean;
566
+ beforeHash?: string;
567
+ afterHash?: string;
568
+ beforeEndsWithNewline?: boolean;
569
+ afterEndsWithNewline?: boolean;
570
+ hunks: SyncChangeHunk[];
571
+ rationale: SyncChangeRationale;
572
+ /**
573
+ * The file also changed in the project while the agent ran, so the
574
+ * proposal would replace an edit the agent never saw. Applying it needs an
575
+ * explicit confirmation.
576
+ */
577
+ changedDuringRun?: boolean;
578
+ }
579
+ /** Model token usage accumulated across the agent sessions that served one request. */
580
+ export interface AgentUsage {
581
+ inputTokens: number;
582
+ outputTokens: number;
583
+ cacheReadTokens: number;
584
+ cacheCreationTokens: number;
585
+ /** Sum of the four token counters. */
586
+ totalTokens: number;
587
+ costUsd?: number;
588
+ turns: number;
589
+ /** Agent sessions (process launches) that contributed. */
590
+ sessions: number;
591
+ /** Largest single-request context (input + cache read + cache creation) seen. */
592
+ maxContextTokens: number;
593
+ durationMs: number;
594
+ }
595
+ export interface SyncRunValidation {
596
+ pages: number;
597
+ errors: number;
598
+ warnings: number;
599
+ issues?: ValidationIssue[];
600
+ }
601
+ /** A generated documentation proposal. The real documentation changes only after review. */
602
+ export interface SyncRun {
603
+ schemaVersion: 2;
604
+ id: string;
605
+ status: SyncRunStatus;
606
+ mode: Exclude<SyncMode, 'check'>;
607
+ trigger: SyncRunTrigger;
608
+ createdAt: string;
609
+ completedAt?: string;
610
+ appliedAt?: string;
611
+ rejectedAt?: string;
612
+ summary: string;
613
+ sourceSummary: string;
614
+ stalePages: string[];
615
+ changes: SyncFileChange[];
616
+ sourceSnapshot?: string;
617
+ /** Plan-first authoring mode, used to complete Create/Update state after acceptance. */
618
+ authoringMode?: 'create' | 'update';
619
+ planId?: string;
620
+ /** Present on runs started from the Pages view. */
621
+ editRequest?: {
622
+ instruction: string;
623
+ paths: string[];
624
+ allowRelated: boolean;
625
+ followUps: Array<{
626
+ id: string;
627
+ createdAt: string;
628
+ instruction: string;
629
+ }>;
630
+ };
631
+ revisionOf?: string;
632
+ supersededBy?: string;
633
+ archivedAt?: string;
634
+ retentionUntil?: string;
635
+ revisionRequests: Array<{
636
+ id: string;
637
+ createdAt: string;
638
+ instruction: string;
639
+ changeIds: string[];
640
+ hunkIds: string[];
641
+ }>;
642
+ humanEdits: Array<{
643
+ changeId: string;
644
+ path: string;
645
+ editedAt: string;
646
+ evidenceDisposition: 'preserved' | 'needs-review';
647
+ }>;
648
+ undo?: {
649
+ status: 'available' | 'undone' | 'unavailable';
650
+ undoneAt?: string;
651
+ reason?: string;
652
+ };
653
+ validation?: SyncRunValidation;
654
+ screenshots?: ScreenshotRunSummary;
655
+ /** Token usage across every agent session that produced this proposal. */
656
+ usage?: AgentUsage;
657
+ error?: string;
658
+ /** When the agent was last continued inside this run's preserved workspace. */
659
+ resumedAt?: string;
660
+ /** Reviewer-facing notes about how this run was continued, never blocking. */
661
+ advisories?: string[];
662
+ /** Continuations available after a failure, given the workspace this run left behind. */
663
+ recovery?: {
664
+ /** The agent can continue in the preserved workspace without redoing finished work. */
665
+ resumable: boolean;
666
+ /** The output that exists can be reviewed with screenshot problems recorded instead of enforced. */
667
+ ignorable: boolean;
668
+ };
669
+ }
115
670
  export type SourceChange = Omit<SourceBinding, 'kind'> & ({
116
671
  kind: 'missing-path';
117
672
  } | {
@@ -120,8 +675,15 @@ export type SourceChange = Omit<SourceBinding, 'kind'> & ({
120
675
  kind: 'spec-remote';
121
676
  } | {
122
677
  kind: 'spec-unchanged';
678
+ head?: string;
679
+ summary?: OpenApiSummary;
123
680
  } | {
124
681
  kind: 'spec-changed';
682
+ baseline?: string;
683
+ head: string;
684
+ summary: OpenApiSummary;
685
+ apiDiff: ApiStructuralDiff;
686
+ changedIdentifiers: string[];
125
687
  } | {
126
688
  kind: 'no-baseline';
127
689
  head: string;
@@ -137,6 +699,314 @@ export type SourceChange = Omit<SourceBinding, 'kind'> & ({
137
699
  changedFiles: string[];
138
700
  uncommittedFiles: string[];
139
701
  });
702
+ /**
703
+ * How well the authoring agent could ground a page in configured evidence.
704
+ * `needs-human` is surfaced by validation rather than silently accepted.
705
+ */
706
+ export type EvidenceConfidence = 'verified' | 'inferred' | 'needs-human';
707
+ export interface PageEvidenceSource {
708
+ /** Name of a configured source binding. */
709
+ source: string;
710
+ /** Source-relative paths or globs the page was written from. */
711
+ paths?: string[];
712
+ /** OpenAPI operations the page documents, such as `POST /oauth/token`. */
713
+ operations?: string[];
714
+ }
715
+ export interface PageEvidence {
716
+ sources: PageEvidenceSource[];
717
+ /** Source name to the commit or content hash the page was last checked against. */
718
+ verifiedAt?: Record<string, string>;
719
+ /** Source name to the ISO timestamp when the page was last checked. */
720
+ verifiedOn?: Record<string, string>;
721
+ confidence?: EvidenceConfidence;
722
+ /** Reader-facing factual claims the page makes, for targeted re-verification. */
723
+ claims?: string[];
724
+ /** Optional claim-level review state keyed by the exact reader-facing claim. */
725
+ claimVerification?: Record<string, ClaimVerificationState>;
726
+ }
727
+ export interface EvidenceMap {
728
+ schemaVersion: 1;
729
+ /** Project-relative page paths, matching the paths reported by validation. */
730
+ pages: Record<string, PageEvidence>;
731
+ }
732
+ export interface StaleReason {
733
+ source: string;
734
+ paths: string[];
735
+ kind?: 'source-change' | 'max-age';
736
+ ageDays?: number;
737
+ baseline?: string;
738
+ head?: string;
739
+ }
740
+ export interface StalePage {
741
+ page: string;
742
+ reasons: StaleReason[];
743
+ verifiedAt?: string;
744
+ }
745
+ export interface DriftSourceSummary {
746
+ name: string;
747
+ path: string;
748
+ kind: SourceChange['kind'];
749
+ /** Changed paths that survived the watch and ignore filters. */
750
+ changedPaths: string[];
751
+ /** How many changed paths the filters dropped. */
752
+ filteredPaths: number;
753
+ baseline?: string;
754
+ head?: string;
755
+ scope?: SourceBinding['scope'];
756
+ }
757
+ /**
758
+ * `current` means nothing reader-visible changed. `stale` names the affected
759
+ * pages. `unknown` means something changed but page-level attribution is not
760
+ * possible yet, usually because no evidence map or baseline exists.
761
+ */
762
+ export type DriftStatus = 'current' | 'stale' | 'unknown';
763
+ export interface DriftResult {
764
+ status: DriftStatus;
765
+ pages: StalePage[];
766
+ trackedPages: number;
767
+ sources: DriftSourceSummary[];
768
+ evidenceMap: 'present' | 'missing';
769
+ notes: string[];
770
+ }
771
+ export interface OpenApiSummary {
772
+ title: string;
773
+ version: string;
774
+ specificationVersion: string;
775
+ servers: string[];
776
+ securitySchemes: string[];
777
+ schemas: string[];
778
+ operationCount: number;
779
+ }
780
+ export interface OpenApiSnapshot {
781
+ schemaVersion: 1;
782
+ specificationVersion: string;
783
+ operations: Record<string, {
784
+ operationId: string;
785
+ parameters: string;
786
+ requestBody: string;
787
+ responses: string;
788
+ security: string;
789
+ examples: string;
790
+ full: string;
791
+ }>;
792
+ schemas: Record<string, string>;
793
+ securitySchemes: Record<string, string>;
794
+ }
795
+ export interface ApiStructuralDiff {
796
+ operations: {
797
+ added: string[];
798
+ removed: string[];
799
+ changed: Array<{
800
+ id: string;
801
+ facets: string[];
802
+ }>;
803
+ };
804
+ schemas: {
805
+ added: string[];
806
+ removed: string[];
807
+ changed: Array<{
808
+ id: string;
809
+ facets: string[];
810
+ }>;
811
+ };
812
+ securitySchemes: {
813
+ added: string[];
814
+ removed: string[];
815
+ changed: Array<{
816
+ id: string;
817
+ facets: string[];
818
+ }>;
819
+ };
820
+ }
821
+ export interface SourceHealth {
822
+ name: string;
823
+ connector: string;
824
+ status: 'healthy' | 'warning' | 'error';
825
+ checkedAt: string;
826
+ lastSuccessfulAt?: string;
827
+ lastMonitoringAt?: string;
828
+ location: string;
829
+ provider: string;
830
+ branch?: string;
831
+ subdirectory?: string;
832
+ monitored: boolean;
833
+ revision?: string;
834
+ summary: string;
835
+ details: string[];
836
+ openapi?: OpenApiSummary;
837
+ /** Present for `docs-site` sources. */
838
+ docsSite?: DocsSiteSource & {
839
+ brokenLinks: number;
840
+ };
841
+ scope?: SourceBinding['scope'];
842
+ }
843
+ export type CoverageSurface = 'commands' | 'exports' | 'http-operations' | 'configuration' | 'security' | 'errors' | 'events-integrations' | 'reader-journeys' | 'verified-pages';
844
+ export type CoverageItemState = 'documented' | 'uncovered' | 'excluded' | 'needs-human' | 'planned' | 'stale';
845
+ export interface CoverageItem {
846
+ id: string;
847
+ surface: CoverageSurface;
848
+ label: string;
849
+ state: CoverageItemState;
850
+ source?: string;
851
+ path?: string;
852
+ kind?: string;
853
+ page?: string;
854
+ suggestedPage?: string;
855
+ reason?: string;
856
+ }
857
+ export interface CoverageMetric {
858
+ id: CoverageSurface;
859
+ label: string;
860
+ documented: number;
861
+ total: number;
862
+ excluded: number;
863
+ percent: number;
864
+ status: 'measured' | 'unknown';
865
+ denominator: string;
866
+ items: CoverageItem[];
867
+ }
868
+ export interface CoverageGroup {
869
+ source: string;
870
+ scope?: SourceBinding['scope'];
871
+ documented: number;
872
+ total: number;
873
+ percent: number;
874
+ status: 'measured' | 'unknown';
875
+ }
876
+ export interface EvidenceDiagnostic {
877
+ severity: IssueSeverity;
878
+ code: 'missing-page' | 'unknown-source' | 'source-only' | 'broad-pattern' | 'deleted-identifier' | 'weak-relation';
879
+ page: string;
880
+ source?: string;
881
+ identifier?: string;
882
+ message: string;
883
+ suggestion: string;
884
+ }
885
+ export interface SourceIntelligenceReport {
886
+ generatedAt: string;
887
+ health: SourceHealth[];
888
+ coverage: {
889
+ metrics: CoverageMetric[];
890
+ groups: CoverageGroup[];
891
+ pages: string[];
892
+ disclaimer: string;
893
+ };
894
+ evidenceDiagnostics: EvidenceDiagnostic[];
895
+ }
896
+ export type ReviewFindingSeverity = 'blocker' | 'major' | 'minor';
897
+ export interface DocumentationReviewFinding {
898
+ id: string;
899
+ severity: ReviewFindingSeverity;
900
+ title: string;
901
+ description: string;
902
+ pages: string[];
903
+ evidence: string[];
904
+ recommendation: string;
905
+ }
906
+ export interface DocumentationReviewReport {
907
+ schemaVersion: 1;
908
+ id: string;
909
+ createdAt: string;
910
+ agent: AgentName;
911
+ model?: string;
912
+ reasoning?: string;
913
+ score: number;
914
+ hardGates: 'pass' | 'fail' | 'unknown';
915
+ summary: string;
916
+ findings: DocumentationReviewFinding[];
917
+ }
918
+ export type QualityCheckStatus = 'pass' | 'warning' | 'fail' | 'skipped';
919
+ export type QualityCheckCategory = 'validation' | 'build' | 'links' | 'examples' | 'schemas' | 'accessibility' | 'visual' | 'lint' | 'claims';
920
+ /** Versioned, CI-stable result returned by `doxloop quality`. */
921
+ export interface QualityCheck {
922
+ code: string;
923
+ category: QualityCheckCategory;
924
+ status: QualityCheckStatus;
925
+ message: string;
926
+ file?: string;
927
+ detail?: string;
928
+ fixable?: boolean;
929
+ }
930
+ export interface QualityReport {
931
+ schemaVersion: 1;
932
+ contractVersion: '1.0.0';
933
+ generatedAt: string;
934
+ inputHash: string;
935
+ project: string;
936
+ generator: GeneratorName;
937
+ status: 'pass' | 'warning' | 'fail';
938
+ checks: QualityCheck[];
939
+ counts: {
940
+ passed: number;
941
+ warnings: number;
942
+ failed: number;
943
+ skipped: number;
944
+ };
945
+ artifacts: {
946
+ report: string;
947
+ accessibility?: string;
948
+ visuals?: string;
949
+ };
950
+ options: {
951
+ offline: boolean;
952
+ rendered: boolean;
953
+ examples: boolean;
954
+ };
955
+ }
956
+ export interface QualityConfig {
957
+ schemaVersion: 1;
958
+ links?: {
959
+ mode?: 'online' | 'offline';
960
+ allowHosts?: string[];
961
+ ignore?: string[];
962
+ timeoutMs?: number;
963
+ retries?: number;
964
+ cacheHours?: number;
965
+ };
966
+ examples?: {
967
+ enabled?: boolean;
968
+ };
969
+ rendered?: {
970
+ enabled?: boolean;
971
+ routes?: string[];
972
+ viewports?: Array<{
973
+ name: string;
974
+ width: number;
975
+ height: number;
976
+ }>;
977
+ themes?: Array<'light' | 'dark'>;
978
+ maximumDiffRatio?: number;
979
+ };
980
+ lint?: {
981
+ maximumTitleLength?: number;
982
+ maximumNavigationLabelLength?: number;
983
+ };
984
+ readerVerification?: {
985
+ enabled?: boolean;
986
+ };
987
+ suppressions?: Array<{
988
+ code: string;
989
+ file?: string;
990
+ reason: string;
991
+ expires?: string;
992
+ }>;
993
+ ratchet?: {
994
+ enabled?: boolean;
995
+ baselineFile?: string;
996
+ };
997
+ }
998
+ export type ClaimVerificationState = 'verified' | 'inferred' | 'contradicted' | 'needs-human';
999
+ export interface ReaderVerificationMetadata {
1000
+ schemaVersion: 1;
1001
+ generatedAt: string;
1002
+ pages: Record<string, {
1003
+ state: ClaimVerificationState;
1004
+ confidence: EvidenceConfidence;
1005
+ verifiedOn?: string;
1006
+ revisions: Record<string, string>;
1007
+ locale: string;
1008
+ }>;
1009
+ }
140
1010
  export type IssueSeverity = 'error' | 'warning';
141
1011
  export interface ValidationIssue {
142
1012
  severity: IssueSeverity;
@@ -155,4 +1025,79 @@ export interface ParsedArgs {
155
1025
  positionals: string[];
156
1026
  flags: Map<string, string[]>;
157
1027
  }
1028
+ /** What the user asked Doxloop to do. Agent transcripts are never recorded. */
1029
+ export type RequestKind = 'create' | 'update' | 'review' | 'edit'
1030
+ /** A direct navigation, branding, asset, page-metadata, or glossary write from the control center. */
1031
+ | 'navigation' | 'branding' | 'asset' | 'metadata' | 'glossary';
1032
+ export type RequestStatus = 'running' | 'generating' | 'awaiting-review' | 'partially-applied' | 'applied' | 'rejected' | 'failed' | 'conflicted' | 'stale' | 'superseded' | 'undone' | 'completed';
1033
+ export interface HistoryRequest {
1034
+ id: string;
1035
+ createdAt: string;
1036
+ finishedAt?: string | undefined;
1037
+ durationMs?: number | undefined;
1038
+ kind: RequestKind;
1039
+ trigger: SyncRunTrigger | 'watch';
1040
+ /** The instruction the user typed, which exists nowhere else after the run. */
1041
+ requestText?: string | undefined;
1042
+ agent?: string | undefined;
1043
+ model?: string | undefined;
1044
+ status: RequestStatus;
1045
+ pagesChanged: number;
1046
+ linesAdded: number;
1047
+ linesRemoved: number;
1048
+ validationErrors?: number | undefined;
1049
+ validationWarnings?: number | undefined;
1050
+ sourceSummary?: string | undefined;
1051
+ error?: string | undefined;
1052
+ /** Token usage recorded when the request finished, when the agent reported it. */
1053
+ usage?: AgentUsage | undefined;
1054
+ }
1055
+ /** A page touched by one request, as shown beside that request. */
1056
+ export interface HistoryChangedPage {
1057
+ path: string;
1058
+ title?: string | undefined;
1059
+ changeKind: SyncChangeKind;
1060
+ decision: 'pending' | 'accepted' | 'rejected' | 'partial';
1061
+ linesAdded: number;
1062
+ linesRemoved: number;
1063
+ }
1064
+ export interface HistoryRequestPage {
1065
+ requestId: string;
1066
+ path: string;
1067
+ title?: string | undefined;
1068
+ changeKind: SyncChangeKind;
1069
+ decision: 'pending' | 'accepted' | 'rejected' | 'partial';
1070
+ decidedAt?: string | undefined;
1071
+ linesAdded: number;
1072
+ linesRemoved: number;
1073
+ requestedAt: string;
1074
+ requestText?: string | undefined;
1075
+ agent?: string | undefined;
1076
+ requestStatus: RequestStatus;
1077
+ }
1078
+ export interface HistoryPage {
1079
+ path: string;
1080
+ title?: string | undefined;
1081
+ createdAt: string;
1082
+ updatedAt: string;
1083
+ changeCount: number;
1084
+ evidenceConfidence?: string | undefined;
1085
+ status: 'active' | 'deleted';
1086
+ }
1087
+ export interface DeploymentRecord {
1088
+ startedAt: string;
1089
+ finishedAt?: string | undefined;
1090
+ durationMs?: number | undefined;
1091
+ target: string;
1092
+ name?: string | undefined;
1093
+ slug?: string | undefined;
1094
+ visibility?: string | undefined;
1095
+ url?: string | undefined;
1096
+ status: 'succeeded' | 'failed';
1097
+ pagesCount?: number | undefined;
1098
+ pagesCreated?: number | undefined;
1099
+ pagesUpdated?: number | undefined;
1100
+ pagesDeleted?: number | undefined;
1101
+ error?: string | undefined;
1102
+ }
158
1103
  //# sourceMappingURL=types.d.ts.map