Skip to content

docs(contact-center): add SDK manifest generator for cross-repo sync#4800

Open
ciscoRankush wants to merge 3 commits intowebex:task-refactorfrom
ciscoRankush:sdk-manifest-generator
Open

docs(contact-center): add SDK manifest generator for cross-repo sync#4800
ciscoRankush wants to merge 3 commits intowebex:task-refactorfrom
ciscoRankush:sdk-manifest-generator

Conversation

@ciscoRankush
Copy link
Copy Markdown

@ciscoRankush ciscoRankush commented Mar 24, 2026

COMPLETES #N/A (new tooling initiative)

This pull request addresses

The need for automated cross-repo SDK synchronization. When SDK APIs change (methods, events, types), consumer repos (ccWidgets) currently discover breakage through manual changelog reading, compile-time errors, or runtime failures. There is no machine-readable contract that consumers can programmatically diff to detect what changed.

by making the following changes

  • scripts/generate-manifest.ts: ts-morph based AST analysis script that statically analyzes the @webex/contact-center package and extracts all exported classes (with public methods, params, return types, event emissions), enums, types/interfaces, and constants into a structured YAML file.
  • sdk-manifest.yaml: Auto-generated machine-readable API surface contract. Added to package.json files array so it ships with the npm package. Consumers can diff this between versions to detect API changes.
  • package.json: Added generate:manifest script and files array including sdk-manifest.yaml.
  • .claude/commands/generate-manifest.md: /generate-manifest Claude Code skill for developers to regenerate the manifest locally.

Key capabilities:

  • Extracts 3 classes, 37 public methods, 2 event enums, 71 types, 2 constants
  • Resolves this.trigger()/this.emit() calls to actual event string values
  • Deduplicates re-exported classes and type-only enum re-exports
  • Sanitizes absolute paths to relative package paths

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • Ran npx ts-node scripts/generate-manifest.ts — generates sdk-manifest.yaml with 3 classes, 37 methods, 2 enums, 71 types, 2 constants
  • Verified event extraction: startTranscription correctly maps to task:transcriptionStarted (success) and task:transcriptionFailed (failure)
  • Verified deduplication: default class re-export and TaskEvents/AgentEvents type re-exports excluded
  • Verified no absolute paths in output YAML
  • End-to-end test: simulated API change (added param to stationLogin), regenerated manifest, diffed against previous version — change correctly detected

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Claude Code (Anthropic)
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Add ts-morph based script that auto-generates sdk-manifest.yaml describing
the public API surface (classes, methods, events, types, constants).
This enables cross-repo SDK synchronization by providing a machine-readable
contract that consumers can diff to detect API changes.

- scripts/generate-manifest.ts: ts-morph AST analysis of exported APIs
- sdk-manifest.yaml: generated artifact (ships with npm package)
- package.json: added generate:manifest script and files array
- .claude/commands/generate-manifest.md: /generate-manifest skill

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ciscoRankush ciscoRankush requested a review from a team as a code owner March 24, 2026 12:44
@ciscoRankush ciscoRankush changed the title feat(contact-center): add SDK manifest generator for cross-repo sync chore(contact-center): add SDK manifest generator for cross-repo sync Mar 24, 2026
@ciscoRankush ciscoRankush changed the title chore(contact-center): add SDK manifest generator for cross-repo sync docs(contact-center): add SDK manifest generator for cross-repo sync Mar 24, 2026
@ciscoRankush ciscoRankush changed the title docs(contact-center): add SDK manifest generator for cross-repo sync chore(contact-center): add SDK manifest generator for cross-repo sync Mar 24, 2026
ciscoRankush and others added 2 commits March 24, 2026 18:27
Add usage instructions for the SDK manifest generator to the root
AGENTS.md, including when/how to regenerate and mandatory API
verification steps for AI agents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ciscoRankush ciscoRankush changed the title chore(contact-center): add SDK manifest generator for cross-repo sync docs(contact-center): add SDK manifest generator for cross-repo sync Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant