@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,253 @@
1
+ import { AgentSessionError } from './agent-failure.js';
2
+ export { agentReplyFromStream, extractPlanOutput, readPlanOutput, type PlanReply } from './agent-reply.js';
3
+ import { type ClaudeEffortLevel } from './author.js';
4
+ import { DoxloopError } from './errors.js';
5
+ import { type ReleaseTemplateInput } from './release-notes.js';
6
+ import { type DocumentationDiscoveryInventory } from './source-discovery.js';
7
+ export { discoveryGuidance } from './source-discovery.js';
8
+ import { type RunAuthoringRecord } from './sync-runs.js';
9
+ import type { AgentName, DocumentationPlan, DoxloopProject, DocumentationPlanExecution, DocumentationPlanFailure, DocumentationPlanMode, DocumentationPlanScope, SourceBinding } from './types.js';
10
+ import { assignSectionSpaces } from './plan-navigation.js';
11
+ export { assignSectionSpaces };
12
+ export interface CreateDocumentationPlanInput {
13
+ mode: DocumentationPlanMode;
14
+ scope: DocumentationPlanScope;
15
+ /** Reviewer-requested minimum number of pages to write. */
16
+ targetPages?: number;
17
+ request?: string;
18
+ clarificationMode?: 'review' | 'defaults' | 'stop';
19
+ execution: DocumentationPlanExecution;
20
+ /** Start from a content-type template whose inputs Doxloop collects deterministically. */
21
+ template?: ReleaseTemplateInput;
22
+ }
23
+ export declare function createDocumentationPlan(root: string, input: CreateDocumentationPlanInput): Promise<DocumentationPlan>;
24
+ /** Planner instructions for a content-type template, or nothing for a plain request. */
25
+ export declare function templateInstructions(plan: Pick<DocumentationPlan, 'template'>): string;
26
+ /** Writer instructions derived from the plan: required diagrams and the release inventory. */
27
+ export declare function planWritingRequirements(plan: Pick<DocumentationPlan, 'pages' | 'template' | 'target'>): string;
28
+ export declare function listDocumentationPlans(root: string): Promise<DocumentationPlan[]>;
29
+ export declare function latestDocumentationPlan(root: string): Promise<DocumentationPlan | undefined>;
30
+ export declare function listDocumentationPlanVersions(root: string, id: string): Promise<DocumentationPlan[]>;
31
+ export declare function readDocumentationPlan(root: string, id: string): Promise<DocumentationPlan>;
32
+ /**
33
+ * The authoring inputs a plan-first generation run starts with. Recorded beside
34
+ * each run; rebuilt here for runs that predate that record so they can still
35
+ * be resumed from their approved plan.
36
+ */
37
+ export declare function planAuthoringRecord(root: string, plan: DocumentationPlan): Promise<Omit<RunAuthoringRecord, 'schemaVersion'>>;
38
+ export declare function proposeDocumentationPlan(root: string, id: string): Promise<DocumentationPlan>;
39
+ /** Validate and persist the structured result returned by any terminal agent. */
40
+ export declare function applyDocumentationPlanProposal(root: string, id: string, raw: unknown, agent?: AgentName): Promise<DocumentationPlan>;
41
+ export declare function beginDocumentationPlanRevision(root: string, id: string, clarificationAnswers?: Record<string, string>): Promise<DocumentationPlan>;
42
+ export declare function reviseDocumentationPlan(root: string, id: string, feedback: string): Promise<DocumentationPlan>;
43
+ export declare function documentationPlanClarificationFeedback(plan: DocumentationPlan, answers: Record<string, string>, useRecommendations?: boolean): string;
44
+ export declare function editDocumentationPlan(root: string, id: string, raw: unknown): Promise<DocumentationPlan>;
45
+ export declare function approveDocumentationPlan(root: string, id: string): Promise<DocumentationPlan>;
46
+ /**
47
+ * Keep a plan whose configured sources changed after it was proposed. The
48
+ * reviewer has already read the structure, so re-running the planner for an
49
+ * unrelated code edit would throw that review away. Refreshing the evidence
50
+ * snapshot keeps every page as proposed and lets approval proceed; generation
51
+ * still inspects the current sources when it writes each page.
52
+ */
53
+ export declare function resumeDocumentationPlan(root: string, id: string): Promise<DocumentationPlan>;
54
+ export declare function cancelDocumentationPlan(root: string, id: string): Promise<DocumentationPlan>;
55
+ /**
56
+ * Record that a planning or generation process ended without reporting a
57
+ * result. A process that is killed, crashes, or is stopped from the UI never
58
+ * reaches its own failure bookkeeping, and a plan left at "planning" offers
59
+ * the reviewer nothing to retry. Returns the failed plan, or undefined when
60
+ * the plan had already moved on.
61
+ */
62
+ export declare function markDocumentationPlanInterrupted(root: string, id: string, stage: DocumentationPlanFailure['stage'], message: string): Promise<DocumentationPlan | undefined>;
63
+ /** Restore only the durable state required to retry an interrupted UI stage. */
64
+ /** Run settings to change; a key present with `undefined` clears that setting. */
65
+ export interface ExecutionChange {
66
+ agent?: DocumentationPlanExecution['agent'] | undefined;
67
+ model?: string | undefined;
68
+ reasoning?: DocumentationPlanExecution['reasoning'] | undefined;
69
+ effort?: DocumentationPlanExecution['effort'] | undefined;
70
+ }
71
+ /**
72
+ * Point a plan at another assistant, model, or effort before it runs again
73
+ * (a retry after the pinned assistant signed out, or a switch in Settings).
74
+ * An approved plan stays approved: the run settings are not the content the
75
+ * reviewer approved, so the approval is re-stamped when it was still valid.
76
+ */
77
+ export declare function updateDocumentationPlanExecution(root: string, id: string, change: ExecutionChange): Promise<DocumentationPlan>;
78
+ export declare function retryDocumentationPlan(root: string, id: string, stage: 'propose' | 'revise' | 'generate'): Promise<DocumentationPlan>;
79
+ export declare function generateApprovedDocumentationPlan(root: string, id: string): Promise<DocumentationPlan>;
80
+ export declare function documentationSourceSnapshot(root: string): Promise<string>;
81
+ export interface ProposalCheckpoint {
82
+ /** Fingerprint of everything the planner was asked; a different brief or source snapshot invalidates the checkpoint. */
83
+ key: string;
84
+ /** Which planning pass produced the reply: the first proposal, or the corrective pass after failed gates. */
85
+ pass: 'proposal' | 'revised';
86
+ raw: unknown;
87
+ /** Deterministic fixes Doxloop applied to read the reply, surfaced on the plan review. */
88
+ repairs?: string[];
89
+ savedAt: string;
90
+ }
91
+ /**
92
+ * Fingerprint of a planning request. Two attempts with the same fingerprint
93
+ * are asking the same question, so the agent's earlier reply can stand in for
94
+ * a new one.
95
+ */
96
+ export declare function proposalCheckpointKey(current: DocumentationPlan, sourceSnapshot: string, feedback?: string): string;
97
+ /**
98
+ * Keep the agent's reply the moment it arrives. A planning run that is later
99
+ * stopped by its time limit, a crash, or the user can then continue from
100
+ * this reply instead of paying for the same planning pass again.
101
+ */
102
+ export declare function writeProposalCheckpoint(root: string, id: string, checkpoint: Omit<ProposalCheckpoint, 'savedAt'>): Promise<void>;
103
+ export declare function readProposalCheckpoint(root: string, id: string, key: string): Promise<ProposalCheckpoint | undefined>;
104
+ export declare function clearProposalCheckpoint(root: string, id: string): Promise<void>;
105
+ /**
106
+ * The corrective pass costs as much as the first proposal because the agent
107
+ * returns the whole plan again, and in real runs it cost more: told to
108
+ * "re-audit the evidence" and "inspect the reachable application", the
109
+ * planner signed in and re-explored every screen it had already seen. The
110
+ * gate names specific pages and specific fields, so the pass is scoped to
111
+ * them, and the browser is only for a state the first pass never reached.
112
+ */
113
+ export declare function gateRevisionInstructions(planningIssue: string, firstProposal: unknown, options?: {
114
+ briefed?: boolean;
115
+ }): string;
116
+ /**
117
+ * A revision used to return the whole plan again — for a 34-page plan that
118
+ * was 57 KB of JSON emitted token by token, five minutes of waiting to apply
119
+ * three answers. The reviser sends only what changed and Doxloop merges it.
120
+ */
121
+ export declare function planRevisionPatchInstructions(): string;
122
+ /**
123
+ * Drop the questions the reviewer has answered from a revised plan. The
124
+ * reviser is told to remove them, but a patch that omits "questions" keeps
125
+ * the base plan's list, and a plan that still carries an answered question
126
+ * would pause for input a second time.
127
+ */
128
+ export declare function withoutAnsweredQuestions(raw: unknown, answers: Record<string, string>): unknown;
129
+ /**
130
+ * Merge a corrective-pass patch into the proposal it corrects. Pages are
131
+ * matched by id: a patched page replaces its original, a new id is appended,
132
+ * and listed ids are removed. Other top-level lists are replaced only when
133
+ * the patch carries them. A patch that turns out to be a whole plan merges
134
+ * the same way, page by page.
135
+ */
136
+ export declare function applyPlanPatch(base: unknown, patch: unknown): unknown;
137
+ /**
138
+ * Accept a plan the planner could not finish to its own standard. The gate it
139
+ * missed becomes an advisory on the plan review, where the reviewer can edit
140
+ * pages, add a screenshot guide, or approve the plan as it is.
141
+ */
142
+ export declare function ignoreDocumentationPlanError(root: string, id: string): Promise<DocumentationPlan>;
143
+ export type PlanContinuationStrategy = 'resume' | 'ignore-errors';
144
+ /**
145
+ * Continue a plan whose generation failed, from the proposal workspace that
146
+ * failure preserved. `resume` starts the agent again in that workspace with a
147
+ * brief of what already exists, so finished pages and verified screenshots are
148
+ * kept; `ignore-errors` accepts the existing output for review with every
149
+ * screenshot problem recorded instead of enforced. Neither starts over.
150
+ */
151
+ export declare function continueDocumentationPlanGeneration(root: string, id: string, strategy: PlanContinuationStrategy): Promise<DocumentationPlan>;
152
+ export declare const DEFAULT_PLANNING_TIMEOUT_MINUTES = 20;
153
+ /**
154
+ * How long a planning agent may run before Doxloop stops it. The environment
155
+ * variable wins over the project budget so a CI job can tighten or relax it
156
+ * without editing the project.
157
+ */
158
+ export declare function planningTimeoutMinutes(project: Pick<DoxloopProject, 'sync'>, env?: NodeJS.ProcessEnv): number;
159
+ /**
160
+ * How long one planning pass may run for a batch. A limit the user set
161
+ * (environment or monitoring budget) is honoured and capped by the batch's
162
+ * minutes; otherwise the batch's own minutes apply, never less than the
163
+ * default, so a comprehensive plan is not cut off at a starter's deadline.
164
+ */
165
+ export declare function planningTimeoutForBatch(project: Pick<DoxloopProject, 'sync'>, limits: {
166
+ maxMinutes: number;
167
+ }, env?: NodeJS.ProcessEnv): number;
168
+ /**
169
+ * Research sessions that all stopped on the agent's sign-in or account are
170
+ * not "missing briefs to retry": name the cause and the next step instead.
171
+ */
172
+ export declare function researchBlockedError(error: unknown, blocker: AgentSessionError): DoxloopError;
173
+ export declare function planningTimeoutMessage(minutes: number, agent: string): string;
174
+ /**
175
+ * Planning is an inventory and grouping task over evidence Doxloop has
176
+ * already extracted; extra reasoning effort mostly buys slower turns. The
177
+ * run's effort still applies to authoring, where depth matters.
178
+ */
179
+ export declare function planningEffort(effort: ClaudeEffortLevel): ClaudeEffortLevel;
180
+ export declare function screenshotPlanningInstructions(briefed?: boolean): string;
181
+ /**
182
+ * When an existing documentation site is configured, the plan is also an
183
+ * audit of it: the reviewer sees coverage, gaps, contradictions, and where
184
+ * every old page lands before any page is rewritten. Product sources decide
185
+ * facts; without them the plan may restructure but not invent.
186
+ */
187
+ export declare function existingDocumentationPlanningInstructions(sources: SourceBinding[], discovery: DocumentationDiscoveryInventory, briefed?: boolean): string;
188
+ export declare function existingDocumentationPlanShape(sources: SourceBinding[]): string;
189
+ /**
190
+ * How the writer follows the approved audit of an existing documentation
191
+ * site: dispositions are scope, contradictions are corrections, and the old
192
+ * prose is evidence to rewrite from rather than text to paste.
193
+ */
194
+ export declare function existingDocumentationWritingRequirements(plan: Pick<DocumentationPlan, 'existingDocumentation' | 'pages'>): string;
195
+ /** Titles and URLs of crawled pages, keyed by docs-site source name and snapshot path. */
196
+ export type ExistingPageDetails = Map<string, Map<string, {
197
+ title: string;
198
+ url: string;
199
+ }>>;
200
+ /**
201
+ * Add the title and URL of every existing page the plan names, from the
202
+ * snapshot manifest. The planner lists pages by path only, which keeps its
203
+ * reply shorter; the review still shows readers what each page was.
204
+ */
205
+ export declare function fillExistingPageDetails(raw: unknown, details: ExistingPageDetails): unknown;
206
+ /**
207
+ * The audit of an existing documentation site is what the reviewer approves
208
+ * before a rewrite, so a first proposal that skips it is not approvable.
209
+ */
210
+ export declare function existingDocumentationPlanIssue(plan: Pick<DocumentationPlan, 'existingDocumentation'>, base: Pick<DocumentationPlan, 'mode' | 'status'>, sources: SourceBinding[]): string | undefined;
211
+ /** Crawled pages the plan never placed are reported for the reviewer rather than sent back to the planner. */
212
+ export declare function existingDocumentationAdvisory(plan: Pick<DocumentationPlan, 'existingDocumentation'>, sources: SourceBinding[], discovery: Pick<DocumentationDiscoveryInventory, 'sources'>): string | undefined;
213
+ /**
214
+ * Fix what a corrective planning pass would only relabel. In required
215
+ * screenshot mode every screenshot-enabled page is required by definition,
216
+ * so a "recommended" label is a wording slip, not a planning decision, and
217
+ * a second full pass to change the word costs as much as the first proposal.
218
+ *
219
+ * The same goes for the other slips the required-screenshot gate catches: a
220
+ * guide whose visual purpose landed in the page's own rationale, a start path
221
+ * written without its leading slash, or a workflow the planner left out while
222
+ * spelling the same steps out in the capture sequence. Real runs paid a second
223
+ * planning pass — six to twenty minutes, with the browser exploration repeated
224
+ * — for each of these, so they are repaired here and reported on the log.
225
+ */
226
+ /** The capture IDs the application research brief recorded, or undefined when there is no brief. */
227
+ export declare function knownPlanningCaptureIds(root: string, planId: string): Promise<Set<string> | undefined>;
228
+ /** Blank every visuals.captureIds entry that names no saved capture; returns how many were blanked. */
229
+ export declare function dropUnknownCaptureIds(raw: unknown, known: ReadonlySet<string>): number;
230
+ export declare function repairMechanicalPlanIssues(raw: unknown, execution: DocumentationPlanExecution): unknown;
231
+ export declare function requiredScreenshotPlanIssue(plan: Pick<DocumentationPlan, 'pages'>, execution: DocumentationPlanExecution): string | undefined;
232
+ /**
233
+ * Thin screenshot coverage, reported for human review rather than enforced. One
234
+ * guide covering several documented workflows usually means the planner only
235
+ * ever saw the application's entry screen — but an application parked on its
236
+ * first-run state genuinely has nothing else to show, and failing the plan for
237
+ * that would leave the reviewer with no way forward.
238
+ */
239
+ /** A screenshot-enabled guide needs at least one useful image, without a per-type quota. */
240
+ export declare const MINIMUM_GUIDE_CAPTURES = 1;
241
+ /** Flag screenshot-enabled guides without a capture; one meaningful image is enough. */
242
+ export declare function shallowCaptureAdvisory(plan: Pick<DocumentationPlan, 'pages'>, execution: DocumentationPlanExecution): string | undefined;
243
+ export declare function screenshotCoverageAdvisory(plan: Pick<DocumentationPlan, 'pages'>, execution: DocumentationPlanExecution): string | undefined;
244
+ export declare function contentSafePath(path: string): string;
245
+ /**
246
+ * Doxbrix serves a page at its file name, so two planned pages called
247
+ * "troubleshooting" in different folders would publish as one. Later pages
248
+ * with a taken name get their folder in front of it ("embed/embed-troubleshooting").
249
+ */
250
+ export declare function uniquePageFileNames(pages: Array<{
251
+ path: string;
252
+ }>): void;
253
+ //# sourceMappingURL=documentation-plan.d.ts.map