@cometchat/skills 4.4.2 → 5.0.0
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/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +41 -163
- package/RULES.md +114 -0
- package/bin/cometchat-skills.mjs +1180 -0
- package/bin/legacy-skills.json +95 -0
- package/catalogs/android-v6.json +1646 -0
- package/catalogs/flutter-v6.json +651 -0
- package/catalogs/ios-v5.json +1383 -0
- package/catalogs/rn-calls-v5.json +134 -0
- package/catalogs/rn-calls-v5.symbols.txt +58 -0
- package/catalogs/rn-sdk-v4.json +672 -0
- package/catalogs/rn-v5.json +449 -0
- package/catalogs/rn-v5.symbols.txt +216 -0
- package/catalogs/sdk-android-v5.json +514 -0
- package/contracts.android-calls-v5.json +122 -0
- package/contracts.android-v6.json +135 -0
- package/contracts.angular-v5.json +694 -0
- package/contracts.flutter-calls-v5.json +77 -0
- package/contracts.flutter-v6.json +126 -0
- package/contracts.ios-calls-v5.json +67 -0
- package/contracts.ios-v5.json +436 -0
- package/contracts.json +82 -0
- package/contracts.rn-calls-v5.json +77 -0
- package/contracts.rn-v5.json +727 -0
- package/contracts.sdk-android-v5.json +15 -0
- package/contracts.web-calls-v5.json +45 -0
- package/features.android-calls-v5.json +246 -0
- package/features.android-v6.json +65 -0
- package/features.angular-v5.json +521 -0
- package/features.flutter-calls-v5.json +286 -0
- package/features.flutter-v6.json +484 -0
- package/features.ios-calls-v5.json +236 -0
- package/features.ios-v5.json +573 -0
- package/features.json +61 -0
- package/features.rn-calls-v5.json +187 -0
- package/features.rn-v5.json +614 -0
- package/features.sdk-android-v5.json +40 -0
- package/features.sdk-jsv4.json +24 -0
- package/features.web-calls-v5.json +108 -0
- package/package.json +151 -74
- package/peers.yaml +312 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +54 -0
- package/registry/android-v6.json +137 -0
- package/registry/angular-v5.json +114 -0
- package/registry/flutter-calls-v5.json +54 -0
- package/registry/flutter-v6.json +119 -0
- package/registry/ios-calls-v5.json +59 -0
- package/registry/ios-v5.json +97 -0
- package/registry/rn-calls-v5.json +59 -0
- package/registry/rn-v5.json +129 -0
- package/registry/sdk-android-v5.json +53 -0
- package/registry/sdk-jsv4.json +53 -0
- package/registry/web-calls-v5.json +54 -0
- package/registry/web-v7.json +99 -0
- package/skills/cometchat/SKILL.md +42 -2096
- package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
- package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
- package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
- package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
- package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
- package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
- package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
- package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
- package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
- package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
- package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
- package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
- package/skills/cometchat-android-v6-core/SKILL.md +236 -672
- package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
- package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
- package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
- package/skills/cometchat-android-v6-core/references/layout.md +112 -0
- package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
- package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
- package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
- package/skills/cometchat-android-v6-events/SKILL.md +46 -184
- package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
- package/skills/cometchat-android-v6-features/SKILL.md +74 -143
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
- package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
- package/skills/cometchat-android-v6-production/SKILL.md +40 -179
- package/skills/cometchat-android-v6-push/SKILL.md +39 -289
- package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
- package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
- package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
- package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
- package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
- package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
- package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
- package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
- package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
- package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
- package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
- package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
- package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
- package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
- package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
- package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
- package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
- package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
- package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
- package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
- package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
- package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
- package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
- package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
- package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
- package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
- package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
- package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
- package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
- package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
- package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
- package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
- package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
- package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
- package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
- package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
- package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
- package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
- package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
- package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
- package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
- package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
- package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
- package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
- package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
- package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
- package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
- package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
- package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
- package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
- package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
- package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
- package/skills/cometchat-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +181 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
- package/skills/cometchat-ios-core/references/docs-map.md +123 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +186 -0
- package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
- package/skills/cometchat-ios-core/references/swiftui.md +91 -0
- package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
- package/skills/cometchat-ios-customization/SKILL.md +33 -968
- package/skills/cometchat-ios-features/SKILL.md +29 -738
- package/skills/cometchat-ios-migration/SKILL.md +39 -0
- package/skills/cometchat-ios-placement/SKILL.md +51 -729
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
- package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
- package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
- package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
- package/skills/cometchat-onboarding/SKILL.md +89 -0
- package/skills/cometchat-onboarding/references/archetypes.md +51 -0
- package/skills/cometchat-onboarding/references/calling-first.md +77 -0
- package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
- package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
- package/skills/cometchat-onboarding/references/platforms.md +90 -0
- package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
- package/skills/cometchat-react-native-calls/SKILL.md +200 -0
- package/skills/cometchat-react-native-components/SKILL.md +142 -0
- package/skills/cometchat-react-native-core/SKILL.md +313 -0
- package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
- package/skills/cometchat-react-native-core/references/component-props.md +105 -0
- package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
- package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
- package/skills/cometchat-react-native-core/references/layout.md +61 -0
- package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
- package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
- package/skills/cometchat-react-native-customization/SKILL.md +198 -0
- package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
- package/skills/cometchat-react-native-features/SKILL.md +122 -0
- package/skills/cometchat-react-native-migration/SKILL.md +103 -0
- package/skills/cometchat-react-native-placement/SKILL.md +158 -0
- package/skills/cometchat-react-native-production/SKILL.md +78 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
- package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
- package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
- package/skills/cometchat-react-native-testing/SKILL.md +94 -0
- package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
- package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
- package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
- package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
- package/skills/cometchat-react-v7-components/SKILL.md +72 -0
- package/skills/cometchat-react-v7-core/SKILL.md +101 -0
- package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
- package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
- package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
- package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
- package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
- package/skills/cometchat-react-v7-core/references/layout.md +158 -0
- package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
- package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
- package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
- package/skills/cometchat-react-v7-core/references/theming.md +52 -0
- package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
- package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
- package/skills/cometchat-react-v7-features/SKILL.md +92 -0
- package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
- package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
- package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
- package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
- package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/test-suite/README.md +70 -0
- package/test-suite/catalogs/android-calls-v5.json +830 -0
- package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
- package/test-suite/catalogs/android-v6.json +1646 -0
- package/test-suite/catalogs/android-v6.symbols.txt +298 -0
- package/test-suite/catalogs/angular-v5.json +7587 -0
- package/test-suite/catalogs/flutter-calls-v5.json +196 -0
- package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
- package/test-suite/catalogs/flutter-v6.json +651 -0
- package/test-suite/catalogs/ios-calls-v5.json +158 -0
- package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
- package/test-suite/catalogs/ios-v5.json +1383 -0
- package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
- package/test-suite/catalogs/rn-calls-v5.json +134 -0
- package/test-suite/catalogs/rn-sdk-v4.json +672 -0
- package/test-suite/catalogs/rn-v5.json +449 -0
- package/test-suite/catalogs/sdk-android-v5.json +514 -0
- package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
- package/test-suite/catalogs/sdk-jsv4.json +800 -0
- package/test-suite/catalogs/web-calls-v5.json +195 -0
- package/test-suite/catalogs/web-v7.json +1243 -0
- package/test-suite/scripts/build-registry.mjs +113 -0
- package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
- package/test-suite/scripts/catalog-refresh.mjs +100 -0
- package/test-suite/scripts/lint-skills.mjs +909 -0
- package/test-suite/scripts/measure-tokens.mjs +169 -0
- package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
- package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
- package/test-suite/scripts/typecheck-fences.mjs +206 -0
- package/test-suite/scripts/verify-catalog.mjs +242 -0
- package/test-suite/scripts/verify-contract-fences.mjs +94 -0
- package/test-suite/scripts/verify-detection.mjs +178 -0
- package/test-suite/scripts/verify-docs-base.mjs +91 -0
- package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
- package/test-suite/scripts/verify-golden-path.mjs +138 -0
- package/test-suite/scripts/verify-oracle-components.mjs +133 -0
- package/test-suite/scripts/verify-template-bindings.mjs +148 -0
- package/test-suite/typecheck/angular-v5/package.json +21 -0
- package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
- package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
- package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
- package/test-suite/typecheck/web-v7/package.json +18 -0
- package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
- package/bin/install.js +0 -1003
- package/skills/.claude-plugin/marketplace.json +0 -86
- package/skills/cometchat/references/asking-questions.md +0 -48
- package/skills/cometchat-a11y/SKILL.md +0 -477
- package/skills/cometchat-android-v5/SKILL.md +0 -121
- package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
- package/skills/cometchat-android-v5-calls/references/README.md +0 -53
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
- package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
- package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
- package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
- package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
- package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
- package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
- package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
- package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
- package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
- package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
- package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
- package/skills/cometchat-android-v5-components/SKILL.md +0 -431
- package/skills/cometchat-android-v5-core/SKILL.md +0 -486
- package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
- package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
- package/skills/cometchat-android-v5-features/SKILL.md +0 -131
- package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
- package/skills/cometchat-android-v5-production/SKILL.md +0 -95
- package/skills/cometchat-android-v5-push/SKILL.md +0 -619
- package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
- package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
- package/skills/cometchat-android-v6/SKILL.md +0 -108
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
- package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
- package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
- package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
- package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
- package/skills/cometchat-angular-calls/SKILL.md +0 -380
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
- package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
- package/skills/cometchat-angular-calls/references/call-session.md +0 -167
- package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
- package/skills/cometchat-angular-calls/references/device-management.md +0 -154
- package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
- package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
- package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
- package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
- package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
- package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
- package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
- package/skills/cometchat-angular-components/SKILL.md +0 -235
- package/skills/cometchat-angular-core/SKILL.md +0 -386
- package/skills/cometchat-angular-customization/SKILL.md +0 -616
- package/skills/cometchat-angular-features/SKILL.md +0 -329
- package/skills/cometchat-angular-patterns/SKILL.md +0 -256
- package/skills/cometchat-angular-placement/SKILL.md +0 -314
- package/skills/cometchat-angular-production/SKILL.md +0 -564
- package/skills/cometchat-angular-push/SKILL.md +0 -389
- package/skills/cometchat-angular-testing/SKILL.md +0 -605
- package/skills/cometchat-angular-theming/SKILL.md +0 -290
- package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
- package/skills/cometchat-astro-patterns/SKILL.md +0 -708
- package/skills/cometchat-calls/SKILL.md +0 -364
- package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
- package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
- package/skills/cometchat-calls/references/use-case-support.md +0 -189
- package/skills/cometchat-calls/references/use-case-team.md +0 -180
- package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
- package/skills/cometchat-components/SKILL.md +0 -1142
- package/skills/cometchat-core/SKILL.md +0 -1048
- package/skills/cometchat-customization/SKILL.md +0 -580
- package/skills/cometchat-customization/references/component-catalog.md +0 -236
- package/skills/cometchat-features/SKILL.md +0 -861
- package/skills/cometchat-flutter-v5/SKILL.md +0 -173
- package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
- package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
- package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
- package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
- package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
- package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
- package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
- package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
- package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
- package/skills/cometchat-flutter-v6/SKILL.md +0 -446
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
- package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
- package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
- package/skills/cometchat-i18n/SKILL.md +0 -419
- package/skills/cometchat-ios/SKILL.md +0 -325
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
- package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
- package/skills/cometchat-ios-calls/references/call-session.md +0 -218
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
- package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
- package/skills/cometchat-ios-calls/references/device-management.md +0 -171
- package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
- package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
- package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
- package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
- package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
- package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
- package/skills/cometchat-ios-production/SKILL.md +0 -738
- package/skills/cometchat-ios-testing/SKILL.md +0 -376
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-js-v5-sdk
|
|
3
|
+
description: "Add voice & video calling to any web app FROM SCRATCH with the headless CometChat Calls SDK v5 (`@cometchat/calls-sdk-javascript@5`) — no prebuilt UI Kit. init→login→generateToken→joinSession, event listeners, in-call actions (mute/video/screen-share/record/layout), meet-style session rooms AND 1:1 ringing (Chat SDK signaling + Calls SDK media). Triggers: 'add calling from scratch', 'standalone video call', 'headless calls sdk', 'build my own call UI', 'meeting room join by session id', 'one-on-one ringing call without uikit'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "Modern WebRTC browser (Chrome 72+/Firefox 68+/Safari 12.1+/Edge 79+); HTTPS (or localhost) for getUserMedia; @cometchat/calls-sdk-javascript@^5 (5.0.5). 1:1 ringing also needs @cometchat/chat-sdk-javascript@^4 for signaling. Framework-agnostic (vanilla JS core; React/Vue/Angular/Next recipes)."
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat calls sdk v5 headless voice video webrtc javascript calling standalone"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** `@cometchat/calls-sdk-javascript@5` + catalog `web-calls-v5.json` (the closed symbol list — every `CometChatCalls.*` below exists in it). Official docs: `/calls/javascript/**` = **v5** · Docs MCP. Fetch exact `SessionSettings` fields, event names, and action-method signatures from the docs (`references/docs-map.md`) — never memory. **APPEND to the user's app — additive wiring only** (`RULES.md`). This is the HEADLESS path (no UI Kit); for the prebuilt drop-in call UI use `cometchat-react-v7-calls` instead.
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- **Standalone/headless entry** — this skill owns its own package (the Calls SDK) and has no `-core` sibling; it is self-contained for meet-style calling.
|
|
16
|
+
- **For 1:1 RINGING only** it also drives the **Chat SDK** (`@cometchat/chat-sdk-javascript@4`) for call signaling — signatures fetched from docs via `references/docs-map.md` (§ "1:1 RINGING"). It does NOT depend on the React UI Kit.
|
|
17
|
+
- **Prefer the UI Kit instead?** If the app also wants chat and a prebuilt call UI, use `cometchat-react-v7-core` + `cometchat-react-v7-calls` — not this skill.
|
|
18
|
+
|
|
19
|
+
## Use this skill when
|
|
20
|
+
"add calling from scratch / without the UI Kit", "standalone voice/video", "build my own call screen", "headless calls SDK", "meeting-room join by session id", "one-on-one ringing call". Precondition: the caller chose the **from-scratch / standalone** path (the "add calling" router asks this). If they want the prebuilt call UI, route to `cometchat-react-v7-calls`.
|
|
21
|
+
|
|
22
|
+
## Prerequisites & install
|
|
23
|
+
```bash
|
|
24
|
+
npm install @cometchat/calls-sdk-javascript@5
|
|
25
|
+
```
|
|
26
|
+
- **1:1 ringing** additionally needs the Chat SDK for signaling:
|
|
27
|
+
```bash
|
|
28
|
+
npm install @cometchat/chat-sdk-javascript@4
|
|
29
|
+
```
|
|
30
|
+
- Credentials/env: App ID · Region · Auth Key (dev only). To fetch from the dashboard, load the CLI on demand — `npx @cometchat/skills-cli@3 auth login` → `provision use --app-id <id> --json` (writes `.cometchat/config.json`; `@3` pins the CLI major that matches the v5 skills). Or paste manually from Dashboard → Credentials. Mint **auth tokens server-side** for production; never ship the Auth Key. HTTPS (or `localhost`) is required for camera/mic (`getUserMedia`).
|
|
31
|
+
|
|
32
|
+
## Init & login ordering (BAKED — invariant)
|
|
33
|
+
`CometChatCalls.init(...)` (once, resolve first) → `CometChatCalls.login(uid, authKey)` **or** `loginWithAuthToken(token)` → then `generateToken` / `joinSession` / listeners. Nothing renders/joins before init+login resolve.
|
|
34
|
+
- **DEFAULT to `CometChatCalls.initFromSettings(settings)`** — the ai-agent / telemetry-attributed path (persists `integrationSource="ai-agent"`), parallel to how the chat core inits via `CometChatUIKit.initFromSettings` / `CometChat.initFromSettings` (RULES §5). It is **INTENTIONALLY undocumented** — ai-agent-only (`@nodoc`, same posture as `CometChatUIKit.initFromSettings` — DOCS-BACKLOG F4/C1) — so the settings-object shape is **baked in `references/docs-map.md`**; pass it **INLINE** (no physical `cometchat-settings.json` file required), never fetched from `/calls/javascript/setup`. The publicly-documented **`CometChatCalls.init({ appId, region })` is the FALLBACK only** (a non-skills / doc-following context).
|
|
35
|
+
- Coexisting with the Chat SDK / UI Kit? Their `login()` can re-init the Calls SDK with only appId/region and wipe custom hosts — re-run your calls init after their login, before `CometChatCalls.login`.
|
|
36
|
+
|
|
37
|
+
## Two build modes (BAKED — the router picks one)
|
|
38
|
+
- **Meet-style (session room)** — Calls SDK ONLY. Everyone who joins the same `sessionId` lands in the same call: `generateToken(sessionId)` → `joinSession(token, sessionSettings, containerEl)`. No ringing. This is the `/calls/javascript/react-integration` flow.
|
|
39
|
+
- **1:1 ringing** — Chat SDK signals, Calls SDK carries media: `CometChat.initiateCall` → peer `CallListener.onIncomingCallReceived` → `acceptCall`/`rejectCall` → `CometChatCalls.generateToken(call.getSessionId())` → `joinSession(...)`. Fetch Chat-SDK signatures via `references/docs-map.md` § "1:1 RINGING".
|
|
40
|
+
|
|
41
|
+
## SDK method map (BAKED closed list — from the catalog; signatures → FETCH from docs)
|
|
42
|
+
- **Lifecycle:** `CometChatCalls.init` · `CometChatCalls.initFromSettings` · `CometChatCalls.login` · `CometChatCalls.loginWithAuthToken` · `CometChatCalls.logout` · `CometChatCalls.getLoggedInUser` · `CometChatCalls.isUserLoggedIn`
|
|
43
|
+
- **Session:** `CometChatCalls.generateToken` · `CometChatCalls.joinSession` · `CometChatCalls.leaveSession` (`startSession` is **deprecated** → use `joinSession`)
|
|
44
|
+
- **Events:** `CometChatCalls.addEventListener(eventName, cb, { signal? }) → unsubscribe()` (event names: FETCH the full list from `/calls/javascript/events`)
|
|
45
|
+
- **In-call actions** — ⚠️ **for CUSTOM controls ONLY; the default `joinSession` UI already renders all of these** (see the first pitfall). Only reach for them when the user EXPLICITLY asks to replace the built-in controls: `muteAudio`/`unmuteAudio`/`toggleAudio` · `pauseVideo`/`resumeVideo`/`toggleVideo` · `setLayout` · `startRecording`/`stopRecording` · `startScreenSharing`/`stopScreenSharing` · `raiseHand`/`lowerHand` · `switchCamera` · `pinParticipant`/`unpinParticipant` · `showParticipantList`/`hideParticipantList`
|
|
46
|
+
- **Devices:** `getAudioInputDevices` · `getAudioOutputDevices` · `getVideoInputDevices` · `getCurrent*Device`
|
|
47
|
+
- **Call logs:** `CometChatCalls.CallLogRequestBuilder` → `fetchNext()` (paginated; shape → docs)
|
|
48
|
+
- **Constants:** `CometChatCalls.constants.LAYOUT` (`TILE`/`SIDEBAR`/`SPOTLIGHT`) · `.TYPE` (`VOICE`/`VIDEO`) · `.CAMERA_FACING`
|
|
49
|
+
> This map is a **curated highlight, NOT the full surface** — the AUTHORITATIVE closed list is the **`web-calls-v5.json` catalog** (83 symbols; it also carries `toggleHand`/`toggleParticipantList`/`endSessionForAll`/`muteParticipant`/`pauseParticipantVideo`/`setChatButtonUnreadCount`/`switchToVideoCall`, device setters (`setAudioInputDevice`…), the virtual-background methods, `startStreaming`/`stopStreaming` (**RTMP live-streaming** — with `streamUrl`/`streamKey`/`hideStreamingButton` in `SessionSettings`; neither the SKILL map above nor the `/calls/javascript/actions` doc foregrounds it, but it is real), `startTranscription`/`stopTranscription` (v5.0.5 — see `/calls/javascript/transcription`), and `TranscriptRequestBuilder`, among others). A symbol is real **iff it's in the catalog** — confirm THERE (not just this map), then fetch its exact signature/params from the docs page in `references/docs-map.md`.
|
|
50
|
+
|
|
51
|
+
## Listener lifecycle (BAKED)
|
|
52
|
+
`addEventListener` RETURNS an unsubscribe function — collect them and call every one on teardown (React: in the effect cleanup), and `CometChatCalls.leaveSession()` on unmount. Register listeners BEFORE `joinSession`. Never leak. You can also pass an `AbortSignal` via the `{ signal }` option for bulk teardown.
|
|
53
|
+
|
|
54
|
+
## Least-code recipe (meet-style, framework-agnostic)
|
|
55
|
+
```ts
|
|
56
|
+
// STRICT-TS-CLEAN: type the settings with the EXPORTED SessionSettings, narrow region.
|
|
57
|
+
import { CometChatCalls } from "@cometchat/calls-sdk-javascript";
|
|
58
|
+
import type { SessionSettings } from "@cometchat/calls-sdk-javascript"; // exported; SessionType/Layout are NOT
|
|
59
|
+
|
|
60
|
+
1. await CometChatCalls.initFromSettings({ appId, region: region as "us"|"eu"|"in", credentials: { authKey: AUTH_KEY }, callsSDK: {}, chatSDK: {}, uiKit: {} }) // ai-agent telemetry default (integrationSource="ai-agent"); init({appId,region}) is the public-doc fallback
|
|
61
|
+
2. await CometChatCalls.login(uid, AUTH_KEY) // or loginWithAuthToken(token)
|
|
62
|
+
3. const { token } = await CometChatCalls.generateToken(sessionId)
|
|
63
|
+
4. const unsub = CometChatCalls.addEventListener("onSessionLeft", () => cleanup())
|
|
64
|
+
5. const callSettings: SessionSettings = { sessionType: "VIDEO", layout: "TILE" } // annotate → literals narrow
|
|
65
|
+
await CometChatCalls.joinSession(token, callSettings, containerEl)
|
|
66
|
+
6. // NO control buttons needed — joinSession's UI ALREADY renders mute/video/screen-share/raise-hand/leave.
|
|
67
|
+
7. // teardown → unsub(); CometChatCalls.leaveSession()
|
|
68
|
+
```
|
|
69
|
+
The `containerEl` MUST have real dimensions — the SDK renders its call surface into it. Fetch the full `SessionSettings` field list from `/calls/javascript/session-settings`. (In plain JS drop the annotations; the doc pages show that JS form.)
|
|
70
|
+
|
|
71
|
+
## Framework notes (same SDK, per-framework glue)
|
|
72
|
+
The recipe above is framework-agnostic; the only per-framework part is WHERE you register listeners / mount the container / tear down. Verified live on React and Angular.
|
|
73
|
+
- **React:** provider or component — init via `CometChatCalls.initFromSettings(...)` (the telemetry-attributed default — `integrationSource="ai-agent"`; `init({appId,region})` is the public-doc fallback), then register listeners + `joinSession` in a `useEffect`; teardown in the effect cleanup (call every unsubscribe + `leaveSession`). Recipe: `/calls/javascript/react-integration`.
|
|
74
|
+
- **Angular:** a **DI service** wrapping `CometChatCalls` (init via `CometChatCalls.initFromSettings(...)` — the telemetry-attributed default (`integrationSource="ai-agent"`; `init({appId,region})` is the public-doc fallback) → login, `generateToken`, typed `joinSession`, `leaveSession`; expose readiness via an RxJS `BehaviorSubject`) + a component with a **sized `@ViewChild('callContainer') ElementRef`** container; register listeners BEFORE `joinSession`; teardown in **`ngOnDestroy`** (unsubscribe all + `leaveSession`). Recipe: `/calls/javascript/angular-integration` — but ⚠️ THREE things to override:
|
|
75
|
+
- **(a)** its example wires external Mute/Video/Leave buttons — **IGNORE them** (pitfall #1: `joinSession`'s UI already has the controls);
|
|
76
|
+
- **(b)** it targets legacy `@NgModule`/`app.module.ts` — a modern `ng new` is **standalone** (`bootstrapApplication` + `app.config.ts`, class `App`), so use the standalone variant;
|
|
77
|
+
- **(c) ⚠️ NgZone / change detection (the silent dead-state).** CometChat SDK callbacks — event listeners AND the `login`/`generateToken`/`joinSession` promise resolutions — fire OUTSIDE Angular's zone, so any component state you set inside them **won't trigger change detection** (symptom: readiness/call buttons *silently never enable*, even though the SDK succeeded). Fix: drive the template off your `BehaviorSubject` via the **`async` pipe**, AND/OR wrap state writes in **`this.zone.run(() => …)`** (inject `NgZone`) or call `ChangeDetectorRef.detectChanges()`. Not optional — the app looks broken without it.
|
|
78
|
+
|
|
79
|
+
## Common pitfalls (BAKED)
|
|
80
|
+
- **Don't duplicate the built-in call controls (the #1 mistake).** `joinSession` renders a COMPLETE call UI — mute, camera on/off, screen-share, raise-hand, participant list, layout switch, and the red leave/end button are ALL built into the surface it mounts in `containerEl`. Do **NOT** add your own Mute / Start-video / Share-screen / Leave buttons around the container: they are redundant, duplicate the SDK's own controls, and drift out of sync with the real call state. The `muteAudio`/`pauseVideo`/`leaveSession`/… methods are for CUSTOM controls ONLY — reach for them **just when the user EXPLICITLY asks** to replace the default controls (and hide the built-in ones first via `SessionSettings` — `hideControlPanel` for the whole bar, or per-button flags like `hideToggleAudioButton`/`hideRaiseHandButton`/`hideChatButton`; the canonical recipe is `/calls/javascript/custom-control-panel`, fields on `/calls/javascript/session-settings`). Default = render the call surface and stop.
|
|
81
|
+
- **Zero-dimension container** — `joinSession` mounts into `containerEl`; if it has `height:0` the call renders invisibly. Give it explicit size (e.g. `height: 500px` / `100dvh`).
|
|
82
|
+
- **HTTP (not HTTPS)** — `getUserMedia` needs a secure context; camera/mic silently fail off `localhost`.
|
|
83
|
+
- **Joining before init+login resolve** — `generateToken`/`joinSession` reject; always `await` init then login first.
|
|
84
|
+
- **Leaked listeners / no `leaveSession`** — every `addEventListener` unsubscribe must run on teardown; call `leaveSession()` on unmount.
|
|
85
|
+
- **`startSession` is deprecated** — use `joinSession`; don't pass the old `CallSettings` builder where a plain `SessionSettings` object is expected.
|
|
86
|
+
- **Host wipe on coexisting Chat-SDK login** — re-init the Calls SDK after the Chat SDK/UI Kit logs in (see Init ordering).
|
|
87
|
+
- **version_conflict** — the Calls SDK is **major 5**, distinct from the Chat SDK's v4; do not "upgrade" the Chat SDK to a non-existent v7.
|
|
88
|
+
- **Assuming a signature** — event names, `SessionSettings` fields, and action params are FETCHED from docs, never guessed.
|
|
89
|
+
- **1:1 ringing: `CometChat.Call` used only as a TYPE trips `TS6133`** — in strict TS, importing `CometChat` and referencing `CometChat.Call` in type positions only (never as a value) fails with `'CometChat' is declared but its value is never read`. Import the **concrete type** instead: `import { CometChat } from "@cometchat/chat-sdk-javascript"` for the VALUES you call (`initiateCall`/`acceptCall`/`addCallListener`) and `import type { Call } from "@cometchat/chat-sdk-javascript"` for the type. (Same class as the `SessionSettings`/`CometChatCalls` strict-TS trap.)
|
|
90
|
+
- **Strict-TS widening (the doc's bare-object form doesn't compile as-is)** — the doc pages pass `joinSession(token, { sessionType: "VIDEO", layout: "TILE" }, el)` and `init({ appId, region })` as plain JS. In a strict-TS app (the stock Vite `react-ts` template: `strict` + `verbatimModuleSyntax` + `noUnusedLocals`) those literals WIDEN to `string` and fail `tsc` (TS2345 vs `SessionSettings`; TS2322 for `region`). Fix: `import type { SessionSettings }` (it's exported; `SessionType`/`Layout` are NOT) and annotate the settings object — `const s: SessionSettings = {…}` (or `satisfies SessionSettings`) — and narrow `region` to `"us"|"eu"|"in"`.
|
|
91
|
+
|
|
92
|
+
## Verify it works
|
|
93
|
+
- **Tier-1 catalog:** every `CometChatCalls.*` symbol emitted appears in `web-calls-v5.json` (`node test-suite/scripts/verify-catalog.mjs --family web-calls-v5`).
|
|
94
|
+
- **Tier-2 fences:** the emit type-checks against the installed `@cometchat/calls-sdk-javascript@5` `.d.ts`.
|
|
95
|
+
- **Tier-3b headless smoke:** `node test-suite/scripts/sdk-smoke.mjs --family web-calls-v5 [--live|--dry]` runs init→login→generateToken→(join wiring)→listener-teardown. Media/`joinSession` needs a real WebRTC/DOM context, so the node smoke covers the token+listener round-trip (`--dry` proves wiring without a backend); the actual call render is verified in a browser harness. Flag "dry-mock only, not live-certified" honestly where true.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# docs-map — CometChat Calls SDK v5 (JavaScript, headless): intent → the exact docs page to fetch
|
|
2
|
+
|
|
3
|
+
## Reaching docs — PREFER the CometChat docs MCP; fetch is the fallback
|
|
4
|
+
The canonical doc channel is the **first-party CometChat docs MCP** — tools `search_cometchat_docs`,
|
|
5
|
+
`fetch_cometchat_doc_page`, and `get_cometchat_implementation_bundle`. **If those tools are connected,
|
|
6
|
+
use them instead of a raw web fetch:**
|
|
7
|
+
- **Find the page** → `search_cometchat_docs(query)` — e.g. `search_cometchat_docs("calls javascript join session")`.
|
|
8
|
+
- **Read the page** → `fetch_cometchat_doc_page(path)` — pass the SAME `<path>` the tables below list; the MCP
|
|
9
|
+
resolves the `.md` twin and returns raw Markdown. A full `https://…/<path>` URL also works.
|
|
10
|
+
- **A whole feature/recipe** → `get_cometchat_implementation_bundle(...)` is **NON-AUTHORITATIVE** — curated
|
|
11
|
+
STATIC recipes that can lag the live docs. Treat any bundle as a hint only: RECONCILE it against the
|
|
12
|
+
`fetch_cometchat_doc_page` result + the catalog; never emit bundle code verbatim.
|
|
13
|
+
|
|
14
|
+
The MCP reads whatever docs environment it is pointed at (production by default; a preview when repointed),
|
|
15
|
+
so it also carries the environment-swap concern below — no hardcoded host on the skill side.
|
|
16
|
+
|
|
17
|
+
**If the MCP tools are NOT connected:** add it (`claude mcp add --transport http cometchat-docs https://mcp.cometchat.com/mcp`, or reinstall/enable the plugin) and retry; only if it still will not connect, fall back to a plain fetch via `DOCS_BASE` (defined next).
|
|
18
|
+
Either way the `<path>` catalog in this file is the source of truth for WHICH page — MCP-vs-fetch is only HOW.
|
|
19
|
+
|
|
20
|
+
## DOCS_BASE — the fetch FALLBACK entry point (⚠️ SWAP HERE to change environments)
|
|
21
|
+
```
|
|
22
|
+
DOCS_BASE = https://www.cometchat.com/docs
|
|
23
|
+
```
|
|
24
|
+
> Production docs (`https://www.cometchat.com/docs`). **Fetch rule:** build a URL as `DOCS_BASE` + the path shown,
|
|
25
|
+
> then append `.md`. Never hardcode a host anywhere else; never read `node_modules`/`.d.ts`.
|
|
26
|
+
|
|
27
|
+
## The convention — Calls v5 lives at the UNVERSIONED root `/calls/javascript/`
|
|
28
|
+
`DOCS_BASE` + `<path>` + `.md` → raw Markdown (verbatim code + prop/parameter tables).
|
|
29
|
+
```
|
|
30
|
+
Fetch: {DOCS_BASE}/calls/javascript/overview.md
|
|
31
|
+
```
|
|
32
|
+
> **⚠️ VERSION TRAP.** The **unversioned** `/calls/javascript/**` tree IS **v5** (matches the installed
|
|
33
|
+
> `@cometchat/calls-sdk-javascript@5`). The `/calls/v4/**` tree is the OLD v4 SDK — never fetch it for a v5
|
|
34
|
+
> build. Legacy `/sdk/javascript/<n>.0/calling-*` pages are older still. When in doubt, prefer the page whose
|
|
35
|
+
> body says "Calls SDK v5".
|
|
36
|
+
|
|
37
|
+
## Scoped index (prefer over the global llms.txt)
|
|
38
|
+
```
|
|
39
|
+
{DOCS_BASE}/llms.txt
|
|
40
|
+
```
|
|
41
|
+
Use it to discover any page not listed below (search for `/calls/javascript/`).
|
|
42
|
+
|
|
43
|
+
## Path catalog — intent → page (all under `/calls/javascript/`)
|
|
44
|
+
| Intent | Path |
|
|
45
|
+
|---|---|
|
|
46
|
+
| SDK overview · architecture · call-flow | `/calls/javascript/overview` |
|
|
47
|
+
| Install + `init` / `initFromSettings` | `/calls/javascript/setup` |
|
|
48
|
+
| Login / auth-token / user mgmt | `/calls/javascript/authentication` |
|
|
49
|
+
| `generateToken` + `joinSession` (meet-style) | `/calls/javascript/join-session` |
|
|
50
|
+
| **1:1 RINGING** — initiate · incoming-call listener + **incoming/outgoing call-screen UI** · accept/reject/cancel · then `generateToken`/`joinSession` | `/calls/javascript/ringing` |
|
|
51
|
+
| Session settings (the `SessionSettings` object) | `/calls/javascript/session-settings` |
|
|
52
|
+
| Events (`addEventListener` — full event list) | `/calls/javascript/events` |
|
|
53
|
+
| In-call actions (mute/pause/leave/layout/record…) | `/calls/javascript/actions` |
|
|
54
|
+
| **Custom control panel** — replace the built-in controls: hide the whole panel (`hideControlPanel`) OR hide INDIVIDUAL buttons, then drive your own UI off the action methods + keep it in sync via events | `/calls/javascript/custom-control-panel` — the canonical recipe for `SKILL.md` pitfall #1's "user EXPLICITLY wants custom controls" path. Carries the per-button hide flags the session-settings page doesn't foreground: `hideRaiseHandButton` · `hideShareInviteButton` · `hideParticipantListButton` · `hideChatButton` (plus `hideLeaveSessionButton`/`hideToggleAudioButton`/`hideToggleVideoButton`/`hideScreenSharingButton`/`hideRecordingButton`/`hideChangeLayoutButton`/`hideVirtualBackgroundButton`) — all real in the installed `.d.ts`. |
|
|
55
|
+
| Call layouts (TILE / SIDEBAR / SPOTLIGHT) | `/calls/javascript/call-layouts` |
|
|
56
|
+
| Participant management (pin / mute / list) | `/calls/javascript/participant-management` |
|
|
57
|
+
| Recording | `/calls/javascript/recording` |
|
|
58
|
+
| Screen sharing | `/calls/javascript/screen-sharing` |
|
|
59
|
+
| Virtual background | `/calls/javascript/virtual-background` |
|
|
60
|
+
| Raise hand | `/calls/javascript/raise-hand` |
|
|
61
|
+
| Idle timeout | `/calls/javascript/idle-timeout` |
|
|
62
|
+
| Share invite | `/calls/javascript/share-invite` |
|
|
63
|
+
| Call logs (`CallLogRequestBuilder`) | `/calls/javascript/call-logs` — ⚠️ **the live example OMITS the REQUIRED `.setAuthToken(token)` — copying it verbatim BREAKS AT RUNTIME.** The page now DOES document the client-SDK `CallLogRequestBuilder` (added in v5.0.5, in its "Transcripts" section) — but its snippet is `new CometChatCalls.CallLogRequestBuilder().setLimit(30).setHasTranscriptions(true).build()` with **no `setAuthToken`**, and the builder does **NOT** implicitly use the logged-in user's token: `fetchNext()` then throws `{ code: "NOT_ENOUGH_PARAMETERS", message: "`Auth Token` is required to use the fetchNext() method." }` (verified live vs installed `@cometchat/calls-sdk-javascript@5.0.5`, explorer `web-calls-v5`). **EMIT THE BAKED RECIPE, not the doc snippet:** `new CometChatCalls.CallLogRequestBuilder().setLimit(n).setAuthToken(CometChatCalls.getUserAuthToken()).build().fetchNext()` → `Promise<CallLog[]>` (paginated; read `getSessionID`/`getType`/`getStatus`/`getTotalDuration`/`getInitiatedAt`/…). `setAuthToken` is REQUIRED; pass the logged-in user's token from `CometChatCalls.getUserAuthToken()`. Use the SDK builder for an in-app call-log list; don't send the user to the REST API. (Docs bug tracked in `DOCS-BACKLOG.md`; this baked recipe stays authoritative over the doc snippet until it's fixed.) |
|
|
64
|
+
| **React** integration (provider + call screen) | `/calls/javascript/react-integration` |
|
|
65
|
+
| Vue / Angular / Next.js / Ionic integration | `/calls/javascript/{vue,angular,nextjs,ionic}-integration` |
|
|
66
|
+
|
|
67
|
+
## DOCS-GAP — `initFromSettings` shape is NOT on the live docs (bake it here)
|
|
68
|
+
> **Referenced by `SKILL.md` (Init & login ordering).** The `/calls/javascript/setup` page documents ONLY
|
|
69
|
+
> `init({ appId, region })` — it does **not** document `CometChatCalls.initFromSettings(...)`, even though the
|
|
70
|
+
> method is real and shipped (installed `@cometchat/calls-sdk-javascript@5` `.d.ts`). Until the docs add it,
|
|
71
|
+
> the `initFromSettings` argument shape (the non-exported `CometChatSettings` interface — real in the
|
|
72
|
+
> installed `.d.ts`, so absent from the exports-only catalog) is baked here so the skill is not a dead-end:
|
|
73
|
+
> ```ts
|
|
74
|
+
> await CometChatCalls.initFromSettings({
|
|
75
|
+
> appId: "APP_ID",
|
|
76
|
+
> region: "us", // 'us' | 'eu' | 'in'
|
|
77
|
+
> credentials: { authKey: "AUTH_KEY" }, // dev-only auth key
|
|
78
|
+
> callsSDK: { adminHost: null, clientHost: null, host: null },
|
|
79
|
+
> chatSDK: {}, // Record<string, unknown>
|
|
80
|
+
> uiKit: {}, // Record<string, unknown>
|
|
81
|
+
> });
|
|
82
|
+
> ```
|
|
83
|
+
> The skills **DEFAULT to `CometChatCalls.initFromSettings(settings)`** — pass the settings object **INLINE**
|
|
84
|
+
> (no physical `cometchat-settings.json` file needed). It is the **ai-agent-only telemetry init**
|
|
85
|
+
> (persists `integrationSource="ai-agent"`), **INTENTIONALLY undocumented** (`@nodoc`, same posture as
|
|
86
|
+
> `CometChatUIKit.initFromSettings` — DOCS-BACKLOG F4), which is WHY the shape is baked here. The
|
|
87
|
+
> publicly-documented **`init({ appId, region })` is the FALLBACK only** (a non-skills / doc-following
|
|
88
|
+
> context). Do NOT tell a user to "fetch the shape from `/calls/javascript/setup`": that page does not carry
|
|
89
|
+
> it. (Explorer `web-calls-v5`, AUDIT-169.)
|
|
90
|
+
|
|
91
|
+
## 1:1 RINGING (meet-style needs none of this) — the signaling layer is the CHAT SDK
|
|
92
|
+
Meet-style (session-id "join a room") uses ONLY the Calls SDK (`generateToken` → `joinSession`). But
|
|
93
|
+
**one-on-one ringing** (call a specific user, they get an incoming-call prompt, accept/reject) combines the
|
|
94
|
+
**Chat SDK** (`@cometchat/chat-sdk-javascript`) for signaling + the Calls SDK for media.
|
|
95
|
+
|
|
96
|
+
**The COMPLETE, CURRENT recipe is ONE page — fetch it directly:**
|
|
97
|
+
```
|
|
98
|
+
fetch_cometchat_doc_page("/calls/javascript/ringing")
|
|
99
|
+
```
|
|
100
|
+
That page (v5, JS) carries the WHOLE flow, both sides: `CometChat.initiateCall(call, timeout?)` →
|
|
101
|
+
`CometChat.addCallListener({ onIncomingCallReceived → show an incoming-call screen, onOutgoingCallAccepted, onOutgoingCallRejected, onIncomingCallCancelled })`
|
|
102
|
+
→ `CometChat.acceptCall(sessionId)` / `rejectCall(sessionId, status)` / cancel → `CometChatCalls.generateToken(sessionId)`
|
|
103
|
+
→ `CometChatCalls.joinSession(...)` → `leaveSession()` + `CometChat.endCall(sessionId)`. It even includes an
|
|
104
|
+
**incoming-call UI example** and an **outgoing-call UI example**.
|
|
105
|
+
> **Do NOT reach for `search_cometchat_docs("default calling")`** — search surfaces the STALE
|
|
106
|
+
> `/sdk/javascript/3.0/` chat-SDK pages, which end on the deprecated `startSession()` (not `joinSession`) and
|
|
107
|
+
> show no incoming-call UI. `/calls/javascript/ringing` is the canonical v5 source of truth; reconcile any
|
|
108
|
+
> Chat-SDK symbol against the Chat SDK catalog before emitting.
|
|
109
|
+
|
|
110
|
+
> **⚠️ Testing 1:1 ringing needs TWO live clients** — different users, in **isolated browser sessions**. CometChat
|
|
111
|
+
> stores the logged-in user in `localStorage`, which is SHARED across tabs of the same browser, so two tabs
|
|
112
|
+
> both become the same user and the callee never rings. Use two different browsers (or one normal + one
|
|
113
|
+
> incognito window), each logged in as a different user with the CallListener active. The caller always shows
|
|
114
|
+
> ringing locally; that proves nothing about the callee. This is a two-client protocol, not a bug.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-onboarding
|
|
3
|
+
description: "The shared FRONT DOOR for adding CometChat to ANY app — a consultative, enterprise-grade DISCOVER → UNDERSTAND → PLAN journey that ALWAYS runs first, before any framework core. Detects the whole repo, runs a features + design-system conversation (core chat/threads/groups/media/calls/search/…; a preset theme, match your design system, or build one), maps each feature to its UI Kit component (or the SDK method where the UI Kit has none — UI-Kit-first, SDK-fallback), shares a full integration PLAN, then hands a scoped build directive to the framework core on approval — final output is production-ready. Triggers: 'add cometchat', 'add chat', 'add chat to my app', 'add calling', 'integrate cometchat', 'build a chat feature'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "Framework-agnostic (React/Next/Angular/Vue/RN/Flutter/Android/iOS/… — degrades gracefully when a signal is absent). Emits NO CometChat components — output is a plan artifact + a scoped directive to a framework core skill."
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat onboarding journey discover understand plan front-door router-gate agnostic intent"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** this skill runs FIRST for every "add CometChat" request and produces NO integration code — its only outputs are (1) the shared **plan artifact** and (2) a **scoped build directive** to the framework core. Repo facts come from `npx @cometchat/skills detect --json` (the authority) + **READING THE REPO** for the rest — NEVER memory, never the dashboard CLI (AUDIT-059). The archetype→capability map and plan template are in `references/` (loaded on demand). Credentials + implementation belong to the framework core (`cometchat-<family>-core`, family resolved from `peers.yaml`). Draw the boundary at PLAN.
|
|
13
|
+
|
|
14
|
+
<!-- onboarding is a platform-NEUTRAL journey skill (like the cross-family a11y/i18n): no per-platform Companion block. Its "companion" is whatever framework core the plan names on hand-off. -->
|
|
15
|
+
|
|
16
|
+
## Use this skill when
|
|
17
|
+
Any first-contact "add CometChat" intent, on ANY stack: "add chat", "add cometchat", "add chat to my app", "add voice/video calling", "integrate cometchat". The router (`cometchat`) ALWAYS routes here FIRST — a mandatory gate. It runs before ANY framework core so the developer gets discover → understand → plan before a line is written. (An *upgrade* request — "upgrade my v6 UI Kit to v7" — is reconciliation, not onboarding; the router sends that straight to migration. And a re-entry on an already-integrated repo short-circuits: see §Re-entry.)
|
|
18
|
+
|
|
19
|
+
## What this skill does — and only this (the four beats)
|
|
20
|
+
Run the four beats in order, as a CONSULTATIVE conversation (senior-engineer tone: recommend with a reason, surface trade-offs, never a blank form). Nothing is written to the user's code in ANY beat — the first write happens only AFTER beat 4's approval, inside the framework core. The final output is PRODUCTION-READY (the core's contract guarantees it).
|
|
21
|
+
|
|
22
|
+
> **The build model — UI Kit first, SDK per-feature fallback (NO "which approach?" question).** A renderable app on a platform with a shipped UI Kit ALWAYS gets the **UI Kit** as its UI layer (fastest path to a production-ready surface). There is NO "UI Kit vs SDK" architecture choice to make. Instead, PER FEATURE: if the UI Kit has a component/prop for it → **use the component**; if it does NOT → call the platform's **Chat SDK** method directly (already installed under the UI Kit — init/login use it). The SDK is the FALLBACK for what the UI Kit doesn't expose (AI agents, campaigns, advanced/AI moderation, transient messages, bots, webhooks, …), looked up in the detected family's core `references/docs-map.md` → SDK docs (`references/platforms.md`). The ONLY exception: a backend/no-DOM/non-renderable context has no UI layer — there the SDK is the whole build; say so honestly.
|
|
23
|
+
|
|
24
|
+
### 1. DETECT everything (environment + the WHOLE current repo)
|
|
25
|
+
Run the detect probe (above), then **READ THE REPO** for the rest (on web: `package.json` deps/scripts, the lockfile, framework config files and source; on iOS: `*.xcodeproj`/`*.xcworkspace`, `Package.swift`, a `Podfile` as a signal only — `references/platforms.md`). Capture, framework-agnostically, degrading gracefully when a signal is absent (record it `null`, never guess):
|
|
26
|
+
- **Framework & build:** `framework` · `framework_version` · `bundler` · `router` · `ssr_strategy` (ssr/csr/islands) · `env_prefix` (VITE_/NEXT_PUBLIC_/…) · `package_manager` (from the lockfile) · `language` (TS/JS) · `project_name` (plus mobile version fields for expo/RN/android/flutter). **Non-web platforms have different fields** — iOS, Android, React Native and Flutter each have a column in `references/platforms.md`.
|
|
27
|
+
- **App integration state:** **installed UI Kit + `version_conflict`** (a major other than the family's target — React v7, Angular v5, RN v5, iOS v5, Android v6, Flutter v6; `peers.yaml`) · **existing CometChat integration** · **credential presence** (an existing `.cometchat/config.json` or `*_COMETCHAT_APP_ID` env).
|
|
28
|
+
- **App architecture (infer from source, `null` when absent):** **auth system** (nextauth / clerk / firebase / auth0 / supabase / custom) · **styling / design system** (tailwind / css-modules / mui / styled-components / chakra) · **state management** (redux / zustand / mobx / recoil / context).
|
|
29
|
+
> **`version_conflict` STOP still applies HERE.** If detection shows a UI Kit major other than the family's target for an *add* request, STOP and surface it in the plan (reconcile first — `RULES.md`); do not hand off a build over a mixed-major repo. If CometChat is already wired for THIS major → **Re-entry** (below).
|
|
30
|
+
> **A signal being absent is DATA, not a blocker.** Missing auth ⇒ recommend the dev Auth-Key path + a note to add prod auth later; missing framework ⇒ record it and (per §Non-React) state the platform's core isn't built yet. Never fabricate a signal, never stall on one.
|
|
31
|
+
|
|
32
|
+
### 2. UNDERSTAND — the features + design conversation (each question WITH a recommended default from the repo)
|
|
33
|
+
A SHORT, consultative Q&A (clarification contract: ask **and wait**); every question carries a repo-inferred recommendation so the developer confirms rather than composes:
|
|
34
|
+
1. **Archetype / shape** — `1:1`/marketplace · `support` · `community`/groups · `full-messenger` · `embedded`. Infer from routes (seller/product → `1:1`; `/support` → `support`; `/community`/`/groups` → `community`). "Detected `<signal>` → recommend `<archetype>` — keep or change?"
|
|
35
|
+
2. **Features** — WHICH capabilities (from the detected platform's manifest — `features.json` react-v7 / `features.angular-v5.json` angular-v5 / `features.ios-v5.json` iOS / … — grouped; naming only one hands the wrong menu to every other family): **Core chat** (1:1 + groups, messages, **threads**, media/attachments, typing, receipts, **reactions, mentions** — the last two are ON BY DEFAULT in v7 core, NOT extensions to enable — AUDIT-077) is the recommended default and always included; then offer the add-ons — **voice/video calls · search · polls/stickers · translation · push notifications · AI/smart-replies · moderation · AI agents**. Do NOT list `reactions`/`mentions` as add-ons (they're core), and never offer a `deprecated:true` feature (email-replies · e2e-encryption · live-streaming). **First SUBTRACT what's already present (AUDIT-043)** — `detect`/existing-integration for wired features, and ASK which dashboard-gated extensions are already enabled (the CLI can't read per-app enabled-state); don't re-offer an already-on feature like translation. Ask "core chat + which of these?" Don't ask about individual components/props (the core decides those). **Each chosen feature maps to a UI Kit component where one exists, or an SDK method where it doesn't** (AI agents · campaigns · advanced/AI moderation · bots · webhooks · transient messages → SDK) — the plan's **Feature coverage** section records which, so nothing is silently dropped or hand-rolled.
|
|
36
|
+
3. **Design / theming** — HOW it should look. Present the light/dark MODE and the palette, and **ALWAYS include the AUTO option**: **(a)** **Auto — follow the device's light/dark (OS) setting** — the RECOMMENDED default for a fresh app (whether the kit follows the OS BY ITSELF differs per platform — **iOS does, with no host code, so do not offer to wire it there; web does not** — `references/platforms.md`, AUDIT-004), **(b)** a fixed **light** preset, **(c)** a fixed **dark** preset, **(d)** **match your existing design system** (recommended when discovery detected Tailwind/MUI/Chakra/a token theme — reuse it), **(e)** a **brand palette** (your colors as the platform's theme tokens — CSS custom properties on web, `UIColor`/`dynamicColor` on iOS), or **(f)** a **custom design system**. All map to the UI Kit's theme tokens / `customization`. Recommend from the detected `styling` signal: none → **auto + default tokens**; a design system detected → **auto + match**. **Omitting the auto / follow-system option is a defect (AUDIT-042) — the kit supports it and it's the pack's fresh-app default; never present a light-only menu.**
|
|
37
|
+
4. **Scope / placement** — smallest surface that satisfies the archetype (default) vs. the full combined app; full-page · embedded · sidebar · popup. Default to the SMALLEST reasonable production-ready surface, never the kitchen sink.
|
|
38
|
+
The archetype → capability translation is in `references/archetypes.md`; the feature menu is the DETECTED platform's manifest (`references/platforms.md`) — never offer a feature that platform does not ship. Recommend, don't interrogate.
|
|
39
|
+
|
|
40
|
+
### 3. PLAN — share the FULL plan artifact BEFORE anything is written
|
|
41
|
+
Assemble and present the **plan artifact** — the concrete deliverable of this skill. It MUST contain every section of the plan-completeness contract (template + contract in `references/plan-artifact.md`):
|
|
42
|
+
1. **What I found** — the beat-1 discovery summary — the fields that APPLY to the detected platform (web: framework/bundler/router/SSR/pkg-mgr/env-prefix; iOS: deployment target/dependency manager/UI framework/Xcode project), plus language, auth, styling, existing-CometChat — each value or `null`. Do not report a field the platform does not have.
|
|
43
|
+
2. **What you want (feature coverage)** — the confirmed intent (archetype · **features** · **design/theming** · scope) translated to **CometChat capabilities** (intent→capability map from `references/archetypes.md`; features from `features.json`), **each tagged UI Kit component or SDK method** — the UI-Kit-first / SDK-fallback split. Flag the SDK-backed ones (AI agents · campaigns · advanced moderation · bots · …) so the core wires them from the SDK docs; nothing is silently dropped or hand-rolled.
|
|
44
|
+
3. **What I'll do** — a NUMBERED action list (the scoped build steps, in order).
|
|
45
|
+
4. **Files that will change** — the concrete paths/areas the build will touch (additive — APPEND, never replace).
|
|
46
|
+
5. **Packages** — the exact package(s) the plan installs (named, with major pins; the core owns the exact coordinates).
|
|
47
|
+
6. **Credential + auth strategy** — dev **Auth Key** vs prod **server-minted auth token**, CHOSEN from discovery (a real auth system detected ⇒ recommend the prod token path wired to it; none ⇒ dev Auth-Key path + a note to harden for prod). State it; do NOT fetch credentials here. **Say in the plan that the core will OFFER to fetch App ID/Region/Auth Key from the dashboard (loading the CometChat CLI on demand → `provision`) or let the user paste them — so the fetch step isn't dropped on hand-off and never degrades into a "paste them yourself" TODO (AUDIT-039).**
|
|
48
|
+
7. **The modify-or-approve gate** — explicitly invite the user to EDIT the plan or approve it. Nothing is written before approval.
|
|
49
|
+
|
|
50
|
+
### 4. MODIFY or START — edit the plan, else hand a SCOPED directive to the core
|
|
51
|
+
- The user may **edit** any part of the plan (change the archetype, add/drop a feature, narrow scope, switch the credential strategy) → re-render the plan and re-present the gate. Loop until they approve.
|
|
52
|
+
- On **approval**, emit a **scoped build directive** and hand off:
|
|
53
|
+
- **Framework detected** → resolve `<family>` from `peers.yaml` (React web → `react-v7`; Angular → `angular-v5`; iOS → `ios`; React Native/Expo → `react-native`; Android → `android-v6`, reading `android_variant` from gradle files for cohort; Flutter → `flutter-v6`) and hand off to `cometchat-<family>-core` with the scoped surface (archetype + features + theming + scope + credential strategy + affected files), pulling in ONLY the additional SHIPPED skills the plan names (theming → `customization`, framework glue → `patterns`, features → `features`, voice/video → `calls`, **push → `cometchat-<family>-push`** (thin, docs-first), v6→v7 upgrade → `migration`). The core builds **UI Kit first** and, for any **SDK-backed feature** the plan flagged (AI agents · campaigns · advanced moderation · …), wires the **SDK method** looked up in `cometchat-<family>-core/references/docs-map.md` → SDK docs. The core owns detect-reuse, credentials, and the production-ready build. **Android extra:** cohort-split skills (`android_variant`: `views` → `kotlin-*`, `compose` → `compose-*`) pick `{kotlin,compose}-{components,placement,customization}`; cohort-neutral skills (`features`, `calls`, `push`, `production`, `testing`, `troubleshooting`, `builder-settings`, `events`, `extensions`, `migration`). Credentials → `app/src/main/assets/cometchat-settings.json` (gitignored), not `.env`.
|
|
54
|
+
- **A framework with no shipped core detected** → still deliver the full discover→understand→plan, then state clearly that **that platform's implementation core isn't built yet** (framework-ready posture; see §Not in this pack). Do not fake an implementation.
|
|
55
|
+
> **Scoped, not the kitchen sink.** The directive names the SMALLEST surface the approved plan calls for (e.g. "1:1 chat surface for the marketplace, dev Auth-Key, touch `src/features/chat/*`"), so the core builds that — not every component.
|
|
56
|
+
|
|
57
|
+
## Calling-FIRST intent — the "add calling" decision tree
|
|
58
|
+
When the PRIMARY first-contact intent is **calling** ("add calling / voice-video / a video call" as the GOAL, not "add chat" that includes calls), run the **`references/calling-first.md`** decision tree instead of defaulting to the UI-Kit path — calling is the ONE intent where an approach choice is legitimate (standalone build-your-own-UI calling is a real product; a CHAT build still gets NO approach question). In brief: detect the UI Kit → offer **prebuilt** (`cometchat-<family>-calls`) vs **standalone from scratch**; if no UI Kit, ask *"chat too, or calling only?"*; for from-scratch, ask **one-on-one (ringing) vs meet-style**, then hand off to the platform's headless Calls SDK v5 skill (**`cometchat-js-v5-sdk`** web, **`cometchat-ios-v5-sdk`** iOS, **`cometchat-android-v5-calls-sdk`** Android, **`cometchat-react-native-v5-sdk`** React Native, **`cometchat-flutter-v5-sdk`** Flutter — resolved from `peers.yaml`, not a literal; not installed? `npx @cometchat/skills add --family <platform>-calls` adds it alongside) with the mode. Still run beats 1–3 + a short plan before hand-off.
|
|
59
|
+
|
|
60
|
+
## The hand-off boundary (REUSE the core; do NOT fork it)
|
|
61
|
+
This skill does **discover + understand + plan**. The framework core does **credentials + implement + verify**. The line is BEAT 4's approval:
|
|
62
|
+
- Onboarding OWNS: whole-repo discovery, intent elicitation with recommendations, the plan artifact, the modify/approve gate, the scoped directive.
|
|
63
|
+
- The core OWNS (do NOT restate or fork here): credential fetch/provision + env write (`references/setup-credentials.md`), init→login→render, component/prop selection, the production-ready build. It REUSES this discovery (re-reads the same signals + any `.cometchat` config, skips re-setup) — one detection approach, two consumers.
|
|
64
|
+
|
|
65
|
+
## Re-entry (already-integrated repo)
|
|
66
|
+
If beat-1 discovery shows CometChat already wired for the current major (`existing_cometchat: true`, no `version_conflict`), do NOT re-run the full journey. Summarize what's already integrated, ask what the user wants to ADD or CHANGE, and route that incremental ask straight to the framework core (or the calls/features/customization skill it names) — onboarding is the FIRST-contact front door, not a gate on every subsequent change.
|
|
67
|
+
|
|
68
|
+
## Not in this pack — missing skills & not-yet-built cores (graceful-degrade posture)
|
|
69
|
+
**The rule: only hand off to a core/skill that SHIPS in this pack** — present under `skills/` and declared in `peers.yaml`. Never route to an uninstalled skill and never pretend it's there; run beats 1–3 in full, produce the plan artifact, and in beat 4 be honest and offer the nearest shipped alternative. **React, Angular, iOS, React Native, Android and Flutter all ship FULL sets** (`cometchat-<family>-core` + `-calls` · `-push` · `-migration` · …), plus the headless `cometchat-android-v5-sdk` (Android Chat SDK) and the from-scratch calling skills `cometchat-js-v5-sdk` (web) / `cometchat-ios-v5-sdk` (iOS) / `cometchat-android-v5-calls-sdk` (Android). Only apply this posture where a capability has genuinely NO shipped skill, or the platform has no `peers.yaml` peer (Vue today) — then deliver the plan as the hand-off spec and say the implementation skill isn't built yet. Never silently pretend React, and never decline a family that ships. **Per-platform routing table + how to word an honest decline: `references/not-in-this-pack.md`.**
|
|
70
|
+
|
|
71
|
+
## Common pitfalls
|
|
72
|
+
- **Writing code in beats 1–3.** The first write is post-approval, in the core. Onboarding that scaffolds before the plan is approved has skipped its own gate.
|
|
73
|
+
- **Asking "UI Kit or SDK?"** There is NO approach choice (calling-first excepted) — the UI Kit is always the UI layer, the SDK the per-feature FALLBACK inside the same build. Don't ask; map each feature to its component, or its SDK method where none exists.
|
|
74
|
+
- **Hand-rolling a feature that already exists.** Never build custom UI/logic for something the UI Kit has a component for, OR the SDK has a method for. Check the UI Kit first (`component-props.md` / catalog), then the SDK docs (`docs-map.md`). Hand-roll ONLY when neither has it.
|
|
75
|
+
- **Declining a family that ships.** calls + **push** + migration ARE installed on every family — route to them normally (`cometchat-<family>-calls` / `-push` / `-migration`). Apply the **§Not in this pack** posture ONLY where no skill ships, and never route an unknown platform to React by default.
|
|
76
|
+
- **Asking blank questions, or skipping features/design.** Beat 2 must cover archetype · WHICH features · HOW it looks (**auto/follow-OS [default]** · fixed light/dark · match design system · brand · custom) · scope, each WITH a repo-inferred recommendation. A bare "which archetype?" is under-delivery; omitting **auto/follow-OS** is a defect (AUDIT-042).
|
|
77
|
+
- **Forking the credential/detect flow.** Do NOT re-implement credentials or detection here — plan them, then let the core execute (the hand-off boundary above).
|
|
78
|
+
- **Over-scoping the directive.** Hand off the smallest surface the plan names, not the whole combined app (that's a later grow-on-request in the core).
|
|
79
|
+
- **Stalling on a missing signal.** Absent auth/framework/styling is recorded `null` and flows into a recommendation — never a blocker. (`version_conflict` on an *add* IS a STOP; a missing signal is not.)
|
|
80
|
+
|
|
81
|
+
## Verify before done (this skill's "done" = a good plan + a clean hand-off, NOT a running app)
|
|
82
|
+
Onboarding is complete when: (1) beat-1 discovery ran and every signal is captured or explicitly `null`; (2) every intent question (archetype · **features** · **design/theming** · scope) was asked WITH a repo-inferred recommendation and answered; (3) the plan artifact was presented containing ALL plan-completeness sections incl. **Feature coverage** (UI Kit component vs SDK method per feature) (`references/plan-artifact.md`); (4) the user approved (or edited → re-approved); (5) EITHER a scoped directive was handed to a SHIPPED core (`cometchat-<family>-core`), OR — where no skill ships for the platform/capability — the **§Not in this pack** posture was stated (honest + plan-as-spec + shipped alternative), never a hand-off to an uninstalled skill. This skill does NOT build, test, or run the app — the chosen core does the build (production-ready per its contract); testing is advisory/human unless the user asks (`RULES.md`).
|
|
83
|
+
|
|
84
|
+
## Deep references (load ONLY when the beat needs them — keeps this file thin)
|
|
85
|
+
- `references/archetypes.md` — the archetype → CometChat-capability map (1:1/marketplace · support · community · full-messenger · embedded) + the repo-signal → recommended-default heuristics for beat 2, and the intent→capability translation for the plan's "what you want".
|
|
86
|
+
- `references/plan-artifact.md` — the plan-artifact TEMPLATE (fill-in) + the **plan-completeness contract** (the seven sections the plan MUST contain) + a worked example.
|
|
87
|
+
- `references/calling-first.md` — the "add calling" decision tree (UI-Kit-present → prebuilt vs scratch; no-UI-Kit → chat-too? ; scratch → one-on-one vs meet → hand off per platform: web `cometchat-js-v5-sdk`, iOS `cometchat-ios-v5-sdk`, Android `cometchat-android-v5-calls-sdk`, React Native `cometchat-react-native-v5-sdk`). Load when the primary intent is calling.
|
|
88
|
+
- `references/not-in-this-pack.md` — the graceful-degrade posture in full: the per-platform table of which skills SHIP (so a shipped family is never declined) + how to word an honest decline. Load in beat 4 when a needed skill may not exist.
|
|
89
|
+
- `references/platforms.md` — the per-platform beat-1 signal columns (web · iOS · Android · React Native · Flutter) + the platform feature manifests.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# archetypes — intent → CometChat capability map + repo-signal → recommended default
|
|
2
|
+
|
|
3
|
+
This is the translation layer for beats 2 and 3: it turns a **product archetype** into **CometChat capabilities** (the plan's "what you want"), and it turns **beat-1 repo signals** into the **recommended default** each intent question carries (the "make it easy + recommend" requirement). Capabilities named here are conceptual (chat surface / 1:1 / groups / calls / search / threads) — the framework core maps each to its own components on hand-off; onboarding does not name UI-Kit symbols.
|
|
4
|
+
|
|
5
|
+
## The five archetypes → capabilities
|
|
6
|
+
|
|
7
|
+
| Archetype | Product shape | CometChat capabilities (the plan's intent→capability) | Default modality | Default scope |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| **1:1 / marketplace** | Buyers ↔ sellers, requester ↔ provider — a "message this person" entry point off a profile/listing | 1:1 conversations · a conversation list · a message pane (send/receive, attachments) · unread + presence · a "Message <X>" entry button wired to open the conversation | chat | smallest 1:1 surface (a message button → a conversation ↔ message pane), NOT the full app |
|
|
10
|
+
| **support** | Customers ↔ support agents; often a launcher/widget in a corner, sometimes ticket-scoped | 1:1 (customer↔agent) conversations · a message pane · often **embedded** placement (a launcher/popup, not a full page) · optionally calls for escalation · agent-side may want a conversation list | chat | an embedded/widget support surface |
|
|
11
|
+
| **community / groups** | Members talk inside communities, channels, or rooms | **groups** · group conversations · group members + management/moderation · a message pane · often a groups/channels list · optionally group calls | chat | a groups + group-message surface |
|
|
12
|
+
| **full messenger** | A complete standalone chat app (the "everything" experience) | the whole combined experience: conversations + users/groups tabs · message pane · threads · search · calls · the full grow-target | both | the full combined app (the core's grow target) |
|
|
13
|
+
| **embedded** | Chat lives INSIDE an existing screen/flow, not as its own page (a side panel, drawer, or inline widget) | a scoped chat surface constrained to a container (a fixed-size panel/drawer), 1:1 or group as the host flow needs; minimal chrome | chat | a placement-constrained embedded surface |
|
|
14
|
+
|
|
15
|
+
> **Modality overlay.** Any archetype can be `chat` / `calls` / `both`. "Add calling" or a repo already using CometChat chat → recommend `calls`/`both`. Calls layer: 1:1 voice/video and/or group calls, incoming-call handling, and (on native) the platform permission config — the framework core + its calls skill own the details.
|
|
16
|
+
|
|
17
|
+
## Repo-signal → recommended default (beat 2 — infer, then let the user confirm)
|
|
18
|
+
|
|
19
|
+
Each question's recommendation comes from what beat-1 detected. Phrase every one as **"detected <signal> → recommend <default> — keep or change?"** — never a blank ask.
|
|
20
|
+
|
|
21
|
+
**Archetype (from routing/domain signals):**
|
|
22
|
+
- Marketplace/e-commerce signals — routes or dirs like `/products`, `/listings`, `/sellers`, `/checkout`; a product/seller/vendor model → **1:1 / marketplace**.
|
|
23
|
+
- Support/helpdesk signals — `/support`, `/help`, `/contact`, `/agent`, a tickets model, a widget/launcher pattern → **support** (embedded placement).
|
|
24
|
+
- Community/social signals — `/community`, `/groups`, `/channels`, `/rooms`, `/feed`, a groups/members model → **community / groups**.
|
|
25
|
+
- A greenfield/standalone app, or an explicit "build a chat app" → **full messenger**.
|
|
26
|
+
- Chat is clearly a secondary feature bolted onto an existing screen (dashboard/app shell with no obvious chat page) → **embedded**.
|
|
27
|
+
- No decisive signal → recommend the SMALLEST reasonable default (**1:1**) and say so; the user confirms or changes. (Do not stall — smallest-reasonable-default + flag, per `RULES.md` clarification only where genuinely blocking.)
|
|
28
|
+
|
|
29
|
+
**Modality:**
|
|
30
|
+
- Trigger was "add calling"/"add voice/video" → **calls** (or **both** if chat isn't present yet).
|
|
31
|
+
- Repo already has CometChat chat wired → **calls** (adding to existing).
|
|
32
|
+
- Otherwise → **chat**.
|
|
33
|
+
|
|
34
|
+
**Scope:**
|
|
35
|
+
- Default to the **smallest surface** that satisfies the archetype (the core's production-ready core surface for 1:1/support/community; a placement-constrained surface for embedded).
|
|
36
|
+
- Recommend the **full combined app** ONLY for **full messenger** or an explicit "the whole chat app" ask.
|
|
37
|
+
|
|
38
|
+
**Credential + auth strategy (feeds plan section 6):**
|
|
39
|
+
- A real auth system detected (`auth` ∈ nextauth/clerk/firebase/auth0/supabase/custom) → recommend the **prod server-minted auth-token** path, wired to that system (map the app's user id → the CometChat UID); note the dev Auth-Key is fine to start but must not ship.
|
|
40
|
+
- No auth detected (`auth: null`) → recommend the **dev Auth-Key** path to get moving, with an explicit note to add prod token auth before production.
|
|
41
|
+
- The framework core executes whichever is chosen (its `references/setup-credentials.md`); onboarding only decides + states it.
|
|
42
|
+
|
|
43
|
+
**Placement / SSR hints (feeds plan sections 3–4):**
|
|
44
|
+
- `styling` (tailwind/mui/…) → note "match the existing design system" as a plan step (hand to customization on build).
|
|
45
|
+
- **Theme MODE default = AUTO (follow the OS light/dark setting).** For a fresh app (no `styling` detected), recommend **auto** — the core syncs `theme` ↔ `prefers-color-scheme` (the kit ships light+dark but does NOT auto-follow the OS on its own; pack default per AUDIT-004). ALWAYS offer the auto/follow-system option in the design question — never a light-only or fixed-preset-only menu (AUDIT-042). Mode (auto/light/dark) and palette (default tokens / match design system / brand / custom) are independent — auto can pair with any palette.
|
|
46
|
+
- `ssr: ssr`/`islands` (Next App Router, Astro) → flag the client-boundary work in the plan (the chat surface is client-side; the core's patterns skill owns the directive).
|
|
47
|
+
- `state` (redux/zustand/context) → note where the "current conversation / logged-in CometChat user" state should live so it fits the app's existing store, not a new one.
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
- These are **recommendations**, not decisions — the user confirms or overrides every one at the beat-4 gate.
|
|
51
|
+
- Onboarding names capabilities and archetypes; the **framework core** names components. Keep that split so this file stays platform-neutral and doesn't rot with UI-Kit changes.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# calling-first.md — the "add calling" decision tree
|
|
2
|
+
|
|
3
|
+
Load this when the PRIMARY, explicit first-contact intent is **calling** — the user opens with "add calling / add voice-video / add a video call to my app" as the GOAL, not "add chat" that merely includes calls. Standalone, build-your-own-UI calling (a video-only app, a meeting room, an embedded call widget with no chat surface) is a legitimate product, so **calling is the one intent where onboarding offers an approach choice**. (A CHAT build still gets NO approach question — the "Asking 'UI Kit or SDK?'" pitfall stands for chat.)
|
|
4
|
+
|
|
5
|
+
Run it as a consultative Q&A (clarification contract: ask **and wait** at each branch). Still run beats 1–3 (whole-repo discovery + a short plan naming the mode + packages + credential strategy) BEFORE the hand-off — this tree replaces the archetype/approach question for calling-first intent; it does not skip the plan.
|
|
6
|
+
|
|
7
|
+
## Step 1 — detect the UI Kit (beat 1)
|
|
8
|
+
Is a CometChat UI Kit installed? Web/RN: `@cometchat/chat-uikit-*` in `package.json`. **iOS: the `ios` row's `kit_package` (`peers.yaml`) in `Package.swift`/`Podfile`, or an `*.xcodeproj`/`*.xcworkspace` that resolves it.** Android: `com.cometchat:chatuikit-*` in the gradle files. Flutter: `cometchat_chat_uikit` in `pubspec.yaml`.
|
|
9
|
+
|
|
10
|
+
## Step 2 — branch on that
|
|
11
|
+
- **UI Kit IS installed** → ask:
|
|
12
|
+
> *"Your UI Kit already ships a prebuilt calling UI (incoming-call surface, call buttons, ongoing-call). Use that, or build a standalone calling feature from scratch with no prebuilt UI?"*
|
|
13
|
+
- **prebuilt** → hand off to `cometchat-<family>-calls` (e.g. `cometchat-react-v7-calls`, **`cometchat-ios-calls`** on iOS). It rides the SAME init/login — enable calling on the existing UIKit settings (`uiKit.callsSDK`). Done.
|
|
14
|
+
- **from scratch** → Step 3.
|
|
15
|
+
- **UI Kit is NOT installed** → ask:
|
|
16
|
+
> *"We also ship UI Kits with a prebuilt calling UI. Do you need CHAT as well, or only calling? If you'll want chat too, the UI Kit gives you both with a prebuilt call UI; if it's calling-only, we can build it from scratch."*
|
|
17
|
+
- **chat too / wants prebuilt** → the normal UI-Kit journey (`cometchat-<family>-core` + `calls`).
|
|
18
|
+
- **calling only / from scratch** → Step 3.
|
|
19
|
+
|
|
20
|
+
## Step 3 — from-scratch / standalone calling → ask the call SHAPE
|
|
21
|
+
> *"One-on-one (ringing — call a specific user, they get an incoming prompt to accept/reject) or meet-style (a session room anyone joins by id)?"*
|
|
22
|
+
|
|
23
|
+
### Step 3b — ringing on MOBILE ⇒ ask DELIVERY too (ask **and wait**; never assume)
|
|
24
|
+
Answered **one-on-one ringing** on a mobile platform (Android/iOS/Flutter/React-Native)? Ask this BEFORE
|
|
25
|
+
the plan — it is an architecture fork, not a later add-on:
|
|
26
|
+
> *"Do calls need to ring when the app is in the background or closed — the way WhatsApp does? Or is
|
|
27
|
+
> in-app ringing enough (both people have the app open)?"*
|
|
28
|
+
|
|
29
|
+
- **In-app / foreground only** → the ringing recipe (`initiateCall` / `CallListener` / `acceptCall`).
|
|
30
|
+
**Say the limit out loud in the plan:** in auto socket mode the Chat SDK drops its WebSocket the moment
|
|
31
|
+
the app is backgrounded, so a backgrounded callee never rings and the caller just times out (~45 s) —
|
|
32
|
+
verified live on two devices. It is NOT replayed when they return.
|
|
33
|
+
- **Background / killed-app ringing** → that is **VoIP push**, a separate build, and a **real device**
|
|
34
|
+
either way (neither emulators nor the iOS Simulator can prove it).
|
|
35
|
+
*Android:* an FCM project + `FirebaseMessagingService`, `PhoneAccount` registration, a
|
|
36
|
+
`ConnectionService` — `/calls/android/voip-calling`, docs-first, paired with the platform's `push` skill.
|
|
37
|
+
*iOS:* the separate `CometChatPushNotifications` package (an APNs **VoIP** provider in the dashboard,
|
|
38
|
+
Background Modes → Voice over IP, and a device — APNs never delivers a VoIP push to the Simulator). The
|
|
39
|
+
SDK owns `PKPushRegistryDelegate` and `CXProviderDelegate`; writing either yourself fights it for the
|
|
40
|
+
same callbacks. Certified on device via `cometchat-ios-v5-sdk`.
|
|
41
|
+
Name it as its own plan item with its own prerequisites — do not fold it into the ringing recipe and do
|
|
42
|
+
not promise it from that recipe.
|
|
43
|
+
|
|
44
|
+
**Why this is asked, not assumed.** "One-on-one ringing" reads as *WhatsApp* to most people, and the
|
|
45
|
+
foreground-only build passes every casual test (both apps open during development) before failing in the
|
|
46
|
+
user's real world. A user who wanted VoIP and got the ringing recipe does not find out until their
|
|
47
|
+
callee's phone stays silent. Web/JS has no VoIP-push equivalent — skip 3b there.
|
|
48
|
+
|
|
49
|
+
## Step 4 — resolve the headless skill FROM THE DETECTED PLATFORM
|
|
50
|
+
The headless calls skill is **per-platform** — resolve it from `peers.yaml` (the peer whose `consumption: sdk` and whose `kit_package` is a `calls-sdk-*`), never from a literal. Today's live headless-calls peers:
|
|
51
|
+
|
|
52
|
+
| Detected platform | Peer | Skill | Calls package | Ringing also needs |
|
|
53
|
+
|---|---|---|---|---|
|
|
54
|
+
| web / JS | `js-calls` | `cometchat-js-v5-sdk` | `@cometchat/calls-sdk-javascript@5` | `@cometchat/chat-sdk-javascript@4` |
|
|
55
|
+
| React Native | `react-native-calls` | `cometchat-react-native-v5-sdk` | `@cometchat/calls-sdk-react-native@5` | `@cometchat/chat-sdk-react-native@4` |
|
|
56
|
+
| iOS | `ios-calls` | `cometchat-ios-v5-sdk` | `CometChatCallsSDK` | the Chat SDK for signaling |
|
|
57
|
+
| Android | `android-calls` | `cometchat-android-v5-calls-sdk` | `com.cometchat:calls-sdk-android` | the Chat SDK for signaling |
|
|
58
|
+
| Flutter | `flutter-calls` | `cometchat-flutter-v5-sdk` | `cometchat_calls_sdk: ^5.0.7` | `cometchat_sdk` v5 |
|
|
59
|
+
|
|
60
|
+
**Is that skill installed?** `add` installs ONE family per run — a UI-Kit install carries only that family's skills, so the headless calls skill may not be in the project's skills folder yet. If it isn't, install it before the hand-off — it is added ALONGSIDE the existing UI Kit skills (nothing is removed):
|
|
61
|
+
`npx @cometchat/skills add --family <js-calls|react-native-calls|ios-calls|android-calls|flutter-calls>` (same `--ide` you installed with). Never hand off to a skill that is not present.
|
|
62
|
+
|
|
63
|
+
> ⚠️ **The JOIN STEP IS NOT PORTABLE — do not copy it across platforms.** Web joins with `joinSession(token, sessionSettings, containerEl)` into a sized **DOM element**. React Native has **no `joinSession` at all**: you join by RENDERING `<CometChatCalls.Component callToken sessionSettings />` inside a flex-sized `View`. Flutter is a third shape again — `joinSession` RETURNS a `Widget?` and mounts nothing, so the app must place it in the widget tree; an agent that ports another platform's snippet produces a call that joins successfully and renders a blank screen. Name the mode and let the platform's own skill own the recipe.
|
|
64
|
+
|
|
65
|
+
Then hand off to the resolved skill with the chosen mode named in the directive:
|
|
66
|
+
- **meet-style** → Calls SDK only (`generateToken` → the platform's join step). No Chat SDK.
|
|
67
|
+
- **one-on-one ringing** → Calls SDK media + **Chat SDK signaling** (`initiateCall` / `CallListener` / `acceptCall`) — note the platform's extra chat-SDK dependency from the table in the plan, and carry the Step-3b delivery answer through.
|
|
68
|
+
|
|
69
|
+
## Hand-off directive shape
|
|
70
|
+
`"standalone <meet-style|one-on-one ringing> calling via cometchat-js-v5-sdk, <session-room|ring-a-user> surface, dev Auth-Key, package(s): @cometchat/calls-sdk-javascript@5[ + @cometchat/chat-sdk-javascript@4 for ringing], touch <paths>"`. Android: `"standalone <meet-style|one-on-one ringing> calling via cometchat-android-v5-calls-sdk, <session-room|ring-a-user> surface, <in-app ringing (foreground-only)|+ VoIP push for background/killed>, dev Auth-Key in assets/cometchat-settings.json, package(s): com.cometchat:calls-sdk-android:5.0.+[ + com.cometchat:chat-sdk-android:5.0.+ for ringing], touch <paths>"`. The headless skill owns install, init→login→generateToken→joinSession, listeners, and teardown. **A ringing directive on mobile MUST carry the Step 3b delivery answer** — without it the recipe silently defaults to foreground-only and the user learns the limit after the build.
|
|
71
|
+
|
|
72
|
+
**iOS:** `"standalone <meet-style|one-on-one ringing> calling via cometchat-ios-v5-sdk, <session-room|ring-a-user> surface, <in-app ringing (foreground-only)|+ VoIP push for background/killed>, dev Auth-Key, package(s): CometChatCallsSDK@5 via SPM (github.com/cometchat/calls-sdk-ios)[ + CometChatSDK@4 for ringing][ + CometChatPushNotifications@1 for VoIP], Info.plist camera+mic usage strings, touch <paths>"`. The headless iOS skill owns install, init->login->join, listeners and teardown.
|
|
73
|
+
|
|
74
|
+
**Flutter:** `"standalone <meet-style|one-on-one ringing> calling via cometchat-flutter-v5-sdk, <session-room|ring-a-user> surface, <in-app ringing (foreground-only)|+ push for background/killed>, dev Auth-Key in cometchat-settings.json (a registered Flutter ASSET — commit a placeholder with no real key so a fresh clone builds; real keys supplied locally / generated in CI, per `cometchat-flutter-v6-core`), package(s): cometchat_calls_sdk: ^5.0.7[ + cometchat_sdk v5 for ringing], minSdk 26 / iOS 15.1, touch <paths>"`. Three Flutter-specific things the directive must not lose:
|
|
75
|
+
- the token API is **`generateCallToken`**, not `generateToken` — the latter is deprecated and the live docs still show it.
|
|
76
|
+
- ⚠️ **do not carry another platform's calling snippet across.** Flutter's `joinSession` returns a `Widget?` and mounts nothing; the app places it in the widget tree. An agent that pattern-matches the container-based platforms produces a call that joins and renders a blank screen.
|
|
77
|
+
- for Step 3b, Flutter has **no first-party CometChat push package** — background ringing is FCM on Android and APNs/CallKit on iOS, wired by the app. Say so rather than promising a package that does not exist.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Not in this pack — missing skills & not-yet-built cores
|
|
2
|
+
|
|
3
|
+
The graceful-degrade posture, in full. The entry keeps the one-line rule; this is the detail,
|
|
4
|
+
including exactly which skills ship per platform and how to word an honest decline.
|
|
5
|
+
|
|
6
|
+
**The rule: only hand off to a core/skill that SHIPS in this pack** — present under `skills/` and declared in `peers.yaml`. When a needed skill is NOT installed, never route to it and never pretend it's there; run beats 1–3 in full, produce the plan artifact, and in beat 4 be honest and offer the nearest shipped alternative. Two cases:
|
|
7
|
+
- **Shipped skills to route to (by platform — NEVER decline what IS shipped; `peers.yaml` is the authority):** **React** (`react-v7`): calling → `cometchat-react-v7-calls`; push → `cometchat-react-v7-push` (docs-first — honestly note live delivery needs a device check); migration → `cometchat-react-v7-migration`. **Angular** (`angular-v5`): the full set incl. `-calls`, `-push`, `-migration`. **iOS** (`ios`): `cometchat-ios-core` + `-calls`/`-push`/`-migration`. **React Native** (`react-native`): calling → `cometchat-react-native-calls`; push → `cometchat-react-native-push`; migration → `cometchat-react-native-migration`. **Android** (`android-v6`): `cometchat-android-v6-core` + the cohort-split `{kotlin,compose}-*` skills, `-calls` (prebuilt call UI), `-push` (FCM), `-migration`; **headless Chat SDK** → `cometchat-android-v5-sdk`; **headless calling from scratch (meet-style or 1:1 ringing, no UI Kit)** → `cometchat-android-v5-calls-sdk` (via `calling-first.md`). **Flutter** (`flutter-v6`): `cometchat-flutter-v6-core` + `-calls`/`-push`/`-migration`. Web headless calling from scratch → `cometchat-js-v5-sdk`. The headless **JS Chat SDK** is not a separate skill, but its methods ARE the per-feature fallback used INSIDE the UI-Kit build (`docs-map.md` → SDK docs). Only apply the "not in this pack" posture for a capability with genuinely NO shipped skill (see §Not in this pack) — push is now shipped on every family, so route to it.
|
|
8
|
+
- **Not-yet-built core (no matching `peers.yaml` peer — Vue today; a plain-JS chat UI is likewise SDK-only):** still deliver the plan; state that CometChat DOES support that platform but its implementation skill isn't built in this pack yet; offer the plan as the hand-off spec (or for a manual integration following CometChat's docs). Never silently pretend React. **Never put a shipped family on this list** — a literal agent will decline the user (this file once listed Android/RN/Flutter/Angular after they had shipped; `lint-skills.mjs` now checks the list against the shipped `-core` dirs).
|