@open-agent-toolkit/cli 0.3.12 → 0.3.13
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.
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/configuration.md +1 -1
- package/assets/docs/cli-utilities/tool-packs.md +4 -1
- package/assets/docs/docs-tooling/add-docs-to-a-repo.md +80 -15
- package/assets/docs/docs-tooling/commands.md +74 -30
- package/assets/docs/docs-tooling/index.md +6 -6
- package/assets/docs/docs-tooling/workflows.md +26 -9
- package/assets/docs/provider-sync/commands.md +1 -1
- package/assets/docs/provider-sync/instruction-sync.md +11 -4
- package/assets/docs/reference/cli-reference.md +2 -2
- package/assets/docs/reference/docs-index-contract.md +19 -4
- package/assets/docs/reference/file-locations.md +3 -1
- package/assets/docs/reference/oat-directory-structure.md +23 -21
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-docs-analyze/SKILL.md +27 -7
- package/assets/skills/oat-docs-analyze/references/quality-checklist.md +16 -3
- package/assets/skills/oat-docs-apply/SKILL.md +20 -3
- package/assets/skills/oat-docs-authoring/SKILL.md +11 -7
- package/assets/skills/oat-docs-authoring/references/docs-root-resolution.md +12 -5
- package/assets/skills/oat-docs-authoring/references/lifecycle-boundaries.md +7 -7
- package/assets/skills/oat-docs-authoring/references/oat-fumadocs-contract.md +13 -3
- package/assets/skills/oat-docs-authoring/references/targeted-authoring-workflow.md +5 -4
- package/assets/skills/oat-docs-authoring/references/validation.md +11 -1
- package/assets/skills/oat-docs-bootstrap/SKILL.md +31 -8
- package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +2 -1
- package/assets/skills/oat-project-document/SKILL.md +21 -2
- package/assets/templates/docs-markdown/contributing.md +35 -0
- package/assets/templates/docs-markdown/index.md +18 -0
- package/dist/commands/docs/index-generate/index.d.ts.map +1 -1
- package/dist/commands/docs/index-generate/index.js +41 -8
- package/dist/commands/docs/init/index.d.ts +17 -2
- package/dist/commands/docs/init/index.d.ts.map +1 -1
- package/dist/commands/docs/init/index.js +194 -14
- package/dist/commands/docs/init/markdown.d.ts +39 -0
- package/dist/commands/docs/init/markdown.d.ts.map +1 -0
- package/dist/commands/docs/init/markdown.js +317 -0
- package/dist/commands/docs/init/resolve-options.d.ts +3 -1
- package/dist/commands/docs/init/resolve-options.d.ts.map +1 -1
- package/dist/commands/docs/init/resolve-options.js +36 -0
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
- package/dist/commands/docs/init/scaffold.js +11 -0
- package/dist/commands/shared/agents-md.d.ts +7 -0
- package/dist/commands/shared/agents-md.d.ts.map +1 -1
- package/dist/commands/shared/agents-md.js +131 -91
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +1 -0
- package/dist/config/oat-config.d.ts +2 -1
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +4 -2
- package/package.json +2 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
3
|
-
import { formatAgentsMdGuidanceResult, formatAgentsMdMutationFailure, upsertAgentsMdSection, } from '../../shared/agents-md.js';
|
|
3
|
+
import { formatAgentsMdGuidanceResult, formatAgentsMdMutationFailure, previewAgentsMdSection, upsertAgentsMdSection, } from '../../shared/agents-md.js';
|
|
4
4
|
import { confirmAction, inputWithDefault, selectWithAbort, } from '../../shared/shared.prompts.js';
|
|
5
5
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
6
6
|
import { readOatConfig, writeOatConfig, } from '../../../config/oat-config.js';
|
|
7
7
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
8
8
|
import { Command, Option } from 'commander';
|
|
9
9
|
import { buildDocsCommands } from './docs-commands.js';
|
|
10
|
+
import { applyMarkdownDocsPlan, MarkdownDocsWriteError, planMarkdownDocs, validateMarkdownConfig, validateMarkdownTarget, } from './markdown.js';
|
|
10
11
|
import { DEFAULT_DOCS_REPO_SHAPE_DEPENDENCIES, detectDocsRepoShape, getDefaultDocsAppName, resolveDocsInitOptions, } from './resolve-options.js';
|
|
11
12
|
import { patchRootPackageJson, } from './root-package.js';
|
|
12
13
|
import { scaffoldDocsApp } from './scaffold.js';
|
|
@@ -52,6 +53,84 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
52
53
|
inputWithDefault,
|
|
53
54
|
selectWithAbort,
|
|
54
55
|
runDocsInit: async (context, options, assetsRoot) => {
|
|
56
|
+
if (options.framework === 'markdown') {
|
|
57
|
+
const config = await readOatConfig(context.cwd);
|
|
58
|
+
const plan = await planMarkdownDocs({
|
|
59
|
+
...options,
|
|
60
|
+
assetsRoot,
|
|
61
|
+
documentation: config.documentation,
|
|
62
|
+
});
|
|
63
|
+
const report = {
|
|
64
|
+
appRoot: plan.appRoot,
|
|
65
|
+
createdFiles: [],
|
|
66
|
+
preservedFiles: plan.preservedFiles,
|
|
67
|
+
auditAdvice: plan.auditAdvice,
|
|
68
|
+
changes: {
|
|
69
|
+
files: plan.files.map(({ name }) => name),
|
|
70
|
+
config: plan.configChanged,
|
|
71
|
+
},
|
|
72
|
+
configStatus: plan.configChanged ? 'planned' : 'no-change',
|
|
73
|
+
};
|
|
74
|
+
if (context.dryRun) {
|
|
75
|
+
return {
|
|
76
|
+
...report,
|
|
77
|
+
dryRun: true,
|
|
78
|
+
plannedFiles: plan.files.map(({ name }) => name),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
const result = await applyMarkdownDocsPlan(plan);
|
|
83
|
+
report.createdFiles = result.createdFiles;
|
|
84
|
+
report.preservedFiles = result.preservedFiles;
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
if (!(error instanceof MarkdownDocsWriteError))
|
|
88
|
+
throw error;
|
|
89
|
+
return {
|
|
90
|
+
...report,
|
|
91
|
+
...error.result,
|
|
92
|
+
configStatus: 'not-attempted',
|
|
93
|
+
changes: { files: error.result.createdFiles, config: false },
|
|
94
|
+
failure: { stage: 'scaffold', message: error.message },
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
if (plan.configChanged) {
|
|
98
|
+
try {
|
|
99
|
+
// Re-read after scaffolding so unrelated concurrent config edits survive.
|
|
100
|
+
const latest = await readOatConfig(context.cwd);
|
|
101
|
+
validateMarkdownConfig(context.cwd, plan.targetDir, latest.documentation);
|
|
102
|
+
latest.documentation = {
|
|
103
|
+
...latest.documentation,
|
|
104
|
+
root: plan.targetDir,
|
|
105
|
+
tooling: 'markdown',
|
|
106
|
+
index: `${plan.targetDir}/index.md`,
|
|
107
|
+
};
|
|
108
|
+
await writeOatConfig(context.cwd, latest);
|
|
109
|
+
report.configStatus = 'updated';
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
return {
|
|
113
|
+
...report,
|
|
114
|
+
configStatus: 'failed',
|
|
115
|
+
changes: { files: report.createdFiles, config: false },
|
|
116
|
+
failure: {
|
|
117
|
+
stage: 'config',
|
|
118
|
+
message: error instanceof Error ? error.message : String(error),
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
report.changes = {
|
|
124
|
+
files: report.createdFiles,
|
|
125
|
+
config: report.configStatus === 'updated',
|
|
126
|
+
};
|
|
127
|
+
if (!context.json) {
|
|
128
|
+
context.logger.info(`Markdown docs at ${plan.targetDir}: ${report.createdFiles.length} baseline file(s) created, ${report.preservedFiles?.length ?? 0} preserved.`);
|
|
129
|
+
for (const advice of plan.auditAdvice)
|
|
130
|
+
context.logger.info(advice);
|
|
131
|
+
}
|
|
132
|
+
return report;
|
|
133
|
+
}
|
|
55
134
|
const result = await scaffoldDocsApp({
|
|
56
135
|
assetsRoot,
|
|
57
136
|
...options,
|
|
@@ -75,7 +154,8 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
75
154
|
context.logger.info(` App name: ${options.appName}`);
|
|
76
155
|
context.logger.info(` Lint: ${options.lint}`);
|
|
77
156
|
context.logger.info(` Format: ${options.format}`);
|
|
78
|
-
|
|
157
|
+
if (rootPackagePatch)
|
|
158
|
+
logRootPackagePatch(context, rootPackagePatch);
|
|
79
159
|
}
|
|
80
160
|
return {
|
|
81
161
|
createdFiles: result.createdFiles,
|
|
@@ -84,12 +164,14 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
84
164
|
};
|
|
85
165
|
},
|
|
86
166
|
upsertAgentsMdSection,
|
|
167
|
+
previewAgentsMdSection,
|
|
87
168
|
readOatConfig,
|
|
88
169
|
confirmAction,
|
|
89
170
|
};
|
|
90
171
|
const FRAMEWORK_LABELS = {
|
|
91
172
|
fumadocs: 'Fumadocs (Next.js + MDX)',
|
|
92
173
|
mkdocs: 'MkDocs (Python)',
|
|
174
|
+
markdown: 'Markdown',
|
|
93
175
|
};
|
|
94
176
|
/**
|
|
95
177
|
* The AGENTS.md `## Documentation` section for a freshly scaffolded app.
|
|
@@ -103,6 +185,19 @@ const FRAMEWORK_LABELS = {
|
|
|
103
185
|
* `documentation.index` is the nav YAML the Config bullet already names.
|
|
104
186
|
*/
|
|
105
187
|
export function buildDocsSectionBody(options) {
|
|
188
|
+
if (options.framework === 'markdown') {
|
|
189
|
+
return [
|
|
190
|
+
'## Documentation',
|
|
191
|
+
'',
|
|
192
|
+
`- **Docs root:** \`${options.targetDir}\``,
|
|
193
|
+
'- **Tooling:** Markdown',
|
|
194
|
+
`- **Authored index:** \`${options.targetDir}/index.md\``,
|
|
195
|
+
`- **Contributing:** \`${options.targetDir}/contributing.md\``,
|
|
196
|
+
'',
|
|
197
|
+
'Keep authored context, title/description metadata, and Contents maps with relative Markdown links current. Preserve local instructions; asset-only directories are exempt from indexes.',
|
|
198
|
+
'Use `oat-docs-analyze` to audit gaps and `oat-docs-apply` for approved repairs. Optional generated inventories belong outside the content tree and do not replace the authored index.',
|
|
199
|
+
].join('\n');
|
|
200
|
+
}
|
|
106
201
|
const lines = [
|
|
107
202
|
'## Documentation',
|
|
108
203
|
'',
|
|
@@ -130,6 +225,7 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
130
225
|
interactive: context.interactive,
|
|
131
226
|
acceptDefaults: options.yes ?? false,
|
|
132
227
|
providedFramework: options.framework,
|
|
228
|
+
providedAdopt: options.adopt,
|
|
133
229
|
providedAppName: options.appName,
|
|
134
230
|
providedSiteName: options.siteName,
|
|
135
231
|
providedTargetDir: options.targetDir,
|
|
@@ -147,8 +243,25 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
147
243
|
process.exitCode = 0;
|
|
148
244
|
return;
|
|
149
245
|
}
|
|
246
|
+
if (context.dryRun && resolved.framework !== 'markdown') {
|
|
247
|
+
throw new Error('--dry-run applies only to --framework markdown.');
|
|
248
|
+
}
|
|
249
|
+
if (options.adopt && resolved.framework !== 'markdown') {
|
|
250
|
+
throw new Error('--adopt applies only to --framework markdown.');
|
|
251
|
+
}
|
|
252
|
+
const inapplicableOptions = [];
|
|
150
253
|
const existingConfig = await dependencies.readOatConfig(context.cwd);
|
|
151
|
-
if (
|
|
254
|
+
if (resolved.framework === 'markdown') {
|
|
255
|
+
resolved.targetDir = await validateMarkdownTarget(context.cwd, resolved.targetDir);
|
|
256
|
+
validateMarkdownConfig(context.cwd, resolved.targetDir, existingConfig.documentation);
|
|
257
|
+
if (options.appName !== undefined)
|
|
258
|
+
inapplicableOptions.push('--app-name');
|
|
259
|
+
if (options.rootPatch === false)
|
|
260
|
+
inapplicableOptions.push('--no-root-patch');
|
|
261
|
+
if (!context.json && inapplicableOptions.length)
|
|
262
|
+
context.logger.warn(`Inapplicable to Markdown: ${inapplicableOptions.join(', ')}. No app or package changes will be made.`);
|
|
263
|
+
}
|
|
264
|
+
else if (existingConfig.documentation?.root) {
|
|
152
265
|
const configDesc = `root: ${existingConfig.documentation.root}, tooling: ${existingConfig.documentation.tooling ?? 'unknown'}`;
|
|
153
266
|
if (context.json) {
|
|
154
267
|
// JSON mode: include warning in output, proceed only with --yes
|
|
@@ -175,21 +288,78 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
175
288
|
}
|
|
176
289
|
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
177
290
|
const scaffold = await dependencies.runDocsInit(context, resolved, assetsRoot);
|
|
291
|
+
if (scaffold?.failure) {
|
|
292
|
+
if (context.json) {
|
|
293
|
+
context.logger.json({
|
|
294
|
+
status: 'partial',
|
|
295
|
+
...resolved,
|
|
296
|
+
...scaffold,
|
|
297
|
+
scaffold: {
|
|
298
|
+
status: scaffold.failure.stage === 'scaffold' ? 'partial' : 'complete',
|
|
299
|
+
targetDir: resolved.targetDir,
|
|
300
|
+
createdFiles: scaffold.createdFiles,
|
|
301
|
+
},
|
|
302
|
+
guidance: { action: 'not-attempted' },
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
context.logger.warn(`Markdown setup is partial: ${scaffold.failure.stage} failed: ${scaffold.failure.message}`);
|
|
307
|
+
context.logger.info(`Created baseline files: ${scaffold.createdFiles.join(', ') || 'none'}. Configuration: ${scaffold.configStatus}. Guidance was not attempted; preserve created content when retrying with --adopt.`);
|
|
308
|
+
if (scaffold.incompleteFiles?.length) {
|
|
309
|
+
context.logger.warn(`Baseline files requiring inspection: ${scaffold.incompleteFiles.join(', ')}. Automatic cleanup could not be completed; inspect or repair these paths before retrying. Adoption preserves existing files.`);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
process.exitCode = 1;
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
178
315
|
const sectionBody = buildDocsSectionBody(resolved);
|
|
179
316
|
let sectionResult;
|
|
180
317
|
try {
|
|
181
|
-
sectionResult =
|
|
318
|
+
sectionResult =
|
|
319
|
+
resolved.framework === 'markdown' && context.dryRun
|
|
320
|
+
? await dependencies.previewAgentsMdSection(context.cwd, 'docs', sectionBody)
|
|
321
|
+
: await dependencies.upsertAgentsMdSection(context.cwd, 'docs', sectionBody);
|
|
182
322
|
}
|
|
183
323
|
catch (error) {
|
|
184
|
-
|
|
324
|
+
if (resolved.framework !== 'markdown')
|
|
325
|
+
throw new Error(formatAgentsMdMutationFailure(error), { cause: error });
|
|
326
|
+
sectionResult = {
|
|
327
|
+
action: 'blocked',
|
|
328
|
+
blocked: {
|
|
329
|
+
code: 'blocked',
|
|
330
|
+
target: 'AGENTS.md',
|
|
331
|
+
reason: formatAgentsMdMutationFailure(error),
|
|
332
|
+
action: 'Review root guidance and retry.',
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
const markdownDetails = resolved.framework === 'markdown'
|
|
337
|
+
? {
|
|
338
|
+
...resolved,
|
|
339
|
+
...scaffold,
|
|
340
|
+
dryRun: context.dryRun,
|
|
341
|
+
inapplicableOptions,
|
|
342
|
+
changes: {
|
|
343
|
+
...scaffold?.changes,
|
|
344
|
+
guidance: sectionResult.action !== 'no-change',
|
|
345
|
+
},
|
|
346
|
+
}
|
|
347
|
+
: {};
|
|
348
|
+
if (resolved.framework === 'markdown' && context.dryRun && !context.json) {
|
|
349
|
+
context.logger.info(`Dry run: ${scaffold?.plannedFiles?.length ?? 0} planned baseline file(s); configuration ${scaffold?.configStatus}; guidance ${sectionResult.action}. No changes were written.`);
|
|
350
|
+
for (const advice of scaffold?.auditAdvice ?? [])
|
|
351
|
+
context.logger.info(advice);
|
|
185
352
|
}
|
|
186
353
|
if (sectionResult.action === 'manual-required' ||
|
|
187
354
|
sectionResult.action === 'blocked') {
|
|
188
355
|
if (context.json) {
|
|
189
356
|
context.logger.json({
|
|
190
357
|
status: 'partial',
|
|
358
|
+
...markdownDetails,
|
|
191
359
|
scaffold: {
|
|
192
|
-
status: '
|
|
360
|
+
status: resolved.framework === 'markdown' && context.dryRun
|
|
361
|
+
? 'planned'
|
|
362
|
+
: 'complete',
|
|
193
363
|
targetDir: resolved.targetDir,
|
|
194
364
|
framework: resolved.framework,
|
|
195
365
|
},
|
|
@@ -197,7 +367,7 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
197
367
|
});
|
|
198
368
|
}
|
|
199
369
|
else {
|
|
200
|
-
context.logger.warn(
|
|
370
|
+
context.logger.warn(`${resolved.framework === 'markdown' && context.dryRun ? 'Docs scaffold planned' : 'Docs scaffold completed'}; AGENTS.md guidance is ${sectionResult.action}.`);
|
|
201
371
|
for (const line of formatAgentsMdGuidanceResult(sectionResult)) {
|
|
202
372
|
context.logger.info(line);
|
|
203
373
|
}
|
|
@@ -211,14 +381,21 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
211
381
|
...resolved,
|
|
212
382
|
...scaffold,
|
|
213
383
|
guidance: sectionResult,
|
|
384
|
+
...markdownDetails,
|
|
214
385
|
});
|
|
215
386
|
}
|
|
216
387
|
else if (sectionResult.action !== 'no-change') {
|
|
217
|
-
context.logger.info(`AGENTS.md docs section ${sectionResult.action}.`);
|
|
388
|
+
context.logger.info(`AGENTS.md docs section ${resolved.framework === 'markdown' && context.dryRun ? 'planned: ' : ''}${sectionResult.action}.`);
|
|
218
389
|
}
|
|
219
390
|
if (!context.json) {
|
|
220
391
|
context.logger.info('');
|
|
221
392
|
context.logger.info('Next steps:');
|
|
393
|
+
if (resolved.framework === 'markdown') {
|
|
394
|
+
context.logger.info(` Read ${resolved.targetDir}/index.md and ${resolved.targetDir}/contributing.md.`);
|
|
395
|
+
context.logger.info(' Use oat-docs-analyze to audit documentation and oat-docs-apply for approved repairs.');
|
|
396
|
+
process.exitCode = 0;
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
222
399
|
const commands = buildDocsCommands(resolved.repoShape, resolved.targetDir, resolved.appName);
|
|
223
400
|
context.logger.info(` ${commands.install}`);
|
|
224
401
|
context.logger.info(` ${commands.dev}`);
|
|
@@ -250,15 +427,16 @@ export function createDocsInitCommand(overrides = {}) {
|
|
|
250
427
|
...overrides,
|
|
251
428
|
};
|
|
252
429
|
return new Command('init')
|
|
253
|
-
.description('
|
|
430
|
+
.description('Bootstrap an OAT docs app or authored Markdown documentation')
|
|
254
431
|
.addOption(new Option('--framework <framework>', 'Documentation framework').choices([
|
|
255
432
|
'fumadocs',
|
|
256
433
|
'mkdocs',
|
|
434
|
+
'markdown',
|
|
257
435
|
]))
|
|
258
|
-
.addOption(new Option('--app-name <name>', 'Docs app name'))
|
|
259
|
-
.addOption(new Option('--site-name <name>', '
|
|
260
|
-
.addOption(new Option('--target-dir <path>', '
|
|
261
|
-
.addOption(new Option('--description <text>', '
|
|
436
|
+
.addOption(new Option('--app-name <name>', 'Docs app name (inapplicable to Markdown)'))
|
|
437
|
+
.addOption(new Option('--site-name <name>', 'Site display title or Markdown documentation title'))
|
|
438
|
+
.addOption(new Option('--target-dir <path>', 'Docs directory (Markdown defaults to docs; requires a dedicated directory)'))
|
|
439
|
+
.addOption(new Option('--description <text>', 'Documentation description'))
|
|
262
440
|
.addOption(new Option('--lint <mode>', 'Markdown lint mode').choices([
|
|
263
441
|
'none',
|
|
264
442
|
'markdownlint-cli2',
|
|
@@ -267,7 +445,9 @@ export function createDocsInitCommand(overrides = {}) {
|
|
|
267
445
|
'oxfmt',
|
|
268
446
|
'none',
|
|
269
447
|
]))
|
|
270
|
-
.option('--no-root-patch', 'Skip
|
|
448
|
+
.option('--no-root-patch', 'Skip root package.json patch (inapplicable to Markdown)')
|
|
449
|
+
.option('--adopt', 'Add missing baseline files to existing Markdown docs; preserve authored content (Markdown only)')
|
|
450
|
+
.option('--dry-run', 'Preview Markdown files, config, and guidance without writes (Markdown only)')
|
|
271
451
|
.option('--yes', 'Accept defaults without prompting')
|
|
272
452
|
.action(async (options, command) => {
|
|
273
453
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { OatDocumentationConfig } from '../../../config/oat-config.js';
|
|
2
|
+
import { type DocsInitResolvedOptions } from './resolve-options.js';
|
|
3
|
+
/** Validate a dedicated Markdown root, including existing symlink ancestors. */
|
|
4
|
+
export declare function validateMarkdownTarget(repoRoot: string, targetDir: string): Promise<string>;
|
|
5
|
+
export interface MarkdownDocsOptions extends DocsInitResolvedOptions {
|
|
6
|
+
assetsRoot: string;
|
|
7
|
+
documentation?: OatDocumentationConfig;
|
|
8
|
+
}
|
|
9
|
+
export interface MarkdownDocsPlan {
|
|
10
|
+
repoRoot: string;
|
|
11
|
+
targetDir: string;
|
|
12
|
+
appRoot: string;
|
|
13
|
+
files: {
|
|
14
|
+
name: string;
|
|
15
|
+
content: string;
|
|
16
|
+
}[];
|
|
17
|
+
preservedFiles: string[];
|
|
18
|
+
auditAdvice: string[];
|
|
19
|
+
documentationConfig: OatDocumentationConfig;
|
|
20
|
+
configChanged: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface MarkdownDocsResult {
|
|
23
|
+
appRoot: string;
|
|
24
|
+
createdFiles: string[];
|
|
25
|
+
incompleteFiles: string[];
|
|
26
|
+
preservedFiles: string[];
|
|
27
|
+
auditAdvice: string[];
|
|
28
|
+
documentationConfig: OatDocumentationConfig;
|
|
29
|
+
}
|
|
30
|
+
export declare class MarkdownDocsWriteError extends Error {
|
|
31
|
+
readonly result: MarkdownDocsResult;
|
|
32
|
+
constructor(message: string, result: MarkdownDocsResult, cause: unknown);
|
|
33
|
+
}
|
|
34
|
+
export declare function validateMarkdownConfig(repoRoot: string, targetDir: string, declared?: OatDocumentationConfig): void;
|
|
35
|
+
/** Read-only inspection used by both adoption and CLI dry-run. */
|
|
36
|
+
export declare function planMarkdownDocs(options: MarkdownDocsOptions): Promise<MarkdownDocsPlan>;
|
|
37
|
+
/** Adds missing baseline files exclusively; config is persisted by the caller. */
|
|
38
|
+
export declare function applyMarkdownDocsPlan(plan: MarkdownDocsPlan): Promise<MarkdownDocsResult>;
|
|
39
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/markdown.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAKjE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAE3B,gFAAgF;AAChF,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CA0CjB;AAsBD,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,mBAAmB,EAAE,sBAAsB,CAAC;IAC5C,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAG7C,QAAQ,CAAC,MAAM,EAAE,kBAAkB;IAFrC,YACE,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,kBAAkB,EACnC,KAAK,EAAE,OAAO,EAGf;CACF;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,sBAAsB,GAChC,IAAI,CAeN;AA6JD,kEAAkE;AAClE,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CA2E3B;AAED,kFAAkF;AAClF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,kBAAkB,CAAC,CA8E7B"}
|