Files
doc-weaver/src/models/index.ts
Vishesh 'ironeagle' Bangotra aeb6e6b0f6
Some checks failed
continuous-integration/drone/tag Build is failing
Add doc-weaver 0.1.0: TypeScript documentation compiler
TypeDoc + JSDoc (RDFC) compiler producing a TypeDoc site and a
doc-forge-shaped MCP bundle for React/TypeScript packages.

- TypeDoc loader + human-docs and MCP renderers, signature-level
  parameter docs and default-export surfacing
- MCPServer over @modelcontextprotocol/sdk (docs://index, docs://nav,
  docs://modules/{module}, ping tool)
- doc-weaver build / serve CLI
- RDFC convention guide and hand-written wiki
- packaged as @aetoskia/doc-weaver with an npm release pipeline
  (build-and-publish-npm + backfill-npm-from-tags)
2026-10-21 00:35:15 +05:30

53 lines
1.2 KiB
TypeScript

/**
* Semantic documentation model for doc-weaver.
*
* This mirrors doc-forge's renderer-agnostic model: a project is a
* collection of modules, each module contains named documentation objects,
* and objects may contain nested members. Renderers (MkDocs, MCP) consume
* this model so that output formats never depend on each other.
*/
/** The set of documentable symbol kinds recognized by doc-weaver. */
export type DocKind =
| 'module'
| 'namespace'
| 'class'
| 'interface'
| 'enum'
| 'enum-member'
| 'type-alias'
| 'variable'
| 'function'
| 'method'
| 'accessor'
| 'property'
| 'constructor'
| 'signature'
| 'parameter'
| 'component'
| 'hook'
| 'unknown';
/** A documentation object with an optional tree of members. */
export interface DocObject {
name: string;
kind: DocKind;
path: string;
signature: string;
docstring: string;
members?: Record<string, DocObject>;
}
/** A single module (typically one source file or package). */
export interface DocModule {
path: string;
docstring: string;
objects: Record<string, DocObject>;
}
/** The root semantic model produced by the loader. */
export interface DocProject {
name: string;
modules: DocModule[];
}