@agentskit/doc-bridge 1.9.0 → 1.10.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.
@@ -1,2 +1,2 @@
1
- export { A as AgentCorpusConfig, x as AgentCorpusConfigSchema, C as ConfigNotFoundError, y as ConformanceConfigSchema, D as DocBridgeConfigV1, e as DocBridgeConfigV1Schema, a as DocumentationAuditConfig, f as DocumentationAuditConfigSchema, d as DocumentationStandardRuleId, g as DocumentationStandardRuleIdSchema, h as DocumentationStandardV1Config, i as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, H as HumanCorpusConfigSchema, z as ReconciliationConfig, B as ReconciliationConfigSchema, k as ReportConfig, l as ReportConfigSchema, F as RetrievalConfig, G as RetrievalConfigSchema, s as applyConfigDefaults, t as defineConfig, u as loadConfig, v as projectRootFromConfigPath, w as resolveProjectRoot } from '../index-Beor6Yhi.js';
1
+ export { A as AgentCorpusConfig, x as AgentCorpusConfigSchema, C as ConfigNotFoundError, y as ConformanceConfigSchema, D as DocBridgeConfigV1, e as DocBridgeConfigV1Schema, a as DocumentationAuditConfig, f as DocumentationAuditConfigSchema, d as DocumentationStandardRuleId, g as DocumentationStandardRuleIdSchema, h as DocumentationStandardV1Config, i as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, H as HumanCorpusConfigSchema, z as ReconciliationConfig, B as ReconciliationConfigSchema, k as ReportConfig, l as ReportConfigSchema, F as RetrievalConfig, G as RetrievalConfigSchema, s as applyConfigDefaults, t as defineConfig, u as loadConfig, v as projectRootFromConfigPath, w as resolveProjectRoot } from '../index-7wYGbllW.js';
2
2
  import 'zod';
@@ -256,11 +256,20 @@ var AnalysisConfigSchema = z.object({
256
256
  /**
257
257
  * How code areas are derived — the unit of architecture between a package and a file.
258
258
  * `roots` names directories that contain areas rather than being one (`src` holds
259
- * `src/query`); `depth` is how many levels below such a root an area sits.
259
+ * `src/query`); `depth` is how many levels below such a root an area sits; `exclude`
260
+ * names directories that hold code without being a unit of architecture.
260
261
  */
261
262
  areas: z.object({
262
263
  depth: z.number().int().min(1).max(8).optional(),
263
- roots: z.array(z.string().min(1).max(128)).max(32).optional()
264
+ roots: z.array(z.string().min(1).max(128)).max(32).optional(),
265
+ /**
266
+ * Glob patterns for directories that are not areas. A monorepo where every package
267
+ * keeps `tests/` and `fixtures/` beside `src/` derives one area per directory, and
268
+ * then connectivity asks for a document about a folder of test data. An ownership
269
+ * record naming an excluded path still makes it an area: a person saying a directory
270
+ * is a unit outranks a pattern saying it is not.
271
+ */
272
+ exclude: z.array(z.string().min(1).max(256)).max(64).optional()
264
273
  }).strict().optional()
265
274
  }).strict();
266
275
  var WorkflowConfigSchema = z.object({
@@ -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 'knowledge.search', 'knowledge.lookup',\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.partialRecord(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.partialRecord(RuleIdSchema, z.number().int().min(1).max(100_000)).optional(),\n })\n .strict()\n\nexport const ReconciliationConfigSchema = z\n .object({\n /** Semantic comparison level. Raw discovery always keeps file-level relations. */\n scope: z.enum(['file', 'module', 'area', 'package']).optional(),\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 /** Limit missing-declaration findings to relations whose endpoints are internal project entities. */\n requiredRelationTargets: z.enum(['all', 'internal']).optional(),\n includeOrphanedDocuments: z.boolean().optional(),\n })\n .strict()\n\nexport const DocumentationAuditConfigSchema = z\n .object({\n /** Glob-like paths that should be compared for structure coverage. */\n criticalPaths: z.array(z.string().min(1).max(512)).max(128).optional(),\n /** Generated docs are checked for presence/freshness evidence only; content quality is skipped. */\n generatedPaths: z.array(z.string().min(1).max(512)).max(128).optional(),\n exclude: z.array(z.string().min(1).max(512)).max(128).optional(),\n minWords: z.number().int().nonnegative().max(100_000).optional(),\n requiredSections: z.array(z.string().min(1).max(128)).max(32).optional(),\n requireExamples: z.boolean().optional(),\n exactDuplicates: z.boolean().optional(),\n defaultTier: z.enum(['tier-0', 'tier-1', 'tier-2']).optional(),\n tierRules: z.array(z.object({\n pattern: z.string().min(1).max(512),\n tier: z.enum(['tier-0', 'tier-1', 'tier-2']),\n critical: z.boolean().optional(),\n }).strict()).max(128).optional(),\n requiredCriticalMetadata: z.array(z.enum(['owner', 'lifecycle', 'sourceOfTruth', 'validationPath'])).max(4).optional(),\n })\n .strict()\n\nexport const AnalysisConfigSchema = z\n .object({\n plugins: z\n .array(\n z\n .object({\n id: z.string().regex(/^[a-z][a-z0-9-]*$/).max(128),\n enabled: z.boolean().optional(),\n order: z.number().int().nonnegative().optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n reason: z.string().min(1).max(1_024).optional(),\n })\n .strict(),\n )\n .max(128)\n .optional(),\n jsTs: z\n .object({\n runtimeWiringMethods: z.array(z.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/).max(64)).max(64).optional(),\n runtimeWiringAdapters: z\n .array(\n z\n .object({\n id: z.string().min(1).max(128),\n methods: z.array(z.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/).max(64)).min(1).max(64),\n })\n .strict(),\n )\n .max(32)\n .optional(),\n includeTestRuntimeWiring: z.boolean().optional(),\n })\n .strict()\n .optional(),\n /**\n * How code areas are derived — the unit of architecture between a package and a file.\n * `roots` names directories that contain areas rather than being one (`src` holds\n * `src/query`); `depth` is how many levels below such a root an area sits.\n */\n areas: z\n .object({\n depth: z.number().int().min(1).max(8).optional(),\n roots: z.array(z.string().min(1).max(128)).max(32).optional(),\n })\n .strict()\n .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 ReportConfigSchema = z\n .object({\n /** Public report privacy mode. Private is the default; anonymized preserves topology without project identity. */\n privacy: z.enum(['private', 'anonymized']).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 'knowledge.search',\n 'knowledge.lookup',\n ]),\n )\n .max(18)\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\n/** One enrichment role: an installed Registry agent and the prompt version it is run with. */\nexport const EnrichmentRoleSchema = z\n .object({\n enabled: z.boolean().optional(),\n /** Defaults to `intelligence.registry.agentId`. */\n agentId: z.string().min(1).max(256).optional(),\n promptVersion: z.string().min(1).max(64).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 cli: z\n .object({\n /** Executable name or absolute path. Arguments are passed without a shell. */\n command: z.string().min(1).max(512),\n args: z.array(z.string().max(2_048)).max(64).optional(),\n })\n .strict()\n .optional(),\n deterministic: z.boolean().optional(),\n timeoutMs: z.number().int().positive().max(600_000).optional(),\n maxInputBytes: z.number().int().positive().max(50_000_000).optional(),\n maxTokens: z.number().int().positive().max(1_000_000).optional(),\n maxResponseBytes: z.number().int().positive().max(10_000_000).optional(),\n maxConcurrency: z.number().int().positive().max(64).optional(),\n /** Byte budget of one enrichment context pack. Default 65536. */\n maxPackBytes: z.number().int().min(4_096).max(4_000_000).optional(),\n /**\n * Which installed agent plays which enrichment role. The default is the configured agent\n * as curator only. The adjudicator must be a different identity from both others.\n */\n roles: z\n .object({\n curator: EnrichmentRoleSchema.optional(),\n reviewer: EnrichmentRoleSchema.optional(),\n adjudicator: EnrichmentRoleSchema.optional(),\n })\n .strict()\n .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\n/**\n * Retrieval tuning. Weights and parameters are configuration rather than code so a repository can\n * change what its agents find first without a release, and so the change is recorded in the index.\n */\nexport const RetrievalConfigSchema = z\n .object({\n corpus: z\n .object({\n /** Project repository documents and modules into the index. On by default. */\n enabled: z.boolean().optional(),\n })\n .strict()\n .optional(),\n weights: z.record(z.string().min(1).max(64), z.number().min(0).max(1_000)).optional(),\n params: z\n .object({ k1: z.number().min(0).max(100).optional(), b: z.number().min(0).max(1).optional() })\n .strict()\n .optional(),\n benchmark: z\n .object({\n /** The golden retrieval suite the doctor measures hit@3 against. `docs/bench/retrieval-suite-v1.json` by default. */\n suite: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const ConformanceConfigSchema = z\n .object({\n documentationStandardV1: DocumentationStandardV1ConfigSchema.optional(),\n })\n .strict()\n\nexport const RenderTemplateNameSchema = z.enum(['llms.txt', 'area', 'ownership', 'change-digest', 'overlay-review'])\n\nexport const RenderConfigSchema = z\n .object({\n /**\n * Project templates that replace the bundled ones, by template name, as paths relative to\n * the project root. `ak-docs render <name> --print-template` prints the bundled template to\n * start from.\n */\n templates: z.partialRecord(RenderTemplateNameSchema, z.string().min(1).max(512)).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 audit: z.object({ documentation: DocumentationAuditConfigSchema.optional() }).strict().optional(),\n analysis: AnalysisConfigSchema.optional(),\n rules: RulesConfigSchema.optional(),\n workflow: WorkflowConfigSchema.optional(),\n safety: RepositorySafetyConfigSchema.optional(),\n report: ReportConfigSchema.optional(),\n surfaces: SurfacesConfigSchema.optional(),\n intelligence: IntelligenceConfigSchema.optional(),\n federation: FederationConfigSchema.optional(),\n conformance: ConformanceConfigSchema.optional(),\n retrieval: RetrievalConfigSchema.optional(),\n render: RenderConfigSchema.optional(),\n })\n .strict()\n\nexport type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>\nexport type RenderConfig = z.infer<typeof RenderConfigSchema>\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 DocumentationAuditConfig = z.infer<typeof DocumentationAuditConfigSchema>\nexport type AnalysisConfig = z.infer<typeof AnalysisConfigSchema>\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>\nexport type ReportConfig = z.infer<typeof ReportConfigSchema>\nexport type RetrievalConfig = z.infer<typeof RetrievalConfigSchema>\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)'}: ${\n issue.code === 'invalid_type' && issue.message.endsWith('received undefined')\n ? 'Required'\n : issue.code === 'invalid_value' && 'values' in issue\n ? 'Invalid enum value'\n : issue.message\n }`,\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,QAA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,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 'knowledge.search', 'knowledge.lookup',\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.partialRecord(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.partialRecord(RuleIdSchema, z.number().int().min(1).max(100_000)).optional(),\n })\n .strict()\n\nexport const ReconciliationConfigSchema = z\n .object({\n /** Semantic comparison level. Raw discovery always keeps file-level relations. */\n scope: z.enum(['file', 'module', 'area', 'package']).optional(),\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 /** Limit missing-declaration findings to relations whose endpoints are internal project entities. */\n requiredRelationTargets: z.enum(['all', 'internal']).optional(),\n includeOrphanedDocuments: z.boolean().optional(),\n })\n .strict()\n\nexport const DocumentationAuditConfigSchema = z\n .object({\n /** Glob-like paths that should be compared for structure coverage. */\n criticalPaths: z.array(z.string().min(1).max(512)).max(128).optional(),\n /** Generated docs are checked for presence/freshness evidence only; content quality is skipped. */\n generatedPaths: z.array(z.string().min(1).max(512)).max(128).optional(),\n exclude: z.array(z.string().min(1).max(512)).max(128).optional(),\n minWords: z.number().int().nonnegative().max(100_000).optional(),\n requiredSections: z.array(z.string().min(1).max(128)).max(32).optional(),\n requireExamples: z.boolean().optional(),\n exactDuplicates: z.boolean().optional(),\n defaultTier: z.enum(['tier-0', 'tier-1', 'tier-2']).optional(),\n tierRules: z.array(z.object({\n pattern: z.string().min(1).max(512),\n tier: z.enum(['tier-0', 'tier-1', 'tier-2']),\n critical: z.boolean().optional(),\n }).strict()).max(128).optional(),\n requiredCriticalMetadata: z.array(z.enum(['owner', 'lifecycle', 'sourceOfTruth', 'validationPath'])).max(4).optional(),\n })\n .strict()\n\nexport const AnalysisConfigSchema = z\n .object({\n plugins: z\n .array(\n z\n .object({\n id: z.string().regex(/^[a-z][a-z0-9-]*$/).max(128),\n enabled: z.boolean().optional(),\n order: z.number().int().nonnegative().optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n reason: z.string().min(1).max(1_024).optional(),\n })\n .strict(),\n )\n .max(128)\n .optional(),\n jsTs: z\n .object({\n runtimeWiringMethods: z.array(z.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/).max(64)).max(64).optional(),\n runtimeWiringAdapters: z\n .array(\n z\n .object({\n id: z.string().min(1).max(128),\n methods: z.array(z.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/).max(64)).min(1).max(64),\n })\n .strict(),\n )\n .max(32)\n .optional(),\n includeTestRuntimeWiring: z.boolean().optional(),\n })\n .strict()\n .optional(),\n /**\n * How code areas are derived — the unit of architecture between a package and a file.\n * `roots` names directories that contain areas rather than being one (`src` holds\n * `src/query`); `depth` is how many levels below such a root an area sits; `exclude`\n * names directories that hold code without being a unit of architecture.\n */\n areas: z\n .object({\n depth: z.number().int().min(1).max(8).optional(),\n roots: z.array(z.string().min(1).max(128)).max(32).optional(),\n /**\n * Glob patterns for directories that are not areas. A monorepo where every package\n * keeps `tests/` and `fixtures/` beside `src/` derives one area per directory, and\n * then connectivity asks for a document about a folder of test data. An ownership\n * record naming an excluded path still makes it an area: a person saying a directory\n * is a unit outranks a pattern saying it is not.\n */\n exclude: z.array(z.string().min(1).max(256)).max(64).optional(),\n })\n .strict()\n .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 ReportConfigSchema = z\n .object({\n /** Public report privacy mode. Private is the default; anonymized preserves topology without project identity. */\n privacy: z.enum(['private', 'anonymized']).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 'knowledge.search',\n 'knowledge.lookup',\n ]),\n )\n .max(18)\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\n/** One enrichment role: an installed Registry agent and the prompt version it is run with. */\nexport const EnrichmentRoleSchema = z\n .object({\n enabled: z.boolean().optional(),\n /** Defaults to `intelligence.registry.agentId`. */\n agentId: z.string().min(1).max(256).optional(),\n promptVersion: z.string().min(1).max(64).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 cli: z\n .object({\n /** Executable name or absolute path. Arguments are passed without a shell. */\n command: z.string().min(1).max(512),\n args: z.array(z.string().max(2_048)).max(64).optional(),\n })\n .strict()\n .optional(),\n deterministic: z.boolean().optional(),\n timeoutMs: z.number().int().positive().max(600_000).optional(),\n maxInputBytes: z.number().int().positive().max(50_000_000).optional(),\n maxTokens: z.number().int().positive().max(1_000_000).optional(),\n maxResponseBytes: z.number().int().positive().max(10_000_000).optional(),\n maxConcurrency: z.number().int().positive().max(64).optional(),\n /** Byte budget of one enrichment context pack. Default 65536. */\n maxPackBytes: z.number().int().min(4_096).max(4_000_000).optional(),\n /**\n * Which installed agent plays which enrichment role. The default is the configured agent\n * as curator only. The adjudicator must be a different identity from both others.\n */\n roles: z\n .object({\n curator: EnrichmentRoleSchema.optional(),\n reviewer: EnrichmentRoleSchema.optional(),\n adjudicator: EnrichmentRoleSchema.optional(),\n })\n .strict()\n .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\n/**\n * Retrieval tuning. Weights and parameters are configuration rather than code so a repository can\n * change what its agents find first without a release, and so the change is recorded in the index.\n */\nexport const RetrievalConfigSchema = z\n .object({\n corpus: z\n .object({\n /** Project repository documents and modules into the index. On by default. */\n enabled: z.boolean().optional(),\n })\n .strict()\n .optional(),\n weights: z.record(z.string().min(1).max(64), z.number().min(0).max(1_000)).optional(),\n params: z\n .object({ k1: z.number().min(0).max(100).optional(), b: z.number().min(0).max(1).optional() })\n .strict()\n .optional(),\n benchmark: z\n .object({\n /** The golden retrieval suite the doctor measures hit@3 against. `docs/bench/retrieval-suite-v1.json` by default. */\n suite: z.string().min(1).max(512).optional(),\n })\n .strict()\n .optional(),\n })\n .strict()\n\nexport const ConformanceConfigSchema = z\n .object({\n documentationStandardV1: DocumentationStandardV1ConfigSchema.optional(),\n })\n .strict()\n\nexport const RenderTemplateNameSchema = z.enum(['llms.txt', 'area', 'ownership', 'change-digest', 'overlay-review'])\n\nexport const RenderConfigSchema = z\n .object({\n /**\n * Project templates that replace the bundled ones, by template name, as paths relative to\n * the project root. `ak-docs render <name> --print-template` prints the bundled template to\n * start from.\n */\n templates: z.partialRecord(RenderTemplateNameSchema, z.string().min(1).max(512)).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 audit: z.object({ documentation: DocumentationAuditConfigSchema.optional() }).strict().optional(),\n analysis: AnalysisConfigSchema.optional(),\n rules: RulesConfigSchema.optional(),\n workflow: WorkflowConfigSchema.optional(),\n safety: RepositorySafetyConfigSchema.optional(),\n report: ReportConfigSchema.optional(),\n surfaces: SurfacesConfigSchema.optional(),\n intelligence: IntelligenceConfigSchema.optional(),\n federation: FederationConfigSchema.optional(),\n conformance: ConformanceConfigSchema.optional(),\n retrieval: RetrievalConfigSchema.optional(),\n render: RenderConfigSchema.optional(),\n })\n .strict()\n\nexport type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>\nexport type RenderConfig = z.infer<typeof RenderConfigSchema>\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 DocumentationAuditConfig = z.infer<typeof DocumentationAuditConfigSchema>\nexport type AnalysisConfig = z.infer<typeof AnalysisConfigSchema>\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>\nexport type ReportConfig = z.infer<typeof ReportConfigSchema>\nexport type RetrievalConfig = z.infer<typeof RetrievalConfigSchema>\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)'}: ${\n issue.code === 'invalid_type' && issue.message.endsWith('received undefined')\n ? 'Required'\n : issue.code === 'invalid_value' && 'values' in issue\n ? 'Invalid enum value'\n : issue.message\n }`,\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,QAC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ject<{
465
465
  areas: z.ZodOptional<z.ZodObject<{
466
466
  depth: z.ZodOptional<z.ZodNumber>;
467
467
  roots: z.ZodOptional<z.ZodArray<z.ZodString>>;
468
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
468
469
  }, z.core.$strict>>;
469
470
  }, z.core.$strict>>;
470
471
  rules: z.ZodOptional<z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DocBridgeConfigV1, a as DocumentationAuditConfig, R as RulesConfig, b as RuleId, c as RuleSeverity, d as DocumentationStandardRuleId } from './index-Beor6Yhi.js';
2
- export { A as AgentCorpusConfig, C as ConfigNotFoundError, e as DocBridgeConfigV1Schema, f as DocumentationAuditConfigSchema, g as DocumentationStandardRuleIdSchema, h as DocumentationStandardV1Config, i as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, j as LoadConfigResult, k as ReportConfig, l as ReportConfigSchema, m as RepositorySafetyConfig, n as RepositorySafetyConfigSchema, o as RuleIdSchema, p as RuleSeveritySchema, q as RulesConfigSchema, W as WorkflowConfig, r as WorkflowConfigSchema, s as applyConfigDefaults, t as defineConfig, u as loadConfig, v as projectRootFromConfigPath, w as resolveProjectRoot } from './index-Beor6Yhi.js';
1
+ import { D as DocBridgeConfigV1, a as DocumentationAuditConfig, R as RulesConfig, b as RuleId, c as RuleSeverity, d as DocumentationStandardRuleId } from './index-7wYGbllW.js';
2
+ export { A as AgentCorpusConfig, C as ConfigNotFoundError, e as DocBridgeConfigV1Schema, f as DocumentationAuditConfigSchema, g as DocumentationStandardRuleIdSchema, h as DocumentationStandardV1Config, i as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, j as LoadConfigResult, k as ReportConfig, l as ReportConfigSchema, m as RepositorySafetyConfig, n as RepositorySafetyConfigSchema, o as RuleIdSchema, p as RuleSeveritySchema, q as RulesConfigSchema, W as WorkflowConfig, r as WorkflowConfigSchema, s as applyConfigDefaults, t as defineConfig, u as loadConfig, v as projectRootFromConfigPath, w as resolveProjectRoot } from './index-7wYGbllW.js';
3
3
  import { z } from 'zod';
4
4
  import { GraphologyGraph } from 'graphology';
5
5
  import * as ts from 'typescript';
@@ -5285,6 +5285,15 @@ type DeriveAreasOptions = {
5285
5285
  readonly ownership?: readonly AreaOwnership[];
5286
5286
  readonly depth?: number;
5287
5287
  readonly roots?: readonly string[];
5288
+ /**
5289
+ * Glob patterns for directories that hold code without being a unit of architecture.
5290
+ *
5291
+ * A candidate that matches is not derived as an area, and its modules fall to the most
5292
+ * specific area that still encloses them — or to none, which is the honest answer for a
5293
+ * folder of fixtures. An ownership record naming the same path still wins: a person saying
5294
+ * a directory is a unit outranks a pattern saying it is not.
5295
+ */
5296
+ readonly exclude?: readonly string[];
5288
5297
  };
5289
5298
  /**
5290
5299
  * The area a module belongs to by convention: `depth` directory levels, counted below a source
@@ -9565,7 +9574,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
9565
9574
  declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
9566
9575
  declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
9567
9576
 
9568
- declare const PACKAGE_VERSION = "1.9.0";
9577
+ declare const PACKAGE_VERSION = "1.10.0";
9569
9578
 
9570
9579
  type FrontmatterValue = string | boolean | readonly string[];
9571
9580
  type FrontmatterData = Record<string, FrontmatterValue>;
package/dist/index.js CHANGED
@@ -256,11 +256,20 @@ var AnalysisConfigSchema = z.object({
256
256
  /**
257
257
  * How code areas are derived — the unit of architecture between a package and a file.
258
258
  * `roots` names directories that contain areas rather than being one (`src` holds
259
- * `src/query`); `depth` is how many levels below such a root an area sits.
259
+ * `src/query`); `depth` is how many levels below such a root an area sits; `exclude`
260
+ * names directories that hold code without being a unit of architecture.
260
261
  */
261
262
  areas: z.object({
262
263
  depth: z.number().int().min(1).max(8).optional(),
263
- roots: z.array(z.string().min(1).max(128)).max(32).optional()
264
+ roots: z.array(z.string().min(1).max(128)).max(32).optional(),
265
+ /**
266
+ * Glob patterns for directories that are not areas. A monorepo where every package
267
+ * keeps `tests/` and `fixtures/` beside `src/` derives one area per directory, and
268
+ * then connectivity asks for a document about a folder of test data. An ownership
269
+ * record naming an excluded path still makes it an area: a person saying a directory
270
+ * is a unit outranks a pattern saying it is not.
271
+ */
272
+ exclude: z.array(z.string().min(1).max(256)).max(64).optional()
264
273
  }).strict().optional()
265
274
  }).strict();
266
275
  var WorkflowConfigSchema = z.object({
@@ -2501,6 +2510,9 @@ var areaSuggestionCoverage = (snapshot, options = {}) => {
2501
2510
  }));
2502
2511
  };
2503
2512
 
2513
+ // src/discovery/areas.ts
2514
+ import { minimatch as minimatch2 } from "minimatch";
2515
+
2504
2516
  // src/discovery/identity.ts
2505
2517
  var MAX_ID_LENGTH = 256;
2506
2518
  var ID_HASH_LENGTH = 32;
@@ -2550,10 +2562,12 @@ var deriveAreas = (options) => {
2550
2562
  const depth = options.depth ?? DEFAULT_AREA_DEPTH;
2551
2563
  const roots = options.roots ?? [...DEFAULT_AREA_ROOTS];
2552
2564
  const ownership = (options.ownership ?? []).map((record) => ({ ...record, path: normalize(record.path) }));
2565
+ const excluded = options.exclude ?? [];
2566
+ const isExcluded2 = (path) => excluded.some((pattern) => minimatch2(path, pattern, { dot: true }));
2553
2567
  const candidates = /* @__PURE__ */ new Map();
2554
2568
  for (const module of options.modules) {
2555
2569
  const path = conventionalAreaPath(module, depth, roots);
2556
- if (path && !candidates.has(path)) candidates.set(path, module.packageId);
2570
+ if (path && !candidates.has(path) && !isExcluded2(path)) candidates.set(path, module.packageId);
2557
2571
  }
2558
2572
  for (const record of ownership) {
2559
2573
  if (!record.path || candidates.has(record.path)) continue;
@@ -3651,7 +3665,8 @@ var discoverRepository = (opts = {}) => {
3651
3665
  modules: areaModules,
3652
3666
  ownership: Object.entries(opts.config?.routing?.options?.ownership ?? {}).map(([id, record]) => ({ id, path: record.path })),
3653
3667
  ...opts.config?.analysis?.areas?.depth !== void 0 ? { depth: opts.config.analysis.areas.depth } : {},
3654
- ...opts.config?.analysis?.areas?.roots !== void 0 ? { roots: opts.config.analysis.areas.roots } : {}
3668
+ ...opts.config?.analysis?.areas?.roots !== void 0 ? { roots: opts.config.analysis.areas.roots } : {},
3669
+ ...opts.config?.analysis?.areas?.exclude !== void 0 ? { exclude: opts.config.analysis.areas.exclude } : {}
3655
3670
  });
3656
3671
  const areasById = new Map(areas.map((area) => [area.id, area]));
3657
3672
  const areasByPath = new Map(areas.map((area) => [area.path, area.id]));
@@ -3952,7 +3967,7 @@ var readBoundedText = (path, budget, limits) => {
3952
3967
  };
3953
3968
 
3954
3969
  // src/index-builder/scan-corpus.ts
3955
- import { minimatch as minimatch2 } from "minimatch";
3970
+ import { minimatch as minimatch3 } from "minimatch";
3956
3971
 
3957
3972
  // src/lib/markdown.ts
3958
3973
  var parseFrontmatter = (markdown) => {
@@ -4103,8 +4118,8 @@ var configuredPathMatches = (relPath, include, exclude) => {
4103
4118
  const normalize3 = (pattern) => toPosix(pattern).replace(/^\.\//, "");
4104
4119
  const included = include?.filter(Boolean).map(normalize3) ?? [];
4105
4120
  const excluded = exclude?.filter(Boolean).map(normalize3) ?? [];
4106
- if (excluded.some((pattern) => minimatch2(relPath, pattern, { dot: true }))) return false;
4107
- return included.length === 0 || included.some((pattern) => minimatch2(relPath, pattern, { dot: true }));
4121
+ if (excluded.some((pattern) => minimatch3(relPath, pattern, { dot: true }))) return false;
4122
+ return included.length === 0 || included.some((pattern) => minimatch3(relPath, pattern, { dot: true }));
4108
4123
  };
4109
4124
  var scanAgentCorpus = (root, config) => {
4110
4125
  const agentRoot = containedProjectPath(root, config.corpus.agent.root);
@@ -4378,7 +4393,7 @@ var buildLookup = (config, packages, corpus, indexOutFile, humanDocs = {}, root
4378
4393
  };
4379
4394
 
4380
4395
  // src/version.ts
4381
- var PACKAGE_VERSION = "1.9.0";
4396
+ var PACKAGE_VERSION = "1.10.0";
4382
4397
 
4383
4398
  // src/index-builder/capabilities.ts
4384
4399
  var renderCapabilitiesJson = (config, index, paths) => {
@@ -5285,14 +5300,14 @@ var nextraAdapter = {
5285
5300
  };
5286
5301
 
5287
5302
  // src/index-builder/human-adapters/plain-markdown.ts
5288
- import { minimatch as minimatch3 } from "minimatch";
5303
+ import { minimatch as minimatch4 } from "minimatch";
5289
5304
  var stringPatterns = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string" && item.length > 0) : [];
5290
5305
  var matchesConfiguredPath = (relPath, options) => {
5291
5306
  const normalize3 = (pattern) => pattern.replaceAll("\\", "/").replace(/^\.\//, "");
5292
5307
  const include = stringPatterns(options?.include).map(normalize3);
5293
5308
  const exclude = stringPatterns(options?.exclude).map(normalize3);
5294
- if (exclude.some((pattern) => minimatch3(relPath, pattern, { dot: true }))) return false;
5295
- return include.length === 0 || include.some((pattern) => minimatch3(relPath, pattern, { dot: true }));
5309
+ if (exclude.some((pattern) => minimatch4(relPath, pattern, { dot: true }))) return false;
5310
+ return include.length === 0 || include.some((pattern) => minimatch4(relPath, pattern, { dot: true }));
5296
5311
  };
5297
5312
  var plainMarkdownAdapter = {
5298
5313
  plugin: "plain-markdown",
@@ -5330,7 +5345,7 @@ var starlightAdapter = {
5330
5345
  };
5331
5346
 
5332
5347
  // src/index-builder/human-adapters/vitepress.ts
5333
- import { minimatch as minimatch4 } from "minimatch";
5348
+ import { minimatch as minimatch5 } from "minimatch";
5334
5349
  var isVitePressPage = (relPath) => !relPath.split("/").some((part) => part === ".vitepress" || part.startsWith("."));
5335
5350
  var srcExcludePatterns = (value) => {
5336
5351
  if (value === void 0) return [];
@@ -5344,7 +5359,7 @@ var srcExcludePatterns = (value) => {
5344
5359
  return pattern;
5345
5360
  });
5346
5361
  };
5347
- var isExcluded = (relPath, patterns) => patterns.some((pattern) => minimatch4(relPath, pattern, { dot: true }));
5362
+ var isExcluded = (relPath, patterns) => patterns.some((pattern) => minimatch5(relPath, pattern, { dot: true }));
5348
5363
  var vitepressSlug = (relPath, cleanUrls) => {
5349
5364
  const slug2 = routeSlug(relPath);
5350
5365
  if (cleanUrls || /(?:^|\/)index\.mdx?$/.test(relPath)) return slug2;
@@ -7970,7 +7985,7 @@ var reconcileKnowledge = (observed, declared, options = {}) => {
7970
7985
  // src/audit/documentation.ts
7971
7986
  import { readFileSync as readFileSync13 } from "fs";
7972
7987
  import { resolve as resolve12 } from "path";
7973
- import { minimatch as minimatch5 } from "minimatch";
7988
+ import { minimatch as minimatch6 } from "minimatch";
7974
7989
 
7975
7990
  // src/query/handoff.ts
7976
7991
  var MAX_RELATED = 3;
@@ -8504,7 +8519,7 @@ var bodyForDuplicate = (content) => {
8504
8519
  const start = lines[0] === "---" ? lines.findIndex((line, index) => index > 0 && line === "---") + 1 : 0;
8505
8520
  return lines.slice(start).join("\n").replace(/\s+/g, " ").trim().toLocaleLowerCase();
8506
8521
  };
8507
- var matches = (path, patterns) => patterns.some((pattern) => minimatch5(path, pattern, { dot: true }));
8522
+ var matches = (path, patterns) => patterns.some((pattern) => minimatch6(path, pattern, { dot: true }));
8508
8523
  var rate = (count4, total) => total ? count4 / total : null;
8509
8524
  var metadataPresent = (content, key) => {
8510
8525
  const value = parseFrontmatter(content).data[key];
@@ -10270,7 +10285,7 @@ var formatStudyVerificationText = (binding) => [
10270
10285
  ];
10271
10286
 
10272
10287
  // src/rules/engine.ts
10273
- import { minimatch as minimatch6 } from "minimatch";
10288
+ import { minimatch as minimatch7 } from "minimatch";
10274
10289
  var diagnosticRules = {
10275
10290
  DOCUMENTATION_QUALITY: "documentation-quality",
10276
10291
  RELATION_UNDOCUMENTED: "graph-undocumented-relation",
@@ -10344,7 +10359,7 @@ var evaluateRules = (report, options = {}) => {
10344
10359
  findings.push(criticalFinding(finding, criticalSeverity, matchingEntity));
10345
10360
  }
10346
10361
  for (const path of resolved.criticalPaths) {
10347
- if (finding.evidence.some((item) => minimatch6(item.path, path, { dot: true })) && !resolved.ignore.has("critical-path-risk") && criticalSeverity !== "off") {
10362
+ if (finding.evidence.some((item) => minimatch7(item.path, path, { dot: true })) && !resolved.ignore.has("critical-path-risk") && criticalSeverity !== "off") {
10348
10363
  findings.push(criticalFinding(finding, criticalSeverity, path));
10349
10364
  }
10350
10365
  }