@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
package/bin/install.js
DELETED
|
@@ -1,1003 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const fs = require("fs");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const os = require("os");
|
|
8
|
-
const readline = require("readline");
|
|
9
|
-
const { spawn } = require("child_process");
|
|
10
|
-
|
|
11
|
-
// ── Lazy-load optional deps ───────────────────────────────────────────────────
|
|
12
|
-
function tryRequire(name) {
|
|
13
|
-
try { return require(name); } catch { return null; }
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const chalk = tryRequire("chalk");
|
|
17
|
-
const ora = tryRequire("ora");
|
|
18
|
-
|
|
19
|
-
const c = {
|
|
20
|
-
bold: (s) => chalk ? chalk.bold(s) : s,
|
|
21
|
-
cyan: (s) => chalk ? chalk.cyan(s) : s,
|
|
22
|
-
green: (s) => chalk ? chalk.green(s) : s,
|
|
23
|
-
yellow: (s) => chalk ? chalk.yellow(s) : s,
|
|
24
|
-
gray: (s) => chalk ? chalk.gray(s) : s,
|
|
25
|
-
red: (s) => chalk ? chalk.red(s) : s,
|
|
26
|
-
dim: (s) => chalk ? chalk.dim(s) : s,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// ── Skills registry ───────────────────────────────────────────────────────────
|
|
30
|
-
const SKILLS_SRC_DIR = path.join(__dirname, "..", "skills");
|
|
31
|
-
|
|
32
|
-
// Each skill declares which families it belongs to. The dispatcher (`cometchat`)
|
|
33
|
-
// is shared across all families; pattern skills are family-specific. Adding a
|
|
34
|
-
// new family (e.g. flutter) means flipping its `coming soon` placeholder below
|
|
35
|
-
// to real entries with `families: ["flutter"]`.
|
|
36
|
-
const SKILLS = [
|
|
37
|
-
// Dispatcher — shared across every family
|
|
38
|
-
{ name: "cometchat", families: ["web", "native", "flutter", "angular", "android", "ios"], description: "Entry point — detects framework, handles onboarding, guides integration" },
|
|
39
|
-
|
|
40
|
-
// Calls dispatcher — shared across every family (v4.1)
|
|
41
|
-
{ name: "cometchat-calls", families: ["web", "native", "flutter", "angular", "android", "ios"], description: "Calls entry point — routes to per-family -calls skill, picks standalone vs additive mode" },
|
|
42
|
-
|
|
43
|
-
// Cross-family polish (v4.1) — i18n + accessibility apply to every family
|
|
44
|
-
{ name: "cometchat-i18n", families: ["web", "native", "flutter", "angular", "android", "ios"], description: "Localization across all kits — CometChatLocalize.init/setLocale signature differences, RTL, fallback language, custom resources" },
|
|
45
|
-
{ name: "cometchat-a11y", families: ["web", "native", "flutter", "angular", "android", "ios"], description: "Accessibility (WCAG 2.1 AA) — contrast, keyboard nav, live regions for new messages, focus management on chat entry, prefers-reduced-motion, calls a11y" },
|
|
46
|
-
|
|
47
|
-
// Web (React / Next.js / React Router / Astro)
|
|
48
|
-
{ name: "cometchat-core", families: ["web"], description: "Foundational rules — init, login, CSS, env vars, SSR safety, provider" },
|
|
49
|
-
{ name: "cometchat-components", families: ["web"], description: "Component catalog — names, props, composition patterns" },
|
|
50
|
-
{ name: "cometchat-placement", families: ["web"], description: "Where to put chat — route, modal, drawer, widget, embedded" },
|
|
51
|
-
{ name: "cometchat-react-patterns", families: ["web"], description: "React / Vite / CRA integration patterns" },
|
|
52
|
-
{ name: "cometchat-nextjs-patterns", families: ["web"], description: "Next.js App Router + Pages Router patterns" },
|
|
53
|
-
{ name: "cometchat-react-router-patterns", families: ["web"], description: "React Router v6 / v7 patterns" },
|
|
54
|
-
{ name: "cometchat-astro-patterns", families: ["web"], description: "Astro React islands patterns" },
|
|
55
|
-
{ name: "cometchat-theming", families: ["web"], description: "Theme presets, brand colors, CSS variable overrides" },
|
|
56
|
-
{ name: "cometchat-features", families: ["web"], description: "40+ feature catalog — calls, polls, AI, moderation" },
|
|
57
|
-
{ name: "cometchat-customization", families: ["web"], description: "Component customization — custom views, builders, events" },
|
|
58
|
-
{ name: "cometchat-production", families: ["web"], description: "Production auth — token endpoints, user management, security" },
|
|
59
|
-
{ name: "cometchat-troubleshooting", families: ["web"], description: "Diagnostics — verify, drift, doctor, symptom lookup" },
|
|
60
|
-
{ name: "cometchat-react-calls", families: ["web"], description: "Web calls (v4.1) — Calls SDK install, dual-SDK init, Incoming/Outgoing/Ongoing, framework SSR safety" },
|
|
61
|
-
{ name: "cometchat-react-testing", families: ["web"], description: "Web testing (v4.1) — Vitest + RTL setup, mocking the SDK, Playwright e2e, init-resolves-before-render assertion, no-Auth-Key-in-source meta-test, CI" },
|
|
62
|
-
{ name: "cometchat-react-push", families: ["web"], description: "Web push (v4.1) — Service Worker + VAPID + Push API for new-message notifications, server-side webhook send, click-through routing, iOS PWA-only caveat" },
|
|
63
|
-
|
|
64
|
-
// React Native (Expo + bare RN)
|
|
65
|
-
{ name: "cometchat-native-core", families: ["native"], description: "RN: init, login, provider chain, env vars, anti-patterns" },
|
|
66
|
-
{ name: "cometchat-native-components", families: ["native"], description: "RN component catalog — names, props, slot views, request builders" },
|
|
67
|
-
{ name: "cometchat-native-placement", families: ["native"], description: "RN: stack screen, bottom tab, modal, bottom sheet, embedded" },
|
|
68
|
-
{ name: "cometchat-native-expo-patterns", families: ["native"], description: "Expo managed workflow + Expo Router + app.json config" },
|
|
69
|
-
{ name: "cometchat-native-bare-patterns", families: ["native"], description: "Bare RN: pod install, native modules, privacy manifest" },
|
|
70
|
-
{ name: "cometchat-native-theming", families: ["native"], description: "RN: CometChatThemeProvider — colors, typography, dark mode" },
|
|
71
|
-
{ name: "cometchat-native-features", families: ["native"], description: "RN feature catalog — calls, extensions, AI agent, reactions, polls" },
|
|
72
|
-
{ name: "cometchat-native-customization", families: ["native"], description: "RN: custom text formatters, events, request builder filtering" },
|
|
73
|
-
{ name: "cometchat-native-production", families: ["native"], description: "RN: server-minted auth tokens, user management, external-backend recipes" },
|
|
74
|
-
{ name: "cometchat-native-push", families: ["native"], description: "RN push: APNs + FCM, dashboard providers, client registration, deep-link" },
|
|
75
|
-
{ name: "cometchat-native-testing", families: ["native"], description: "RN testing: Jest + RNTL, mocking the kit/SDK, Detox vs Maestro, CI" },
|
|
76
|
-
{ name: "cometchat-native-troubleshooting", families: ["native"], description: "RN troubleshooting: Metro cache, pod install, native module linking" },
|
|
77
|
-
{ name: "cometchat-native-calls", families: ["native"], description: "RN calls (v4.1) — Calls SDK + callkeep + voip-push + FCM, CallKit/ConnectionService, dev-client requirement" },
|
|
78
|
-
|
|
79
|
-
// Angular (12-15)
|
|
80
|
-
{ name: "cometchat-angular-core", families: ["angular"], description: "Angular: UIKitSettingsBuilder init, login order, environment config, provider" },
|
|
81
|
-
{ name: "cometchat-angular-components", families: ["angular"], description: "Angular component catalog — selectors, inputs, content projection, modules" },
|
|
82
|
-
{ name: "cometchat-angular-placement", families: ["angular"], description: "Angular: route, modal, drawer, embedded panel — where to put chat" },
|
|
83
|
-
{ name: "cometchat-angular-patterns", families: ["angular"], description: "Angular integration patterns — modules, lazy loading, environment files" },
|
|
84
|
-
{ name: "cometchat-angular-theming", families: ["angular"], description: "Angular: CometChatThemeService — colors, typography, dark mode" },
|
|
85
|
-
{ name: "cometchat-angular-features", families: ["angular"], description: "Angular feature catalog — calls, polls, reactions, extensions, AI" },
|
|
86
|
-
{ name: "cometchat-angular-customization", families: ["angular"], description: "Angular: content projection, ng-template slots, custom views" },
|
|
87
|
-
{ name: "cometchat-angular-production", families: ["angular"], description: "Angular: server-minted auth tokens, user management, external-backend recipes" },
|
|
88
|
-
{ name: "cometchat-angular-troubleshooting", families: ["angular"], description: "Angular troubleshooting: build errors, module imports, Zone.js issues" },
|
|
89
|
-
{ name: "cometchat-angular-calls", families: ["angular"], description: "Angular calls (v4.1) — Calls SDK in APP_INITIALIZER, NgZone correctness, <cometchat-call-buttons> + <cometchat-incoming-call>" },
|
|
90
|
-
{ name: "cometchat-angular-testing", families: ["angular"], description: "Angular testing (v4.1) — Karma OR Jest, TestBed with CUSTOM_ELEMENTS_SCHEMA, NgZone-aware fakeAsync, Cypress e2e" },
|
|
91
|
-
{ name: "cometchat-angular-push", families: ["angular"], description: "Angular push (v4.1) — @angular/service-worker + ngsw-config, SwPush subscription, click-through via Router.navigateByUrl, Universal SSR guards" },
|
|
92
|
-
|
|
93
|
-
// Android native — both V5 (live, Java + Kotlin Views) and V6 (beta,
|
|
94
|
-
// Compose + Kotlin Views) ship together. The V5 + V6 dispatcher entries
|
|
95
|
-
// (`cometchat-android-v5` / `cometchat-android-v6`) are routed by the
|
|
96
|
-
// unified `cometchat` dispatcher after detecting the gradle dep.
|
|
97
|
-
{ name: "cometchat-android-v5", families: ["android"], description: "V5 dispatcher — Java + Kotlin Views (com.cometchat:chat-uikit-android:5.x)" },
|
|
98
|
-
{ name: "cometchat-android-v5-core", families: ["android"], description: "V5: UIKitSettings init, login, dependency setup" },
|
|
99
|
-
{ name: "cometchat-android-v5-components", families: ["android"], description: "V5 component catalog — Conversations, Messages, Users, Groups, Calls" },
|
|
100
|
-
{ name: "cometchat-android-v5-placement", families: ["android"], description: "V5: Activity, Fragment, BottomSheet — where to put chat" },
|
|
101
|
-
{ name: "cometchat-android-v5-theming", families: ["android"], description: "V5: theme attrs, colors.xml, dark mode, brand styling" },
|
|
102
|
-
{ name: "cometchat-android-v5-features", families: ["android"], description: "V5 feature catalog — calls, reactions, polls, extensions, AI" },
|
|
103
|
-
{ name: "cometchat-android-v5-customization", families: ["android"], description: "V5: custom views, DataSource decorators, request builders" },
|
|
104
|
-
{ name: "cometchat-android-v5-production", families: ["android"], description: "V5: server-minted auth tokens, user management, external-backend recipes" },
|
|
105
|
-
{ name: "cometchat-android-v5-push", families: ["android"], description: "V5 push: FCM, dashboard providers, deep-link, foreground/background" },
|
|
106
|
-
{ name: "cometchat-android-v5-extensions", families: ["android"], description: "V5 extensions — moderation, smart replies, message translation" },
|
|
107
|
-
{ name: "cometchat-android-v5-testing", families: ["android"], description: "V5 testing: Espresso, Robolectric, mocking the kit/SDK" },
|
|
108
|
-
{ name: "cometchat-android-v5-troubleshooting", families: ["android"], description: "V5 troubleshooting: gradle conflicts, manifest, lifecycle, ProGuard" },
|
|
109
|
-
{ name: "cometchat-android-v5-calls", families: ["android"], description: "V5 calls (v4.1) — calls-sdk-android Cloudsmith install, ConnectionService + FCM VoIP, foreground service, 16 deep references/" },
|
|
110
|
-
|
|
111
|
-
{ name: "cometchat-android-v6", families: ["android"], description: "V6 dispatcher — Compose + Kotlin Views (chatuikit-{compose,kotlin}-android:6.x)" },
|
|
112
|
-
{ name: "cometchat-android-v6-core", families: ["android"], description: "V6: gradle deps, init, login, message sending" },
|
|
113
|
-
{ name: "cometchat-android-v6-events", families: ["android"], description: "V6: SDK event subscriptions and lifecycle" },
|
|
114
|
-
{ name: "cometchat-android-v6-compose-components", families: ["android"], description: "V6 Compose component catalog — Composables for chat UI" },
|
|
115
|
-
{ name: "cometchat-android-v6-compose-placement", families: ["android"], description: "V6 Compose: NavHost, modal, bottom sheet — where to put chat" },
|
|
116
|
-
{ name: "cometchat-android-v6-compose-theming", families: ["android"], description: "V6 Compose: CometChatTheme, color schemes, typography" },
|
|
117
|
-
{ name: "cometchat-android-v6-compose-customization", families: ["android"], description: "V6 Compose: custom slots, DataSource, message templates" },
|
|
118
|
-
{ name: "cometchat-android-v6-kotlin-components", families: ["android"], description: "V6 Kotlin Views component catalog — custom View classes" },
|
|
119
|
-
{ name: "cometchat-android-v6-kotlin-placement", families: ["android"], description: "V6 Kotlin Views: Activity, Fragment, BottomSheet placement" },
|
|
120
|
-
{ name: "cometchat-android-v6-kotlin-theming", families: ["android"], description: "V6 Kotlin Views: style attributes, colors.xml, dark mode" },
|
|
121
|
-
{ name: "cometchat-android-v6-kotlin-customization", families: ["android"], description: "V6 Kotlin Views: custom Views, DataSource, request builders" },
|
|
122
|
-
{ name: "cometchat-android-v6-features", families: ["android"], description: "V6 feature catalog — calls, reactions, polls, AI agent, extensions" },
|
|
123
|
-
{ name: "cometchat-android-v6-extensions", families: ["android"], description: "V6 extensions — moderation, smart replies, message translation" },
|
|
124
|
-
{ name: "cometchat-android-v6-builder-settings", families: ["android"], description: "V6: UIKitSettingsBuilder options — presence, typing, receipts" },
|
|
125
|
-
{ name: "cometchat-android-v6-production", families: ["android"], description: "V6: server-minted auth tokens, user management, external-backend recipes" },
|
|
126
|
-
{ name: "cometchat-android-v6-push", families: ["android"], description: "V6 push: FCM, dashboard providers, deep-link" },
|
|
127
|
-
{ name: "cometchat-android-v6-testing", families: ["android"], description: "V6 testing: Espresso, Robolectric, Compose UI tests, mocking" },
|
|
128
|
-
{ name: "cometchat-android-v6-troubleshooting", families: ["android"], description: "V6 troubleshooting: gradle, Compose runtime, R8, BuildConfig" },
|
|
129
|
-
{ name: "cometchat-android-v6-calls", families: ["android"], description: "V6 calls (v4.1, beta) — calls bundled into chatuikit-{compose,kotlin}, .enableCalling(), surface-aware Compose+Views routing" },
|
|
130
|
-
{ name: "cometchat-android-v6-migration", families: ["android"], description: "V5→V6 migration recipes — gradle deps rewrite, UIKitSettings.Builder API, theme parent (CometChatTheme.DayNight), calls bundled, Compose vs Views cohort selection" },
|
|
131
|
-
|
|
132
|
-
// Flutter — V5 stable (`cometchat_chat_uikit:^5.2`) + V6 beta
|
|
133
|
-
// (`cometchat_chat_uikit:^6.0.0-beta`) ship together. Routed by the
|
|
134
|
-
// unified `cometchat` dispatcher after detecting the pubspec.yaml dep.
|
|
135
|
-
{ name: "cometchat-flutter-v5", families: ["flutter"], description: "V5 dispatcher — cometchat_chat_uikit ^5.2 + cometchat_calls_uikit ^5.0" },
|
|
136
|
-
{ name: "cometchat-flutter-v5-core", families: ["flutter"], description: "V5: pubspec deps, UIKitSettings, init/login, app entry" },
|
|
137
|
-
{ name: "cometchat-flutter-v5-conversations", families: ["flutter"], description: "V5: CometChatConversations widget — props, callbacks, request builder" },
|
|
138
|
-
{ name: "cometchat-flutter-v5-messages", families: ["flutter"], description: "V5: CometChatMessages screen — message list, header, composer wiring" },
|
|
139
|
-
{ name: "cometchat-flutter-v5-users-groups", families: ["flutter"], description: "V5: CometChatUsers / CometChatGroups / CometChatGroupMembers" },
|
|
140
|
-
{ name: "cometchat-flutter-v5-calls", families: ["flutter"], description: "V5: voice/video calling — incoming/outgoing/ongoing screens, call buttons" },
|
|
141
|
-
{ name: "cometchat-flutter-v5-theming", families: ["flutter"], description: "V5: CometChatTheme, color palette, typography, dark mode" },
|
|
142
|
-
{ name: "cometchat-flutter-v5-customization", families: ["flutter"], description: "V5: custom message templates, options, text formatters, builders" },
|
|
143
|
-
{ name: "cometchat-flutter-v5-events", families: ["flutter"], description: "V5: CometChatMessageEvents / GroupEvents / CallEvents subscription" },
|
|
144
|
-
{ name: "cometchat-flutter-v5-production", families: ["flutter"], description: "V5: server-minted auth tokens, user management, external-backend recipes" },
|
|
145
|
-
{ name: "cometchat-flutter-v5-push", families: ["flutter"], description: "V5: FCM/APNs push, token lifecycle, deep-link" },
|
|
146
|
-
{ name: "cometchat-flutter-v5-troubleshooting", families: ["flutter"], description: "V5 troubleshooting: pubspec, GetX, Pod errors, runtime crashes" },
|
|
147
|
-
{ name: "cometchat-flutter-v5-testing", families: ["flutter"], description: "V5 testing (v4.1) — flutter_test + mocktail, GetX-aware widget tests, integration_test, golden tests, CI" },
|
|
148
|
-
|
|
149
|
-
{ name: "cometchat-flutter-v6", families: ["flutter"], description: "V6 dispatcher — cometchat_chat_uikit ^6.0.0-beta (Bloc-based)" },
|
|
150
|
-
{ name: "cometchat-flutter-v6-core", families: ["flutter"], description: "V6: pubspec deps, UIKitSettings, init/login, app entry" },
|
|
151
|
-
{ name: "cometchat-flutter-v6-components", families: ["flutter"], description: "V6 component catalog — Bloc-driven widgets, slots, request builders" },
|
|
152
|
-
{ name: "cometchat-flutter-v6-conversations", families: ["flutter"], description: "V6: CometChatConversations widget — Bloc, request builder, callbacks" },
|
|
153
|
-
{ name: "cometchat-flutter-v6-messages", families: ["flutter"], description: "V6: CometChatMessages — list / header / composer composition" },
|
|
154
|
-
{ name: "cometchat-flutter-v6-users-groups", families: ["flutter"], description: "V6: CometChatUsers / CometChatGroups / CometChatGroupMembers" },
|
|
155
|
-
{ name: "cometchat-flutter-v6-calls", families: ["flutter"], description: "V6: voice/video calling — incoming/outgoing/ongoing screens" },
|
|
156
|
-
{ name: "cometchat-flutter-v6-features", families: ["flutter"], description: "V6 feature catalog — calls, polls, reactions, AI, extensions" },
|
|
157
|
-
{ name: "cometchat-flutter-v6-placement", families: ["flutter"], description: "V6: route, modal sheet, embedded widget — where chat lives in the app" },
|
|
158
|
-
{ name: "cometchat-flutter-v6-theming", families: ["flutter"], description: "V6: CometChatThemeHelper, CometChatColorPalette, light/dark schemes" },
|
|
159
|
-
{ name: "cometchat-flutter-v6-customization", families: ["flutter"], description: "V6: bubble factories, message templates, text formatters, slot widgets" },
|
|
160
|
-
{ name: "cometchat-flutter-v6-events", families: ["flutter"], description: "V6: Bloc-based event streams + listener registration" },
|
|
161
|
-
{ name: "cometchat-flutter-v6-production", families: ["flutter"], description: "V6: server-minted auth tokens, user management, external-backend recipes" },
|
|
162
|
-
{ name: "cometchat-flutter-v6-troubleshooting", families: ["flutter"], description: "V6 troubleshooting: pubspec, Bloc, theme cache, build errors" },
|
|
163
|
-
{ name: "cometchat-flutter-v6-migration", families: ["flutter"], description: "V5→V6 migration recipes — GetX → Bloc, theme API rewrite, breaking changes" },
|
|
164
|
-
{ name: "cometchat-flutter-v6-testing", families: ["flutter"], description: "V6 testing (v4.1) — flutter_test + bloc_test, BlocProvider.value patterns, integration_test, calls init-order assertion" },
|
|
165
|
-
{ name: "cometchat-flutter-v6-push", families: ["flutter"], description: "V6 push (v4.1) — firebase_messaging FCM/APNs, background isolate handler with @pragma vm:entry-point, Bloc-driven foreground UI, deep-link to chat threads" },
|
|
166
|
-
|
|
167
|
-
// iOS — V5 stable (`CometChatUIKitSwift:^5`). No V6 beta yet; when
|
|
168
|
-
// it ships, add per-cohort namespacing as Android/Flutter do today.
|
|
169
|
-
{ name: "cometchat-ios", families: ["ios"], description: "iOS dispatcher — Swift project setup, dependency manager routing" },
|
|
170
|
-
{ name: "cometchat-ios-core", families: ["ios"], description: "iOS: SDK init, login, UIKit settings builder, SwiftUI/UIKit entry points" },
|
|
171
|
-
{ name: "cometchat-ios-components", families: ["ios"], description: "iOS component catalog — view controllers, SwiftUI views, request builders" },
|
|
172
|
-
{ name: "cometchat-ios-placement", families: ["ios"], description: "iOS: navigation controller, modal, tab, embedded — where chat lives" },
|
|
173
|
-
{ name: "cometchat-ios-theming", families: ["ios"], description: "iOS: CometChatTheme, color tokens, typography, dark mode" },
|
|
174
|
-
{ name: "cometchat-ios-features", families: ["ios"], description: "iOS feature catalog — calls, polls, reactions, AI, extensions" },
|
|
175
|
-
{ name: "cometchat-ios-customization", families: ["ios"], description: "iOS: custom views, message templates, text formatters, DataSource decorators" },
|
|
176
|
-
{ name: "cometchat-ios-production", families: ["ios"], description: "iOS: server-minted auth tokens, user management, external-backend recipes" },
|
|
177
|
-
{ name: "cometchat-ios-push", families: ["ios"], description: "iOS push: APNs + VoIP, CallKit, token lifecycle, deep-link" },
|
|
178
|
-
{ name: "cometchat-ios-troubleshooting", families: ["ios"], description: "iOS troubleshooting: SPM, CocoaPods, Xcode build errors, Info.plist, runtime crashes" },
|
|
179
|
-
{ name: "cometchat-ios-calls", families: ["ios"], description: "iOS calls (v4.1) — CometChatCallsSDK install, CallKit + PushKit VoIP, AVAudioSession routing, mixed SwiftUI/UIKit hosting" },
|
|
180
|
-
{ name: "cometchat-ios-testing", families: ["ios"], description: "iOS testing (v4.1) — XCTest + protocol-wrapped SDK mocks, async/await tests, SnapshotTesting, XCUITest, Xcode Cloud / GitHub Actions CI" },
|
|
181
|
-
];
|
|
182
|
-
|
|
183
|
-
// ── Base skills (cross-family) ────────────────────────────────────────────────
|
|
184
|
-
//
|
|
185
|
-
// Skills registered for ALL six families. These are the baseline a dispatcher
|
|
186
|
-
// needs to detect framework and route — they're installed in the default
|
|
187
|
-
// interactive flow, before any family is resolved. The dispatcher (read at
|
|
188
|
-
// runtime in the user's IDE) detects the framework and asks the agent to
|
|
189
|
-
// install the relevant family skills via:
|
|
190
|
-
//
|
|
191
|
-
// npx @cometchat/skills add --family <X> --ide <Y>
|
|
192
|
-
//
|
|
193
|
-
// (Logic already in `skills/cometchat/SKILL.md` Step 1 — "If `framework` is
|
|
194
|
-
// X AND `cometchat-{X}-core` is NOT loaded: <install command>".)
|
|
195
|
-
//
|
|
196
|
-
// This list grows automatically as more cross-family skills are registered
|
|
197
|
-
// (e.g. when the calls work merges, cometchat-calls/i18n/a11y join).
|
|
198
|
-
const ALL_FAMILIES_SET = ["web", "native", "flutter", "angular", "android", "ios"];
|
|
199
|
-
const BASE_SKILLS = SKILLS.filter(s =>
|
|
200
|
-
ALL_FAMILIES_SET.every(f => s.families.includes(f))
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
// ── Framework → family routing ────────────────────────────────────────────────
|
|
204
|
-
const FRAMEWORK_TO_FAMILY = {
|
|
205
|
-
reactjs: "web",
|
|
206
|
-
nextjs: "web",
|
|
207
|
-
"react-router": "web",
|
|
208
|
-
astro: "web",
|
|
209
|
-
expo: "native",
|
|
210
|
-
"react-native": "native",
|
|
211
|
-
flutter: "flutter",
|
|
212
|
-
angular: "angular",
|
|
213
|
-
android: "android",
|
|
214
|
-
ios: "ios",
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
const FAMILY_LABELS = {
|
|
218
|
-
web: "Web (React / Next.js / React Router / Astro)",
|
|
219
|
-
native: "React Native (Expo / bare RN)",
|
|
220
|
-
angular: "Angular (12-15)",
|
|
221
|
-
flutter: "Flutter (V5 stable + V6 beta)",
|
|
222
|
-
android: "Android native (V5 stable + V6 beta)",
|
|
223
|
-
ios: "iOS native (V5 stable)",
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
227
|
-
function ensureDir(dir) {
|
|
228
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// ── IDE target directories ────────────────────────────────────────────────────
|
|
232
|
-
//
|
|
233
|
-
// Three install modes:
|
|
234
|
-
//
|
|
235
|
-
// - "multi" → one SKILL.md per skill in a directory tree. Anthropic-spec
|
|
236
|
-
// native. Used by Claude Code, Replit Agent, Kiro.
|
|
237
|
-
//
|
|
238
|
-
// - "single" → all skills concatenated into one markdown file at a
|
|
239
|
-
// specific path. Used by GitHub Copilot Chat
|
|
240
|
-
// (.github/copilot-instructions.md), Cursor + Continue.dev
|
|
241
|
-
// (AGENTS.md at project root), Cline (.clinerules/cometchat.md),
|
|
242
|
-
// Aider (CONVENTIONS.md). The single file is markdown with
|
|
243
|
-
// `---` separators between skills — works with any agent that
|
|
244
|
-
// reads markdown context.
|
|
245
|
-
//
|
|
246
|
-
// - "cli-only" → no file written. The agent uses the `cometchat` CLI
|
|
247
|
-
// directly. For agents without a skill/rules format
|
|
248
|
-
// (Codex CLI, Gemini CLI, Aider when not using
|
|
249
|
-
// CONVENTIONS.md). Installer prints CLI usage hints.
|
|
250
|
-
//
|
|
251
|
-
// File-path notes:
|
|
252
|
-
// - Cursor's docs (cursor.com/docs/rules) say rules live at `.cursor/rules/`,
|
|
253
|
-
// NOT `.cursor/skills/`. AGENTS.md at project root is the simpler
|
|
254
|
-
// alternative Cursor also supports.
|
|
255
|
-
// - GitHub Copilot reads `.github/copilot-instructions.md` automatically.
|
|
256
|
-
// - Cline reads `.clinerules/*.md`.
|
|
257
|
-
// - Aider reads any markdown file passed via `--read CONVENTIONS.md` (or via
|
|
258
|
-
// `read: CONVENTIONS.md` in `.aider.conf.yml`).
|
|
259
|
-
const IDE_TARGETS = {
|
|
260
|
-
// Multi-file (Anthropic-spec compatible)
|
|
261
|
-
claude: { mode: "multi", local: ".claude/skills", global: path.join(os.homedir(), ".claude", "skills"), skillFile: "SKILL.md" },
|
|
262
|
-
kiro: { mode: "multi", local: ".kiro/skills", global: path.join(os.homedir(), ".kiro", "skills"), skillFile: "SKILL.md" },
|
|
263
|
-
// Replit Agent reads `.agents/skills/` per docs.replit.com/core-concepts/agent/skills.
|
|
264
|
-
replit: { mode: "multi", local: ".agents/skills", global: path.join(os.homedir(), ".config", "agents", "skills"), skillFile: "SKILL.md" },
|
|
265
|
-
|
|
266
|
-
// Single-file (concatenated markdown)
|
|
267
|
-
copilot: { mode: "single", local: ".github", global: null, fileName: "copilot-instructions.md" },
|
|
268
|
-
cursor: { mode: "single", local: ".", global: null, fileName: "AGENTS.md" },
|
|
269
|
-
continue: { mode: "single", local: ".", global: null, fileName: "AGENTS.md" },
|
|
270
|
-
cline: { mode: "single", local: ".clinerules", global: null, fileName: "cometchat.md" },
|
|
271
|
-
aider: { mode: "single", local: ".", global: null, fileName: "CONVENTIONS.md" },
|
|
272
|
-
|
|
273
|
-
// CLI-only (no skill/rules format on the agent side)
|
|
274
|
-
codex: { mode: "cli-only", local: null, global: null },
|
|
275
|
-
gemini: { mode: "cli-only", local: null, global: null },
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
// ── Framework detection (inline — no subprocess) ─────────────────────────────
|
|
279
|
-
//
|
|
280
|
-
// Reads package.json + signal files in cwd to determine which family this
|
|
281
|
-
// project belongs to. Returns the family string ("web", "native", "flutter",
|
|
282
|
-
// "angular", "android", "ios") or null if undetectable.
|
|
283
|
-
//
|
|
284
|
-
// We inline this rather than subprocess to @cometchat/skills-cli because:
|
|
285
|
-
// 1. Cold `npx -y` adds 5-15 s on first run — bad first impression
|
|
286
|
-
// 2. Avoids attack surface of auto-installing a separate package
|
|
287
|
-
// 3. The unified installer only needs family resolution, not the CLI's
|
|
288
|
-
// richer detection (router/bundler/env-prefix/SSR strategy etc.)
|
|
289
|
-
//
|
|
290
|
-
// Detection order matters — more specific first:
|
|
291
|
-
// 1. RN (expo / react-native dep) — must come before generic React
|
|
292
|
-
// 2. Next.js (next dep)
|
|
293
|
-
// 3. React Router (any of the v6/v7 deps)
|
|
294
|
-
// 4. Astro (deps OR astro.config.*)
|
|
295
|
-
// 5. Angular (@angular/core dep OR angular.json)
|
|
296
|
-
// 6. Generic React (react / react-dom dep) → web
|
|
297
|
-
// 7. Flutter (pubspec.yaml with `flutter:` key)
|
|
298
|
-
// 8. Android (build.gradle / settings.gradle)
|
|
299
|
-
// 9. iOS (*.xcodeproj, *.xcworkspace, Package.swift with .iOS, Podfile with platform :ios)
|
|
300
|
-
function detectFamily(cwd) {
|
|
301
|
-
const pkgPath = path.join(cwd, "package.json");
|
|
302
|
-
if (fs.existsSync(pkgPath)) {
|
|
303
|
-
try {
|
|
304
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
305
|
-
const deps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
|
|
306
|
-
if (deps["expo"] || deps["react-native"]) return "native";
|
|
307
|
-
if (deps["next"]) return "web";
|
|
308
|
-
if (deps["@react-router/dev"] || deps["react-router-dom"] || deps["react-router"]) return "web";
|
|
309
|
-
if (deps["astro"]) return "web";
|
|
310
|
-
if (deps["@angular/core"]) return "angular";
|
|
311
|
-
if (deps["react"] || deps["react-dom"]) return "web";
|
|
312
|
-
} catch { /* malformed package.json — fall through */ }
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// Astro config exists even before deps install
|
|
316
|
-
for (const ext of ["ts", "mjs", "js", "cjs"]) {
|
|
317
|
-
if (fs.existsSync(path.join(cwd, `astro.config.${ext}`))) return "web";
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// Flutter — pubspec.yaml with `flutter:` key
|
|
321
|
-
const pubspecPath = path.join(cwd, "pubspec.yaml");
|
|
322
|
-
if (fs.existsSync(pubspecPath)) {
|
|
323
|
-
try {
|
|
324
|
-
const pubspec = fs.readFileSync(pubspecPath, "utf-8");
|
|
325
|
-
if (/^flutter:/m.test(pubspec)) return "flutter";
|
|
326
|
-
} catch { /* fall through */ }
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Angular workspace
|
|
330
|
-
if (fs.existsSync(path.join(cwd, "angular.json"))) return "angular";
|
|
331
|
-
|
|
332
|
-
// Android (Gradle-based)
|
|
333
|
-
if (
|
|
334
|
-
fs.existsSync(path.join(cwd, "build.gradle")) ||
|
|
335
|
-
fs.existsSync(path.join(cwd, "build.gradle.kts")) ||
|
|
336
|
-
fs.existsSync(path.join(cwd, "settings.gradle"))
|
|
337
|
-
) {
|
|
338
|
-
return "android";
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
// iOS — Xcode project / workspace, or Package.swift with .iOS, or Podfile with `platform :ios`
|
|
342
|
-
try {
|
|
343
|
-
for (const f of fs.readdirSync(cwd)) {
|
|
344
|
-
if (f.endsWith(".xcodeproj") || f.endsWith(".xcworkspace")) return "ios";
|
|
345
|
-
}
|
|
346
|
-
} catch { /* unreadable cwd — fall through */ }
|
|
347
|
-
const podfilePath = path.join(cwd, "Podfile");
|
|
348
|
-
if (fs.existsSync(podfilePath)) {
|
|
349
|
-
try {
|
|
350
|
-
if (/platform\s+:ios/.test(fs.readFileSync(podfilePath, "utf-8"))) return "ios";
|
|
351
|
-
} catch { /* fall through */ }
|
|
352
|
-
}
|
|
353
|
-
const packageSwiftPath = path.join(cwd, "Package.swift");
|
|
354
|
-
if (fs.existsSync(packageSwiftPath)) {
|
|
355
|
-
try {
|
|
356
|
-
if (/\.iOS\s*\(/.test(fs.readFileSync(packageSwiftPath, "utf-8"))) return "ios";
|
|
357
|
-
} catch { /* fall through */ }
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
return null;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
function promptFamily() {
|
|
364
|
-
// Refuse to prompt in non-interactive environments — readline would block
|
|
365
|
-
// forever waiting for stdin that never comes (CI, Dockerfile, scripted
|
|
366
|
-
// installs). Tell the user how to recover.
|
|
367
|
-
if (!process.stdin.isTTY) {
|
|
368
|
-
console.error(c.red(`\n Cannot prompt for family in a non-interactive environment.`));
|
|
369
|
-
console.error(` Pass ${c.cyan("--family <name>")} explicitly. Valid:`);
|
|
370
|
-
console.error(` ${Object.keys(FAMILY_LABELS).join(", ")}, all\n`);
|
|
371
|
-
process.exit(1);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
const families = ["web", "native", "flutter", "angular", "android", "ios"];
|
|
375
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
376
|
-
console.log(`\n ${c.bold("Which framework does your project use?")}\n`);
|
|
377
|
-
families.forEach((f, i) => {
|
|
378
|
-
console.log(` ${c.cyan(String(i + 1))}. ${FAMILY_LABELS[f]}`);
|
|
379
|
-
});
|
|
380
|
-
return new Promise((resolve) => {
|
|
381
|
-
rl.question(`\n Enter 1-${families.length}: `, (answer) => {
|
|
382
|
-
rl.close();
|
|
383
|
-
const idx = parseInt(answer.trim(), 10) - 1;
|
|
384
|
-
if (Number.isNaN(idx) || idx < 0 || idx >= families.length) {
|
|
385
|
-
console.error(c.red(`\n Invalid choice: ${answer}\n`));
|
|
386
|
-
process.exit(1);
|
|
387
|
-
}
|
|
388
|
-
resolve(families[idx]);
|
|
389
|
-
});
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
// Returns an array of families. Most calls return a single-item array;
|
|
394
|
-
// repeated `--family` flags (`--family web --family native`) return multiple,
|
|
395
|
-
// useful for monorepos with both web + RN packages. `--family all` is a single
|
|
396
|
-
// item that means "every family" downstream.
|
|
397
|
-
async function resolveFamilies(args) {
|
|
398
|
-
// 1. Explicit --family flag(s) — repeatable
|
|
399
|
-
const explicit = [];
|
|
400
|
-
for (let i = 0; i < args.length; i++) {
|
|
401
|
-
if (args[i] === "--family" && args[i + 1]) {
|
|
402
|
-
const f = args[i + 1];
|
|
403
|
-
if (f === "all") { explicit.length = 0; explicit.push("all"); break; }
|
|
404
|
-
if (!Object.keys(FAMILY_LABELS).includes(f)) {
|
|
405
|
-
console.error(c.red(`\n Unknown family: ${f}. Valid: ${Object.keys(FAMILY_LABELS).join(", ")}, all\n`));
|
|
406
|
-
process.exit(1);
|
|
407
|
-
}
|
|
408
|
-
if (!explicit.includes(f)) explicit.push(f);
|
|
409
|
-
i++; // skip the value
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
if (explicit.length > 0) return explicit;
|
|
413
|
-
|
|
414
|
-
// 2. Auto-detect (inline, no subprocess)
|
|
415
|
-
process.stdout.write(c.dim("\n Detecting framework... "));
|
|
416
|
-
const family = detectFamily(process.cwd());
|
|
417
|
-
if (family) {
|
|
418
|
-
console.log(c.green(`✓ ${family} — ${FAMILY_LABELS[family]}`));
|
|
419
|
-
return [family];
|
|
420
|
-
}
|
|
421
|
-
console.log(c.dim("could not detect from project files"));
|
|
422
|
-
|
|
423
|
-
// 3. Prompt the user (with TTY guard)
|
|
424
|
-
return [await promptFamily()];
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
// ── Install one skill (per-IDE write) ─────────────────────────────────────────
|
|
428
|
-
function installSkill(skill, baseDir, skillFile) {
|
|
429
|
-
const src = path.join(SKILLS_SRC_DIR, skill.name, "SKILL.md");
|
|
430
|
-
if (!fs.existsSync(src)) {
|
|
431
|
-
return null;
|
|
432
|
-
}
|
|
433
|
-
const skillDir = path.join(baseDir, skill.name);
|
|
434
|
-
ensureDir(skillDir);
|
|
435
|
-
const dest = path.join(skillDir, skillFile);
|
|
436
|
-
fs.copyFileSync(src, dest);
|
|
437
|
-
|
|
438
|
-
// Copy supporting files (e.g. references/component-catalog.md)
|
|
439
|
-
// that live alongside SKILL.md in the skill's directory.
|
|
440
|
-
const refsDir = path.join(SKILLS_SRC_DIR, skill.name, "references");
|
|
441
|
-
if (fs.existsSync(refsDir)) {
|
|
442
|
-
const destRefs = path.join(skillDir, "references");
|
|
443
|
-
ensureDir(destRefs);
|
|
444
|
-
for (const file of fs.readdirSync(refsDir)) {
|
|
445
|
-
fs.copyFileSync(path.join(refsDir, file), path.join(destRefs, file));
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
return dest;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Generate a short orienting AGENTS.md / CONVENTIONS.md / etc. (~3-5 KB)
|
|
454
|
-
* that tells the agent how to drive the cometchat CLI for any task.
|
|
455
|
-
*
|
|
456
|
-
* Why short instead of full SKILL.md concatenation:
|
|
457
|
-
* - Cursor / Continue / Cline read these as ALWAYS-ON context. A 430 KB
|
|
458
|
-
* concatenation burns tokens on every turn. Bad UX, bad cost.
|
|
459
|
-
* - The CLI is the universal surface — `cometchat init`, `apply-feature`,
|
|
460
|
-
* `builder open/export`, etc. Agents reliably execute CLI commands.
|
|
461
|
-
* - Inline help (`cometchat <cmd> --help`) carries the per-command
|
|
462
|
-
* guidance lazily, only when the agent needs it.
|
|
463
|
-
*
|
|
464
|
-
* The full SKILL.md tree still ships when the user installs with --ide claude
|
|
465
|
-
* (or replit / kiro). For non-Anthropic agents, this short orientation is
|
|
466
|
-
* the right shape.
|
|
467
|
-
*/
|
|
468
|
-
function generateOrientingMd(skillsToInstall, families) {
|
|
469
|
-
const familyLabel = families.includes("all") ? "all platforms" : families.join(" + ");
|
|
470
|
-
const familyHint = families.length === 1 ? families[0] : "your project's framework";
|
|
471
|
-
|
|
472
|
-
let md = `# CometChat — AI Agent Instructions\n\n`;
|
|
473
|
-
md += `> Auto-generated by \`npx @cometchat/skills add\`. Do not hand-edit; rerun the installer to refresh.\n`;
|
|
474
|
-
md += `> Family: **${familyLabel}**. ${skillsToInstall.length} skills available.\n\n`;
|
|
475
|
-
|
|
476
|
-
md += `## When the user asks about CometChat\n\n`;
|
|
477
|
-
md += `If the user asks any of the following, run the matching CLI command — DO NOT improvise from training memory:\n\n`;
|
|
478
|
-
md += `| User says... | Run |\n|---|---|\n`;
|
|
479
|
-
md += `| "integrate cometchat" / "add chat" / "/cometchat" | \`cometchat init\` (or walk the user through \`detect\` → \`auth login\` → \`provision setup\` → \`apply\` → \`verify\`) |\n`;
|
|
480
|
-
md += `| "what's my framework" | \`cometchat detect --json\` |\n`;
|
|
481
|
-
md += `| "log me into CometChat" / "set up credentials" | \`cometchat auth login\` then \`cometchat provision setup --app-id <id> --framework <fw>\` |\n`;
|
|
482
|
-
md += `| "design chat visually" / "open the UI Kit Builder" | \`cometchat builder open --json\` (returns a deep URL into the dashboard's UI Kit Builder), then \`cometchat builder export --target . --json\` after the user designs |\n`;
|
|
483
|
-
md += `| "add polls" / "enable smart replies" / "turn on \\<feature\\>" | \`cometchat features list\` to find the feature id, then \`cometchat apply-feature <id>\` |\n`;
|
|
484
|
-
md += `| "match my brand" / "theme it like Slack" | \`cometchat apply-theme --preset slack\` (or \`--primary-color #...\`) |\n`;
|
|
485
|
-
md += `| "use real auth tokens, not the auth key" | \`cometchat production-auth\` |\n`;
|
|
486
|
-
md += `| "what went wrong" / "diagnose this" | \`cometchat doctor\` |\n`;
|
|
487
|
-
md += `| "what's installed already" | \`cometchat info\` or \`cometchat status\` |\n\n`;
|
|
488
|
-
|
|
489
|
-
md += `Run \`cometchat --help\` for the full command list. Each subcommand has \`--help\` with detailed usage.\n\n`;
|
|
490
|
-
|
|
491
|
-
md += `## How CometChat integration works (${familyHint})\n\n`;
|
|
492
|
-
md += `1. **Detect** the framework — \`cometchat detect --json\` returns framework, version, env-var prefix, and existing-integration state.\n`;
|
|
493
|
-
md += `2. **Authenticate** — the user logs into the CometChat dashboard via \`cometchat auth login\` (browser flow). Token is stored in OS keychain.\n`;
|
|
494
|
-
md += `3. **Provision** — \`cometchat provision setup --app-id <id> --framework <fw>\` writes credentials to the right env file (\`.env\` for Vite, \`.env.local\` for Next.js, \`local.properties\` for Android, \`Secrets.swift\` for iOS, etc.).\n`;
|
|
495
|
-
md += `4. **Apply** — \`cometchat apply --experience <N>\` writes the integration code (provider, components, placement). Idempotent.\n`;
|
|
496
|
-
md += `5. **Verify** — \`cometchat verify\` runs build + AST checks. \`cometchat doctor\` runs combined diagnostics.\n`;
|
|
497
|
-
md += `6. **Iterate** — features / theming / customization via the CLI commands above.\n\n`;
|
|
498
|
-
|
|
499
|
-
md += `## Hard rules (non-negotiable)\n\n`;
|
|
500
|
-
md += `- **Run \`cometchat detect\` BEFORE making framework assumptions.** The user's project might be React+Vite, Next.js App Router, React Router v7, Astro, Expo, bare RN, Angular 12-15, native Android (V5 stable + V6 beta), iOS V5, or Flutter (V5 stable + V6 beta) — each has different conventions.\n`;
|
|
501
|
-
md += `- **NEVER hardcode credentials.** Use \`cometchat provision setup\`, which writes the right env file with the right prefix. The Auth Key is for dev only — \`cometchat production-auth\` upgrades to server-minted tokens.\n`;
|
|
502
|
-
md += `- **NEVER hand-roll a custom search UI** — the UI Kit ships \`<CometChatSearch>\` (and \`showSearchBar\` on \`<CometChatConversations>\`). Hand-rolling silently breaks pagination + result highlighting.\n`;
|
|
503
|
-
md += `- **NEVER \`Skill()\`-style auto-load skills.** This file is your orientation; for deeper detail, run the CLI command for the specific task. The CLI's \`--help\` text is the source of truth.\n`;
|
|
504
|
-
md += `- **Component names + props** — for an unfamiliar component, run \`cometchat features info <name>\` or query the CometChat docs MCP if available. Don't invent from training data; the UI Kit's API surface has changed across versions.\n\n`;
|
|
505
|
-
|
|
506
|
-
md += `## When you need richer guidance\n\n`;
|
|
507
|
-
md += `Each \`cometchat <cmd> --help\` covers usage for that command. For deeper skill content (placement patterns, customization four-tier model, troubleshooting symptom-table, framework-specific gotchas) — install the multi-file skill set:\n\n`;
|
|
508
|
-
md += "```bash\n";
|
|
509
|
-
md += `npx @cometchat/skills add --family ${families[0] || "web"} --ide claude\n`;
|
|
510
|
-
md += "```\n\n";
|
|
511
|
-
md += `That writes ${skillsToInstall.length} per-skill markdown files to \`.claude/skills/cometchat-*/SKILL.md\`. Cursor / Continue / Cline can read those too — open the files directly when needed (\`@.claude/skills/cometchat-core/SKILL.md\` in Cursor, etc.).\n`;
|
|
512
|
-
|
|
513
|
-
return md;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Write a single orienting file (AGENTS.md / CONVENTIONS.md / etc.) at
|
|
518
|
-
* <baseDir>/<fileName>. Used for non-Anthropic-spec agents that read one
|
|
519
|
-
* always-on context file instead of a per-skill directory tree.
|
|
520
|
-
*
|
|
521
|
-
* The orienting file is short (~3-5 KB) and points the agent at the CLI as
|
|
522
|
-
* the universal surface. The full per-skill SKILL.md tree is opt-in via
|
|
523
|
-
* `--ide claude` (or replit / kiro) for agents that want the rich content.
|
|
524
|
-
*/
|
|
525
|
-
function installSingleFileSkills(skillsToInstall, baseDir, fileName, families) {
|
|
526
|
-
ensureDir(baseDir);
|
|
527
|
-
const dest = path.join(baseDir, fileName);
|
|
528
|
-
fs.writeFileSync(dest, generateOrientingMd(skillsToInstall, families), "utf8");
|
|
529
|
-
return dest;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* For agents without a skill/rules format (Codex CLI, Gemini CLI), no file
|
|
534
|
-
* is written. The installer just prints CLI usage hints — the agent runs
|
|
535
|
-
* shell commands directly.
|
|
536
|
-
*/
|
|
537
|
-
function printCliOnlyHints(ide, skillsToInstall) {
|
|
538
|
-
console.log(c.dim(`\n ${ide} has no skill/rules format. The cometchat CLI is the integration surface.`));
|
|
539
|
-
console.log(c.dim(` Available commands (run any from the project root):\n`));
|
|
540
|
-
console.log(` ${c.cyan("cometchat detect")} Identify framework`);
|
|
541
|
-
console.log(` ${c.cyan("cometchat auth login")} Authenticate to CometChat`);
|
|
542
|
-
console.log(` ${c.cyan("cometchat provision setup")} Wire credentials into .env`);
|
|
543
|
-
console.log(` ${c.cyan("cometchat init")} Apply the integration`);
|
|
544
|
-
console.log(` ${c.cyan("cometchat builder open")} Visual UI Kit Builder (deep URL)`);
|
|
545
|
-
console.log(` ${c.cyan("cometchat builder export")} Export visual builder output to project`);
|
|
546
|
-
console.log(` ${c.cyan("cometchat apply-feature <id>")} Toggle a feature (polls / smart-replies / etc.)`);
|
|
547
|
-
console.log(` ${c.cyan("cometchat doctor")} Diagnose drift / missing config`);
|
|
548
|
-
console.log(c.dim(`\n ${skillsToInstall.length} skills available — none copied (no compatible format).\n`));
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
// ── Multi-agent picker via vercel-labs/skills ────────────────────────────────
|
|
552
|
-
//
|
|
553
|
-
// Spawns `npx -y skills@<pin> add cometchat/cometchat-skills -s <names>`
|
|
554
|
-
// so the interactive multi-agent picker (Claude Code / Cursor / Codex /
|
|
555
|
-
// Cline / Kiro / Replit / 50+ agents) shows. The user picks which agents
|
|
556
|
-
// to write to; the skills CLI handles the per-agent path conventions.
|
|
557
|
-
//
|
|
558
|
-
// We pre-resolve the relevant skill list (BASE_SKILLS by default, full
|
|
559
|
-
// family if --family is set) and pass the names via `-s name1 name2 ...`
|
|
560
|
-
// so the user only sees skills relevant to their integration — not all
|
|
561
|
-
// 100+ in the marketplace.
|
|
562
|
-
//
|
|
563
|
-
// Pin: `skills@1.5.5` was the version verified against this codebase.
|
|
564
|
-
// Bump on intentional re-verification; pre-pin avoids breakage from a
|
|
565
|
-
// future major bump in the upstream CLI.
|
|
566
|
-
const SKILLS_CLI_PIN = "skills@1.5.5";
|
|
567
|
-
const SKILLS_REPO = "cometchat/cometchat-skills";
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Read package.json + signal files to build a one-line "Detected" string
|
|
571
|
-
* we show the user before spawning the picker. Strictly cosmetic — the
|
|
572
|
-
* actual install doesn't depend on this.
|
|
573
|
-
*
|
|
574
|
-
* Returns something like:
|
|
575
|
-
* "Vite + React 19 + TypeScript (web family)"
|
|
576
|
-
* "Next.js 14 + TypeScript (web family)"
|
|
577
|
-
* "Expo 49 + React Native 0.72 (native family)"
|
|
578
|
-
* "no framework detected — base skills install fine without one"
|
|
579
|
-
*/
|
|
580
|
-
function describeProjectContext(cwd) {
|
|
581
|
-
const pkg = (() => {
|
|
582
|
-
try { return JSON.parse(fs.readFileSync(path.join(cwd, "package.json"), "utf-8")); }
|
|
583
|
-
catch { return null; }
|
|
584
|
-
})();
|
|
585
|
-
|
|
586
|
-
const family = detectFamily(cwd);
|
|
587
|
-
const familyLabel = family ? FAMILY_LABELS[family] : null;
|
|
588
|
-
if (!pkg) {
|
|
589
|
-
return family
|
|
590
|
-
? { line: `${familyLabel} project`, family }
|
|
591
|
-
: { line: "no framework detected — base skills install fine without one", family: null };
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
const deps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
|
|
595
|
-
const hasTS = !!(deps.typescript || pkg.types || pkg.typings);
|
|
596
|
-
const reactV = deps.react ? deps.react.replace(/^[~^]/, "").split(".")[0] : null;
|
|
597
|
-
const parts = [];
|
|
598
|
-
|
|
599
|
-
if (deps.next) parts.push(`Next.js ${deps.next.replace(/^[~^]/, "").split(".")[0]}`);
|
|
600
|
-
else if (deps.vite || deps["@vitejs/plugin-react"]) parts.push(`Vite${reactV ? ` + React ${reactV}` : ""}`);
|
|
601
|
-
else if (deps.astro) parts.push(`Astro`);
|
|
602
|
-
else if (deps.expo) parts.push(`Expo ${deps.expo.replace(/^[~^]/, "").split(".")[0]}${deps["react-native"] ? ` + React Native ${deps["react-native"].replace(/^[~^]/, "").split(".")[0]}` : ""}`);
|
|
603
|
-
else if (deps["react-native"]) parts.push(`React Native ${deps["react-native"].replace(/^[~^]/, "").split(".")[0]}`);
|
|
604
|
-
else if (deps["@angular/core"]) parts.push(`Angular ${deps["@angular/core"].replace(/^[~^]/, "").split(".")[0]}`);
|
|
605
|
-
else if (deps.react) parts.push(`React ${reactV}`);
|
|
606
|
-
else if (familyLabel) parts.push(familyLabel);
|
|
607
|
-
|
|
608
|
-
if (hasTS && !parts.some(p => p.includes("TypeScript"))) parts.push("TypeScript");
|
|
609
|
-
|
|
610
|
-
const line = parts.length
|
|
611
|
-
? `${parts.join(" + ")}${family ? ` (${family} family)` : ""}`
|
|
612
|
-
: familyLabel || "unknown framework — base install still works";
|
|
613
|
-
|
|
614
|
-
return { line, family };
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
async function delegateToSkillsCli({ skills, families, isGlobal }) {
|
|
618
|
-
const skillNames = skills.map(s => s.name);
|
|
619
|
-
const isBaseInstall = families.length === 1 && families[0] === "base";
|
|
620
|
-
const cwd = process.cwd();
|
|
621
|
-
const ctx = describeProjectContext(cwd);
|
|
622
|
-
const projectPath = cwd.replace(os.homedir(), "~");
|
|
623
|
-
|
|
624
|
-
// Pre-spawn: brand + project context + framing of what's about to happen
|
|
625
|
-
const installLabel = isBaseInstall
|
|
626
|
-
? `base install ${c.dim("· dispatcher routes the rest at runtime")}`
|
|
627
|
-
: `${families.includes("all") ? "all" : families.join("+")} family ${c.dim(`· ${skillNames.length} skills`)}`;
|
|
628
|
-
|
|
629
|
-
console.log(``);
|
|
630
|
-
console.log(` ${c.bold(c.cyan("CometChat Skills"))} ${c.dim("·")} ${installLabel}`);
|
|
631
|
-
console.log(``);
|
|
632
|
-
console.log(` ${c.dim("Project")} ${projectPath}`);
|
|
633
|
-
console.log(` ${c.dim("Detected")} ${ctx.line}`);
|
|
634
|
-
console.log(``);
|
|
635
|
-
if (isBaseInstall) {
|
|
636
|
-
console.log(` ${c.gray(`We're about to install ${skillNames.length} cross-family skills (${skillNames.map(s => s.replace(/^cometchat-?/, "") || "router").filter(Boolean).join(", ")})`)}`);
|
|
637
|
-
console.log(` ${c.gray(`to whichever AI agents you pick. Once installed, run /cometchat in your IDE`)}`);
|
|
638
|
-
console.log(` ${c.gray(`— the dispatcher detects your framework and writes the integration.`)}`);
|
|
639
|
-
} else {
|
|
640
|
-
console.log(` ${c.gray(`Installing ${skillNames.length} ${families.join("+")} skills via the multi-agent picker.`)}`);
|
|
641
|
-
}
|
|
642
|
-
console.log(``);
|
|
643
|
-
console.log(` ${c.gray("Launching the multi-agent picker...")}`);
|
|
644
|
-
console.log(``);
|
|
645
|
-
|
|
646
|
-
const npxArgs = [
|
|
647
|
-
"-y", // auto-accept the npx install prompt for the skills CLI itself
|
|
648
|
-
SKILLS_CLI_PIN,
|
|
649
|
-
"add",
|
|
650
|
-
SKILLS_REPO,
|
|
651
|
-
"-s", ...skillNames, // space-separated skill names (skills CLI's flag shape)
|
|
652
|
-
];
|
|
653
|
-
if (isGlobal) npxArgs.push("-g");
|
|
654
|
-
|
|
655
|
-
// F42 (2026-05-22) + F79 (2026-05-28): on Windows, `npx` is `npx.cmd` /
|
|
656
|
-
// `npx.ps1` and Node's spawn can't resolve the shim cleanly. The original
|
|
657
|
-
// F42 fix used `shell: true`, but that still fails in some Windows envs
|
|
658
|
-
// (nested npx, PowerShell execution-policy restrictions) with
|
|
659
|
-
// `spawn npx ENOENT` — reported by a customer on 2026-05-28.
|
|
660
|
-
//
|
|
661
|
-
// F79: on Windows, resolve npm's bundled `npx-cli.js` next to the running
|
|
662
|
-
// Node binary and invoke it directly via `process.execPath`. This bypasses
|
|
663
|
-
// the .cmd/.ps1 shim entirely. Falls back to the F42 `shell: true` path if
|
|
664
|
-
// npx-cli.js can't be located (pnpm / yarn / custom Node installs without
|
|
665
|
-
// a bundled npm). macOS/Linux keep the plain `spawn("npx")` path unchanged.
|
|
666
|
-
const isWindows = process.platform === "win32";
|
|
667
|
-
|
|
668
|
-
let spawnCmd = "npx";
|
|
669
|
-
let spawnArgs = npxArgs;
|
|
670
|
-
let spawnOpts = { stdio: "inherit" };
|
|
671
|
-
|
|
672
|
-
if (isWindows) {
|
|
673
|
-
// npm ships npx-cli.js at <node-dir>/node_modules/npm/bin/npx-cli.js
|
|
674
|
-
const nodeDir = path.dirname(process.execPath);
|
|
675
|
-
const npxCli = path.join(nodeDir, "node_modules", "npm", "bin", "npx-cli.js");
|
|
676
|
-
if (fs.existsSync(npxCli)) {
|
|
677
|
-
spawnCmd = process.execPath; // the current node binary
|
|
678
|
-
spawnArgs = [npxCli, ...npxArgs];
|
|
679
|
-
spawnOpts = { stdio: "inherit" }; // no shell needed — direct node invocation
|
|
680
|
-
} else {
|
|
681
|
-
// Fallback: F42 path (shim via shell). Covers pnpm/yarn/custom installs.
|
|
682
|
-
spawnOpts = { stdio: "inherit", shell: true };
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
return new Promise((resolve) => {
|
|
687
|
-
const child = spawn(spawnCmd, spawnArgs, spawnOpts);
|
|
688
|
-
child.on("close", (code) => {
|
|
689
|
-
if (code === 0) {
|
|
690
|
-
// Post-spawn success: celebrate + concrete next steps
|
|
691
|
-
printPostInstallNextSteps({ isBaseInstall, ctx, projectPath });
|
|
692
|
-
}
|
|
693
|
-
resolve(code ?? 1);
|
|
694
|
-
});
|
|
695
|
-
child.on("error", (err) => {
|
|
696
|
-
console.error(c.red(`\n ✗ Failed to spawn skills CLI: ${err.message}`));
|
|
697
|
-
console.error(c.dim(` Falling back to legacy direct-write — re-run with --ide <name> to bypass the picker.\n`));
|
|
698
|
-
resolve(2);
|
|
699
|
-
});
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
function printPostInstallNextSteps({ isBaseInstall, ctx, projectPath }) {
|
|
704
|
-
console.log(``);
|
|
705
|
-
console.log(` ${c.green("✓")} ${c.bold(isBaseInstall ? "Base skills installed." : "Skills installed.")}`);
|
|
706
|
-
console.log(``);
|
|
707
|
-
console.log(` ${c.bold("Next:")} open ${c.cyan(projectPath)} in any agent you picked, then in the chat panel:`);
|
|
708
|
-
console.log(``);
|
|
709
|
-
console.log(` ${c.cyan("/cometchat add chat to my app")}`);
|
|
710
|
-
console.log(``);
|
|
711
|
-
if (isBaseInstall) {
|
|
712
|
-
const detected = ctx.family ? ctx.line.replace(/ \(.*\)$/, "") : "your framework";
|
|
713
|
-
console.log(` ${c.gray(`The dispatcher detects ${detected}, walks you through CometChat signup,`)}`);
|
|
714
|
-
console.log(` ${c.gray(`and writes the integration code based on your project (~30 seconds).`)}`);
|
|
715
|
-
} else {
|
|
716
|
-
console.log(` ${c.gray("All skills are loaded; the dispatcher walks you through the rest.")}`);
|
|
717
|
-
}
|
|
718
|
-
console.log(``);
|
|
719
|
-
console.log(` ${c.dim("Docs:")} ${c.cyan("https://www.cometchat.com/docs/skills")}`);
|
|
720
|
-
console.log(``);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
function printHelp() {
|
|
724
|
-
console.log(`
|
|
725
|
-
${c.bold("@cometchat/skills")} — Install CometChat AI coding skills
|
|
726
|
-
|
|
727
|
-
${c.bold("Usage:")}
|
|
728
|
-
${c.cyan("npx @cometchat/skills add")} Base install + interactive multi-agent picker
|
|
729
|
-
${c.cyan("npx @cometchat/skills add --family <name>")} Install full family upfront (no runtime expansion)
|
|
730
|
-
${c.cyan("npx @cometchat/skills add --ide <name>")} Direct-write base skills to one IDE (CI/scripted)
|
|
731
|
-
|
|
732
|
-
${c.bold("Two install shapes:")}
|
|
733
|
-
${c.bold("Base install")} (default — no --family flag): writes only the cross-family
|
|
734
|
-
skills (the cometchat dispatcher + cross-family helpers). Once installed,
|
|
735
|
-
open your project in your IDE and run /cometchat — the dispatcher detects
|
|
736
|
-
your framework and asks the agent to install the family-specific skills
|
|
737
|
-
via \`npx @cometchat/skills add --family <X> --ide <Y>\`. Smallest initial
|
|
738
|
-
install, dispatcher routes the rest. Recommended for most users.
|
|
739
|
-
${c.bold("Full family install")} (--family flag): writes the dispatcher + every
|
|
740
|
-
skill registered for that family (web=13, android=31, flutter=28, etc.)
|
|
741
|
-
upfront. Use when you know the project's framework and prefer all skills
|
|
742
|
-
present immediately. Used by power users + CI smoke tests.
|
|
743
|
-
|
|
744
|
-
${c.bold("Family values:")}
|
|
745
|
-
${c.cyan("web")} React / Next.js / React Router / Astro
|
|
746
|
-
${c.cyan("native")} Expo / bare React Native
|
|
747
|
-
${c.cyan("angular")} Angular (12-15)
|
|
748
|
-
${c.cyan("android")} Android native (V5 stable + V6 beta)
|
|
749
|
-
${c.cyan("flutter")} Flutter (V5 stable + V6 beta)
|
|
750
|
-
${c.cyan("ios")} iOS native (V5 stable)
|
|
751
|
-
${c.cyan("all")} Install every skill (legacy v3 behavior)
|
|
752
|
-
|
|
753
|
-
${c.bold("IDE selection (direct-write mode only — default: claude):")}
|
|
754
|
-
${c.cyan("--ide claude")} Multi-file SKILL.md at .claude/skills/ (default)
|
|
755
|
-
${c.cyan("--ide cursor")} Single AGENTS.md at project root
|
|
756
|
-
${c.cyan("--ide copilot")} Single .github/copilot-instructions.md
|
|
757
|
-
${c.cyan("--ide cline")} Single .clinerules/cometchat.md
|
|
758
|
-
${c.cyan("--ide continue")} Single AGENTS.md at project root
|
|
759
|
-
${c.cyan("--ide aider")} Single CONVENTIONS.md at project root
|
|
760
|
-
${c.cyan("--ide kiro")} Multi-file SKILL.md at .kiro/skills/
|
|
761
|
-
${c.cyan("--ide replit")} Multi-file SKILL.md at .agents/skills/
|
|
762
|
-
${c.cyan("--ide codex")} No skill format — print CLI hints
|
|
763
|
-
${c.cyan("--ide gemini")} No skill format — print CLI hints
|
|
764
|
-
${c.cyan("--ide all")} Install for every IDE
|
|
765
|
-
|
|
766
|
-
${c.bold("Multi-family / monorepo:")}
|
|
767
|
-
${c.cyan("--family web --family native")} Install BOTH families (repeat flag)
|
|
768
|
-
|
|
769
|
-
${c.bold("Other:")}
|
|
770
|
-
${c.cyan("--global")} Install globally (~/.claude/skills/, etc.)
|
|
771
|
-
${c.cyan("--clean")} Wipe existing cometchat-* skill dirs before install (direct-write mode only)
|
|
772
|
-
${c.cyan("--list")} Show every skill with its family tags
|
|
773
|
-
${c.cyan("--no-picker")} Force direct-write even in interactive TTY (useful for testing the legacy path)
|
|
774
|
-
|
|
775
|
-
${c.bold("After installing, open your project in your IDE and run:")}
|
|
776
|
-
${c.cyan("/cometchat")}
|
|
777
|
-
`);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
// ── Main ──────────────────────────────────────────────────────────────────────
|
|
781
|
-
async function main() {
|
|
782
|
-
const args = process.argv.slice(2);
|
|
783
|
-
const cmd = args[0];
|
|
784
|
-
|
|
785
|
-
if (!cmd || cmd === "--help" || cmd === "-h") {
|
|
786
|
-
printHelp();
|
|
787
|
-
process.exit(0);
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
if (cmd !== "add") {
|
|
791
|
-
console.error(c.red(`\n Unknown command: ${cmd}`));
|
|
792
|
-
printHelp();
|
|
793
|
-
process.exit(1);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
const isGlobal = args.includes("--global") || args.includes("-g");
|
|
797
|
-
const listOnly = args.includes("--list") || args.includes("-l");
|
|
798
|
-
const isClean = args.includes("--clean");
|
|
799
|
-
const ideIdx = args.indexOf("--ide");
|
|
800
|
-
const ideArg = ideIdx !== -1 ? args[ideIdx + 1] : "claude";
|
|
801
|
-
|
|
802
|
-
if (listOnly) {
|
|
803
|
-
console.log(`\n ${c.bold("Available skills:")}\n`);
|
|
804
|
-
for (const s of SKILLS) {
|
|
805
|
-
console.log(` ${c.cyan(s.name)} ${c.dim(`[${s.families.join(", ")}]`)}`);
|
|
806
|
-
console.log(` ${c.dim(s.description)}\n`);
|
|
807
|
-
}
|
|
808
|
-
process.exit(0);
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
// ── Install mode selection ─────────────────────────────────────────────
|
|
812
|
-
//
|
|
813
|
-
// Three valid invocation shapes:
|
|
814
|
-
//
|
|
815
|
-
// 1. `npx @cometchat/skills add` (TTY, no --family, no --ide)
|
|
816
|
-
// → BASE INSTALL: install only cross-family skills (cometchat
|
|
817
|
-
// dispatcher + cometchat-calls + i18n + a11y) via the multi-agent
|
|
818
|
-
// picker. The dispatcher detects the framework AT RUNTIME inside
|
|
819
|
-
// the user's IDE and asks the agent to install family-specific
|
|
820
|
-
// skills via `npx @cometchat/skills add --family <X> --ide <Y>`.
|
|
821
|
-
// Smallest initial install; routing is the dispatcher's job.
|
|
822
|
-
//
|
|
823
|
-
// 2. `npx @cometchat/skills add --family <X>` (TTY)
|
|
824
|
-
// → FAMILY INSTALL: install the dispatcher + every skill registered
|
|
825
|
-
// for family X (web=13, android=31, etc.) via the picker. Use this
|
|
826
|
-
// when you know upfront which family you want and prefer all
|
|
827
|
-
// skills present immediately.
|
|
828
|
-
//
|
|
829
|
-
// 3. `npx @cometchat/skills add --ide <Y>` (or non-TTY, e.g. CI)
|
|
830
|
-
// → DIRECT WRITE: skips the picker and writes directly to one IDE's
|
|
831
|
-
// directory. With --family, writes the family subset; without, falls
|
|
832
|
-
// back to BASE skills (CI smoke). Used by Dockerfiles and the
|
|
833
|
-
// legacy single-agent flow.
|
|
834
|
-
const ideExplicit = ideIdx !== -1;
|
|
835
|
-
const familyExplicit = args.includes("--family");
|
|
836
|
-
const isTTY = process.stdin.isTTY && process.stdout.isTTY;
|
|
837
|
-
const skipPicker = ideExplicit || !isTTY || args.includes("--no-picker");
|
|
838
|
-
|
|
839
|
-
// Resolve skill set based on mode:
|
|
840
|
-
// - --family X → install the dispatcher + every skill registered for X
|
|
841
|
-
// (legacy power-user / CI flow; everything present immediately)
|
|
842
|
-
// - No --family (with or without --ide) → BASE install only. The
|
|
843
|
-
// dispatcher handles family-specific install at runtime via its own
|
|
844
|
-
// `npx @cometchat/skills add --family <X>` invocation logic.
|
|
845
|
-
let skillsToInstall;
|
|
846
|
-
let families;
|
|
847
|
-
if (familyExplicit) {
|
|
848
|
-
families = await resolveFamilies(args);
|
|
849
|
-
if (families.includes("all")) {
|
|
850
|
-
skillsToInstall = SKILLS;
|
|
851
|
-
} else {
|
|
852
|
-
const seen = new Set();
|
|
853
|
-
skillsToInstall = [];
|
|
854
|
-
for (const fam of families) {
|
|
855
|
-
for (const s of SKILLS) {
|
|
856
|
-
if (s.families.includes(fam) && !seen.has(s.name)) {
|
|
857
|
-
seen.add(s.name);
|
|
858
|
-
skillsToInstall.push(s);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
// If no pattern skills matched (only the dispatcher), all selected
|
|
865
|
-
// families are "coming soon" — bail with a friendly message rather than
|
|
866
|
-
// installing a half-broken set.
|
|
867
|
-
const patternSkills = skillsToInstall.filter(s => s.name !== "cometchat");
|
|
868
|
-
if (patternSkills.length === 0) {
|
|
869
|
-
const labels = families.map(f => FAMILY_LABELS[f] || f).join(", ");
|
|
870
|
-
console.log(c.yellow(`\n ⚠ Pattern skills for ${labels} aren't published yet.`));
|
|
871
|
-
console.log(` Supported families today: ${c.cyan("web")}, ${c.cyan("native")}, ${c.cyan("angular")}, ${c.cyan("android")}, ${c.cyan("flutter")}, ${c.cyan("ios")}.`);
|
|
872
|
-
console.log(` Run with one of those, or wait for ${families.join(" + ")} skills to ship.\n`);
|
|
873
|
-
process.exit(1);
|
|
874
|
-
}
|
|
875
|
-
} else {
|
|
876
|
-
// Default: base install only (whether interactive or with --ide).
|
|
877
|
-
// The dispatcher detects the framework at runtime and installs the
|
|
878
|
-
// family-specific skills via its own runtime npx invocation. The
|
|
879
|
-
// user-facing intro is printed by delegateToSkillsCli (interactive
|
|
880
|
-
// flow) or the direct-write loop below (CI flow) — no duplicate
|
|
881
|
-
// banner here.
|
|
882
|
-
skillsToInstall = BASE_SKILLS;
|
|
883
|
-
families = ["base"];
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
if (!skipPicker) {
|
|
887
|
-
const exitCode = await delegateToSkillsCli({
|
|
888
|
-
skills: skillsToInstall,
|
|
889
|
-
families,
|
|
890
|
-
isGlobal,
|
|
891
|
-
});
|
|
892
|
-
process.exit(exitCode);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
const targets = ideArg === "all" ? Object.keys(IDE_TARGETS) : [ideArg];
|
|
896
|
-
|
|
897
|
-
for (const ide of targets) {
|
|
898
|
-
const target = IDE_TARGETS[ide];
|
|
899
|
-
if (!target) {
|
|
900
|
-
console.error(c.red(`\n Unknown IDE: ${ide}. Valid: ${Object.keys(IDE_TARGETS).join(", ")}, all`));
|
|
901
|
-
process.exit(1);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
// CLI-only mode: no file write. Just print CLI usage hints.
|
|
905
|
-
if (target.mode === "cli-only") {
|
|
906
|
-
const familyLabel = families.includes("all") ? "all" : families.join("+");
|
|
907
|
-
console.log(`\n ${c.bold(c.cyan("CometChat Skills"))} — ${ide} — ${c.bold(familyLabel)} family\n`);
|
|
908
|
-
printCliOnlyHints(ide, skillsToInstall);
|
|
909
|
-
continue;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
if (isGlobal && !target.global) {
|
|
913
|
-
console.log(`\n ${c.yellow("⚠")} ${ide} does not support global install — skipping.`);
|
|
914
|
-
continue;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
const baseDir = isGlobal ? target.global : path.join(process.cwd(), target.local);
|
|
918
|
-
const scopeLabel = isGlobal
|
|
919
|
-
? `global ${c.gray(`(${target.global}/`)}`
|
|
920
|
-
: `local ${c.gray(`(${target.local}/)`)}`;
|
|
921
|
-
|
|
922
|
-
const familyLabel = families.includes("all") ? "all" : families.join("+");
|
|
923
|
-
console.log(`\n ${c.bold(c.cyan("CometChat Skills"))} — ${ide} — ${c.bold(familyLabel)} family\n`);
|
|
924
|
-
console.log(` Scope: ${scopeLabel}\n`);
|
|
925
|
-
|
|
926
|
-
// ENG-35720: warn if cometchat-* skills already exist at a DIFFERENT IDE target.
|
|
927
|
-
// Reading skills from two paths (e.g. `.agents/skills/` + `.kiro/skills/`) works
|
|
928
|
-
// for agents that scan both (Kiro), but is fragile and confusing. Surface the
|
|
929
|
-
// mismatch so the integrator can clean up the older path.
|
|
930
|
-
if (!isGlobal) {
|
|
931
|
-
const conflictingPaths = Object.entries(IDE_TARGETS)
|
|
932
|
-
.filter(([otherIde, otherTarget]) =>
|
|
933
|
-
otherIde !== ide &&
|
|
934
|
-
otherTarget.mode === "multi" &&
|
|
935
|
-
otherTarget.local !== target.local
|
|
936
|
-
)
|
|
937
|
-
.map(([otherIde, otherTarget]) => ({ ide: otherIde, path: path.join(process.cwd(), otherTarget.local) }))
|
|
938
|
-
.filter(({ path: p }) => {
|
|
939
|
-
try {
|
|
940
|
-
if (!fs.existsSync(p)) return false;
|
|
941
|
-
return fs.readdirSync(p).some(d => d.startsWith("cometchat-"));
|
|
942
|
-
} catch { return false; }
|
|
943
|
-
});
|
|
944
|
-
if (conflictingPaths.length > 0) {
|
|
945
|
-
console.log(` ${c.yellow("⚠")} Existing CometChat skills found at:`);
|
|
946
|
-
for (const { ide: oIde, path: p } of conflictingPaths) {
|
|
947
|
-
console.log(` ${c.dim("•")} ${p}/ (from --ide ${oIde})`);
|
|
948
|
-
}
|
|
949
|
-
console.log(` ${c.dim("Multi-path skill installs work for IDEs that scan all locations (e.g. Kiro), but are fragile.")}\n ${c.dim("Consider removing the older path or staying on a single --ide flag across re-runs.\n")}`);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
ensureDir(baseDir);
|
|
954
|
-
|
|
955
|
-
// --clean: wipe existing cometchat-* skill dirs in baseDir before install.
|
|
956
|
-
// Avoids stale skills accumulating across multiple --family runs in the
|
|
957
|
-
// same project. Only touches the cometchat-* skill dirs in multi-mode;
|
|
958
|
-
// single-mode rewrites the whole file.
|
|
959
|
-
if (isClean && target.mode === "multi" && fs.existsSync(baseDir)) {
|
|
960
|
-
let wiped = 0;
|
|
961
|
-
for (const entry of fs.readdirSync(baseDir)) {
|
|
962
|
-
if (entry === "cometchat" || entry.startsWith("cometchat-")) {
|
|
963
|
-
fs.rmSync(path.join(baseDir, entry), { recursive: true, force: true });
|
|
964
|
-
wiped++;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
if (wiped > 0) console.log(c.dim(` ✓ cleaned ${wiped} existing cometchat-* skill ${wiped === 1 ? "dir" : "dirs"}\n`));
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
if (target.mode === "single") {
|
|
971
|
-
const spinner = ora ? ora({ text: target.fileName, prefixText: " " }).start() : null;
|
|
972
|
-
try {
|
|
973
|
-
installSingleFileSkills(skillsToInstall, baseDir, target.fileName, families);
|
|
974
|
-
if (spinner) spinner.succeed(c.green("✓ ") + c.bold(target.fileName) + ` ${c.dim(`(${skillsToInstall.length} skills concatenated)`)}`);
|
|
975
|
-
else console.log(` ✓ ${target.fileName} (${skillsToInstall.length} skills)`);
|
|
976
|
-
} catch (err) {
|
|
977
|
-
if (spinner) spinner.fail(c.red(`✗ ${target.fileName}: ${err.message}`));
|
|
978
|
-
else console.error(` ✗ ${target.fileName}: ${err.message}`);
|
|
979
|
-
}
|
|
980
|
-
} else {
|
|
981
|
-
// multi mode: one SKILL.md per skill
|
|
982
|
-
for (const skill of skillsToInstall) {
|
|
983
|
-
const spinner = ora ? ora({ text: skill.name, prefixText: " " }).start() : null;
|
|
984
|
-
try {
|
|
985
|
-
installSkill(skill, baseDir, target.skillFile);
|
|
986
|
-
if (spinner) spinner.succeed(c.green("✓ ") + c.bold(skill.name) + ` ${c.dim(skill.description)}`);
|
|
987
|
-
else console.log(` ✓ ${skill.name}`);
|
|
988
|
-
} catch (err) {
|
|
989
|
-
if (spinner) spinner.fail(c.red(`✗ ${skill.name}: ${err.message}`));
|
|
990
|
-
else console.error(` ✗ ${skill.name}: ${err.message}`);
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
console.log(`\n ${c.bold("Done.")} Open your project in your IDE and run:\n`);
|
|
997
|
-
console.log(` ${c.cyan("/cometchat")}\n`);
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
main().catch((err) => {
|
|
1001
|
-
console.error(chalk ? chalk.red(`\n Error: ${err.message}`) : `\n Error: ${err.message}`);
|
|
1002
|
-
process.exit(1);
|
|
1003
|
-
});
|