@agentskit/doc-bridge 1.6.2 → 1.6.3
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/CHANGELOG.md +6 -0
- package/action.yml +1 -1
- package/bin/ak-verify.js +9 -0
- package/dist/cli/program.js +303 -55
- package/dist/cli/program.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -1
- package/dist/{index-Di7PkJuf.d.ts → index-DudNuwI5.d.ts} +24 -1
- package/dist/index.d.ts +24 -5
- package/dist/index.js +249 -43
- package/dist/index.js.map +1 -1
- package/docs/knowledge-engine-runbook.md +14 -0
- package/docs/verification-harness.md +36 -0
- package/mcpb/manifest.json +1 -1
- package/package.json +52 -44
- package/scripts/report-visual-check.mjs +239 -0
- package/scripts/verification-harness.mjs +280 -0
- package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
- package/src/cli/program.ts +64 -7
- package/src/config/index.ts +2 -0
- package/src/config/schema.ts +9 -0
- package/src/index.ts +8 -1
- package/src/lib/markdown.ts +5 -0
- package/src/reconciliation/reconcile.ts +9 -1
- package/src/report/html.ts +292 -40
- package/src/schemas/knowledge.ts +1 -0
- package/src/version.ts +1 -1
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AgentCorpusConfig, t as AgentCorpusConfigSchema, C as ConfigNotFoundError, u as ConformanceConfigSchema, D as DocBridgeConfigV1, d as DocBridgeConfigV1Schema, c as DocumentationStandardRuleId, e as DocumentationStandardRuleIdSchema, f as DocumentationStandardV1Config, g as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, H as HumanCorpusConfigSchema, o as applyConfigDefaults, p as defineConfig, q as loadConfig, r as projectRootFromConfigPath, s as resolveProjectRoot } from '../index-
|
|
1
|
+
export { A as AgentCorpusConfig, t as AgentCorpusConfigSchema, C as ConfigNotFoundError, u as ConformanceConfigSchema, D as DocBridgeConfigV1, d as DocBridgeConfigV1Schema, c as DocumentationStandardRuleId, e as DocumentationStandardRuleIdSchema, f as DocumentationStandardV1Config, g as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, H as HumanCorpusConfigSchema, v as ReconciliationConfig, w as ReconciliationConfigSchema, o as applyConfigDefaults, p as defineConfig, q as loadConfig, r as projectRootFromConfigPath, s as resolveProjectRoot } from '../index-DudNuwI5.js';
|
|
2
2
|
import 'zod';
|
package/dist/config/index.js
CHANGED
|
@@ -204,6 +204,10 @@ var RulesConfigSchema = z.object({
|
|
|
204
204
|
criticalPaths: z.array(z.string().min(1).max(512)).max(128).optional(),
|
|
205
205
|
warningThresholds: z.record(RuleIdSchema, z.number().int().min(1).max(1e5)).optional()
|
|
206
206
|
}).strict();
|
|
207
|
+
var ReconciliationConfigSchema = z.object({
|
|
208
|
+
/** Relation kinds that must have documentation declarations. Omit to require all observed kinds; [] disables this signal. */
|
|
209
|
+
requiredRelationKinds: z.array(z.string().min(1).max(128)).max(128).optional()
|
|
210
|
+
}).strict();
|
|
207
211
|
var WorkflowConfigSchema = z.object({
|
|
208
212
|
stateDir: z.string().min(1).max(512).optional()
|
|
209
213
|
}).strict();
|
|
@@ -377,6 +381,7 @@ var DocBridgeConfigV1Schema = z.object({
|
|
|
377
381
|
index: IndexConfigSchema.optional(),
|
|
378
382
|
routing: RoutingConfigSchema.optional(),
|
|
379
383
|
gates: GatesConfigSchema.optional(),
|
|
384
|
+
reconciliation: ReconciliationConfigSchema.optional(),
|
|
380
385
|
rules: RulesConfigSchema.optional(),
|
|
381
386
|
workflow: WorkflowConfigSchema.optional(),
|
|
382
387
|
safety: RepositorySafetyConfigSchema.optional(),
|
|
@@ -755,6 +760,7 @@ export {
|
|
|
755
760
|
DocumentationStandardV1ConfigSchema,
|
|
756
761
|
EcosystemContractEvidenceSchema,
|
|
757
762
|
HumanCorpusConfigSchema,
|
|
763
|
+
ReconciliationConfigSchema,
|
|
758
764
|
applyConfigDefaults,
|
|
759
765
|
defineConfig,
|
|
760
766
|
loadConfig,
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/defaults.ts","../../src/config/schema.ts","../../src/config/define-config.ts","../../src/config/load-config.ts","../../src/lib/static-js-literal.ts"],"sourcesContent":["import type { DocBridgeConfigV1 } from './schema.js'\n\nconst DEFAULT_AGENT_EXCLUDE = ['**/node_modules/**', '**/.git/**'] as const\n\nexport const applyConfigDefaults = (config: DocBridgeConfigV1): DocBridgeConfigV1 => {\n const agentRoot = config.corpus.agent.root\n const agentIndex = config.corpus.agent.index ?? `${agentRoot}/INDEX.md`\n\n return {\n ...config,\n corpus: {\n ...config.corpus,\n agent: {\n ...config.corpus.agent,\n index: agentIndex,\n include: config.corpus.agent.include ?? ['**/*.{md,mdx}'],\n exclude: config.corpus.agent.exclude ?? [...DEFAULT_AGENT_EXCLUDE],\n },\n },\n index: {\n outFile: '.doc-bridge/index.json',\n contentHash: 'sha256-normalized-v1',\n llmsTxt: {\n enabled: true,\n outFile: 'llms.txt',\n ...config.index?.llmsTxt,\n },\n capabilities: {\n enabled: true,\n outFile: '.doc-bridge/capabilities.json',\n ...config.index?.capabilities,\n },\n ...config.index,\n },\n gates: {\n preset: 'minimal',\n ...config.gates,\n },\n rules: {\n mode: 'default',\n ...config.rules,\n },\n safety: {\n redactSecrets: true,\n ...config.safety,\n },\n surfaces: {\n cli: {\n bin: 'ak-docs',\n defaultFormat: 'json',\n ...config.surfaces?.cli,\n },\n mcp: {\n enabled: true,\n tools: [\n 'handoff.resolve', 'doc.search', 'doc.get', 'gate.status', 'retriever.query',\n 'memory.classify', 'memory.promoteDraft', 'registry.topology',\n 'docbridge.snapshot', 'docbridge.report', 'docbridge.diagnostics',\n 'docbridge.relations', 'docbridge.run', 'docbridge.proposals',\n ],\n transport: 'stdio',\n ...config.surfaces?.mcp,\n },\n ...config.surfaces,\n },\n intelligence: config.intelligence\n ? {\n enabled: false,\n ...config.intelligence,\n chat: config.intelligence.chat\n ? { handoffFirst: true, ...config.intelligence.chat }\n : undefined,\n }\n : { enabled: false },\n }\n}\n","import { z } from 'zod'\n\nexport const CONFIG_SCHEMA_VERSION = 1 as const\n\nexport const HumanCorpusPluginIdSchema = z.enum([\n 'plain-markdown',\n 'fumadocs',\n 'docusaurus',\n 'mkdocs',\n 'vitepress',\n 'starlight',\n 'nextra',\n 'custom',\n])\n\nexport const AgentCorpusConfigSchema = z\n .object({\n root: z.string().min(1).max(512),\n index: z.string().min(1).max(512).optional(),\n include: z.array(z.string().min(1).max(256)).max(64).optional(),\n exclude: z.array(z.string().min(1).max(256)).max(64).optional(),\n okf: z\n .object({\n requireType: z.boolean().optional(),\n allowedTypes: z.array(z.string().min(1).max(128)).max(64).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const HumanCorpusConfigSchema = z\n .object({\n plugin: HumanCorpusPluginIdSchema,\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n\nexport const IndexConfigSchema = z\n .object({\n outFile: z.string().min(1).max(512).optional(),\n llmsTxt: z\n .object({\n enabled: z.boolean().optional(),\n outFile: z.string().min(1).max(512).optional(),\n preamble: z.string().max(4_000).optional(),\n urlPrefix: z.string().url().optional(),\n pathPrefix: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n capabilities: z\n .object({\n enabled: z.boolean().optional(),\n outFile: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n contentHash: z.literal('sha256-normalized-v1').optional(),\n })\n .strict()\n\nexport const OwnershipEntrySchema = z\n .object({\n path: z.string().min(1).max(512),\n group: z.string().min(1).max(128).optional(),\n layer: z.string().min(1).max(32).optional(),\n purpose: z.string().max(1024).optional(),\n checks: z.array(z.string().min(1).max(256)).max(32).optional(),\n agentDoc: z.string().min(1).max(512).optional(),\n humanDoc: z.string().min(1).max(512).optional(),\n })\n .strict()\n\nexport const RoutingConfigSchema = z\n .object({\n plugin: z\n .enum(['pnpm-monorepo', 'npm-workspaces', 'yarn-workspaces', 'nx', 'pattern-files', 'custom'])\n .optional(),\n options: z\n .object({\n packages: z.array(z.string().min(1).max(256)).max(128).optional(),\n /** Infer ownership from corpus paths/frontmatter (default true). */\n ownershipFromCorpus: z.boolean().optional(),\n ownership: z.record(z.string().min(1).max(256), OwnershipEntrySchema).optional(),\n intents: z\n .array(\n z\n .object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(256),\n paths: z.array(z.string().min(1).max(512)).max(32),\n })\n .strict(),\n )\n .max(128)\n .optional(),\n changes: z\n .array(\n z\n .object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(256),\n startHere: z.string().min(1).max(512),\n relatedPackages: z.array(z.string().min(1).max(256)).max(32).optional(),\n })\n .strict(),\n )\n .max(128)\n .optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const GatesConfigSchema = z\n .object({\n /** minimal: freshness · standard: + human links · strict: + okf-type · playbook: freshness + okf soft style */\n preset: z.enum(['minimal', 'standard', 'strict', 'playbook']).optional(),\n include: z\n .array(\n z.enum([\n 'index-freshness',\n 'human-guide-links',\n 'link-rot',\n 'okf-type',\n 'docs-style',\n 'routing-currency',\n 'bootstrap-size',\n 'documentation-standard-v1',\n ]),\n )\n .max(16)\n .optional(),\n exclude: z\n .array(\n z.enum([\n 'index-freshness',\n 'human-guide-links',\n 'link-rot',\n 'okf-type',\n 'docs-style',\n 'routing-currency',\n 'bootstrap-size',\n 'documentation-standard-v1',\n ]),\n )\n .max(16)\n .optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n\nexport const RuleIdSchema = z.enum([\n 'documentation-quality',\n 'graph-undocumented-relation',\n 'declared-unobserved-relation',\n 'unresolved-reference',\n 'conflicting-declaration',\n 'not-analyzed-coverage',\n 'stale-documentation',\n 'centrality-risk',\n 'critical-path-risk',\n 'freshness',\n 'ownership',\n])\n\nexport const RuleSeveritySchema = z.enum(['off', 'info', 'warn', 'error'])\n\nexport const RulesConfigSchema = z\n .object({\n mode: z.enum(['default', 'recommended', 'strict']).optional(),\n severity: z.record(RuleIdSchema, RuleSeveritySchema).optional(),\n ignore: z.array(RuleIdSchema).max(128).optional(),\n criticalEntities: z.array(z.string().min(1).max(256)).max(128).optional(),\n criticalPaths: z.array(z.string().min(1).max(512)).max(128).optional(),\n warningThresholds: z.record(RuleIdSchema, z.number().int().min(1).max(100_000)).optional(),\n })\n .strict()\n\nexport const WorkflowConfigSchema = z\n .object({\n stateDir: z.string().min(1).max(512).optional(),\n })\n .strict()\n\nexport const RepositorySafetyConfigSchema = z\n .object({\n exclude: z.array(z.string().min(1).max(512)).max(128).optional(),\n maxFiles: z.number().int().positive().max(1_000_000).optional(),\n maxBytes: z.number().int().positive().max(10_000_000_000).optional(),\n maxTimeMs: z.number().int().positive().max(86_400_000).optional(),\n maxMemoryMb: z.number().int().positive().max(1_048_576).optional(),\n redactSecrets: z.boolean().optional(),\n })\n .strict()\n\nexport const SurfacesConfigSchema = z\n .object({\n cli: z\n .object({\n bin: z.string().min(1).max(64).optional(),\n defaultFormat: z.enum(['json', 'text']).optional(),\n })\n .strict()\n .optional(),\n mcp: z\n .object({\n enabled: z.boolean().optional(),\n tools: z\n .array(\n z.enum([\n 'handoff.resolve',\n 'doc.search',\n 'doc.get',\n 'gate.status',\n 'playbook.pattern.get',\n 'retriever.query',\n 'memory.classify',\n 'memory.promoteDraft',\n 'registry.topology',\n 'docbridge.snapshot',\n 'docbridge.report',\n 'docbridge.diagnostics',\n 'docbridge.relations',\n 'docbridge.run',\n 'docbridge.proposals',\n ]),\n )\n .max(16)\n .optional(),\n transport: z.enum(['stdio', 'http']).optional(),\n http: z\n .object({\n port: z.number().int().min(1).max(65_535).optional(),\n path: z.string().min(1).max(256).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const IntelligenceConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n adapter: z\n .object({\n provider: z.enum(['openai', 'anthropic', 'ollama', 'openrouter', 'custom']),\n model: z.string().min(1).max(128).optional(),\n apiKeyEnv: z.string().min(0).max(128).optional(),\n baseUrl: z.string().url().optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n .optional(),\n chat: z\n .object({\n enabled: z.boolean().optional(),\n sources: z.array(z.enum(['agent', 'human', 'federation'])).max(8).optional(),\n handoffFirst: z.boolean().optional(),\n })\n .strict()\n .optional(),\n retriever: z\n .object({\n enabled: z.boolean().optional(),\n mode: z.enum(['local', 'remote', 'bm25', 'agentskit-rag']).optional(),\n embedModel: z.string().min(1).max(128).optional(),\n chunkSize: z.number().int().min(128).max(16_384).optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n .optional(),\n memory: z\n .object({\n enabled: z.boolean().optional(),\n adapters: z\n .array(z.enum(['playbook-memory', 'cursor-rules', 'session-export', 'bootstrap-delta']))\n .max(8)\n .optional(),\n ingestDir: z.string().min(1).max(512).optional(),\n classify: z.boolean().optional(),\n promote: z\n .object({\n enabled: z.boolean().optional(),\n targets: z.array(z.enum(['agent', 'human', 'agents-md'])).max(8).optional(),\n requireApproval: z.boolean().optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n .optional(),\n runtime: z.enum(['agentskit', 'custom']).optional(),\n runtimeModule: z.string().min(1).max(512).optional(),\n registry: z\n .object({\n enabled: z.boolean().optional(),\n agentId: z.string().min(1).max(256).optional(),\n agentRoot: z.string().min(1).max(512).optional(),\n runnerModule: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const FederationConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n sources: z\n .array(\n z\n .object({\n id: z.string().min(1).max(64),\n llmsTxt: z.string().min(1).max(512).optional(),\n rawBaseUrl: z.string().url().optional(),\n includeInRetriever: z.boolean().optional(),\n includeInChat: z.boolean().optional(),\n })\n .strict(),\n )\n .max(16)\n .optional(),\n })\n .strict()\n\nexport const DocumentationEvidenceFileSchema = z\n .object({\n path: z.string().min(1).max(512),\n contains: z.array(z.string().min(1).max(512)).min(1).max(32),\n })\n .strict()\n\nexport const DocumentationLinkEvidenceSchema = z\n .object({\n url: z.string().url().max(512),\n paths: z.array(z.string().min(1).max(512)).min(1).max(32),\n })\n .strict()\n\nexport const DocumentationQuickstartEvidenceSchema = z\n .object({\n id: z.string().regex(/^[a-z][a-z0-9-]*$/).max(128),\n doc: z.string().min(1).max(512),\n test: z.string().min(1).max(512),\n command: z.string().min(1).max(512),\n testContains: z.array(z.string().min(1).max(256)).min(1).max(16),\n })\n .strict()\n\nexport const EcosystemContractEvidenceSchema = z\n .object({\n manifest: z.string().min(1).max(512),\n claims: z.string().min(1).max(512),\n productId: z.string().regex(/^[a-z][a-z0-9-]*$/).max(128),\n })\n .strict()\n\nexport const DocumentationStandardRuleIdSchema = z.enum([\n 'human-docs',\n 'llms-and-raw-source',\n 'agent-handoffs',\n 'contribution',\n 'metadata',\n 'cross-links',\n 'tested-quickstarts',\n 'visual-explanations',\n 'structured-diagrams',\n])\n\nexport const DocumentationStandardExceptionSchema = z\n .object({\n ruleId: DocumentationStandardRuleIdSchema,\n reason: z.string().min(10).max(1_024),\n approvedBy: z.string().min(1).max(256),\n trackingUrl: z.string().url().max(512),\n })\n .strict()\n\nexport const DocumentationStandardV1ConfigSchema = z\n .object({\n rawSources: z.array(z.string().min(1).max(512)).max(64).optional(),\n contributionPaths: z.array(z.string().min(1).max(512)).max(16).optional(),\n metadata: z.array(DocumentationEvidenceFileSchema).max(32).optional(),\n links: z.array(DocumentationLinkEvidenceSchema).max(64).optional(),\n quickstarts: z.array(DocumentationQuickstartEvidenceSchema).max(32).optional(),\n visuals: z.array(z.string().min(1).max(512)).max(64).optional(),\n diagrams: z.array(DocumentationEvidenceFileSchema).max(32).optional(),\n ecosystemContract: EcosystemContractEvidenceSchema.optional(),\n exceptions: z.array(DocumentationStandardExceptionSchema).max(32).optional(),\n })\n .strict()\n .superRefine((value, context) => {\n const seen = new Set<string>()\n for (const [index, exception] of (value.exceptions ?? []).entries()) {\n if (seen.has(exception.ruleId)) {\n context.addIssue({\n code: 'custom',\n path: ['exceptions', index, 'ruleId'],\n message: `Duplicate exception for rule ${exception.ruleId}`,\n })\n }\n seen.add(exception.ruleId)\n }\n })\n\nexport const ConformanceConfigSchema = z\n .object({\n documentationStandardV1: DocumentationStandardV1ConfigSchema.optional(),\n })\n .strict()\n\nexport const DocBridgeConfigV1Schema = z\n .object({\n schemaVersion: z.literal(CONFIG_SCHEMA_VERSION),\n project: z\n .object({\n name: z.string().min(1).max(128).optional(),\n root: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n corpus: z\n .object({\n agent: AgentCorpusConfigSchema,\n human: z.union([HumanCorpusConfigSchema, z.array(HumanCorpusConfigSchema).max(8)]).optional(),\n })\n .strict(),\n index: IndexConfigSchema.optional(),\n routing: RoutingConfigSchema.optional(),\n gates: GatesConfigSchema.optional(),\n rules: RulesConfigSchema.optional(),\n workflow: WorkflowConfigSchema.optional(),\n safety: RepositorySafetyConfigSchema.optional(),\n surfaces: SurfacesConfigSchema.optional(),\n intelligence: IntelligenceConfigSchema.optional(),\n federation: FederationConfigSchema.optional(),\n conformance: ConformanceConfigSchema.optional(),\n })\n .strict()\n\nexport type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>\nexport type AgentCorpusConfig = z.infer<typeof AgentCorpusConfigSchema>\nexport type HumanCorpusConfig = z.infer<typeof HumanCorpusConfigSchema>\nexport type DocumentationStandardV1Config = z.infer<typeof DocumentationStandardV1ConfigSchema>\nexport type DocumentationStandardRuleId = z.infer<typeof DocumentationStandardRuleIdSchema>\nexport type RuleId = z.infer<typeof RuleIdSchema>\nexport type RuleSeverity = z.infer<typeof RuleSeveritySchema>\nexport type RulesConfig = z.infer<typeof RulesConfigSchema>\nexport type WorkflowConfig = z.infer<typeof WorkflowConfigSchema>\nexport type RepositorySafetyConfig = z.infer<typeof RepositorySafetyConfigSchema>\n","import { applyConfigDefaults } from './defaults.js'\nimport { DocBridgeConfigV1Schema, type DocBridgeConfigV1 } from './schema.js'\n\n/** Type-safe config helper for `doc-bridge.config.ts`. */\nexport const defineConfig = (config: DocBridgeConfigV1): DocBridgeConfigV1 =>\n applyConfigDefaults(DocBridgeConfigV1Schema.parse(config))","import { existsSync, readFileSync } from 'node:fs'\nimport { basename, dirname, join, resolve } from 'node:path'\n\nimport { parseStaticJsObject } from '../lib/static-js-literal.js'\nimport { applyConfigDefaults } from './defaults.js'\nimport { DocBridgeConfigV1Schema, type DocBridgeConfigV1 } from './schema.js'\n\nconst CONFIG_CANDIDATES = [\n 'doc-bridge.config.ts',\n 'doc-bridge.config.mts',\n 'doc-bridge.config.js',\n 'doc-bridge.config.mjs',\n 'doc-bridge.config.json',\n 'doc-bridge.config.yaml',\n 'doc-bridge.config.yml',\n 'package.json',\n] as const\n\nexport type LoadConfigOptions = {\n readonly cwd?: string\n readonly explicitPath?: string\n}\n\nexport type LoadConfigResult = {\n readonly config: DocBridgeConfigV1\n readonly path: string\n}\n\nexport class ConfigNotFoundError extends Error {\n constructor(readonly cwd: string) {\n super(\n `No doc-bridge config found in ${cwd}. Run: ak-docs init — or pass --config <path>.`,\n )\n this.name = 'ConfigNotFoundError'\n }\n}\n\nconst findConfigPath = (cwd: string, explicitPath?: string): string | null => {\n if (explicitPath) {\n const abs = resolve(cwd, explicitPath)\n return existsSync(abs) ? abs : null\n }\n for (const name of CONFIG_CANDIDATES) {\n const candidate = join(cwd, name)\n if (!existsSync(candidate)) continue\n if (name !== 'package.json') return candidate\n const pkg = parseJsonConfig(readFileSync(candidate, 'utf8'), candidate) as { docBridge?: unknown }\n if (pkg.docBridge) return candidate\n }\n return null\n}\n\nconst parseJsonConfig = (raw: string, path: string): unknown => {\n try {\n return JSON.parse(raw) as unknown\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n throw new Error(`Failed to parse JSON config at ${path}: ${message}`)\n }\n}\n\nconst parseCodeConfig = (raw: string, path: string): unknown => {\n const unsupportedImports = raw\n .replace(/import\\s+type\\s+[\\s\\S]*?;?\\n/g, '')\n .replace(/import\\s+\\{\\s*defineConfig\\s*\\}\\s+from\\s+['\"]@agentskit\\/doc-bridge(?:\\/config)?['\"];?\\n?/g, '')\n if (/\\bimport\\b/.test(unsupportedImports)) {\n throw new Error(`Unsupported import in ${path}. Static config only supports defineConfig imports.`)\n }\n try {\n return parseStaticJsObject(raw)\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n throw new Error(`Failed to load config at ${path}: ${message}`)\n }\n}\n\nconst parseConfig = (input: unknown): DocBridgeConfigV1 => {\n const result = DocBridgeConfigV1Schema.safeParse(input)\n if (result.success) return result.data\n throw new Error(\n `Invalid doc-bridge config:\\n${result.error.issues.map((issue) =>\n ` - ${issue.path.join('.') || '(root)'}: ${issue.message}`,\n ).join('\\n')}`,\n )\n}\n\n/** v0.1 — static JS/TS config, JSON config files, and package.json#docBridge. */\nexport const loadConfig = (opts: LoadConfigOptions = {}): LoadConfigResult => {\n const cwd = resolve(opts.cwd ?? process.cwd())\n const path = findConfigPath(cwd, opts.explicitPath)\n if (!path) throw new ConfigNotFoundError(cwd)\n\n const raw = readFileSync(path, 'utf8')\n const ext = path.split('.').pop()?.toLowerCase()\n if (ext === 'yaml' || ext === 'yml') {\n throw new Error(`YAML config is not supported yet (${path}). Use doc-bridge.config.json for now.`)\n }\n\n const parsed =\n basename(path) === 'package.json'\n ? (parseJsonConfig(raw, path) as { docBridge?: unknown }).docBridge\n : ext === 'ts' || ext === 'mts' || ext === 'js' || ext === 'mjs'\n ? parseCodeConfig(raw, path)\n : parseJsonConfig(raw, path)\n const config = applyConfigDefaults(parseConfig(parsed))\n return { config, path }\n}\n\nexport const resolveProjectRoot = (start = process.cwd()): string => {\n let cur = resolve(start)\n for (let i = 0; i < 12; i += 1) {\n if (findConfigPath(cur)) return cur\n const parent = dirname(cur)\n if (parent === cur) break\n cur = parent\n }\n return resolve(start)\n}\n\n/** Project root for a loaded config file path (directory of the config). */\nexport const projectRootFromConfigPath = (\n configFilePath: string,\n projectRootField?: string,\n): string => {\n const configDir = dirname(resolve(configFilePath))\n if (projectRootField) return resolve(configDir, projectRootField)\n return configDir\n}\n","const stripComments = (source: string): string => {\n let out = ''\n let index = 0\n let quote: string | undefined\n while (index < source.length) {\n const char = source[index] ?? ''\n const next = source[index + 1] ?? ''\n if (quote) {\n out += char\n if (char === '\\\\') {\n out += next\n index += 2\n continue\n }\n if (char === quote) quote = undefined\n index += 1\n continue\n }\n if (char === '\"' || char === \"'\" || char === '`') {\n quote = char\n out += char\n index += 1\n continue\n }\n if (char === '/' && next === '/') {\n while (index < source.length && source[index] !== '\\n') index += 1\n out += '\\n'\n index += 1\n continue\n }\n if (char === '/' && next === '*') {\n index += 2\n while (index < source.length && !(source[index] === '*' && source[index + 1] === '/')) index += 1\n index += 2\n out += ' '\n continue\n }\n out += char\n index += 1\n }\n if (quote) throw new Error('Unterminated string in static JavaScript literal.')\n return out\n}\n\nclass LiteralParser {\n private index = 0\n\n constructor(private readonly source: string) {}\n\n parseAt(index: number): unknown {\n this.index = index\n const value = this.value()\n this.space()\n return value\n }\n\n private space(): void {\n while (/\\s/.test(this.source[this.index] ?? '')) this.index += 1\n }\n\n private value(): unknown {\n this.space()\n const char = this.source[this.index]\n if (char === '{') return this.object()\n if (char === '[') return this.array()\n if (char === '\"' || char === \"'\") return this.string()\n const word = this.word()\n if (word === 'true') return true\n if (word === 'false') return false\n if (word === 'null') return null\n if (/^-?\\d+(?:\\.\\d+)?$/.test(word)) return Number(word)\n throw new Error(`Unsupported dynamic sidebar expression near \"${word || char || 'EOF'}\".`)\n }\n\n private object(): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n this.index += 1\n this.space()\n while (this.source[this.index] !== '}') {\n const key = this.source[this.index] === '\"' || this.source[this.index] === \"'\" ? this.string() : this.word()\n if (!key) throw new Error('Static sidebar object key is required.')\n this.space()\n if (this.source[this.index] !== ':') throw new Error(`Static sidebar key \"${key}\" requires a literal value.`)\n this.index += 1\n result[key] = this.value()\n this.space()\n if (this.source[this.index] === ',') {\n this.index += 1\n this.space()\n continue\n }\n if (this.source[this.index] !== '}') throw new Error('Expected comma or closing brace in static sidebar.')\n }\n this.index += 1\n return result\n }\n\n private array(): unknown[] {\n const result: unknown[] = []\n this.index += 1\n this.space()\n while (this.source[this.index] !== ']') {\n result.push(this.value())\n this.space()\n if (this.source[this.index] === ',') {\n this.index += 1\n this.space()\n continue\n }\n if (this.source[this.index] !== ']') throw new Error('Expected comma or closing bracket in static sidebar.')\n }\n this.index += 1\n return result\n }\n\n private string(): string {\n const quote = this.source[this.index] ?? ''\n this.index += 1\n let result = ''\n while (this.index < this.source.length) {\n const char = this.source[this.index] ?? ''\n if (char === quote) {\n this.index += 1\n return result\n }\n if (char === '\\\\') {\n const escaped = this.source[this.index + 1]\n if (escaped === undefined) break\n const escapes: Record<string, string> = { n: '\\n', r: '\\r', t: '\\t' }\n result += escapes[escaped] ?? escaped\n this.index += 2\n continue\n }\n result += char\n this.index += 1\n }\n throw new Error('Unterminated string in static sidebar.')\n }\n\n private word(): string {\n this.space()\n const start = this.index\n while (/[A-Za-z0-9_$.-]/.test(this.source[this.index] ?? '')) this.index += 1\n return this.source.slice(start, this.index)\n }\n}\n\nconst maskStrings = (source: string): string => {\n const chars = [...source]\n let quote: string | undefined\n let previousToken: string | undefined\n const regexPrefixKeywords = new Set([\n 'await', 'case', 'delete', 'do', 'else', 'in', 'instanceof', 'new',\n 'of', 'return', 'throw', 'typeof', 'void', 'yield',\n ])\n const canStartRegex = (): boolean => previousToken === undefined\n || '=(:,[!&|?{};'.includes(previousToken)\n || previousToken === '=>'\n || regexPrefixKeywords.has(previousToken)\n for (let index = 0; index < chars.length; index += 1) {\n const char = chars[index] ?? ''\n if (quote) {\n chars[index] = ' '\n if (char === '\\\\') {\n if (index + 1 < chars.length) chars[index + 1] = ' '\n index += 1\n } else if (char === quote) {\n quote = undefined\n previousToken = 'literal'\n }\n continue\n }\n if (char === '\"' || char === \"'\" || char === '`') {\n quote = char\n chars[index] = ' '\n continue\n }\n if (char === '/' && canStartRegex()) {\n chars[index] = ' '\n let inClass = false\n for (index += 1; index < chars.length; index += 1) {\n const regexChar = chars[index] ?? ''\n chars[index] = ' '\n if (regexChar === '\\\\') {\n if (index + 1 < chars.length) chars[index + 1] = ' '\n index += 1\n } else if (regexChar === '[') {\n inClass = true\n } else if (regexChar === ']') {\n inClass = false\n } else if (regexChar === '/' && !inClass) {\n while (/[A-Za-z]/.test(chars[index + 1] ?? '')) {\n index += 1\n chars[index] = ' '\n }\n break\n }\n }\n previousToken = 'literal'\n continue\n }\n if (/[A-Za-z_$]/.test(char)) {\n const start = index\n while (/[A-Za-z0-9_$]/.test(chars[index + 1] ?? '')) index += 1\n previousToken = chars.slice(start, index + 1).join('')\n continue\n }\n if (char === '=' && chars[index + 1] === '>') {\n previousToken = '=>'\n index += 1\n continue\n }\n if (!/\\s/.test(char)) previousToken = char\n }\n return chars.join('')\n}\n\nconst nonSpace = (source: string, start: number): number => {\n let index = start\n while (/\\s/.test(source[index] ?? '')) index += 1\n return index\n}\n\nconst escapedRegex = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\nexport const parseStaticJsObject = (source: string): unknown => {\n const clean = stripComments(source)\n const mask = maskStrings(clean)\n const parseBinding = (identifier: string): unknown => {\n const declaration = new RegExp(`\\\\b(?:const|let|var)\\\\s+${escapedRegex(identifier)}(?:\\\\s*:[^=;]+)?\\\\s*=`).exec(mask)\n if (!declaration) throw new Error(`Exported binding \"${identifier}\" must reference a static object declaration.`)\n const start = nonSpace(mask, declaration.index + declaration[0].length)\n if (mask[start] !== '{') throw new Error(`Exported binding \"${identifier}\" must be a static object literal.`)\n return new LiteralParser(clean).parseAt(start)\n }\n const commonJs = /\\bmodule\\.exports\\s*=/.exec(mask)\n if (commonJs) {\n const start = nonSpace(mask, commonJs.index + commonJs[0].length)\n if (mask[start] === '{') return new LiteralParser(clean).parseAt(start)\n const identifier = /^[A-Za-z_$][\\w$]*/.exec(mask.slice(start))?.[0]\n if (identifier) return parseBinding(identifier)\n throw new Error('module.exports must be assigned a static object literal or binding.')\n }\n\n const exported = /\\bexport\\s+default\\b/.exec(mask)\n if (exported) {\n let start = nonSpace(mask, exported.index + exported[0].length)\n if (mask.slice(start).startsWith('defineConfig')) {\n start = nonSpace(mask, start + 'defineConfig'.length)\n if (mask[start] !== '(') throw new Error('defineConfig must be called with a static object literal.')\n start = nonSpace(mask, start + 1)\n if (mask[start] !== '{') throw new Error('defineConfig must be called with a static object literal.')\n return new LiteralParser(clean).parseAt(start)\n }\n if (mask[start] === '{') return new LiteralParser(clean).parseAt(start)\n\n const identifier = /^[A-Za-z_$][\\w$]*/.exec(mask.slice(start))?.[0]\n if (identifier) return parseBinding(identifier)\n }\n throw new Error('Docusaurus sidebar must export a static object or assign one to a const.')\n}\n"],"mappings":";AAEA,IAAM,wBAAwB,CAAC,sBAAsB,YAAY;AAE1D,IAAM,sBAAsB,CAAC,WAAiD;AACnF,QAAM,YAAY,OAAO,OAAO,MAAM;AACtC,QAAM,aAAa,OAAO,OAAO,MAAM,SAAS,GAAG,SAAS;AAE5D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,MACN,GAAG,OAAO;AAAA,MACV,OAAO;AAAA,QACL,GAAG,OAAO,OAAO;AAAA,QACjB,OAAO;AAAA,QACP,SAAS,OAAO,OAAO,MAAM,WAAW,CAAC,eAAe;AAAA,QACxD,SAAS,OAAO,OAAO,MAAM,WAAW,CAAC,GAAG,qBAAqB;AAAA,MACnE;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,MACb,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,GAAG,OAAO,OAAO;AAAA,MACnB;AAAA,MACA,cAAc;AAAA,QACZ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,GA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AS,IAAI,MAAM,iBACd,gBAAgB,KAAK,IAAI,EAA8B,YACxD,QAAQ,QAAQ,QAAQ,SAAS,QAAQ,QAAQ,QAAQ,QACvD,gBAAgB,KAAK,IAAI,IAC3B,gBAAgB,KAAK,IAAI;AAC/B,QAAM,SAAS,oBAAoB,YAAY,MAAM,CAAC;AACtD,SAAO,EAAE,QAAQ,KAAK;AACxB;AAEO,IAAM,qBAAqB,CAAC,QAAQ,QAAQ,IAAI,MAAc;AACnE,MAAI,MAAM,QAAQ,KAAK;AACvB,WAAS,IAAI,GAAG,IAAI,IAAI,KAAK,GAAG;AAC9B,QAAI,eAAe,GAAG,EAAG,QAAO;AAChC,UAAM,SAAS,QAAQ,GAAG;AAC1B,QAAI,WAAW,IAAK;AACpB,UAAM;AAAA,EACR;AACA,SAAO,QAAQ,KAAK;AACtB;AAGO,IAAM,4BAA4B,CACvC,gBACA,qBACW;AACX,QAAM,YAAY,QAAQ,QAAQ,cAAc,CAAC;AACjD,MAAI,iBAAkB,QAAO,QAAQ,WAAW,gBAAgB;AAChE,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/config/defaults.ts","../../src/config/schema.ts","../../src/config/define-config.ts","../../src/config/load-config.ts","../../src/lib/static-js-literal.ts"],"sourcesContent":["import type { DocBridgeConfigV1 } from './schema.js'\n\nconst DEFAULT_AGENT_EXCLUDE = ['**/node_modules/**', '**/.git/**'] as const\n\nexport const applyConfigDefaults = (config: DocBridgeConfigV1): DocBridgeConfigV1 => {\n const agentRoot = config.corpus.agent.root\n const agentIndex = config.corpus.agent.index ?? `${agentRoot}/INDEX.md`\n\n return {\n ...config,\n corpus: {\n ...config.corpus,\n agent: {\n ...config.corpus.agent,\n index: agentIndex,\n include: config.corpus.agent.include ?? ['**/*.{md,mdx}'],\n exclude: config.corpus.agent.exclude ?? [...DEFAULT_AGENT_EXCLUDE],\n },\n },\n index: {\n outFile: '.doc-bridge/index.json',\n contentHash: 'sha256-normalized-v1',\n llmsTxt: {\n enabled: true,\n outFile: 'llms.txt',\n ...config.index?.llmsTxt,\n },\n capabilities: {\n enabled: true,\n outFile: '.doc-bridge/capabilities.json',\n ...config.index?.capabilities,\n },\n ...config.index,\n },\n gates: {\n preset: 'minimal',\n ...config.gates,\n },\n rules: {\n mode: 'default',\n ...config.rules,\n },\n safety: {\n redactSecrets: true,\n ...config.safety,\n },\n surfaces: {\n cli: {\n bin: 'ak-docs',\n defaultFormat: 'json',\n ...config.surfaces?.cli,\n },\n mcp: {\n enabled: true,\n tools: [\n 'handoff.resolve', 'doc.search', 'doc.get', 'gate.status', 'retriever.query',\n 'memory.classify', 'memory.promoteDraft', 'registry.topology',\n 'docbridge.snapshot', 'docbridge.report', 'docbridge.diagnostics',\n 'docbridge.relations', 'docbridge.run', 'docbridge.proposals',\n ],\n transport: 'stdio',\n ...config.surfaces?.mcp,\n },\n ...config.surfaces,\n },\n intelligence: config.intelligence\n ? {\n enabled: false,\n ...config.intelligence,\n chat: config.intelligence.chat\n ? { handoffFirst: true, ...config.intelligence.chat }\n : undefined,\n }\n : { enabled: false },\n }\n}\n","import { z } from 'zod'\n\nexport const CONFIG_SCHEMA_VERSION = 1 as const\n\nexport const HumanCorpusPluginIdSchema = z.enum([\n 'plain-markdown',\n 'fumadocs',\n 'docusaurus',\n 'mkdocs',\n 'vitepress',\n 'starlight',\n 'nextra',\n 'custom',\n])\n\nexport const AgentCorpusConfigSchema = z\n .object({\n root: z.string().min(1).max(512),\n index: z.string().min(1).max(512).optional(),\n include: z.array(z.string().min(1).max(256)).max(64).optional(),\n exclude: z.array(z.string().min(1).max(256)).max(64).optional(),\n okf: z\n .object({\n requireType: z.boolean().optional(),\n allowedTypes: z.array(z.string().min(1).max(128)).max(64).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const HumanCorpusConfigSchema = z\n .object({\n plugin: HumanCorpusPluginIdSchema,\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n\nexport const IndexConfigSchema = z\n .object({\n outFile: z.string().min(1).max(512).optional(),\n llmsTxt: z\n .object({\n enabled: z.boolean().optional(),\n outFile: z.string().min(1).max(512).optional(),\n preamble: z.string().max(4_000).optional(),\n urlPrefix: z.string().url().optional(),\n pathPrefix: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n capabilities: z\n .object({\n enabled: z.boolean().optional(),\n outFile: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n contentHash: z.literal('sha256-normalized-v1').optional(),\n })\n .strict()\n\nexport const OwnershipEntrySchema = z\n .object({\n path: z.string().min(1).max(512),\n group: z.string().min(1).max(128).optional(),\n layer: z.string().min(1).max(32).optional(),\n purpose: z.string().max(1024).optional(),\n checks: z.array(z.string().min(1).max(256)).max(32).optional(),\n agentDoc: z.string().min(1).max(512).optional(),\n humanDoc: z.string().min(1).max(512).optional(),\n })\n .strict()\n\nexport const RoutingConfigSchema = z\n .object({\n plugin: z\n .enum(['pnpm-monorepo', 'npm-workspaces', 'yarn-workspaces', 'nx', 'pattern-files', 'custom'])\n .optional(),\n options: z\n .object({\n packages: z.array(z.string().min(1).max(256)).max(128).optional(),\n /** Infer ownership from corpus paths/frontmatter (default true). */\n ownershipFromCorpus: z.boolean().optional(),\n ownership: z.record(z.string().min(1).max(256), OwnershipEntrySchema).optional(),\n intents: z\n .array(\n z\n .object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(256),\n paths: z.array(z.string().min(1).max(512)).max(32),\n })\n .strict(),\n )\n .max(128)\n .optional(),\n changes: z\n .array(\n z\n .object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(256),\n startHere: z.string().min(1).max(512),\n relatedPackages: z.array(z.string().min(1).max(256)).max(32).optional(),\n })\n .strict(),\n )\n .max(128)\n .optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const GatesConfigSchema = z\n .object({\n /** minimal: freshness · standard: + human links · strict: + okf-type · playbook: freshness + okf soft style */\n preset: z.enum(['minimal', 'standard', 'strict', 'playbook']).optional(),\n include: z\n .array(\n z.enum([\n 'index-freshness',\n 'human-guide-links',\n 'link-rot',\n 'okf-type',\n 'docs-style',\n 'routing-currency',\n 'bootstrap-size',\n 'documentation-standard-v1',\n ]),\n )\n .max(16)\n .optional(),\n exclude: z\n .array(\n z.enum([\n 'index-freshness',\n 'human-guide-links',\n 'link-rot',\n 'okf-type',\n 'docs-style',\n 'routing-currency',\n 'bootstrap-size',\n 'documentation-standard-v1',\n ]),\n )\n .max(16)\n .optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n\nexport const RuleIdSchema = z.enum([\n 'documentation-quality',\n 'graph-undocumented-relation',\n 'declared-unobserved-relation',\n 'unresolved-reference',\n 'conflicting-declaration',\n 'not-analyzed-coverage',\n 'stale-documentation',\n 'centrality-risk',\n 'critical-path-risk',\n 'freshness',\n 'ownership',\n])\n\nexport const RuleSeveritySchema = z.enum(['off', 'info', 'warn', 'error'])\n\nexport const RulesConfigSchema = z\n .object({\n mode: z.enum(['default', 'recommended', 'strict']).optional(),\n severity: z.record(RuleIdSchema, RuleSeveritySchema).optional(),\n ignore: z.array(RuleIdSchema).max(128).optional(),\n criticalEntities: z.array(z.string().min(1).max(256)).max(128).optional(),\n criticalPaths: z.array(z.string().min(1).max(512)).max(128).optional(),\n warningThresholds: z.record(RuleIdSchema, z.number().int().min(1).max(100_000)).optional(),\n })\n .strict()\n\nexport const ReconciliationConfigSchema = z\n .object({\n /** Relation kinds that must have documentation declarations. Omit to require all observed kinds; [] disables this signal. */\n requiredRelationKinds: z.array(z.string().min(1).max(128)).max(128).optional(),\n })\n .strict()\n\nexport const WorkflowConfigSchema = z\n .object({\n stateDir: z.string().min(1).max(512).optional(),\n })\n .strict()\n\nexport const RepositorySafetyConfigSchema = z\n .object({\n exclude: z.array(z.string().min(1).max(512)).max(128).optional(),\n maxFiles: z.number().int().positive().max(1_000_000).optional(),\n maxBytes: z.number().int().positive().max(10_000_000_000).optional(),\n maxTimeMs: z.number().int().positive().max(86_400_000).optional(),\n maxMemoryMb: z.number().int().positive().max(1_048_576).optional(),\n redactSecrets: z.boolean().optional(),\n })\n .strict()\n\nexport const SurfacesConfigSchema = z\n .object({\n cli: z\n .object({\n bin: z.string().min(1).max(64).optional(),\n defaultFormat: z.enum(['json', 'text']).optional(),\n })\n .strict()\n .optional(),\n mcp: z\n .object({\n enabled: z.boolean().optional(),\n tools: z\n .array(\n z.enum([\n 'handoff.resolve',\n 'doc.search',\n 'doc.get',\n 'gate.status',\n 'playbook.pattern.get',\n 'retriever.query',\n 'memory.classify',\n 'memory.promoteDraft',\n 'registry.topology',\n 'docbridge.snapshot',\n 'docbridge.report',\n 'docbridge.diagnostics',\n 'docbridge.relations',\n 'docbridge.run',\n 'docbridge.proposals',\n ]),\n )\n .max(16)\n .optional(),\n transport: z.enum(['stdio', 'http']).optional(),\n http: z\n .object({\n port: z.number().int().min(1).max(65_535).optional(),\n path: z.string().min(1).max(256).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const IntelligenceConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n adapter: z\n .object({\n provider: z.enum(['openai', 'anthropic', 'ollama', 'openrouter', 'custom']),\n model: z.string().min(1).max(128).optional(),\n apiKeyEnv: z.string().min(0).max(128).optional(),\n baseUrl: z.string().url().optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n .optional(),\n chat: z\n .object({\n enabled: z.boolean().optional(),\n sources: z.array(z.enum(['agent', 'human', 'federation'])).max(8).optional(),\n handoffFirst: z.boolean().optional(),\n })\n .strict()\n .optional(),\n retriever: z\n .object({\n enabled: z.boolean().optional(),\n mode: z.enum(['local', 'remote', 'bm25', 'agentskit-rag']).optional(),\n embedModel: z.string().min(1).max(128).optional(),\n chunkSize: z.number().int().min(128).max(16_384).optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n .optional(),\n memory: z\n .object({\n enabled: z.boolean().optional(),\n adapters: z\n .array(z.enum(['playbook-memory', 'cursor-rules', 'session-export', 'bootstrap-delta']))\n .max(8)\n .optional(),\n ingestDir: z.string().min(1).max(512).optional(),\n classify: z.boolean().optional(),\n promote: z\n .object({\n enabled: z.boolean().optional(),\n targets: z.array(z.enum(['agent', 'human', 'agents-md'])).max(8).optional(),\n requireApproval: z.boolean().optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n .optional(),\n runtime: z.enum(['agentskit', 'custom']).optional(),\n runtimeModule: z.string().min(1).max(512).optional(),\n registry: z\n .object({\n enabled: z.boolean().optional(),\n agentId: z.string().min(1).max(256).optional(),\n agentRoot: z.string().min(1).max(512).optional(),\n runnerModule: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const FederationConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n sources: z\n .array(\n z\n .object({\n id: z.string().min(1).max(64),\n llmsTxt: z.string().min(1).max(512).optional(),\n rawBaseUrl: z.string().url().optional(),\n includeInRetriever: z.boolean().optional(),\n includeInChat: z.boolean().optional(),\n })\n .strict(),\n )\n .max(16)\n .optional(),\n })\n .strict()\n\nexport const DocumentationEvidenceFileSchema = z\n .object({\n path: z.string().min(1).max(512),\n contains: z.array(z.string().min(1).max(512)).min(1).max(32),\n })\n .strict()\n\nexport const DocumentationLinkEvidenceSchema = z\n .object({\n url: z.string().url().max(512),\n paths: z.array(z.string().min(1).max(512)).min(1).max(32),\n })\n .strict()\n\nexport const DocumentationQuickstartEvidenceSchema = z\n .object({\n id: z.string().regex(/^[a-z][a-z0-9-]*$/).max(128),\n doc: z.string().min(1).max(512),\n test: z.string().min(1).max(512),\n command: z.string().min(1).max(512),\n testContains: z.array(z.string().min(1).max(256)).min(1).max(16),\n })\n .strict()\n\nexport const EcosystemContractEvidenceSchema = z\n .object({\n manifest: z.string().min(1).max(512),\n claims: z.string().min(1).max(512),\n productId: z.string().regex(/^[a-z][a-z0-9-]*$/).max(128),\n })\n .strict()\n\nexport const DocumentationStandardRuleIdSchema = z.enum([\n 'human-docs',\n 'llms-and-raw-source',\n 'agent-handoffs',\n 'contribution',\n 'metadata',\n 'cross-links',\n 'tested-quickstarts',\n 'visual-explanations',\n 'structured-diagrams',\n])\n\nexport const DocumentationStandardExceptionSchema = z\n .object({\n ruleId: DocumentationStandardRuleIdSchema,\n reason: z.string().min(10).max(1_024),\n approvedBy: z.string().min(1).max(256),\n trackingUrl: z.string().url().max(512),\n })\n .strict()\n\nexport const DocumentationStandardV1ConfigSchema = z\n .object({\n rawSources: z.array(z.string().min(1).max(512)).max(64).optional(),\n contributionPaths: z.array(z.string().min(1).max(512)).max(16).optional(),\n metadata: z.array(DocumentationEvidenceFileSchema).max(32).optional(),\n links: z.array(DocumentationLinkEvidenceSchema).max(64).optional(),\n quickstarts: z.array(DocumentationQuickstartEvidenceSchema).max(32).optional(),\n visuals: z.array(z.string().min(1).max(512)).max(64).optional(),\n diagrams: z.array(DocumentationEvidenceFileSchema).max(32).optional(),\n ecosystemContract: EcosystemContractEvidenceSchema.optional(),\n exceptions: z.array(DocumentationStandardExceptionSchema).max(32).optional(),\n })\n .strict()\n .superRefine((value, context) => {\n const seen = new Set<string>()\n for (const [index, exception] of (value.exceptions ?? []).entries()) {\n if (seen.has(exception.ruleId)) {\n context.addIssue({\n code: 'custom',\n path: ['exceptions', index, 'ruleId'],\n message: `Duplicate exception for rule ${exception.ruleId}`,\n })\n }\n seen.add(exception.ruleId)\n }\n })\n\nexport const ConformanceConfigSchema = z\n .object({\n documentationStandardV1: DocumentationStandardV1ConfigSchema.optional(),\n })\n .strict()\n\nexport const DocBridgeConfigV1Schema = z\n .object({\n schemaVersion: z.literal(CONFIG_SCHEMA_VERSION),\n project: z\n .object({\n name: z.string().min(1).max(128).optional(),\n root: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n corpus: z\n .object({\n agent: AgentCorpusConfigSchema,\n human: z.union([HumanCorpusConfigSchema, z.array(HumanCorpusConfigSchema).max(8)]).optional(),\n })\n .strict(),\n index: IndexConfigSchema.optional(),\n routing: RoutingConfigSchema.optional(),\n gates: GatesConfigSchema.optional(),\n reconciliation: ReconciliationConfigSchema.optional(),\n rules: RulesConfigSchema.optional(),\n workflow: WorkflowConfigSchema.optional(),\n safety: RepositorySafetyConfigSchema.optional(),\n surfaces: SurfacesConfigSchema.optional(),\n intelligence: IntelligenceConfigSchema.optional(),\n federation: FederationConfigSchema.optional(),\n conformance: ConformanceConfigSchema.optional(),\n })\n .strict()\n\nexport type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>\nexport type AgentCorpusConfig = z.infer<typeof AgentCorpusConfigSchema>\nexport type HumanCorpusConfig = z.infer<typeof HumanCorpusConfigSchema>\nexport type DocumentationStandardV1Config = z.infer<typeof DocumentationStandardV1ConfigSchema>\nexport type DocumentationStandardRuleId = z.infer<typeof DocumentationStandardRuleIdSchema>\nexport type ReconciliationConfig = z.infer<typeof ReconciliationConfigSchema>\nexport type RuleId = z.infer<typeof RuleIdSchema>\nexport type RuleSeverity = z.infer<typeof RuleSeveritySchema>\nexport type RulesConfig = z.infer<typeof RulesConfigSchema>\nexport type WorkflowConfig = z.infer<typeof WorkflowConfigSchema>\nexport type RepositorySafetyConfig = z.infer<typeof RepositorySafetyConfigSchema>\n","import { applyConfigDefaults } from './defaults.js'\nimport { DocBridgeConfigV1Schema, type DocBridgeConfigV1 } from './schema.js'\n\n/** Type-safe config helper for `doc-bridge.config.ts`. */\nexport const defineConfig = (config: DocBridgeConfigV1): DocBridgeConfigV1 =>\n applyConfigDefaults(DocBridgeConfigV1Schema.parse(config))","import { existsSync, readFileSync } from 'node:fs'\nimport { basename, dirname, join, resolve } from 'node:path'\n\nimport { parseStaticJsObject } from '../lib/static-js-literal.js'\nimport { applyConfigDefaults } from './defaults.js'\nimport { DocBridgeConfigV1Schema, type DocBridgeConfigV1 } from './schema.js'\n\nconst CONFIG_CANDIDATES = [\n 'doc-bridge.config.ts',\n 'doc-bridge.config.mts',\n 'doc-bridge.config.js',\n 'doc-bridge.config.mjs',\n 'doc-bridge.config.json',\n 'doc-bridge.config.yaml',\n 'doc-bridge.config.yml',\n 'package.json',\n] as const\n\nexport type LoadConfigOptions = {\n readonly cwd?: string\n readonly explicitPath?: string\n}\n\nexport type LoadConfigResult = {\n readonly config: DocBridgeConfigV1\n readonly path: string\n}\n\nexport class ConfigNotFoundError extends Error {\n constructor(readonly cwd: string) {\n super(\n `No doc-bridge config found in ${cwd}. Run: ak-docs init — or pass --config <path>.`,\n )\n this.name = 'ConfigNotFoundError'\n }\n}\n\nconst findConfigPath = (cwd: string, explicitPath?: string): string | null => {\n if (explicitPath) {\n const abs = resolve(cwd, explicitPath)\n return existsSync(abs) ? abs : null\n }\n for (const name of CONFIG_CANDIDATES) {\n const candidate = join(cwd, name)\n if (!existsSync(candidate)) continue\n if (name !== 'package.json') return candidate\n const pkg = parseJsonConfig(readFileSync(candidate, 'utf8'), candidate) as { docBridge?: unknown }\n if (pkg.docBridge) return candidate\n }\n return null\n}\n\nconst parseJsonConfig = (raw: string, path: string): unknown => {\n try {\n return JSON.parse(raw) as unknown\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n throw new Error(`Failed to parse JSON config at ${path}: ${message}`)\n }\n}\n\nconst parseCodeConfig = (raw: string, path: string): unknown => {\n const unsupportedImports = raw\n .replace(/import\\s+type\\s+[\\s\\S]*?;?\\n/g, '')\n .replace(/import\\s+\\{\\s*defineConfig\\s*\\}\\s+from\\s+['\"]@agentskit\\/doc-bridge(?:\\/config)?['\"];?\\n?/g, '')\n if (/\\bimport\\b/.test(unsupportedImports)) {\n throw new Error(`Unsupported import in ${path}. Static config only supports defineConfig imports.`)\n }\n try {\n return parseStaticJsObject(raw)\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n throw new Error(`Failed to load config at ${path}: ${message}`)\n }\n}\n\nconst parseConfig = (input: unknown): DocBridgeConfigV1 => {\n const result = DocBridgeConfigV1Schema.safeParse(input)\n if (result.success) return result.data\n throw new Error(\n `Invalid doc-bridge config:\\n${result.error.issues.map((issue) =>\n ` - ${issue.path.join('.') || '(root)'}: ${issue.message}`,\n ).join('\\n')}`,\n )\n}\n\n/** v0.1 — static JS/TS config, JSON config files, and package.json#docBridge. */\nexport const loadConfig = (opts: LoadConfigOptions = {}): LoadConfigResult => {\n const cwd = resolve(opts.cwd ?? process.cwd())\n const path = findConfigPath(cwd, opts.explicitPath)\n if (!path) throw new ConfigNotFoundError(cwd)\n\n const raw = readFileSync(path, 'utf8')\n const ext = path.split('.').pop()?.toLowerCase()\n if (ext === 'yaml' || ext === 'yml') {\n throw new Error(`YAML config is not supported yet (${path}). Use doc-bridge.config.json for now.`)\n }\n\n const parsed =\n basename(path) === 'package.json'\n ? (parseJsonConfig(raw, path) as { docBridge?: unknown }).docBridge\n : ext === 'ts' || ext === 'mts' || ext === 'js' || ext === 'mjs'\n ? parseCodeConfig(raw, path)\n : parseJsonConfig(raw, path)\n const config = applyConfigDefaults(parseConfig(parsed))\n return { config, path }\n}\n\nexport const resolveProjectRoot = (start = process.cwd()): string => {\n let cur = resolve(start)\n for (let i = 0; i < 12; i += 1) {\n if (findConfigPath(cur)) return cur\n const parent = dirname(cur)\n if (parent === cur) break\n cur = parent\n }\n return resolve(start)\n}\n\n/** Project root for a loaded config file path (directory of the config). */\nexport const projectRootFromConfigPath = (\n configFilePath: string,\n projectRootField?: string,\n): string => {\n const configDir = dirname(resolve(configFilePath))\n if (projectRootField) return resolve(configDir, projectRootField)\n return configDir\n}\n","const stripComments = (source: string): string => {\n let out = ''\n let index = 0\n let quote: string | undefined\n while (index < source.length) {\n const char = source[index] ?? ''\n const next = source[index + 1] ?? ''\n if (quote) {\n out += char\n if (char === '\\\\') {\n out += next\n index += 2\n continue\n }\n if (char === quote) quote = undefined\n index += 1\n continue\n }\n if (char === '\"' || char === \"'\" || char === '`') {\n quote = char\n out += char\n index += 1\n continue\n }\n if (char === '/' && next === '/') {\n while (index < source.length && source[index] !== '\\n') index += 1\n out += '\\n'\n index += 1\n continue\n }\n if (char === '/' && next === '*') {\n index += 2\n while (index < source.length && !(source[index] === '*' && source[index + 1] === '/')) index += 1\n index += 2\n out += ' '\n continue\n }\n out += char\n index += 1\n }\n if (quote) throw new Error('Unterminated string in static JavaScript literal.')\n return out\n}\n\nclass LiteralParser {\n private index = 0\n\n constructor(private readonly source: string) {}\n\n parseAt(index: number): unknown {\n this.index = index\n const value = this.value()\n this.space()\n return value\n }\n\n private space(): void {\n while (/\\s/.test(this.source[this.index] ?? '')) this.index += 1\n }\n\n private value(): unknown {\n this.space()\n const char = this.source[this.index]\n if (char === '{') return this.object()\n if (char === '[') return this.array()\n if (char === '\"' || char === \"'\") return this.string()\n const word = this.word()\n if (word === 'true') return true\n if (word === 'false') return false\n if (word === 'null') return null\n if (/^-?\\d+(?:\\.\\d+)?$/.test(word)) return Number(word)\n throw new Error(`Unsupported dynamic sidebar expression near \"${word || char || 'EOF'}\".`)\n }\n\n private object(): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n this.index += 1\n this.space()\n while (this.source[this.index] !== '}') {\n const key = this.source[this.index] === '\"' || this.source[this.index] === \"'\" ? this.string() : this.word()\n if (!key) throw new Error('Static sidebar object key is required.')\n this.space()\n if (this.source[this.index] !== ':') throw new Error(`Static sidebar key \"${key}\" requires a literal value.`)\n this.index += 1\n result[key] = this.value()\n this.space()\n if (this.source[this.index] === ',') {\n this.index += 1\n this.space()\n continue\n }\n if (this.source[this.index] !== '}') throw new Error('Expected comma or closing brace in static sidebar.')\n }\n this.index += 1\n return result\n }\n\n private array(): unknown[] {\n const result: unknown[] = []\n this.index += 1\n this.space()\n while (this.source[this.index] !== ']') {\n result.push(this.value())\n this.space()\n if (this.source[this.index] === ',') {\n this.index += 1\n this.space()\n continue\n }\n if (this.source[this.index] !== ']') throw new Error('Expected comma or closing bracket in static sidebar.')\n }\n this.index += 1\n return result\n }\n\n private string(): string {\n const quote = this.source[this.index] ?? ''\n this.index += 1\n let result = ''\n while (this.index < this.source.length) {\n const char = this.source[this.index] ?? ''\n if (char === quote) {\n this.index += 1\n return result\n }\n if (char === '\\\\') {\n const escaped = this.source[this.index + 1]\n if (escaped === undefined) break\n const escapes: Record<string, string> = { n: '\\n', r: '\\r', t: '\\t' }\n result += escapes[escaped] ?? escaped\n this.index += 2\n continue\n }\n result += char\n this.index += 1\n }\n throw new Error('Unterminated string in static sidebar.')\n }\n\n private word(): string {\n this.space()\n const start = this.index\n while (/[A-Za-z0-9_$.-]/.test(this.source[this.index] ?? '')) this.index += 1\n return this.source.slice(start, this.index)\n }\n}\n\nconst maskStrings = (source: string): string => {\n const chars = [...source]\n let quote: string | undefined\n let previousToken: string | undefined\n const regexPrefixKeywords = new Set([\n 'await', 'case', 'delete', 'do', 'else', 'in', 'instanceof', 'new',\n 'of', 'return', 'throw', 'typeof', 'void', 'yield',\n ])\n const canStartRegex = (): boolean => previousToken === undefined\n || '=(:,[!&|?{};'.includes(previousToken)\n || previousToken === '=>'\n || regexPrefixKeywords.has(previousToken)\n for (let index = 0; index < chars.length; index += 1) {\n const char = chars[index] ?? ''\n if (quote) {\n chars[index] = ' '\n if (char === '\\\\') {\n if (index + 1 < chars.length) chars[index + 1] = ' '\n index += 1\n } else if (char === quote) {\n quote = undefined\n previousToken = 'literal'\n }\n continue\n }\n if (char === '\"' || char === \"'\" || char === '`') {\n quote = char\n chars[index] = ' '\n continue\n }\n if (char === '/' && canStartRegex()) {\n chars[index] = ' '\n let inClass = false\n for (index += 1; index < chars.length; index += 1) {\n const regexChar = chars[index] ?? ''\n chars[index] = ' '\n if (regexChar === '\\\\') {\n if (index + 1 < chars.length) chars[index + 1] = ' '\n index += 1\n } else if (regexChar === '[') {\n inClass = true\n } else if (regexChar === ']') {\n inClass = false\n } else if (regexChar === '/' && !inClass) {\n while (/[A-Za-z]/.test(chars[index + 1] ?? '')) {\n index += 1\n chars[index] = ' '\n }\n break\n }\n }\n previousToken = 'literal'\n continue\n }\n if (/[A-Za-z_$]/.test(char)) {\n const start = index\n while (/[A-Za-z0-9_$]/.test(chars[index + 1] ?? '')) index += 1\n previousToken = chars.slice(start, index + 1).join('')\n continue\n }\n if (char === '=' && chars[index + 1] === '>') {\n previousToken = '=>'\n index += 1\n continue\n }\n if (!/\\s/.test(char)) previousToken = char\n }\n return chars.join('')\n}\n\nconst nonSpace = (source: string, start: number): number => {\n let index = start\n while (/\\s/.test(source[index] ?? '')) index += 1\n return index\n}\n\nconst escapedRegex = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\nexport const parseStaticJsObject = (source: string): unknown => {\n const clean = stripComments(source)\n const mask = maskStrings(clean)\n const parseBinding = (identifier: string): unknown => {\n const declaration = new RegExp(`\\\\b(?:const|let|var)\\\\s+${escapedRegex(identifier)}(?:\\\\s*:[^=;]+)?\\\\s*=`).exec(mask)\n if (!declaration) throw new Error(`Exported binding \"${identifier}\" must reference a static object declaration.`)\n const start = nonSpace(mask, declaration.index + declaration[0].length)\n if (mask[start] !== '{') throw new Error(`Exported binding \"${identifier}\" must be a static object literal.`)\n return new LiteralParser(clean).parseAt(start)\n }\n const commonJs = /\\bmodule\\.exports\\s*=/.exec(mask)\n if (commonJs) {\n const start = nonSpace(mask, commonJs.index + commonJs[0].length)\n if (mask[start] === '{') return new LiteralParser(clean).parseAt(start)\n const identifier = /^[A-Za-z_$][\\w$]*/.exec(mask.slice(start))?.[0]\n if (identifier) return parseBinding(identifier)\n throw new Error('module.exports must be assigned a static object literal or binding.')\n }\n\n const exported = /\\bexport\\s+default\\b/.exec(mask)\n if (exported) {\n let start = nonSpace(mask, exported.index + exported[0].length)\n if (mask.slice(start).startsWith('defineConfig')) {\n start = nonSpace(mask, start + 'defineConfig'.length)\n if (mask[start] !== '(') throw new Error('defineConfig must be called with a static object literal.')\n start = nonSpace(mask, start + 1)\n if (mask[start] !== '{') throw new Error('defineConfig must be called with a static object literal.')\n return new LiteralParser(clean).parseAt(start)\n }\n if (mask[start] === '{') return new LiteralParser(clean).parseAt(start)\n\n const identifier = /^[A-Za-z_$][\\w$]*/.exec(mask.slice(start))?.[0]\n if (identifier) return parseBinding(identifier)\n }\n throw new Error('Docusaurus sidebar must export a static object or assign one to a const.')\n}\n"],"mappings":";AAEA,IAAM,wBAAwB,CAAC,sBAAsB,YAAY;AAE1D,IAAM,sBAAsB,CAAC,WAAiD;AACnF,QAAM,YAAY,OAAO,OAAO,MAAM;AACtC,QAAM,aAAa,OAAO,OAAO,MAAM,SAAS,GAAG,SAAS;AAE5D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,MACN,GAAG,OAAO;AAAA,MACV,OAAO;AAAA,QACL,GAAG,OAAO,OAAO;AAAA,QACjB,OAAO;AAAA,QACP,SAAS,OAAO,OAAO,MAAM,WAAW,CAAC,eAAe;AAAA,QACxD,SAAS,OAAO,OAAO,MAAM,WAAW,CAAC,GAAG,qBAAqB;AAAA,MACnE;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,MACb,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,GAAG,OAAO,OAAO;AAAA,MACnB;AAAA,MACA,cAAc;AAAA,QACZ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,GAAG,OAAO,OAAO;AAAA,MACnB;AAAA,MACA,GAAG,OAAO;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,GAAG,OAAO;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,GAAG,OAAO;AAAA,IACZ;AAAA,IACA,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,GAAG,OAAO;AAAA,IACZ;AAAA,IACA,UAAU;AAAA,MACR,KAAK;AAAA,QACH,KAAK;AAAA,QACL,eAAe;AAAA,QACf,GAAG,OAAO,UAAU;AAAA,MACtB;AAAA,MACA,KAAK;AAAA,QACH,SAAS;AAAA,QACT,OAAO;AAAA,UACL;AAAA,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K;AACxB;AAEO,IAAM,qBAAqB,CAAC,QAAQ,QAAQ,IAAI,MAAc;AACnE,MAAI,MAAM,QAAQ,KAAK;AACvB,WAAS,IAAI,GAAG,IAAI,IAAI,KAAK,GAAG;AAC9B,QAAI,eAAe,GAAG,EAAG,QAAO;AAChC,UAAM,SAAS,QAAQ,GAAG;AAC1B,QAAI,WAAW,IAAK;AACpB,UAAM;AAAA,EACR;AACA,SAAO,QAAQ,KAAK;AACtB;AAGO,IAAM,4BAA4B,CACvC,gBACA,qBACW;AACX,QAAM,YAAY,QAAQ,QAAQ,cAAc,CAAC;AACjD,MAAI,iBAAkB,QAAO,QAAQ,WAAW,gBAAgB;AAChE,SAAO;AACT;","names":[]}
|
|
@@ -68,6 +68,14 @@ declare const RulesConfigSchema: z.ZodObject<{
|
|
|
68
68
|
criticalPaths?: string[] | undefined;
|
|
69
69
|
warningThresholds?: Partial<Record<"ownership" | "documentation-quality" | "graph-undocumented-relation" | "declared-unobserved-relation" | "unresolved-reference" | "conflicting-declaration" | "not-analyzed-coverage" | "stale-documentation" | "centrality-risk" | "critical-path-risk" | "freshness", number>> | undefined;
|
|
70
70
|
}>;
|
|
71
|
+
declare const ReconciliationConfigSchema: z.ZodObject<{
|
|
72
|
+
/** Relation kinds that must have documentation declarations. Omit to require all observed kinds; [] disables this signal. */
|
|
73
|
+
requiredRelationKinds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
|
+
}, "strict", z.ZodTypeAny, {
|
|
75
|
+
requiredRelationKinds?: string[] | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
requiredRelationKinds?: string[] | undefined;
|
|
78
|
+
}>;
|
|
71
79
|
declare const WorkflowConfigSchema: z.ZodObject<{
|
|
72
80
|
stateDir: z.ZodOptional<z.ZodString>;
|
|
73
81
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -964,6 +972,14 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
964
972
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size" | "documentation-standard-v1")[] | undefined;
|
|
965
973
|
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
966
974
|
}>>;
|
|
975
|
+
reconciliation: z.ZodOptional<z.ZodObject<{
|
|
976
|
+
/** Relation kinds that must have documentation declarations. Omit to require all observed kinds; [] disables this signal. */
|
|
977
|
+
requiredRelationKinds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
978
|
+
}, "strict", z.ZodTypeAny, {
|
|
979
|
+
requiredRelationKinds?: string[] | undefined;
|
|
980
|
+
}, {
|
|
981
|
+
requiredRelationKinds?: string[] | undefined;
|
|
982
|
+
}>>;
|
|
967
983
|
rules: z.ZodOptional<z.ZodObject<{
|
|
968
984
|
mode: z.ZodOptional<z.ZodEnum<["default", "recommended", "strict"]>>;
|
|
969
985
|
severity: z.ZodOptional<z.ZodRecord<z.ZodEnum<["documentation-quality", "graph-undocumented-relation", "declared-unobserved-relation", "unresolved-reference", "conflicting-declaration", "not-analyzed-coverage", "stale-documentation", "centrality-risk", "critical-path-risk", "freshness", "ownership"]>, z.ZodEnum<["off", "info", "warn", "error"]>>>;
|
|
@@ -1693,6 +1709,9 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
1693
1709
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size" | "documentation-standard-v1")[] | undefined;
|
|
1694
1710
|
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
1695
1711
|
} | undefined;
|
|
1712
|
+
reconciliation?: {
|
|
1713
|
+
requiredRelationKinds?: string[] | undefined;
|
|
1714
|
+
} | undefined;
|
|
1696
1715
|
rules?: {
|
|
1697
1716
|
mode?: "strict" | "default" | "recommended" | undefined;
|
|
1698
1717
|
severity?: Partial<Record<"ownership" | "documentation-quality" | "graph-undocumented-relation" | "declared-unobserved-relation" | "unresolved-reference" | "conflicting-declaration" | "not-analyzed-coverage" | "stale-documentation" | "centrality-risk" | "critical-path-risk" | "freshness", "off" | "info" | "warn" | "error">> | undefined;
|
|
@@ -1888,6 +1907,9 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
1888
1907
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size" | "documentation-standard-v1")[] | undefined;
|
|
1889
1908
|
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
1890
1909
|
} | undefined;
|
|
1910
|
+
reconciliation?: {
|
|
1911
|
+
requiredRelationKinds?: string[] | undefined;
|
|
1912
|
+
} | undefined;
|
|
1891
1913
|
rules?: {
|
|
1892
1914
|
mode?: "strict" | "default" | "recommended" | undefined;
|
|
1893
1915
|
severity?: Partial<Record<"ownership" | "documentation-quality" | "graph-undocumented-relation" | "declared-unobserved-relation" | "unresolved-reference" | "conflicting-declaration" | "not-analyzed-coverage" | "stale-documentation" | "centrality-risk" | "critical-path-risk" | "freshness", "off" | "info" | "warn" | "error">> | undefined;
|
|
@@ -2005,6 +2027,7 @@ type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>;
|
|
|
2005
2027
|
type AgentCorpusConfig = z.infer<typeof AgentCorpusConfigSchema>;
|
|
2006
2028
|
type DocumentationStandardV1Config = z.infer<typeof DocumentationStandardV1ConfigSchema>;
|
|
2007
2029
|
type DocumentationStandardRuleId = z.infer<typeof DocumentationStandardRuleIdSchema>;
|
|
2030
|
+
type ReconciliationConfig = z.infer<typeof ReconciliationConfigSchema>;
|
|
2008
2031
|
type RuleId = z.infer<typeof RuleIdSchema>;
|
|
2009
2032
|
type RuleSeverity = z.infer<typeof RuleSeveritySchema>;
|
|
2010
2033
|
type RulesConfig = z.infer<typeof RulesConfigSchema>;
|
|
@@ -2034,4 +2057,4 @@ declare const resolveProjectRoot: (start?: string) => string;
|
|
|
2034
2057
|
/** Project root for a loaded config file path (directory of the config). */
|
|
2035
2058
|
declare const projectRootFromConfigPath: (configFilePath: string, projectRootField?: string) => string;
|
|
2036
2059
|
|
|
2037
|
-
export { type AgentCorpusConfig as A, ConfigNotFoundError as C, type DocBridgeConfigV1 as D, EcosystemContractEvidenceSchema as E, HumanCorpusConfigSchema as H, type LoadConfigOptions as L, type RulesConfig as R, type WorkflowConfig as W, type RuleId as a, type RuleSeverity as b, type DocumentationStandardRuleId as c, DocBridgeConfigV1Schema as d, DocumentationStandardRuleIdSchema as e, type DocumentationStandardV1Config as f, DocumentationStandardV1ConfigSchema as g, type LoadConfigResult as h, type RepositorySafetyConfig as i, RepositorySafetyConfigSchema as j, RuleIdSchema as k, RuleSeveritySchema as l, RulesConfigSchema as m, WorkflowConfigSchema as n, applyConfigDefaults as o, defineConfig as p, loadConfig as q, projectRootFromConfigPath as r, resolveProjectRoot as s, AgentCorpusConfigSchema as t, ConformanceConfigSchema as u };
|
|
2060
|
+
export { type AgentCorpusConfig as A, ConfigNotFoundError as C, type DocBridgeConfigV1 as D, EcosystemContractEvidenceSchema as E, HumanCorpusConfigSchema as H, type LoadConfigOptions as L, type RulesConfig as R, type WorkflowConfig as W, type RuleId as a, type RuleSeverity as b, type DocumentationStandardRuleId as c, DocBridgeConfigV1Schema as d, DocumentationStandardRuleIdSchema as e, type DocumentationStandardV1Config as f, DocumentationStandardV1ConfigSchema as g, type LoadConfigResult as h, type RepositorySafetyConfig as i, RepositorySafetyConfigSchema as j, RuleIdSchema as k, RuleSeveritySchema as l, RulesConfigSchema as m, WorkflowConfigSchema as n, applyConfigDefaults as o, defineConfig as p, loadConfig as q, projectRootFromConfigPath as r, resolveProjectRoot as s, AgentCorpusConfigSchema as t, ConformanceConfigSchema as u, type ReconciliationConfig as v, ReconciliationConfigSchema as w };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DocBridgeConfigV1, R as RulesConfig, a as RuleId, b as RuleSeverity, c as DocumentationStandardRuleId } from './index-
|
|
2
|
-
export { A as AgentCorpusConfig, C as ConfigNotFoundError, d as DocBridgeConfigV1Schema, e as DocumentationStandardRuleIdSchema, f as DocumentationStandardV1Config, g as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, h as LoadConfigResult, i as RepositorySafetyConfig, j as RepositorySafetyConfigSchema, k as RuleIdSchema, l as RuleSeveritySchema, m as RulesConfigSchema, W as WorkflowConfig, n as WorkflowConfigSchema, o as applyConfigDefaults, p as defineConfig, q as loadConfig, r as projectRootFromConfigPath, s as resolveProjectRoot } from './index-
|
|
1
|
+
import { D as DocBridgeConfigV1, R as RulesConfig, a as RuleId, b as RuleSeverity, c as DocumentationStandardRuleId } from './index-DudNuwI5.js';
|
|
2
|
+
export { A as AgentCorpusConfig, C as ConfigNotFoundError, d as DocBridgeConfigV1Schema, e as DocumentationStandardRuleIdSchema, f as DocumentationStandardV1Config, g as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, h as LoadConfigResult, i as RepositorySafetyConfig, j as RepositorySafetyConfigSchema, k as RuleIdSchema, l as RuleSeveritySchema, m as RulesConfigSchema, W as WorkflowConfig, n as WorkflowConfigSchema, o as applyConfigDefaults, p as defineConfig, q as loadConfig, r as projectRootFromConfigPath, s as resolveProjectRoot } from './index-DudNuwI5.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const HANDOFF_SCHEMA_VERSION: 1;
|
|
@@ -2313,14 +2313,17 @@ declare const ReconciliationReportV1Schema: z.ZodObject<{
|
|
|
2313
2313
|
entityCount: z.ZodNumber;
|
|
2314
2314
|
relationCount: z.ZodNumber;
|
|
2315
2315
|
diagnosticCount: z.ZodNumber;
|
|
2316
|
+
requiredRelationKinds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2316
2317
|
}, "strict", z.ZodTypeAny, {
|
|
2317
2318
|
entityCount: number;
|
|
2318
2319
|
relationCount: number;
|
|
2319
2320
|
diagnosticCount: number;
|
|
2321
|
+
requiredRelationKinds?: string[] | undefined;
|
|
2320
2322
|
}, {
|
|
2321
2323
|
entityCount: number;
|
|
2322
2324
|
relationCount: number;
|
|
2323
2325
|
diagnosticCount: number;
|
|
2326
|
+
requiredRelationKinds?: string[] | undefined;
|
|
2324
2327
|
}>;
|
|
2325
2328
|
schemaVersion: z.ZodLiteral<1>;
|
|
2326
2329
|
contentHash: z.ZodString;
|
|
@@ -2353,6 +2356,7 @@ declare const ReconciliationReportV1Schema: z.ZodObject<{
|
|
|
2353
2356
|
entityCount: number;
|
|
2354
2357
|
relationCount: number;
|
|
2355
2358
|
diagnosticCount: number;
|
|
2359
|
+
requiredRelationKinds?: string[] | undefined;
|
|
2356
2360
|
};
|
|
2357
2361
|
contentHashAlgo: "sha256-normalized-v1";
|
|
2358
2362
|
sourceRevision: string;
|
|
@@ -2391,6 +2395,7 @@ declare const ReconciliationReportV1Schema: z.ZodObject<{
|
|
|
2391
2395
|
entityCount: number;
|
|
2392
2396
|
relationCount: number;
|
|
2393
2397
|
diagnosticCount: number;
|
|
2398
|
+
requiredRelationKinds?: string[] | undefined;
|
|
2394
2399
|
};
|
|
2395
2400
|
contentHashAlgo: "sha256-normalized-v1";
|
|
2396
2401
|
sourceRevision: string;
|
|
@@ -3148,7 +3153,11 @@ type DocumentationAnalysisResult = {
|
|
|
3148
3153
|
declare const parseDocumentationDeclarations: (input: DocumentationDeclarationInput, options: DocumentationDeclarationOptions) => DocumentationDeclarationResult;
|
|
3149
3154
|
declare const applyDocumentationDeclarations: (snapshot: DiscoverySnapshotV1, documents: readonly DocumentationDeclarationInput[]) => DocumentationAnalysisResult;
|
|
3150
3155
|
|
|
3151
|
-
|
|
3156
|
+
type ReconciliationOptions = {
|
|
3157
|
+
/** Omit for backwards-compatible all-relation checking; [] disables missing-declaration findings. */
|
|
3158
|
+
readonly requiredRelationKinds?: readonly string[];
|
|
3159
|
+
};
|
|
3160
|
+
declare const reconcileKnowledge: (observed: DiscoverySnapshotV1, declared: DiscoverySnapshotV1, options?: ReconciliationOptions) => ReconciliationReportV1;
|
|
3152
3161
|
|
|
3153
3162
|
type OfflineReportInput = {
|
|
3154
3163
|
readonly snapshot: DiscoverySnapshotV1;
|
|
@@ -3157,7 +3166,17 @@ type OfflineReportInput = {
|
|
|
3157
3166
|
type OfflineReportOptions = {
|
|
3158
3167
|
readonly includeSnippets?: boolean;
|
|
3159
3168
|
};
|
|
3169
|
+
type OfflineReportArtifact = {
|
|
3170
|
+
readonly mode: 'single-file' | 'directory';
|
|
3171
|
+
readonly indexHtml: string;
|
|
3172
|
+
readonly files: Readonly<Record<string, string>>;
|
|
3173
|
+
readonly manifest: string;
|
|
3174
|
+
};
|
|
3175
|
+
declare const DEFAULT_LARGE_REPORT_THRESHOLD_BYTES = 5000000;
|
|
3160
3176
|
declare const renderOfflineReport: (input: unknown, options?: OfflineReportOptions) => string;
|
|
3177
|
+
declare const renderOfflineReportArtifact: (input: unknown, options?: OfflineReportOptions & {
|
|
3178
|
+
readonly thresholdBytes?: number;
|
|
3179
|
+
}) => OfflineReportArtifact;
|
|
3161
3180
|
|
|
3162
3181
|
type FixProposalOptions = {
|
|
3163
3182
|
readonly baseRevision: string;
|
|
@@ -3783,7 +3802,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
|
|
|
3783
3802
|
declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
|
|
3784
3803
|
declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
|
|
3785
3804
|
|
|
3786
|
-
declare const PACKAGE_VERSION = "1.6.
|
|
3805
|
+
declare const PACKAGE_VERSION = "1.6.3";
|
|
3787
3806
|
|
|
3788
3807
|
type FrontmatterValue = string | boolean | readonly string[];
|
|
3789
3808
|
type FrontmatterData = Record<string, FrontmatterValue>;
|
|
@@ -3900,4 +3919,4 @@ declare const docBridgePatternPayload: () => {
|
|
|
3900
3919
|
cli: "ak-docs";
|
|
3901
3920
|
};
|
|
3902
3921
|
|
|
3903
|
-
export { AffectedFileSchema, AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentProposalV1, AgentProposalV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, CoverageSchema, DEFAULT_REGISTRY_AGENT_ID, DEFAULT_SAFETY_EXCLUDES, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, type DiagnosticSeverity, DiagnosticSeveritySchema, type DiscoveryOptions, type DiscoverySnapshotV1, DiscoverySnapshotV1Schema, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationAnalysisResult, type DocumentationConformanceReportV1, type DocumentationDeclarationInput, type DocumentationDeclarationOptions, type DocumentationDeclarationResult, type DocumentationDiagnostic, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, EntitySchema, type Evidence, EvidenceSchema, EvidenceSourceSchema, type FederatedRetrieverOptions, type FetchText, type FindingStatus, FindingStatusSchema, type FixApplyOptions, type FixChange, FixChangeSchema, type FixProposalOptions, FixProposalStatusSchema, type FixProposalV1, FixProposalV1Schema, type FormatEcosystemLlmsBlockOptions, type GateId, type GateResult, type GateRunResult, type GithubPrOptions, type GithubPrResult, HANDOFF_SCHEMA_VERSION, type HandoffBridge, HandoffBridgeSchema, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, KNOWLEDGE_CONTENT_HASH_ALGO, KNOWLEDGE_SCHEMA_VERSION, type KnowledgeArtifactV1, type KnowledgeDiagnostic, type KnowledgeEntity, type KnowledgeEntry, KnowledgeEntrySchema, type KnowledgeRelation, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, type OfflineReportInput, type OfflineReportOptions, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, ProjectIdentitySchema, ProposalOriginSchema, type Provenance, ProvenanceSchema, type QueryKind, type QueryRequest, type QueryResult, type ReconciliationReportV1, ReconciliationReportV1Schema, type RegistryAgentAdapter, type RegistryAgentContext, type RegistryAgentMetadata, type RegistryAgentRunner, RelationSchema, type RuleEngineOptions, type RuleEvaluationResult, type RuleFinding, RuleId, type RuleMode, RuleSeverity, RulesConfig, type SafeWalkOptions, type SafeWalkResult, type SafetyFinding, type SearchMatch, WORKFLOW_STAGES, type WatchIndexOptions, type WorkflowExecutionResult, type WorkflowOptions, type WorkflowRunV1, WorkflowRunV1Schema, type WorkflowStage, type WorkflowStageContext, type WorkflowStageHandler, type WorkflowState, WorkflowStateSchema, WorkflowStepSchema, WorkflowTransitionSchema, applyDocumentationDeclarations, applyFixProposal, approveFixProposal, buildDocBridgeIndex, buildLookup, canonicalJsonV1, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, containedPath, contentHashForArtifactV1, createArtifactNormalizationProposal, createDocBridgeRag, createDocBridgeRetriever, createMarkdownLinkFixProposal, createRegistryAgentAdapter, defaultPromotionDraftPath, discoverNxProjects, discoverRepository, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, evaluateRules, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, loadRegistryAgentMetadata, loadRegistryAgentRunner, loadWorkflowManifest, loadWorkflowStepOutput, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentProposal, parseAgentSearch, parseDiscoverySnapshot, parseDocBridgeConfig, parseDocBridgeIndex, parseDocumentationDeclarations, parseFixProposal, parseLlmsTxtLinks, parseMemoryCandidate, parseReconciliationReport, parseRuleId, parseRuleSeverity, parseWorkflowRun, persistRegistryAgentProposal, promoteMemoryToGithubPr, reconcileKnowledge, redactSecrets, redactValue, renderOfflineReport, resolveGateIds, resolveRoot, respondMcpRequest, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, runWorkflow, safeParseAgentHandoff, safeWalkFiles, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };
|
|
3922
|
+
export { AffectedFileSchema, AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentProposalV1, AgentProposalV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, CoverageSchema, DEFAULT_LARGE_REPORT_THRESHOLD_BYTES, DEFAULT_REGISTRY_AGENT_ID, DEFAULT_SAFETY_EXCLUDES, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, type DiagnosticSeverity, DiagnosticSeveritySchema, type DiscoveryOptions, type DiscoverySnapshotV1, DiscoverySnapshotV1Schema, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationAnalysisResult, type DocumentationConformanceReportV1, type DocumentationDeclarationInput, type DocumentationDeclarationOptions, type DocumentationDeclarationResult, type DocumentationDiagnostic, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, EntitySchema, type Evidence, EvidenceSchema, EvidenceSourceSchema, type FederatedRetrieverOptions, type FetchText, type FindingStatus, FindingStatusSchema, type FixApplyOptions, type FixChange, FixChangeSchema, type FixProposalOptions, FixProposalStatusSchema, type FixProposalV1, FixProposalV1Schema, type FormatEcosystemLlmsBlockOptions, type GateId, type GateResult, type GateRunResult, type GithubPrOptions, type GithubPrResult, HANDOFF_SCHEMA_VERSION, type HandoffBridge, HandoffBridgeSchema, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, KNOWLEDGE_CONTENT_HASH_ALGO, KNOWLEDGE_SCHEMA_VERSION, type KnowledgeArtifactV1, type KnowledgeDiagnostic, type KnowledgeEntity, type KnowledgeEntry, KnowledgeEntrySchema, type KnowledgeRelation, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, type OfflineReportArtifact, type OfflineReportInput, type OfflineReportOptions, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, ProjectIdentitySchema, ProposalOriginSchema, type Provenance, ProvenanceSchema, type QueryKind, type QueryRequest, type QueryResult, type ReconciliationReportV1, ReconciliationReportV1Schema, type RegistryAgentAdapter, type RegistryAgentContext, type RegistryAgentMetadata, type RegistryAgentRunner, RelationSchema, type RuleEngineOptions, type RuleEvaluationResult, type RuleFinding, RuleId, type RuleMode, RuleSeverity, RulesConfig, type SafeWalkOptions, type SafeWalkResult, type SafetyFinding, type SearchMatch, WORKFLOW_STAGES, type WatchIndexOptions, type WorkflowExecutionResult, type WorkflowOptions, type WorkflowRunV1, WorkflowRunV1Schema, type WorkflowStage, type WorkflowStageContext, type WorkflowStageHandler, type WorkflowState, WorkflowStateSchema, WorkflowStepSchema, WorkflowTransitionSchema, applyDocumentationDeclarations, applyFixProposal, approveFixProposal, buildDocBridgeIndex, buildLookup, canonicalJsonV1, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, containedPath, contentHashForArtifactV1, createArtifactNormalizationProposal, createDocBridgeRag, createDocBridgeRetriever, createMarkdownLinkFixProposal, createRegistryAgentAdapter, defaultPromotionDraftPath, discoverNxProjects, discoverRepository, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, evaluateRules, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, loadRegistryAgentMetadata, loadRegistryAgentRunner, loadWorkflowManifest, loadWorkflowStepOutput, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentProposal, parseAgentSearch, parseDiscoverySnapshot, parseDocBridgeConfig, parseDocBridgeIndex, parseDocumentationDeclarations, parseFixProposal, parseLlmsTxtLinks, parseMemoryCandidate, parseReconciliationReport, parseRuleId, parseRuleSeverity, parseWorkflowRun, persistRegistryAgentProposal, promoteMemoryToGithubPr, reconcileKnowledge, redactSecrets, redactValue, renderOfflineReport, renderOfflineReportArtifact, resolveGateIds, resolveRoot, respondMcpRequest, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, runWorkflow, safeParseAgentHandoff, safeWalkFiles, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };
|