@cometchat/skills 4.4.2 → 5.0.1
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 +44 -0
- package/LICENSE +21 -0
- package/MIGRATING.md +187 -0
- package/README.md +52 -156
- package/RULES.md +125 -0
- package/bin/cometchat-skills.mjs +1280 -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 +156 -74
- package/peers.yaml +355 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +94 -0
- package/registry/android-v6.json +177 -0
- package/registry/angular-v5.json +154 -0
- package/registry/flutter-calls-v5.json +94 -0
- package/registry/flutter-v6.json +159 -0
- package/registry/ios-calls-v5.json +99 -0
- package/registry/ios-v5.json +152 -0
- package/registry/rn-calls-v5.json +99 -0
- package/registry/rn-v5.json +169 -0
- package/registry/sdk-android-v5.json +93 -0
- package/registry/sdk-jsv4.json +93 -0
- package/registry/web-calls-v5.json +94 -0
- package/registry/web-v7.json +154 -0
- package/skills/cometchat/SKILL.md +47 -2096
- package/skills/cometchat-a11y/SKILL.md +44 -472
- package/skills/cometchat-analytics/SKILL.md +61 -0
- 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 +41 -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 +102 -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-audit/SKILL.md +61 -0
- package/skills/cometchat-compliance/SKILL.md +63 -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 +132 -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 +59 -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-i18n/SKILL.md +35 -404
- 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 +182 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +113 -0
- package/skills/cometchat-ios-core/references/docs-map.md +124 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +219 -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-production/SKILL.md +67 -723
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-testing/SKILL.md +36 -355
- package/skills/cometchat-ios-troubleshooting/SKILL.md +31 -989
- 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-migrate-from-getstream/SKILL.md +65 -0
- package/skills/cometchat-migrate-from-getstream/references/concept-map.md +98 -0
- package/skills/cometchat-migrate-from-getstream/references/data-migration.md +74 -0
- package/skills/cometchat-migrate-from-getstream/references/feature-map.md +108 -0
- package/skills/cometchat-migrate-from-getstream/references/inventory.md +82 -0
- package/skills/cometchat-migrate-from-getstream/references/native-build.md +9 -0
- package/skills/cometchat-migrate-from-getstream/references/report-template.md +59 -0
- package/skills/cometchat-migrate-from-sendbird/SKILL.md +64 -0
- package/skills/cometchat-migrate-from-sendbird/references/concept-map.md +99 -0
- package/skills/cometchat-migrate-from-sendbird/references/data-migration.md +74 -0
- package/skills/cometchat-migrate-from-sendbird/references/feature-map.md +104 -0
- package/skills/cometchat-migrate-from-sendbird/references/inventory.md +86 -0
- package/skills/cometchat-migrate-from-sendbird/references/native-build.md +10 -0
- package/skills/cometchat-migrate-from-sendbird/references/report-template.md +59 -0
- package/skills/cometchat-migrate-from-twilio/SKILL.md +52 -0
- package/skills/cometchat-migrate-from-twilio/references/concept-map.md +49 -0
- package/skills/cometchat-migrate-from-twilio/references/data-migration.md +50 -0
- package/skills/cometchat-migrate-from-twilio/references/feature-map.md +27 -0
- package/skills/cometchat-migrate-from-twilio/references/inventory.md +53 -0
- package/skills/cometchat-migrate-from-twilio/references/report-template.md +52 -0
- package/skills/cometchat-moderation/SKILL.md +58 -0
- package/skills/cometchat-onboarding/SKILL.md +92 -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 +105 -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 +335 -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 +127 -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 +79 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +133 -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 +174 -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/layout.md +150 -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-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-production/SKILL.md +84 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/skills/cometchat-react-v7-testing/SKILL.md +60 -0
- package/skills/cometchat-react-v7-troubleshooting/SKILL.md +47 -0
- package/skills/cometchat-security/SKILL.md +80 -0
- package/skills/cometchat-self-host/SKILL.md +56 -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 +932 -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 +134 -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-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-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-theming/SKILL.md +0 -667
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* verify-family-agnostic.mjs — the machine guard for RULES.md §22.
|
|
4
|
+
*
|
|
5
|
+
* The pack's tools are documented as "family-agnostic — copy them; a new family adds only
|
|
6
|
+
* its typecheck/<family>/ + a --discover needle". Nothing enforced that claim, and eleven
|
|
7
|
+
* separate tools drifted into hardcoding `web-v7` (AUDIT-091/087/088/090/091). Three of them
|
|
8
|
+
* reported green while checking nothing.
|
|
9
|
+
*
|
|
10
|
+
* This fails the build when a family key appears as a literal in a tool that does not resolve
|
|
11
|
+
* it from families.json. Allowed: a default read from families.json's own `default`, and the
|
|
12
|
+
* families.json file itself.
|
|
13
|
+
*/
|
|
14
|
+
import { readFileSync, existsSync, readdirSync } from "node:fs";
|
|
15
|
+
import { join, dirname, relative } from "node:path";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
|
|
18
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "../..");
|
|
19
|
+
const FAMILIES = join(ROOT, ".claude/skills/cometchat-skill-reviewer/tools/families.json");
|
|
20
|
+
if (!existsSync(FAMILIES)) { console.log("❌ families.json missing — cannot verify"); process.exit(2); }
|
|
21
|
+
|
|
22
|
+
const fams = JSON.parse(readFileSync(FAMILIES, "utf8")).families;
|
|
23
|
+
// Both the family keys and the registry/catalog basenames they imply are family identifiers.
|
|
24
|
+
const KEYS = [...new Set(Object.entries(fams).flatMap(([k, v]) =>
|
|
25
|
+
[k, (v.catalog || "").replace(/^catalog\//, "").replace(/\.json$/, "")].filter(Boolean)))];
|
|
26
|
+
|
|
27
|
+
const TOOLS = [
|
|
28
|
+
...readdirSync(join(ROOT, "test-suite/scripts")).filter((f) => f.endsWith(".mjs")).map((f) => `test-suite/scripts/${f}`),
|
|
29
|
+
...(existsSync(join(ROOT, "bin")) ? readdirSync(join(ROOT, "bin")).filter((f) => f.endsWith(".mjs")).map((f) => `bin/${f}`) : []),
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const SELF = "verify-family-agnostic.mjs";
|
|
33
|
+
const violations = [];
|
|
34
|
+
for (const rel of TOOLS) {
|
|
35
|
+
if (rel.endsWith(SELF)) continue;
|
|
36
|
+
const src = readFileSync(join(ROOT, rel), "utf8");
|
|
37
|
+
const readsFamilies = src.includes("families.json");
|
|
38
|
+
src.split("\n").forEach((line, i) => {
|
|
39
|
+
if (/^\s*(\/\/|\*|\/\*)/.test(line)) return; // comments may name families freely
|
|
40
|
+
for (const k of KEYS) {
|
|
41
|
+
if (!new RegExp(`["'\`]${k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}["'\`]`).test(line)) continue;
|
|
42
|
+
// a default sourced from families.json is legitimate
|
|
43
|
+
if (readsFamilies && /families?\.default|DEFAULT_FAMILY/.test(line)) continue;
|
|
44
|
+
violations.push({ rel, line: i + 1, key: k, text: line.trim().slice(0, 96), readsFamilies });
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ── §22b: PLATFORM-NEUTRAL surfaces must not name one family ────────────────
|
|
50
|
+
// The key-literal scan above passed while bin/ hardcoded "React v7 UI Kit" as the
|
|
51
|
+
// AGENTS.md title and the entry router sent every request to `cometchat-react-v7-*`
|
|
52
|
+
// — neither is a family KEY, so neither was seen. A React Native project got a
|
|
53
|
+
// router claiming it was React web, and the agent stopped trusting it (AUDIT-101).
|
|
54
|
+
// These files are read by EVERY family, so a family-specific literal is a defect.
|
|
55
|
+
const NEUTRAL = [
|
|
56
|
+
...(existsSync(join(ROOT, "bin")) ? readdirSync(join(ROOT, "bin")).filter((f) => f.endsWith(".mjs")).map((f) => `bin/${f}`) : []),
|
|
57
|
+
"RULES.md",
|
|
58
|
+
// The router, the gate, and the competitor-migration skills (peers.yaml `migrations:`) are all
|
|
59
|
+
// installed for every family — each is a platform-neutral surface.
|
|
60
|
+
...["cometchat", "cometchat-onboarding",
|
|
61
|
+
...(existsSync(join(ROOT, "skills")) ? readdirSync(join(ROOT, "skills")).filter((d) => /^cometchat-migrate-from-[a-z0-9]+$/.test(d)) : []),
|
|
62
|
+
].flatMap((d) => {
|
|
63
|
+
const dir = join(ROOT, "skills", d);
|
|
64
|
+
if (!existsSync(dir)) return [];
|
|
65
|
+
const out = [`skills/${d}/SKILL.md`];
|
|
66
|
+
const refs = join(dir, "references");
|
|
67
|
+
if (existsSync(refs)) out.push(...readdirSync(refs).filter((f) => f.endsWith(".md")).map((f) => `skills/${d}/references/${f}`));
|
|
68
|
+
return out.filter((f) => existsSync(join(ROOT, f)));
|
|
69
|
+
}),
|
|
70
|
+
];
|
|
71
|
+
// Family identifiers that are NOT keys: the skill-dir prefix and the kit package.
|
|
72
|
+
const peersYaml = existsSync(join(ROOT, "peers.yaml")) ? readFileSync(join(ROOT, "peers.yaml"), "utf8") : "";
|
|
73
|
+
const MARKS = [...new Set([
|
|
74
|
+
...[...peersYaml.matchAll(/dir_prefix:\s*"([^"]+)"/g)].map((m) => m[1]),
|
|
75
|
+
...[...peersYaml.matchAll(/kit_package:\s*"([^"]+)"/g)].map((m) => m[1]),
|
|
76
|
+
])].filter(Boolean);
|
|
77
|
+
const FAMILY_NAMES = [...new Set([...peersYaml.matchAll(/dir_prefix:\s*"cometchat-([^"]+?)-?"/g)].map((m) => m[1]))].filter(Boolean);
|
|
78
|
+
|
|
79
|
+
// §22c: a reference that is PER-PLATFORM BY DESIGN may DECLARE itself.
|
|
80
|
+
// `skills/cometchat-onboarding/references/platforms.md` is a per-platform table/list whose whole
|
|
81
|
+
// job is one entry per shipped family — `lint-skills.mjs` GATE R (gateSharedSkillsCoverShippedFamilies)
|
|
82
|
+
// FAILS it when a shipped family has no column. So the two gates contradict on that file: one demands
|
|
83
|
+
// per-family content, the other forbids naming a single family. The escape is a DECLARED marker the
|
|
84
|
+
// file itself carries — never a filename hardcoded here — so the exemption is auditable, is printed
|
|
85
|
+
// on every run, and cannot be silently inherited by the next reference dropped into `references/`.
|
|
86
|
+
// It is not a blanket pass: a declaring file must name TWO OR MORE families overall, otherwise the
|
|
87
|
+
// marker is being used to smuggle a single-family document onto a platform-neutral surface.
|
|
88
|
+
const PER_PLATFORM_MARKER = /^\s*<!--\s*family-agnostic:\s*per-platform-by-design\b/m;
|
|
89
|
+
const declaredExempt = [];
|
|
90
|
+
|
|
91
|
+
for (const rel of NEUTRAL) {
|
|
92
|
+
const src = readFileSync(join(ROOT, rel), "utf8");
|
|
93
|
+
if (PER_PLATFORM_MARKER.test(src)) {
|
|
94
|
+
const namedInFile = FAMILY_NAMES.filter((f) => src.includes(f));
|
|
95
|
+
if (namedInFile.length >= 2) { declaredExempt.push({ rel, families: namedInFile.length }); continue; }
|
|
96
|
+
violations.push({
|
|
97
|
+
rel, line: src.split("\n").findIndex((l) => PER_PLATFORM_MARKER.test(l)) + 1,
|
|
98
|
+
key: "per-platform-by-design", readsFamilies: true, neutral: true,
|
|
99
|
+
text: `declares the per-platform exemption but names ${namedInFile.length} family/families — the marker is for MULTI-family references only`,
|
|
100
|
+
});
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
src.split("\n").forEach((line, i) => {
|
|
104
|
+
if (/^\s*(\/\/|\*|\/\*|>)/.test(line)) return; // comments/quotes may name families
|
|
105
|
+
if (/<family>/.test(line)) return; // already parameterised
|
|
106
|
+
// Naming ONE family in a neutral file is the defect. A line that names TWO or more is
|
|
107
|
+
// an explicit per-family branch ("react-v7: X; react-native: Y") — that is how a neutral
|
|
108
|
+
// file legitimately documents a divergence, so allow it.
|
|
109
|
+
const named = FAMILY_NAMES.filter((f) => line.includes(f));
|
|
110
|
+
if (named.length >= 2) return;
|
|
111
|
+
for (const mark of MARKS) {
|
|
112
|
+
if (!line.includes(mark)) continue;
|
|
113
|
+
violations.push({ rel, line: i + 1, key: mark, text: line.trim().slice(0, 96), readsFamilies: true, neutral: true });
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Declared exemptions PRINT on every run (pass or fail) so they cannot rot into silence.
|
|
119
|
+
for (const e of declaredExempt) {
|
|
120
|
+
console.log(`ℹ️ per-platform-by-design (declared): ${e.rel} — exempt from the neutral scan; names ${e.families} families. GATE R (lint-skills) enforces its per-family coverage.`);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (!violations.length) {
|
|
124
|
+
console.log(`✅ family-agnostic: ${TOOLS.length} tool(s) scanned; no hardcoded family keys; ${NEUTRAL.length - declaredExempt.length} platform-neutral file(s) clean; ${declaredExempt.length} declared per-platform reference(s).`);
|
|
125
|
+
process.exit(0);
|
|
126
|
+
}
|
|
127
|
+
console.log(`❌ family-agnostic: ${violations.length} hardcoded family key(s) — RULES.md §22.`);
|
|
128
|
+
console.log(" Every family-scoped path must come from families.json; a literal here means the");
|
|
129
|
+
console.log(" tool silently skips (or mis-attributes) every other family.\n");
|
|
130
|
+
for (const v of violations) {
|
|
131
|
+
console.log(` ${v.rel}:${v.line} "${v.key}"${v.readsFamilies ? "" : " (does not read families.json at all)"}`);
|
|
132
|
+
console.log(` ${v.text}`);
|
|
133
|
+
}
|
|
134
|
+
process.exit(1);
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* verify-golden-path.mjs — compile a skill's RECIPE as a real Angular component.
|
|
4
|
+
*
|
|
5
|
+
* The gap this closes: `verify:fences` type-checks ts fences in isolation, and
|
|
6
|
+
* `verify:templates` checks that a template's selectors/bindings EXIST. Neither ever
|
|
7
|
+
* type-checks an html fence's bindings AGAINST the ts fence that backs it. So a recipe
|
|
8
|
+
* could declare `selectedUser: CometChat.User | null` and bind it to the kit's
|
|
9
|
+
* `user?: CometChat.User`, and every gate stayed green while the recipe failed
|
|
10
|
+
* `ng build` with 8× TS2322 in any stock Angular app (strictTemplates is on by default).
|
|
11
|
+
* That shipped in the always-loaded core golden path — the first thing a new user runs.
|
|
12
|
+
*
|
|
13
|
+
* It pairs a `templateUrl:`-bearing ts fence with the html fence that follows it (plus an
|
|
14
|
+
* optional css fence), writes them as a component into the review app, and runs the real
|
|
15
|
+
* Angular compiler over the whole app.
|
|
16
|
+
*
|
|
17
|
+
* Usage: node test-suite/scripts/verify-golden-path.mjs [--family angular-v5] [--json]
|
|
18
|
+
* Exit: 0 clean (or skipped — app absent) · 1 a recipe does not compile · 2 bad usage.
|
|
19
|
+
*/
|
|
20
|
+
import { readFileSync, existsSync, mkdirSync, rmSync, writeFileSync, readdirSync } from "node:fs";
|
|
21
|
+
import { join, dirname } from "node:path";
|
|
22
|
+
import { fileURLToPath } from "node:url";
|
|
23
|
+
import { spawnSync } from "node:child_process";
|
|
24
|
+
|
|
25
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
26
|
+
|
|
27
|
+
// RULES.md §22 — every family-scoped path comes from families.json; a literal family key
|
|
28
|
+
// here means the tool silently skips (or mis-attributes) every other family.
|
|
29
|
+
const FAMILIES = JSON.parse(readFileSync(
|
|
30
|
+
join(ROOT, ".claude/skills/cometchat-skill-reviewer/tools/families.json"), "utf8")).families;
|
|
31
|
+
// families.json is keyed by review key (web-angular-v5); tools take the catalog key
|
|
32
|
+
// (angular-v5). Resolve either, so --family angular-v5 and --family web-angular-v5 both work.
|
|
33
|
+
function resolveFamily(key) {
|
|
34
|
+
const byCatalog = Object.values(FAMILIES).find(
|
|
35
|
+
(f) => (f.catalog || "").replace(/^catalog\//, "").replace(/\.json$/, "") === key);
|
|
36
|
+
return FAMILIES[key] || byCatalog || null;
|
|
37
|
+
}
|
|
38
|
+
const arg = (n, d) => { const i = process.argv.indexOf(n); return i >= 0 ? process.argv[i + 1] : d; };
|
|
39
|
+
const JSON_OUT = process.argv.includes("--json");
|
|
40
|
+
// RULES.md §22: no literal family key, not even as a default — the caller names the family
|
|
41
|
+
const FAMILY = arg("--family");
|
|
42
|
+
if (!FAMILY) { console.error("--family is required (see families.json)"); process.exit(2); }
|
|
43
|
+
|
|
44
|
+
const _f = resolveFamily(FAMILY);
|
|
45
|
+
if (!_f) { console.error(`unknown --family: ${FAMILY} (known: ${Object.keys(FAMILIES).join(", ")})`); process.exit(2); }
|
|
46
|
+
if (!_f.appDir || !_f.skillDirPattern) {
|
|
47
|
+
console.log(`⏭ verify-golden-path [${FAMILY}]: family declares no appDir/skillDirPattern — skipped`);
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
const FAM = { app: _f.appDir, skillDir: new RegExp(_f.skillDirPattern) };
|
|
51
|
+
|
|
52
|
+
const app = join(ROOT, FAM.app);
|
|
53
|
+
if (!existsSync(join(app, "node_modules", "@cometchat"))) {
|
|
54
|
+
console.log(`⏭ verify-golden-path [${FAMILY}]: review app not provisioned — skipped (not a failure)`);
|
|
55
|
+
process.exit(0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Collect (ts, html, css?) recipe triples from every skill markdown.
|
|
59
|
+
function recipes() {
|
|
60
|
+
const out = [];
|
|
61
|
+
const skills = join(ROOT, "skills");
|
|
62
|
+
const walk = (d, skill) => {
|
|
63
|
+
for (const e of readdirSync(d, { withFileTypes: true })) {
|
|
64
|
+
const p = join(d, e.name);
|
|
65
|
+
if (e.isDirectory()) { walk(p, skill); continue; }
|
|
66
|
+
if (!e.name.endsWith(".md")) continue;
|
|
67
|
+
const txt = readFileSync(p, "utf8");
|
|
68
|
+
// Fences in document order, so an html fence can be matched to the ts fence above it.
|
|
69
|
+
const fences = [...txt.matchAll(/```(ts|html|css)\n([\s\S]*?)```/g)]
|
|
70
|
+
.map((m) => ({ lang: m[1], body: m[2] }));
|
|
71
|
+
for (let i = 0; i < fences.length; i++) {
|
|
72
|
+
if (fences[i].lang !== "ts" || !/templateUrl:/.test(fences[i].body)) continue;
|
|
73
|
+
const html = fences.slice(i + 1).find((f) => f.lang === "html");
|
|
74
|
+
if (!html) continue;
|
|
75
|
+
const css = fences.slice(i + 1).find((f) => f.lang === "css");
|
|
76
|
+
out.push({ file: `${skill}/${e.name}`, ts: fences[i].body, html: html.body, css: css ? css.body : "" });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
for (const d of readdirSync(join(skills), { withFileTypes: true })) {
|
|
81
|
+
if (d.isDirectory() && FAM.skillDir.test(d.name)) walk(join(skills, d.name), d.name);
|
|
82
|
+
}
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const found = recipes();
|
|
87
|
+
const stage = join(app, "src", "app", "__goldenpath__");
|
|
88
|
+
rmSync(stage, { recursive: true, force: true });
|
|
89
|
+
mkdirSync(stage, { recursive: true });
|
|
90
|
+
|
|
91
|
+
const written = [];
|
|
92
|
+
found.forEach((r, n) => {
|
|
93
|
+
const dir = join(stage, `r${n}`);
|
|
94
|
+
mkdirSync(dir, { recursive: true });
|
|
95
|
+
// Point the component at the files we write beside it, whatever the recipe named them.
|
|
96
|
+
const ts = r.ts
|
|
97
|
+
.replace(/templateUrl:\s*'[^']*'/, "templateUrl: './tpl.html'")
|
|
98
|
+
.replace(/styleUrls?:\s*\[[^\]]*\]/, "styleUrl: './tpl.css'")
|
|
99
|
+
.replace(/styleUrl:\s*'[^']*'/, "styleUrl: './tpl.css'");
|
|
100
|
+
writeFileSync(join(dir, "cmp.ts"), ts);
|
|
101
|
+
writeFileSync(join(dir, "tpl.html"), r.html);
|
|
102
|
+
writeFileSync(join(dir, "tpl.css"), r.css);
|
|
103
|
+
written.push({ index: n, file: r.file });
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const res = spawnSync("npx", ["ng", "build", "--configuration", "development"], { cwd: app, encoding: "utf8" });
|
|
107
|
+
const out = (res.stdout || "") + (res.stderr || "");
|
|
108
|
+
rmSync(stage, { recursive: true, force: true });
|
|
109
|
+
|
|
110
|
+
// Attribute each error block back to the recipe whose staged dir it names.
|
|
111
|
+
const lines = out.split("\n");
|
|
112
|
+
const isHead = (l) => /error TS\d+/.test(l) || /\[ERROR\]/.test(l);
|
|
113
|
+
const blocks = [];
|
|
114
|
+
for (let i = 0; i < lines.length; i++) {
|
|
115
|
+
if (!isHead(lines[i])) continue;
|
|
116
|
+
const parts = [lines[i].trim()];
|
|
117
|
+
for (let j = i + 1; j < lines.length && !isHead(lines[j]); j++) {
|
|
118
|
+
if (!lines[j].trim()) { if (j + 1 < lines.length && /^\s+\S/.test(lines[j + 1])) continue; break; }
|
|
119
|
+
if (!/^\s+\S/.test(lines[j])) break;
|
|
120
|
+
parts.push(lines[j].trim());
|
|
121
|
+
}
|
|
122
|
+
blocks.push(parts.join(" "));
|
|
123
|
+
}
|
|
124
|
+
const mine = blocks.filter((b) => b.includes("__goldenpath__"));
|
|
125
|
+
const attributed = mine.map((b) => {
|
|
126
|
+
const m = b.match(/__goldenpath__\/r(\d+)\//);
|
|
127
|
+
const rec = m ? written.find((w) => w.index === Number(m[1])) : null;
|
|
128
|
+
return { recipe: rec ? rec.file : "(unknown)", error: b.slice(0, 240) };
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
if (JSON_OUT) { console.log(JSON.stringify({ ok: !attributed.length, recipes: written.length, errors: attributed }, null, 0)); process.exit(attributed.length ? 1 : 0); }
|
|
132
|
+
if (!attributed.length) {
|
|
133
|
+
console.log(`✅ verify-golden-path [${FAMILY}]: ${written.length} recipe(s) compile as real components (template bindings type-checked against their own class).`);
|
|
134
|
+
process.exit(0);
|
|
135
|
+
}
|
|
136
|
+
console.log(`❌ verify-golden-path [${FAMILY}]: ${attributed.length} error(s) — a documented recipe does not compile:`);
|
|
137
|
+
for (const a of attributed) console.log(` [${a.recipe}] ${a.error}`);
|
|
138
|
+
process.exit(1);
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* verify-oracle-components.mjs — features.<family>.json `ui_components` must list only
|
|
4
|
+
* components a HOST imports and writes in a template.
|
|
5
|
+
*
|
|
6
|
+
* `ui_components` drives the reviewer's G1 `mustUseComponents`, so a KIT-INTERNAL child
|
|
7
|
+
* (a *-item inside its list, a singular *-bubble inside cometchat-message-bubble, a
|
|
8
|
+
* keyboard/dialog inside the composer) makes the gate demand an import a CORRECT emit
|
|
9
|
+
* must not have. That shipped in six features and cost a review tick each time.
|
|
10
|
+
*
|
|
11
|
+
* A component is kit-internal when BOTH hold:
|
|
12
|
+
* 1. some OTHER kit component lists it in its own standalone `imports: []`, and
|
|
13
|
+
* 2. no skill RECIPE writes its selector (catalog.md is excluded — that file is the
|
|
14
|
+
* complete EXISTENCE list, not a list of things a host emits).
|
|
15
|
+
* Condition 2 is what keeps host-facing components that merely happen to be reused
|
|
16
|
+
* inside another kit component (cometchat-message-list inside cometchat-ai-assistant-chat)
|
|
17
|
+
* from being flagged.
|
|
18
|
+
*
|
|
19
|
+
* Usage: node test-suite/scripts/verify-oracle-components.mjs [--family angular-v5] [--json]
|
|
20
|
+
* Exit: 0 clean · 1 kit-internal entries found · 2 bad invocation (kit not installed).
|
|
21
|
+
*/
|
|
22
|
+
import { readFileSync, existsSync, readdirSync, statSync } from "node:fs";
|
|
23
|
+
import { join, dirname } from "node:path";
|
|
24
|
+
import { fileURLToPath } from "node:url";
|
|
25
|
+
|
|
26
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
27
|
+
|
|
28
|
+
// RULES.md §22 — every family-scoped path comes from families.json; a literal family key
|
|
29
|
+
// here means the tool silently skips (or mis-attributes) every other family.
|
|
30
|
+
const FAMILIES = JSON.parse(readFileSync(
|
|
31
|
+
join(ROOT, ".claude/skills/cometchat-skill-reviewer/tools/families.json"), "utf8")).families;
|
|
32
|
+
// families.json is keyed by review key (web-angular-v5); tools take the catalog key
|
|
33
|
+
// (angular-v5). Resolve either, so --family angular-v5 and --family web-angular-v5 both work.
|
|
34
|
+
function resolveFamily(key) {
|
|
35
|
+
const byCatalog = Object.values(FAMILIES).find(
|
|
36
|
+
(f) => (f.catalog || "").replace(/^catalog\//, "").replace(/\.json$/, "") === key);
|
|
37
|
+
return FAMILIES[key] || byCatalog || null;
|
|
38
|
+
}
|
|
39
|
+
const arg = (n, d) => { const i = process.argv.indexOf(n); return i >= 0 ? process.argv[i + 1] : d; };
|
|
40
|
+
const JSON_OUT = process.argv.includes("--json");
|
|
41
|
+
// RULES.md §22: no literal family key, not even as a default — the caller names the family
|
|
42
|
+
const FAMILY = arg("--family");
|
|
43
|
+
if (!FAMILY) { console.error("--family is required (see families.json)"); process.exit(2); }
|
|
44
|
+
|
|
45
|
+
const _f = resolveFamily(FAMILY);
|
|
46
|
+
if (!_f) { console.error(`unknown --family: ${FAMILY}`); process.exit(2); }
|
|
47
|
+
const _kitDir = (_f.catalog_build?.dirs || []).find((d) => /chat-uikit-/.test(d));
|
|
48
|
+
if (!_kitDir || !_f.features || !_f.skillDirPattern) {
|
|
49
|
+
console.log(`⏭ verify-oracle-components [${FAMILY}]: family declares no kit dir / features / skillDirPattern — skipped`);
|
|
50
|
+
process.exit(0);
|
|
51
|
+
}
|
|
52
|
+
const FAM = {
|
|
53
|
+
features: _f.features,
|
|
54
|
+
bundle: `${_kitDir}/fesm2022/${_f.kitPackage.replace(/^@/, "").replace("/", "-")}.mjs`,
|
|
55
|
+
skillGlob: new RegExp(_f.skillDirPattern),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const bundlePath = join(ROOT, FAM.bundle);
|
|
59
|
+
if (!existsSync(bundlePath)) {
|
|
60
|
+
// The review app is git-ignored, so this gate is a no-op in a clean checkout rather
|
|
61
|
+
// than a false failure. It runs wherever the kit is installed (locally, and in CI once
|
|
62
|
+
// the app is provisioned).
|
|
63
|
+
console.log(`⏭ verify-oracle-components [${FAMILY}]: kit bundle not installed — skipped (not a failure)`);
|
|
64
|
+
process.exit(0);
|
|
65
|
+
}
|
|
66
|
+
const bundle = readFileSync(bundlePath, "utf8");
|
|
67
|
+
|
|
68
|
+
const selectorOf = (c) =>
|
|
69
|
+
(bundle.match(new RegExp(`type: ${c}, isStandalone: true, selector: "([a-z-]+)"`)) || [])[1] || null;
|
|
70
|
+
|
|
71
|
+
function kitParents(c) {
|
|
72
|
+
const own = selectorOf(c);
|
|
73
|
+
const re = /args: \[\{ selector: .([a-z-]+)., standalone: true, [^]{0,700}?imports: \[([^\]]*)\]/g;
|
|
74
|
+
const out = new Set();
|
|
75
|
+
let m;
|
|
76
|
+
while ((m = re.exec(bundle))) {
|
|
77
|
+
if (m[1] !== own && new RegExp(`\\b${c}\\b`).test(m[2])) out.add(m[1]);
|
|
78
|
+
}
|
|
79
|
+
return [...out];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Every selector written in a skill RECIPE (catalog.md excluded).
|
|
83
|
+
function recipeSelectors() {
|
|
84
|
+
const found = new Set();
|
|
85
|
+
const skills = join(ROOT, "skills");
|
|
86
|
+
const walk = (d) => {
|
|
87
|
+
for (const e of readdirSync(d, { withFileTypes: true })) {
|
|
88
|
+
const p = join(d, e.name);
|
|
89
|
+
if (e.isDirectory()) { walk(p); continue; }
|
|
90
|
+
if (!e.name.endsWith(".md") || e.name === "catalog.md") continue;
|
|
91
|
+
// Only selectors inside a CODE FENCE count as "a recipe emits this". A prose
|
|
92
|
+
// enumeration ("**Search** `<cometchat-search>` · `<cometchat-search-bar>` · …") is a
|
|
93
|
+
// listing, like catalog.md, and counting it let three kit-internal search components
|
|
94
|
+
// pass this gate — a false negative that then cost a review tick at G1.
|
|
95
|
+
const txt = readFileSync(p, "utf8");
|
|
96
|
+
for (const f of txt.matchAll(/```(?:html|ts|tsx|typescript)\n([\s\S]*?)```/g)) {
|
|
97
|
+
for (const m of f[1].matchAll(/<(cometchat-[a-z-]+)\b/g)) found.add(m[1]);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
for (const d of readdirSync(skills, { withFileTypes: true })) {
|
|
102
|
+
if (d.isDirectory() && FAM.skillGlob.test(d.name)) walk(join(skills, d.name));
|
|
103
|
+
}
|
|
104
|
+
return found;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const recipes = recipeSelectors();
|
|
108
|
+
const features = JSON.parse(readFileSync(join(ROOT, FAM.features), "utf8")).features || [];
|
|
109
|
+
const offenders = [];
|
|
110
|
+
for (const f of features) {
|
|
111
|
+
// `auto_rendered_ui: true` already tells compile-expect to demand NOTHING (the kit
|
|
112
|
+
// renders it all), so listing the bubbles there is harmless documentation of what the
|
|
113
|
+
// kit draws. The defect only bites when the entries are actually demanded.
|
|
114
|
+
if (f.auto_rendered_ui) continue;
|
|
115
|
+
for (const c of f.ui_components || []) {
|
|
116
|
+
const sel = selectorOf(c);
|
|
117
|
+
if (!sel) continue; // not a component (a formatter class etc.)
|
|
118
|
+
if (recipes.has(sel)) continue; // a recipe emits it → host-facing
|
|
119
|
+
const parents = kitParents(c);
|
|
120
|
+
if (parents.length) offenders.push({ feature: f.id, component: c, selector: sel, renderedBy: parents });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (JSON_OUT) { console.log(JSON.stringify({ ok: !offenders.length, offenders }, null, 0)); process.exit(offenders.length ? 1 : 0); }
|
|
125
|
+
if (!offenders.length) {
|
|
126
|
+
console.log(`✅ verify-oracle-components [${FAMILY}]: every ui_components entry is host-facing.`);
|
|
127
|
+
process.exit(0);
|
|
128
|
+
}
|
|
129
|
+
console.log(`❌ verify-oracle-components [${FAMILY}]: ${offenders.length} kit-internal component(s) listed as host imports:`);
|
|
130
|
+
for (const o of offenders) {
|
|
131
|
+
console.log(` - ${o.feature}: ${o.component} <${o.selector}> is rendered by ${o.renderedBy.join(", ")} — G1 will demand an import a correct emit must not have`);
|
|
132
|
+
}
|
|
133
|
+
process.exit(1);
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* verify-template-bindings.mjs — Tier-2b: validate Angular TEMPLATE bindings in
|
|
4
|
+
* ```html skill fences against the installed kit's component declarations.
|
|
5
|
+
*
|
|
6
|
+
* node test-suite/scripts/verify-template-bindings.mjs --family angular-v5 \
|
|
7
|
+
* --project test-suite/typecheck/angular-v5
|
|
8
|
+
*
|
|
9
|
+
* WHY THIS EXISTS
|
|
10
|
+
* typecheck-fences.mjs only extracts ```ts/```tsx fences, because that is all
|
|
11
|
+
* `tsc` can check. In React that is sufficient — component usage lives in .tsx
|
|
12
|
+
* and bad props fail the compile. In ANGULAR component usage lives in the
|
|
13
|
+
* TEMPLATE, so the half of the surface most likely to be wrong was checked by
|
|
14
|
+
* nothing at all.
|
|
15
|
+
*
|
|
16
|
+
* Concretely: `<cometchat-conversations (ccConversationClicked)="...">` shipped
|
|
17
|
+
* in cometchat-angular-v5-core and passed lint + catalog + fences, all green.
|
|
18
|
+
* The real output is `itemClick`; `ccConversationClicked` is a React-ism. An
|
|
19
|
+
* unknown output binding in Angular fails SILENTLY — no error, the handler just
|
|
20
|
+
* never fires — so this is exactly the class of defect a human review misses.
|
|
21
|
+
*
|
|
22
|
+
* Validating a template properly needs Angular's own compiler (ngtsc with
|
|
23
|
+
* strictTemplates), which needs a real component + imports[] + a build — far too
|
|
24
|
+
* heavy for illustrative fragments. This does the targeted 90%: every
|
|
25
|
+
* <cometchat-*> element's selector must exist, and every [input] / (output)
|
|
26
|
+
* bound on it must be declared by that component.
|
|
27
|
+
*
|
|
28
|
+
* Reads the kit's ɵɵComponentDeclaration entries (selector + input/output maps),
|
|
29
|
+
* so it is always in sync with the installed version — no committed artifact to
|
|
30
|
+
* drift. Needs the pinned kit installed (same precondition as verify:fences);
|
|
31
|
+
* hard-exits 2 when absent so it can never pass vacuously.
|
|
32
|
+
*
|
|
33
|
+
* Exit: 0 clean · 1 unknown selector/binding · 2 bad invocation or kit missing.
|
|
34
|
+
*/
|
|
35
|
+
import { readFileSync, readdirSync, existsSync } from "node:fs";
|
|
36
|
+
import { join, dirname } from "node:path";
|
|
37
|
+
import { fileURLToPath } from "node:url";
|
|
38
|
+
|
|
39
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
40
|
+
const arg = (n, d) => { const i = process.argv.indexOf(n); return i >= 0 ? process.argv[i + 1] : d; };
|
|
41
|
+
|
|
42
|
+
// RULES.md §22 — no literal family key; resolve from families.json (by review key OR
|
|
43
|
+
// catalog key, so --family angular-v5 and --family web-angular-v5 both work).
|
|
44
|
+
const FAM_DATA = JSON.parse(readFileSync(
|
|
45
|
+
join(ROOT, ".claude/skills/cometchat-skill-reviewer/tools/families.json"), "utf8")).families;
|
|
46
|
+
// RULES.md §22: no literal family key, not even as a default — the caller names the family
|
|
47
|
+
const FAMILY = arg("--family");
|
|
48
|
+
if (!FAMILY) { console.error("--family is required (see families.json)"); process.exit(2); }
|
|
49
|
+
const PROJECT = arg("--project", `test-suite/typecheck/${FAMILY}`);
|
|
50
|
+
const _f = FAM_DATA[FAMILY] || Object.values(FAM_DATA).find(
|
|
51
|
+
(f) => (f.catalog || "").replace(/^catalog\//, "").replace(/\.json$/, "") === FAMILY);
|
|
52
|
+
if (!_f) { console.error(`unknown --family: ${FAMILY}`); process.exit(2); }
|
|
53
|
+
if (!_f.kitPackage || !_f.skillDirPattern) {
|
|
54
|
+
console.log(`⏭ verify-template-bindings [${FAMILY}]: family declares no kitPackage/skillDirPattern — skipped`);
|
|
55
|
+
process.exit(0);
|
|
56
|
+
}
|
|
57
|
+
const fam = {
|
|
58
|
+
skillDir: new RegExp(_f.skillDirPattern),
|
|
59
|
+
kit: `node_modules/${_f.kitPackage}`,
|
|
60
|
+
// @cometchat/chat-uikit-angular -> types/cometchat-chat-uikit-angular.d.ts
|
|
61
|
+
dts: `types/${_f.kitPackage.replace(/^@/, "").replace("/", "-")}.d.ts`,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const dtsPath = join(ROOT, PROJECT, fam.kit, fam.dts);
|
|
65
|
+
if (!existsSync(dtsPath)) {
|
|
66
|
+
console.error(`kit not installed: ${dtsPath}`);
|
|
67
|
+
console.error(`run: npm run verify:fences:${FAMILY}:setup`);
|
|
68
|
+
process.exit(2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ── the oracle: selector → { inputs, outputs } from ɵɵComponentDeclaration ────
|
|
72
|
+
const dts = readFileSync(dtsPath, "utf8");
|
|
73
|
+
const DECL = /ɵɵComponentDeclaration<\s*(\w+),\s*"([^"]+)",\s*[^,]+,\s*\{([\s\S]*?)\},\s*\{([\s\S]*?)\},\s*never/g;
|
|
74
|
+
const bySelector = new Map();
|
|
75
|
+
for (const m of dts.matchAll(DECL)) {
|
|
76
|
+
const inputs = new Set([...m[3].matchAll(/"([\w$]+)"\s*:/g)].map((x) => x[1]));
|
|
77
|
+
// outputs are "prop": "publicAlias" — the ALIAS is what a template binds
|
|
78
|
+
const outputs = new Set([...m[4].matchAll(/"([\w$]+)"\s*:\s*"([\w$]+)"/g)].map((x) => x[2]));
|
|
79
|
+
bySelector.set(m[2], { cls: m[1], inputs, outputs });
|
|
80
|
+
}
|
|
81
|
+
if (bySelector.size === 0) { console.error("parsed 0 component declarations — the .d.ts shape changed; fix DECL"); process.exit(2); }
|
|
82
|
+
|
|
83
|
+
// ── collect ```html fences from this family's skills ──────────────────────────
|
|
84
|
+
const SKILLS_DIR = join(ROOT, "skills");
|
|
85
|
+
const files = [];
|
|
86
|
+
const walk = (d) => {
|
|
87
|
+
for (const e of readdirSync(d, { withFileTypes: true })) {
|
|
88
|
+
const p = join(d, e.name);
|
|
89
|
+
if (e.isDirectory()) walk(p);
|
|
90
|
+
else if (e.name.endsWith(".md")) files.push(p);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
for (const d of readdirSync(SKILLS_DIR, { withFileTypes: true })) {
|
|
94
|
+
if (d.isDirectory() && fam.skillDir.test(d.name)) walk(join(SKILLS_DIR, d.name));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Angular syntax that is NOT a component binding — structural directives, refs,
|
|
98
|
+
// two-way sugar, animations, and plain HTML attributes.
|
|
99
|
+
const SKIP_ATTR = /^(\*|#|@|\[\(|class$|style$|id$|hidden$|title$|role$|aria-|data-|ng)/;
|
|
100
|
+
|
|
101
|
+
let unknownSelector = 0, unknownBinding = 0, checkedEls = 0, checkedBindings = 0;
|
|
102
|
+
const problems = [];
|
|
103
|
+
|
|
104
|
+
for (const f of files) {
|
|
105
|
+
const src = readFileSync(f, "utf8");
|
|
106
|
+
for (const fence of src.matchAll(/```html\n([\s\S]*?)```/g)) {
|
|
107
|
+
for (const el of fence[1].matchAll(/<(cometchat-[a-z0-9-]+)([^>]*)>/g)) {
|
|
108
|
+
const [, selector, attrsRaw] = el;
|
|
109
|
+
const decl = bySelector.get(selector);
|
|
110
|
+
checkedEls++;
|
|
111
|
+
if (!decl) {
|
|
112
|
+
unknownSelector++;
|
|
113
|
+
problems.push(`${f.replace(ROOT + "/", "")}: <${selector}> is not a component in the installed kit`);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
for (const a of attrsRaw.matchAll(/(\[?\(?[\w$.-]+\)?\]?)\s*=\s*"/g)) {
|
|
117
|
+
const raw = a[1];
|
|
118
|
+
if (SKIP_ATTR.test(raw)) continue;
|
|
119
|
+
const isOut = raw.startsWith("(") && raw.endsWith(")");
|
|
120
|
+
const isIn = raw.startsWith("[") && raw.endsWith("]");
|
|
121
|
+
if (!isOut && !isIn) continue; // plain static attribute
|
|
122
|
+
const name = raw.slice(1, -1);
|
|
123
|
+
checkedBindings++;
|
|
124
|
+
const ok = isOut ? decl.outputs.has(name) : decl.inputs.has(name);
|
|
125
|
+
if (!ok) {
|
|
126
|
+
unknownBinding++;
|
|
127
|
+
const kind = isOut ? "output" : "input";
|
|
128
|
+
const near = [...(isOut ? decl.outputs : decl.inputs)]
|
|
129
|
+
.filter((n) => n.toLowerCase().includes(name.toLowerCase().replace(/^cc/, "").slice(0, 5)))
|
|
130
|
+
.slice(0, 4);
|
|
131
|
+
problems.push(
|
|
132
|
+
`${f.replace(ROOT + "/", "")}: <${selector}> has no ${kind} "${name}"` +
|
|
133
|
+
(near.length ? ` — did you mean: ${near.join(", ")}?` : "")
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
console.log(`verify-template-bindings [${FAMILY}]: ${bySelector.size} component declaration(s) · ${files.length} skill file(s) · ${checkedEls} element(s) · ${checkedBindings} binding(s) checked`);
|
|
142
|
+
if (problems.length === 0) {
|
|
143
|
+
console.log(`\n✅ Tier-2b: every <cometchat-*> selector exists and every [input]/(output) is declared by that component.`);
|
|
144
|
+
process.exit(0);
|
|
145
|
+
}
|
|
146
|
+
console.log(`\n❌ ${problems.length} template-binding problem(s) — these fail SILENTLY at runtime in Angular:`);
|
|
147
|
+
for (const p of problems) console.log(` ${p}`);
|
|
148
|
+
process.exit(1);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cometchat-skills-typecheck-angular-v5",
|
|
3
|
+
"private": true,
|
|
4
|
+
"description": "Tier-2 fence type-check sandbox — pins the Angular v5 UI Kit + JS SDK v4 so skill code fences compile against the real published API in CI. Angular is pinned to 21: the kit's peer range is >=17.0.0 <22.0.0, so 22 hard-fails ERESOLVE. Keep these pins in sync with peers.yaml (angular) and cometchat-angular-app/package.json.",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@cometchat/chat-uikit-angular": "^5.1.0",
|
|
8
|
+
"@cometchat/chat-sdk-javascript": "^4.1.13",
|
|
9
|
+
"@cometchat/cards-angular": "^1.0.0",
|
|
10
|
+
"@cometchat/calls-sdk-javascript": "^5.0.3",
|
|
11
|
+
"@angular/core": "^21.0.0",
|
|
12
|
+
"@angular/common": "^21.0.0",
|
|
13
|
+
"@angular/platform-browser": "^21.0.0",
|
|
14
|
+
"dompurify": "^3.0.0",
|
|
15
|
+
"rxjs": "^7.8.0",
|
|
16
|
+
"zone.js": "^0.15.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "~5.9.2"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"//": "Mirrors the Angular CLI 21 strict template the skills target. experimentalDecorators + useDefineForClassFields:false are required for @Component/@Input to type-check. noUnusedLocals/Parameters are OFF on purpose: fences are illustrative fragments, so unused-symbol noise (TS6133) would mask real kit-API drift.",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"useDefineForClassFields": false,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"verbatimModuleSyntax": false,
|
|
17
|
+
"noUnusedLocals": false,
|
|
18
|
+
"noUnusedParameters": false
|
|
19
|
+
},
|
|
20
|
+
"include": ["src"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Mirrors a default `flutter create` app's analysis setup, with fragment-noise rules
|
|
2
|
+
# OFF on purpose: fences are ILLUSTRATIVE snippets, so unused-import/local and style
|
|
3
|
+
# lints would mask real kit-API drift. Only ERROR-severity diagnostics (the analyzer's
|
|
4
|
+
# resolution/type errors) are what the Tier-2 gate reads — see typecheck-fences-dart.mjs.
|
|
5
|
+
# The strict unused-import check is enforced on FULL emits by the reviewer, not fragments.
|
|
6
|
+
include: package:flutter_lints/flutter.yaml
|
|
7
|
+
|
|
8
|
+
analyzer:
|
|
9
|
+
errors:
|
|
10
|
+
unused_import: ignore
|
|
11
|
+
unused_local_variable: ignore
|
|
12
|
+
unused_element: ignore
|
|
13
|
+
unused_field: ignore
|
|
14
|
+
depend_on_referenced_packages: ignore
|
|
15
|
+
avoid_print: ignore
|
|
16
|
+
prefer_const_constructors: ignore
|
|
17
|
+
prefer_const_literals_to_create_immutables: ignore
|
|
18
|
+
use_build_context_synchronously: ignore
|
|
19
|
+
dead_code: ignore
|
|
20
|
+
|
|
21
|
+
linter:
|
|
22
|
+
rules:
|
|
23
|
+
prefer_const_constructors: false
|
|
24
|
+
prefer_const_declarations: false
|
|
25
|
+
avoid_print: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: cometchat_skills_typecheck_flutter_v6
|
|
2
|
+
description: >
|
|
3
|
+
Tier-2 fence analyze sandbox — pins the Flutter UI Kit v6 + Chat SDK v5 + Calls SDK v5
|
|
4
|
+
so skill code fences analyze against the real published API in CI. Keep these pins in
|
|
5
|
+
sync with peers.yaml (flutter-v6) and test-suite/catalogs/flutter-v6.json (kitVersion).
|
|
6
|
+
publish_to: none
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
|
|
9
|
+
environment:
|
|
10
|
+
sdk: ">=3.10.1 <4.0.0"
|
|
11
|
+
flutter: ">=3.19.0"
|
|
12
|
+
|
|
13
|
+
dependencies:
|
|
14
|
+
flutter:
|
|
15
|
+
sdk: flutter
|
|
16
|
+
cometchat_chat_uikit: ^6.1.0
|
|
17
|
+
cometchat_sdk: ^5.0.6
|
|
18
|
+
cometchat_calls_sdk: ^5.0.4
|
|
19
|
+
|
|
20
|
+
dev_dependencies:
|
|
21
|
+
flutter_lints: ^6.0.0
|