@agentskit/doc-bridge 1.2.4 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CONTRIBUTING.md +6 -0
  3. package/PRIVACY.md +38 -0
  4. package/README.md +30 -3
  5. package/SECURITY.md +7 -2
  6. package/action.yml +1 -1
  7. package/dist/cli/program.js +400 -156
  8. package/dist/cli/program.js.map +1 -1
  9. package/dist/config/index.d.ts +1 -1
  10. package/dist/config/index.js +3 -1
  11. package/dist/config/index.js.map +1 -1
  12. package/dist/{index-DGI9TBLE.d.ts → index-DAeq_OIi.d.ts} +22 -22
  13. package/dist/index.d.ts +47 -12
  14. package/dist/index.js +376 -131
  15. package/dist/index.js.map +1 -1
  16. package/docs/POSITIONING.md +1 -1
  17. package/docs/examples.md +4 -0
  18. package/docs/getting-started.md +1 -1
  19. package/docs/landing/index.html +1 -1
  20. package/docs/mcp.md +16 -0
  21. package/docs/qa/vitepress-starlight-adapters.md +19 -0
  22. package/docs/spec/config-v1.md +33 -2
  23. package/examples/nextra-only.config.ts +17 -0
  24. package/examples/nx-monorepo.config.ts +11 -0
  25. package/examples/starlight-only.config.ts +17 -0
  26. package/examples/vitepress-only.config.ts +19 -0
  27. package/mcpb/.mcpbignore +8 -0
  28. package/mcpb/icon.png +0 -0
  29. package/mcpb/manifest.json +96 -0
  30. package/package.json +14 -11
  31. package/src/config/schema.ts +3 -1
  32. package/src/index-builder/build-handoffs.ts +2 -0
  33. package/src/index-builder/build-index.ts +7 -1
  34. package/src/index-builder/human-adapters/index.ts +6 -0
  35. package/src/index-builder/human-adapters/nextra.ts +43 -0
  36. package/src/index-builder/human-adapters/starlight.ts +40 -0
  37. package/src/index-builder/human-adapters/vitepress.ts +43 -0
  38. package/src/index-builder/plugins/nx.ts +161 -0
  39. package/src/index-builder/plugins/pnpm-monorepo.ts +1 -0
  40. package/src/index-builder/watch-index.ts +11 -2
  41. package/src/index.ts +1 -0
  42. package/src/mcp/server.ts +58 -26
  43. package/src/version.ts +1 -1
@@ -1,2 +1,2 @@
1
- export { A as AgentCorpusConfig, i as AgentCorpusConfigSchema, C as ConfigNotFoundError, j as ConformanceConfigSchema, D as DocBridgeConfigV1, b as DocBridgeConfigV1Schema, a as DocumentationStandardRuleId, c as DocumentationStandardRuleIdSchema, d as DocumentationStandardV1Config, e as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, H as HumanCorpusConfigSchema, g as applyConfigDefaults, h as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from '../index-DGI9TBLE.js';
1
+ export { A as AgentCorpusConfig, i as AgentCorpusConfigSchema, C as ConfigNotFoundError, j as ConformanceConfigSchema, D as DocBridgeConfigV1, b as DocBridgeConfigV1Schema, a as DocumentationStandardRuleId, c as DocumentationStandardRuleIdSchema, d as DocumentationStandardV1Config, e as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, H as HumanCorpusConfigSchema, g as applyConfigDefaults, h as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from '../index-DAeq_OIi.js';
2
2
  import 'zod';
@@ -64,6 +64,8 @@ var HumanCorpusPluginIdSchema = z.enum([
64
64
  "docusaurus",
65
65
  "mkdocs",
66
66
  "vitepress",
67
+ "starlight",
68
+ "nextra",
67
69
  "custom"
68
70
  ]);
69
71
  var AgentCorpusConfigSchema = z.object({
@@ -103,7 +105,7 @@ var OwnershipEntrySchema = z.object({
103
105
  humanDoc: z.string().min(1).max(512).optional()
104
106
  }).strict();
105
107
  var RoutingConfigSchema = z.object({
106
- plugin: z.enum(["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "pattern-files", "custom"]).optional(),
108
+ plugin: z.enum(["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "nx", "pattern-files", "custom"]).optional(),
107
109
  options: z.object({
108
110
  packages: z.array(z.string().min(1).max(256)).max(128).optional(),
109
111
  /** Infer ownership from corpus paths/frontmatter (default true). */
@@ -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 surfaces: {\n cli: {\n bin: 'ak-docs',\n defaultFormat: 'json',\n ...config.surfaces?.cli,\n },\n mcp: {\n enabled: true,\n tools: ['handoff.resolve', 'doc.search', 'doc.get', 'gate.status'],\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 '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 })\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', '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 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 ]),\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 })\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 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>\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,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,CAAC,mBAAmB,cAAc,WAAW,aAAa;AAAA,QACjE,WAAW;AAAA,QACX,GAAG,OAAO,UAAU;AAAA,MACtB;AAAA,MACA,GAAG,OAAO;AAAA,IACZ;AAAA,IACA,cAAc,OAAO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AK;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 surfaces: {\n cli: {\n bin: 'ak-docs',\n defaultFormat: 'json',\n ...config.surfaces?.cli,\n },\n mcp: {\n enabled: true,\n tools: ['handoff.resolve', 'doc.search', 'doc.get', 'gate.status'],\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 })\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 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 ]),\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 })\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 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>\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,UAAU;AAAA,MACR,KAAK;AAAA,QACH,KAAK;AAAA,QACL,eAAe;AAAA,QACf,GAAG,OAAO,UAAU;AAAA,MACtB;AAAA,MACA,KAA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M,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":[]}
@@ -35,13 +35,13 @@ declare const AgentCorpusConfigSchema: z.ZodObject<{
35
35
  } | undefined;
36
36
  }>;
37
37
  declare const HumanCorpusConfigSchema: z.ZodObject<{
38
- plugin: z.ZodEnum<["plain-markdown", "fumadocs", "docusaurus", "mkdocs", "vitepress", "custom"]>;
38
+ plugin: z.ZodEnum<["plain-markdown", "fumadocs", "docusaurus", "mkdocs", "vitepress", "starlight", "nextra", "custom"]>;
39
39
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
40
40
  }, "strict", z.ZodTypeAny, {
41
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
41
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
42
42
  options?: Record<string, unknown> | undefined;
43
43
  }, {
44
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
44
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
45
45
  options?: Record<string, unknown> | undefined;
46
46
  }>;
47
47
  declare const EcosystemContractEvidenceSchema: z.ZodObject<{
@@ -618,22 +618,22 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
618
618
  } | undefined;
619
619
  }>;
620
620
  human: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
621
- plugin: z.ZodEnum<["plain-markdown", "fumadocs", "docusaurus", "mkdocs", "vitepress", "custom"]>;
621
+ plugin: z.ZodEnum<["plain-markdown", "fumadocs", "docusaurus", "mkdocs", "vitepress", "starlight", "nextra", "custom"]>;
622
622
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
623
623
  }, "strict", z.ZodTypeAny, {
624
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
624
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
625
625
  options?: Record<string, unknown> | undefined;
626
626
  }, {
627
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
627
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
628
628
  options?: Record<string, unknown> | undefined;
629
629
  }>, z.ZodArray<z.ZodObject<{
630
- plugin: z.ZodEnum<["plain-markdown", "fumadocs", "docusaurus", "mkdocs", "vitepress", "custom"]>;
630
+ plugin: z.ZodEnum<["plain-markdown", "fumadocs", "docusaurus", "mkdocs", "vitepress", "starlight", "nextra", "custom"]>;
631
631
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
632
632
  }, "strict", z.ZodTypeAny, {
633
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
633
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
634
634
  options?: Record<string, unknown> | undefined;
635
635
  }, {
636
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
636
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
637
637
  options?: Record<string, unknown> | undefined;
638
638
  }>, "many">]>>;
639
639
  }, "strict", z.ZodTypeAny, {
@@ -648,10 +648,10 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
648
648
  } | undefined;
649
649
  };
650
650
  human?: {
651
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
651
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
652
652
  options?: Record<string, unknown> | undefined;
653
653
  } | {
654
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
654
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
655
655
  options?: Record<string, unknown> | undefined;
656
656
  }[] | undefined;
657
657
  }, {
@@ -666,10 +666,10 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
666
666
  } | undefined;
667
667
  };
668
668
  human?: {
669
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
669
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
670
670
  options?: Record<string, unknown> | undefined;
671
671
  } | {
672
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
672
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
673
673
  options?: Record<string, unknown> | undefined;
674
674
  }[] | undefined;
675
675
  }>;
@@ -725,7 +725,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
725
725
  contentHash?: "sha256-normalized-v1" | undefined;
726
726
  }>>;
727
727
  routing: z.ZodOptional<z.ZodObject<{
728
- plugin: z.ZodOptional<z.ZodEnum<["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "pattern-files", "custom"]>>;
728
+ plugin: z.ZodOptional<z.ZodEnum<["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "nx", "pattern-files", "custom"]>>;
729
729
  options: z.ZodOptional<z.ZodObject<{
730
730
  packages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
731
731
  /** Infer ownership from corpus paths/frontmatter (default true). */
@@ -856,7 +856,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
856
856
  relatedPackages?: string[] | undefined;
857
857
  }[] | undefined;
858
858
  } | undefined;
859
- plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
859
+ plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "nx" | "pattern-files" | undefined;
860
860
  }, {
861
861
  options?: {
862
862
  packages?: string[] | undefined;
@@ -882,7 +882,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
882
882
  relatedPackages?: string[] | undefined;
883
883
  }[] | undefined;
884
884
  } | undefined;
885
- plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
885
+ plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "nx" | "pattern-files" | undefined;
886
886
  }>>;
887
887
  gates: z.ZodOptional<z.ZodObject<{
888
888
  /** minimal: freshness · standard: + human links · strict: + okf-type · playbook: freshness + okf soft style */
@@ -1482,10 +1482,10 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
1482
1482
  } | undefined;
1483
1483
  };
1484
1484
  human?: {
1485
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
1485
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
1486
1486
  options?: Record<string, unknown> | undefined;
1487
1487
  } | {
1488
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
1488
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
1489
1489
  options?: Record<string, unknown> | undefined;
1490
1490
  }[] | undefined;
1491
1491
  };
@@ -1541,7 +1541,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
1541
1541
  relatedPackages?: string[] | undefined;
1542
1542
  }[] | undefined;
1543
1543
  } | undefined;
1544
- plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
1544
+ plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "nx" | "pattern-files" | undefined;
1545
1545
  } | undefined;
1546
1546
  gates?: {
1547
1547
  options?: Record<string, unknown> | undefined;
@@ -1650,10 +1650,10 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
1650
1650
  } | undefined;
1651
1651
  };
1652
1652
  human?: {
1653
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
1653
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
1654
1654
  options?: Record<string, unknown> | undefined;
1655
1655
  } | {
1656
- plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "custom";
1656
+ plugin: "plain-markdown" | "fumadocs" | "docusaurus" | "mkdocs" | "vitepress" | "starlight" | "nextra" | "custom";
1657
1657
  options?: Record<string, unknown> | undefined;
1658
1658
  }[] | undefined;
1659
1659
  };
@@ -1709,7 +1709,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
1709
1709
  relatedPackages?: string[] | undefined;
1710
1710
  }[] | undefined;
1711
1711
  } | undefined;
1712
- plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
1712
+ plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "nx" | "pattern-files" | undefined;
1713
1713
  } | undefined;
1714
1714
  gates?: {
1715
1715
  options?: Record<string, unknown> | undefined;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DocBridgeConfigV1, a as DocumentationStandardRuleId } from './index-DGI9TBLE.js';
2
- export { A as AgentCorpusConfig, C as ConfigNotFoundError, b as DocBridgeConfigV1Schema, c as DocumentationStandardRuleIdSchema, d as DocumentationStandardV1Config, e as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, f as LoadConfigResult, g as applyConfigDefaults, h as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from './index-DGI9TBLE.js';
1
+ import { D as DocBridgeConfigV1, a as DocumentationStandardRuleId } from './index-DAeq_OIi.js';
2
+ export { A as AgentCorpusConfig, C as ConfigNotFoundError, b as DocBridgeConfigV1Schema, c as DocumentationStandardRuleIdSchema, d as DocumentationStandardV1Config, e as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, f as LoadConfigResult, g as applyConfigDefaults, h as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from './index-DAeq_OIi.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const HANDOFF_SCHEMA_VERSION: 1;
@@ -1535,7 +1535,11 @@ type McpContext = {
1535
1535
  };
1536
1536
  declare const MCP_TOOLS: readonly [{
1537
1537
  readonly name: "handoff.resolve";
1538
- readonly description: "Resolve a package or ownership id to an AgentHandoff.";
1538
+ readonly title: "Resolve repository handoff";
1539
+ readonly description: "Resolve a package or ownership id to its deterministic AgentHandoff.";
1540
+ readonly annotations: {
1541
+ readonly readOnlyHint: true;
1542
+ };
1539
1543
  readonly inputSchema: {
1540
1544
  readonly type: "object";
1541
1545
  readonly properties: {
@@ -1551,7 +1555,11 @@ declare const MCP_TOOLS: readonly [{
1551
1555
  };
1552
1556
  }, {
1553
1557
  readonly name: "doc.search";
1554
- readonly description: "Search the deterministic doc-bridge index.";
1558
+ readonly title: "Search repository documentation";
1559
+ readonly description: "Search the deterministic Doc Bridge index for repository documentation.";
1560
+ readonly annotations: {
1561
+ readonly readOnlyHint: true;
1562
+ };
1555
1563
  readonly inputSchema: {
1556
1564
  readonly type: "object";
1557
1565
  readonly properties: {
@@ -1566,7 +1574,11 @@ declare const MCP_TOOLS: readonly [{
1566
1574
  };
1567
1575
  }, {
1568
1576
  readonly name: "doc.get";
1569
- readonly description: "Read an indexed agent documentation file by id or path.";
1577
+ readonly title: "Read indexed documentation";
1578
+ readonly description: "Read one indexed agent documentation file by id or indexed path.";
1579
+ readonly annotations: {
1580
+ readonly readOnlyHint: true;
1581
+ };
1570
1582
  readonly inputSchema: {
1571
1583
  readonly type: "object";
1572
1584
  readonly properties: {
@@ -1580,14 +1592,22 @@ declare const MCP_TOOLS: readonly [{
1580
1592
  };
1581
1593
  }, {
1582
1594
  readonly name: "gate.status";
1583
- readonly description: "Run the index-freshness gate.";
1595
+ readonly title: "Check documentation gates";
1596
+ readonly description: "Evaluate documentation gates without writing files.";
1597
+ readonly annotations: {
1598
+ readonly readOnlyHint: true;
1599
+ };
1584
1600
  readonly inputSchema: {
1585
1601
  readonly type: "object";
1586
1602
  readonly properties: {};
1587
1603
  };
1588
1604
  }, {
1589
1605
  readonly name: "retriever.query";
1590
- readonly description: "Return local doc-bridge retriever chunks for a query.";
1606
+ readonly title: "Retrieve documentation context";
1607
+ readonly description: "Return relevant local Doc Bridge index chunks for a query.";
1608
+ readonly annotations: {
1609
+ readonly readOnlyHint: true;
1610
+ };
1591
1611
  readonly inputSchema: {
1592
1612
  readonly type: "object";
1593
1613
  readonly properties: {
@@ -1602,21 +1622,33 @@ declare const MCP_TOOLS: readonly [{
1602
1622
  };
1603
1623
  }, {
1604
1624
  readonly name: "memory.classify";
1605
- readonly description: "Classify local memory candidates into agent/human/playbook/discard routes.";
1625
+ readonly title: "Classify memory candidates";
1626
+ readonly description: "Classify local memory candidates into agent, human, playbook, or discard routes.";
1627
+ readonly annotations: {
1628
+ readonly readOnlyHint: true;
1629
+ };
1606
1630
  readonly inputSchema: {
1607
1631
  readonly type: "object";
1608
1632
  readonly properties: {};
1609
1633
  };
1610
1634
  }, {
1611
1635
  readonly name: "memory.promoteDraft";
1612
- readonly description: "Build a safe draft promotion body for local memory candidates.";
1636
+ readonly title: "Draft memory promotion";
1637
+ readonly description: "Build a reviewable draft promotion body from local memory candidates without publishing it.";
1638
+ readonly annotations: {
1639
+ readonly readOnlyHint: true;
1640
+ };
1613
1641
  readonly inputSchema: {
1614
1642
  readonly type: "object";
1615
1643
  readonly properties: {};
1616
1644
  };
1617
1645
  }, {
1618
1646
  readonly name: "registry.topology";
1619
- readonly description: "Return the doc-curator registry topology.";
1647
+ readonly title: "Inspect registry topology";
1648
+ readonly description: "Return the static Doc Bridge curator and delegate topology.";
1649
+ readonly annotations: {
1650
+ readonly readOnlyHint: true;
1651
+ };
1620
1652
  readonly inputSchema: {
1621
1653
  readonly type: "object";
1622
1654
  readonly properties: {};
@@ -1813,7 +1845,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
1813
1845
  declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
1814
1846
  declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
1815
1847
 
1816
- declare const PACKAGE_VERSION = "1.2.4";
1848
+ declare const PACKAGE_VERSION = "1.3.0";
1817
1849
 
1818
1850
  type FrontmatterValue = string | boolean | readonly string[];
1819
1851
  type FrontmatterData = Record<string, FrontmatterValue>;
@@ -1828,6 +1860,7 @@ type DiscoveredPackage = {
1828
1860
  readonly id: string;
1829
1861
  readonly path: string;
1830
1862
  readonly name?: string;
1863
+ readonly checks?: readonly string[];
1831
1864
  };
1832
1865
 
1833
1866
  type IndexLookup = {
@@ -1871,6 +1904,8 @@ declare const buildLookup: (config: DocBridgeConfigV1, packages: readonly Discov
1871
1904
  handoffs: Record<string, AgentHandoffV1>;
1872
1905
  };
1873
1906
 
1907
+ declare const discoverNxProjects: (root: string, config: DocBridgeConfigV1) => DiscoveredPackage[];
1908
+
1874
1909
  type RagSearchHit = {
1875
1910
  readonly id?: string;
1876
1911
  readonly content: string;
@@ -1927,4 +1962,4 @@ declare const docBridgePatternPayload: () => {
1927
1962
  cli: "ak-docs";
1928
1963
  };
1929
1964
 
1930
- export { AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationConformanceReportV1, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, type FederatedRetrieverOptions, type FetchText, 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, type KnowledgeEntry, KnowledgeEntrySchema, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, type QueryKind, type QueryRequest, type QueryResult, type SafetyFinding, type SearchMatch, type WatchIndexOptions, buildDocBridgeIndex, buildLookup, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, createDocBridgeRag, createDocBridgeRetriever, defaultPromotionDraftPath, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentSearch, parseDocBridgeConfig, parseDocBridgeIndex, parseLlmsTxtLinks, parseMemoryCandidate, promoteMemoryToGithubPr, resolveGateIds, resolveRoot, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, safeParseAgentHandoff, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };
1965
+ export { AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationConformanceReportV1, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, type FederatedRetrieverOptions, type FetchText, 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, type KnowledgeEntry, KnowledgeEntrySchema, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, type QueryKind, type QueryRequest, type QueryResult, type SafetyFinding, type SearchMatch, type WatchIndexOptions, buildDocBridgeIndex, buildLookup, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, createDocBridgeRag, createDocBridgeRetriever, defaultPromotionDraftPath, discoverNxProjects, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentSearch, parseDocBridgeConfig, parseDocBridgeIndex, parseLlmsTxtLinks, parseMemoryCandidate, promoteMemoryToGithubPr, resolveGateIds, resolveRoot, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, safeParseAgentHandoff, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };