@agentskit/doc-bridge 0.1.0-alpha.1 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/dist/cli/program.js +283 -105
- package/dist/cli/program.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +6 -3
- package/dist/config/index.js.map +1 -1
- package/dist/{index-CD_zmKXf.d.ts → index-CPUJbTbg.d.ts} +19 -10
- package/dist/index.d.ts +5 -4
- package/dist/index.js +278 -100
- package/dist/index.js.map +1 -1
- package/docs/DOGFOOD.md +92 -0
- package/package.json +27 -9
- package/scripts/prepare.mjs +44 -0
- package/src/cli/program.ts +933 -0
- package/src/config/defaults.ts +63 -0
- package/src/config/define-config.ts +6 -0
- package/src/config/index.ts +15 -0
- package/src/config/load-config.ts +138 -0
- package/src/config/schema.ts +294 -0
- package/src/federation/llms.ts +145 -0
- package/src/gates/run-gates.ts +274 -0
- package/src/index-builder/build-handoffs.ts +217 -0
- package/src/index-builder/build-index.ts +137 -0
- package/src/index-builder/capabilities.ts +37 -0
- package/src/index-builder/content-hash.ts +19 -0
- package/src/index-builder/human-adapters/core.ts +100 -0
- package/src/index-builder/human-adapters/docusaurus.ts +113 -0
- package/src/index-builder/human-adapters/fumadocs.ts +70 -0
- package/src/index-builder/human-adapters/index.ts +52 -0
- package/src/index-builder/human-adapters/plain-markdown.ts +10 -0
- package/src/index-builder/llms-txt.ts +19 -0
- package/src/index-builder/plugins/human-markdown.ts +7 -0
- package/src/index-builder/plugins/pnpm-monorepo.ts +72 -0
- package/src/index-builder/scan-corpus.ts +181 -0
- package/src/index.ts +120 -0
- package/src/intelligence/adapter.ts +90 -0
- package/src/intelligence/chat.ts +148 -0
- package/src/intelligence/peers.ts +59 -0
- package/src/intelligence/rag.ts +98 -0
- package/src/lib/glob-expand.ts +33 -0
- package/src/lib/markdown.ts +90 -0
- package/src/lib/package-manager.ts +104 -0
- package/src/lib/paths.ts +6 -0
- package/src/lib/walk.ts +45 -0
- package/src/mcp/server.ts +276 -0
- package/src/memory/ingest.ts +51 -0
- package/src/memory/pipeline.ts +119 -0
- package/src/query/load-index.ts +25 -0
- package/src/query/query.ts +142 -0
- package/src/query/search.ts +58 -0
- package/src/retriever/doc-bridge-retriever.ts +62 -0
- package/src/schemas/agent-handoff.ts +82 -0
- package/src/schemas/doc-bridge-index.ts +106 -0
- package/src/schemas/json-schemas.ts +156 -0
- package/src/schemas/memory-candidate.ts +37 -0
- package/src/shims/agentskit-peers.d.ts +80 -0
- package/src/validate.ts +67 -0
- package/src/version.ts +1 -0
- package/tsconfig.json +21 -0
- package/tsup.config.ts +15 -0
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AgentCorpusConfig, e as AgentCorpusConfigSchema, C as ConfigNotFoundError, D as DocBridgeConfigV1, a as DocBridgeConfigV1Schema, H as HumanCorpusConfigSchema, c as applyConfigDefaults, d as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from '../index-
|
|
1
|
+
export { A as AgentCorpusConfig, e as AgentCorpusConfigSchema, C as ConfigNotFoundError, D as DocBridgeConfigV1, a as DocBridgeConfigV1Schema, H as HumanCorpusConfigSchema, c as applyConfigDefaults, d as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from '../index-CPUJbTbg.js';
|
|
2
2
|
import 'zod';
|
package/dist/config/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var applyConfigDefaults = (config) => {
|
|
|
10
10
|
agent: {
|
|
11
11
|
...config.corpus.agent,
|
|
12
12
|
index: agentIndex,
|
|
13
|
-
include: config.corpus.agent.include ?? ["**/*.md"],
|
|
13
|
+
include: config.corpus.agent.include ?? ["**/*.{md,mdx}"],
|
|
14
14
|
exclude: config.corpus.agent.exclude ?? [...DEFAULT_AGENT_EXCLUDE]
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -103,9 +103,11 @@ var OwnershipEntrySchema = z.object({
|
|
|
103
103
|
humanDoc: z.string().min(1).max(512).optional()
|
|
104
104
|
}).strict();
|
|
105
105
|
var RoutingConfigSchema = z.object({
|
|
106
|
-
plugin: z.enum(["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "custom"]).optional(),
|
|
106
|
+
plugin: z.enum(["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "pattern-files", "custom"]).optional(),
|
|
107
107
|
options: z.object({
|
|
108
108
|
packages: z.array(z.string().min(1).max(256)).max(128).optional(),
|
|
109
|
+
/** Infer ownership from corpus paths/frontmatter (default true). */
|
|
110
|
+
ownershipFromCorpus: z.boolean().optional(),
|
|
109
111
|
ownership: z.record(z.string().min(1).max(256), OwnershipEntrySchema).optional(),
|
|
110
112
|
intents: z.array(
|
|
111
113
|
z.object({
|
|
@@ -125,7 +127,8 @@ var RoutingConfigSchema = z.object({
|
|
|
125
127
|
}).strict().optional()
|
|
126
128
|
}).strict();
|
|
127
129
|
var GatesConfigSchema = z.object({
|
|
128
|
-
|
|
130
|
+
/** minimal: freshness · standard: + human links · strict: + okf-type · playbook: freshness + okf soft style */
|
|
131
|
+
preset: z.enum(["minimal", "standard", "strict", "playbook"]).optional(),
|
|
129
132
|
include: z.array(
|
|
130
133
|
z.enum([
|
|
131
134
|
"index-freshness",
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/defaults.ts","../../src/config/schema.ts","../../src/config/define-config.ts","../../src/config/load-config.ts"],"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'],\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.enum(['pnpm-monorepo', 'npm-workspaces', 'yarn-workspaces', 'custom']).optional(),\n options: z\n .object({\n packages: z.array(z.string().min(1).max(256)).max(128).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 preset: z.enum(['minimal', 'standard', 'strict']).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 ]),\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 ]),\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 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 })\n .strict()\n\nexport type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>\nexport type AgentCorpusConfig = z.infer<typeof AgentCorpusConfigSchema>\nexport type HumanCorpusConfig = z.infer<typeof HumanCorpusConfigSchema>\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'\nimport vm from 'node:vm'\n\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 code = 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 .replace(/\\s+satisfies\\s+[A-Za-z0-9_.$<>{}\\[\\],\\s]+(?=\\s*(?:;|\\)|$))/g, '')\n .replace(/export\\s+default/, 'module.exports.default =')\n\n if (/\\bimport\\b/.test(code)) {\n throw new Error(`Unsupported import in ${path}. Static config only supports defineConfig imports.`)\n }\n\n const sandbox = {\n module: { exports: {} as { default?: unknown } },\n exports: {},\n defineConfig: (config: unknown) => config,\n }\n try {\n vm.runInNewContext(code, sandbox, { timeout: 250, filename: path })\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 return sandbox.module.exports.default\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"],"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,SAAS;AAAA,QAClD,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,cA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AG,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"],"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 ]),\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 ]),\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 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 })\n .strict()\n\nexport type DocBridgeConfigV1 = z.infer<typeof DocBridgeConfigV1Schema>\nexport type AgentCorpusConfig = z.infer<typeof AgentCorpusConfigSchema>\nexport type HumanCorpusConfig = z.infer<typeof HumanCorpusConfigSchema>\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'\nimport vm from 'node:vm'\n\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 code = 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 .replace(/\\s+satisfies\\s+[A-Za-z0-9_.$<>{}\\[\\],\\s]+(?=\\s*(?:;|\\)|$))/g, '')\n .replace(/export\\s+default/, 'module.exports.default =')\n\n if (/\\bimport\\b/.test(code)) {\n throw new Error(`Unsupported import in ${path}. Static config only supports defineConfig imports.`)\n }\n\n const sandbox = {\n module: { exports: {} as { default?: unknown } },\n exports: {},\n defineConfig: (config: unknown) => config,\n }\n try {\n vm.runInNewContext(code, sandbox, { timeout: 250, filename: path })\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 return sandbox.module.exports.default\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"],"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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ZodOptional<z.ZodObject<{
|
|
202
|
-
plugin: z.ZodOptional<z.ZodEnum<["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "custom"]>>;
|
|
202
|
+
plugin: z.ZodOptional<z.ZodEnum<["pnpm-monorepo", "npm-workspaces", "yarn-workspaces", "pattern-files", "custom"]>>;
|
|
203
203
|
options: z.ZodOptional<z.ZodObject<{
|
|
204
204
|
packages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
205
|
+
/** Infer ownership from corpus paths/frontmatter (default true). */
|
|
206
|
+
ownershipFromCorpus: z.ZodOptional<z.ZodBoolean>;
|
|
205
207
|
ownership: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
206
208
|
path: z.ZodString;
|
|
207
209
|
group: z.ZodOptional<z.ZodString>;
|
|
@@ -258,6 +260,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
258
260
|
}>, "many">>;
|
|
259
261
|
}, "strict", z.ZodTypeAny, {
|
|
260
262
|
packages?: string[] | undefined;
|
|
263
|
+
ownershipFromCorpus?: boolean | undefined;
|
|
261
264
|
ownership?: Record<string, {
|
|
262
265
|
path: string;
|
|
263
266
|
group?: string | undefined;
|
|
@@ -280,6 +283,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
280
283
|
}[] | undefined;
|
|
281
284
|
}, {
|
|
282
285
|
packages?: string[] | undefined;
|
|
286
|
+
ownershipFromCorpus?: boolean | undefined;
|
|
283
287
|
ownership?: Record<string, {
|
|
284
288
|
path: string;
|
|
285
289
|
group?: string | undefined;
|
|
@@ -304,6 +308,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
304
308
|
}, "strict", z.ZodTypeAny, {
|
|
305
309
|
options?: {
|
|
306
310
|
packages?: string[] | undefined;
|
|
311
|
+
ownershipFromCorpus?: boolean | undefined;
|
|
307
312
|
ownership?: Record<string, {
|
|
308
313
|
path: string;
|
|
309
314
|
group?: string | undefined;
|
|
@@ -325,10 +330,11 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
325
330
|
relatedPackages?: string[] | undefined;
|
|
326
331
|
}[] | undefined;
|
|
327
332
|
} | undefined;
|
|
328
|
-
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | undefined;
|
|
333
|
+
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
|
|
329
334
|
}, {
|
|
330
335
|
options?: {
|
|
331
336
|
packages?: string[] | undefined;
|
|
337
|
+
ownershipFromCorpus?: boolean | undefined;
|
|
332
338
|
ownership?: Record<string, {
|
|
333
339
|
path: string;
|
|
334
340
|
group?: string | undefined;
|
|
@@ -350,10 +356,11 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
350
356
|
relatedPackages?: string[] | undefined;
|
|
351
357
|
}[] | undefined;
|
|
352
358
|
} | undefined;
|
|
353
|
-
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | undefined;
|
|
359
|
+
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
|
|
354
360
|
}>>;
|
|
355
361
|
gates: z.ZodOptional<z.ZodObject<{
|
|
356
|
-
|
|
362
|
+
/** minimal: freshness · standard: + human links · strict: + okf-type · playbook: freshness + okf soft style */
|
|
363
|
+
preset: z.ZodOptional<z.ZodEnum<["minimal", "standard", "strict", "playbook"]>>;
|
|
357
364
|
include: z.ZodOptional<z.ZodArray<z.ZodEnum<["index-freshness", "human-guide-links", "link-rot", "okf-type", "docs-style", "routing-currency", "bootstrap-size"]>, "many">>;
|
|
358
365
|
exclude: z.ZodOptional<z.ZodArray<z.ZodEnum<["index-freshness", "human-guide-links", "link-rot", "okf-type", "docs-style", "routing-currency", "bootstrap-size"]>, "many">>;
|
|
359
366
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -361,12 +368,12 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
361
368
|
options?: Record<string, unknown> | undefined;
|
|
362
369
|
include?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
363
370
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
364
|
-
preset?: "strict" | "minimal" | "standard" | undefined;
|
|
371
|
+
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
365
372
|
}, {
|
|
366
373
|
options?: Record<string, unknown> | undefined;
|
|
367
374
|
include?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
368
375
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
369
|
-
preset?: "strict" | "minimal" | "standard" | undefined;
|
|
376
|
+
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
370
377
|
}>>;
|
|
371
378
|
surfaces: z.ZodOptional<z.ZodObject<{
|
|
372
379
|
cli: z.ZodOptional<z.ZodObject<{
|
|
@@ -693,6 +700,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
693
700
|
routing?: {
|
|
694
701
|
options?: {
|
|
695
702
|
packages?: string[] | undefined;
|
|
703
|
+
ownershipFromCorpus?: boolean | undefined;
|
|
696
704
|
ownership?: Record<string, {
|
|
697
705
|
path: string;
|
|
698
706
|
group?: string | undefined;
|
|
@@ -714,13 +722,13 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
714
722
|
relatedPackages?: string[] | undefined;
|
|
715
723
|
}[] | undefined;
|
|
716
724
|
} | undefined;
|
|
717
|
-
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | undefined;
|
|
725
|
+
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
|
|
718
726
|
} | undefined;
|
|
719
727
|
gates?: {
|
|
720
728
|
options?: Record<string, unknown> | undefined;
|
|
721
729
|
include?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
722
730
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
723
|
-
preset?: "strict" | "minimal" | "standard" | undefined;
|
|
731
|
+
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
724
732
|
} | undefined;
|
|
725
733
|
surfaces?: {
|
|
726
734
|
cli?: {
|
|
@@ -823,6 +831,7 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
823
831
|
routing?: {
|
|
824
832
|
options?: {
|
|
825
833
|
packages?: string[] | undefined;
|
|
834
|
+
ownershipFromCorpus?: boolean | undefined;
|
|
826
835
|
ownership?: Record<string, {
|
|
827
836
|
path: string;
|
|
828
837
|
group?: string | undefined;
|
|
@@ -844,13 +853,13 @@ declare const DocBridgeConfigV1Schema: z.ZodObject<{
|
|
|
844
853
|
relatedPackages?: string[] | undefined;
|
|
845
854
|
}[] | undefined;
|
|
846
855
|
} | undefined;
|
|
847
|
-
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | undefined;
|
|
856
|
+
plugin?: "custom" | "pnpm-monorepo" | "npm-workspaces" | "yarn-workspaces" | "pattern-files" | undefined;
|
|
848
857
|
} | undefined;
|
|
849
858
|
gates?: {
|
|
850
859
|
options?: Record<string, unknown> | undefined;
|
|
851
860
|
include?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
852
861
|
exclude?: ("index-freshness" | "human-guide-links" | "link-rot" | "okf-type" | "docs-style" | "routing-currency" | "bootstrap-size")[] | undefined;
|
|
853
|
-
preset?: "strict" | "minimal" | "standard" | undefined;
|
|
862
|
+
preset?: "strict" | "minimal" | "standard" | "playbook" | undefined;
|
|
854
863
|
} | undefined;
|
|
855
864
|
surfaces?: {
|
|
856
865
|
cli?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DocBridgeConfigV1 } from './index-
|
|
2
|
-
export { A as AgentCorpusConfig, C as ConfigNotFoundError, a as DocBridgeConfigV1Schema, L as LoadConfigOptions, b as LoadConfigResult, c as applyConfigDefaults, d as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from './index-
|
|
1
|
+
import { D as DocBridgeConfigV1 } from './index-CPUJbTbg.js';
|
|
2
|
+
export { A as AgentCorpusConfig, C as ConfigNotFoundError, a as DocBridgeConfigV1Schema, L as LoadConfigOptions, b as LoadConfigResult, c as applyConfigDefaults, d as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from './index-CPUJbTbg.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const HANDOFF_SCHEMA_VERSION: 1;
|
|
@@ -1517,7 +1517,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
|
|
|
1517
1517
|
declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
|
|
1518
1518
|
declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
|
|
1519
1519
|
|
|
1520
|
-
declare const PACKAGE_VERSION = "0.1.0-alpha.
|
|
1520
|
+
declare const PACKAGE_VERSION = "0.1.0-alpha.2";
|
|
1521
1521
|
|
|
1522
1522
|
type FrontmatterValue = string | boolean | readonly string[];
|
|
1523
1523
|
type FrontmatterData = Record<string, FrontmatterValue>;
|
|
@@ -1567,9 +1567,10 @@ type ChangeRecord = {
|
|
|
1567
1567
|
* 1. routing.options.ownership (explicit)
|
|
1568
1568
|
* 2. pnpm / workspace discovery
|
|
1569
1569
|
* 3. agent-doc frontmatter (package + editRoot)
|
|
1570
|
+
* 4. corpus path heuristics (packages/<id>.md, pillars patterns, etc.)
|
|
1570
1571
|
*/
|
|
1571
1572
|
declare const collectPackages: (config: DocBridgeConfigV1, discovered: readonly DiscoveredPackage[], corpus: readonly CorpusDoc[]) => DiscoveredPackage[];
|
|
1572
|
-
declare const buildLookup: (config: DocBridgeConfigV1, packages: readonly DiscoveredPackage[], corpus: readonly CorpusDoc[], indexOutFile: string, humanDocs?: HumanDocMap) => {
|
|
1573
|
+
declare const buildLookup: (config: DocBridgeConfigV1, packages: readonly DiscoveredPackage[], corpus: readonly CorpusDoc[], indexOutFile: string, humanDocs?: HumanDocMap, root?: string) => {
|
|
1573
1574
|
lookup: IndexLookup;
|
|
1574
1575
|
handoffs: Record<string, AgentHandoffV1>;
|
|
1575
1576
|
};
|