Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude/commands/generate-manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Generate the SDK manifest for @webex/contact-center.

## What this does

Runs `npx ts-node scripts/generate-manifest.ts` in the contact-center package to produce `sdk-manifest.yaml` — a machine-readable description of the public API surface.

## Steps

1. Navigate to `packages/@webex/contact-center/`
2. Run: `npx ts-node scripts/generate-manifest.ts`
3. Show a summary of what was generated (classes, methods, enums, types)
4. If there are changes vs the previously committed manifest, show the diff with `git diff sdk-manifest.yaml`
5. Remind the developer to commit `sdk-manifest.yaml` alongside their code changes

## When to run

- After changing any public method signature in cc.ts or Task.ts
- After adding/removing/renaming exported types, enums, or constants
- Before creating a PR that touches the public API surface
36 changes: 36 additions & 0 deletions packages/@webex/contact-center/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,42 @@ Use this table to identify which service's ai-docs to load based on the develope

---

## SDK Manifest (Cross-Repo Sync)

This package generates a machine-readable `sdk-manifest.yaml` describing the public API surface.
Consumers (e.g., ccWidgets) use this manifest to detect API changes and map impact.

### When to regenerate
- After changing any public method signature in `cc.ts` or `Task.ts`
- After adding/removing/renaming exported types, enums, or constants
- Before creating a PR that touches the public API surface

### How to regenerate
```bash
npm run generate:manifest
```

### What it produces
`sdk-manifest.yaml` — checked into git, ships with npm package. Contains:
- Classes and public methods (params, return types, event emissions)
- Exported enums with string values
- Exported types/interfaces with field shapes
- Exported constants

### CI validation (future)
```bash
npm run generate:manifest && git diff --exit-code sdk-manifest.yaml
```

### SDK API Verification (MANDATORY for AI agents)
Before generating code that changes a public API:
1. Read `sdk-manifest.yaml` to understand the current contract
2. After changes, run `npm run generate:manifest`
3. Review the manifest diff — it shows the exact API surface impact
4. Commit `sdk-manifest.yaml` alongside your code changes

---

## Need More Context?

- **TypeScript patterns**: [`ai-docs/patterns/typescript-patterns.md`](ai-docs/patterns/typescript-patterns.md)
Expand Down
10 changes: 9 additions & 1 deletion packages/@webex/contact-center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@
"test": "yarn test:style && yarn test:unit",
"test:style": "eslint 'src/**/*.ts'",
"test:unit": "webex-legacy-tools test --unit --runner jest",
"deploy:npm": "yarn npm publish"
"deploy:npm": "yarn npm publish",
"generate:manifest": "ts-node scripts/generate-manifest.ts"
},
"files": [
"dist/",
"sdk-manifest.yaml"
],
"dependencies": {
"@types/platform": "1.3.4",
"@webex/calling": "workspace:*",
Expand All @@ -61,6 +66,7 @@
"@babel/core": "^7.22.11",
"@babel/preset-typescript": "7.22.11",
"@types/jest": "27.4.1",
"@types/js-yaml": "^4",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"@webex/babel-config-legacy": "workspace:*",
Expand All @@ -79,7 +85,9 @@
"eslint-plugin-tsdoc": "0.2.14",
"jest": "27.5.1",
"jest-junit": "13.0.0",
"js-yaml": "^4.1.1",
"prettier": "2.5.1",
"ts-morph": "^27.0.2",
"typedoc": "^0.25.0",
"typescript": "5.4.5"
}
Expand Down
Loading
Loading