Skip to content

feat: stronger API contract extraction for critical packages #486

@jithinraj

Description

@jithinraj

Context

The current api-surface-lock.sh extracts public export names from .d.ts files using regex. This is pragmatic and catches accidental API removals/renames, but it only tracks export names, not full signatures.

Proposed improvement

For critical packages (@peac/kernel, @peac/schema, @peac/crypto, @peac/protocol), use one of:

  • API Extractor (@microsoft/api-extractor): generates .api.md rollup files with full type signatures
  • ts-morph-based JSON signature model: extract function signatures, type parameters, and return types into a structured JSON format

This would catch signature changes (parameter additions, type narrowing) that name-only tracking misses.

Scope

Quality improvement for post-stable. The regex-based scanner is functional for the current release.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions