diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index c123e36..7be12d5 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -12,7 +12,7 @@ "source": "git-subdir", "url": "https://github.com/sendbird/sendbird-client-plugin.git", "path": "plugins/sendbird-client", - "ref": "v0.1.45" + "ref": "v0.1.46" }, "description": "Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS. Includes hooks that run local shell scripts; see README \"What runs on your machine\"." } diff --git a/plugins/sendbird-client/.claude-plugin/plugin.json b/plugins/sendbird-client/.claude-plugin/plugin.json index 08d6e5f..8a1256e 100644 --- a/plugins/sendbird-client/.claude-plugin/plugin.json +++ b/plugins/sendbird-client/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "sendbird-client", "displayName": "Sendbird Client", - "version": "0.1.45", + "version": "0.1.46", "description": "Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS", "author": { "name": "Sendbird", diff --git a/plugins/sendbird-client/.codex-plugin/plugin.json b/plugins/sendbird-client/.codex-plugin/plugin.json index 1187424..e90e5ad 100644 --- a/plugins/sendbird-client/.codex-plugin/plugin.json +++ b/plugins/sendbird-client/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "sendbird-client", - "version": "0.1.45", + "version": "0.1.46", "description": "Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS", "author": { "name": "Sendbird", diff --git a/plugins/sendbird-client/README.md b/plugins/sendbird-client/README.md index 31cdadb..e5646a5 100644 --- a/plugins/sendbird-client/README.md +++ b/plugins/sendbird-client/README.md @@ -3,7 +3,7 @@ > Generated by `tools/editions/build.sh` from the repository root. Do not edit this folder; > change the root and rerun the build. -`sendbird-client` v0.1.45 — Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS. +`sendbird-client` v0.1.46 — Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS. ## Products diff --git a/plugins/sendbird-client/agents/sendbird-android-agent.md b/plugins/sendbird-client/agents/sendbird-android-agent.md index d28e819..41cad48 100644 --- a/plugins/sendbird-client/agents/sendbird-android-agent.md +++ b/plugins/sendbird-client/agents/sendbird-android-agent.md @@ -27,13 +27,10 @@ Run `bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/detect.sh" `. Splice from `templates/android/{view|compose}/{product}/` matching the detected host + product. ## Android acceptance checks -- Preserve Groovy versus Kotlin DSL and resolve the exact dependency version selected by Gradle. +- Preserve Groovy versus Kotlin DSL and read the exact dependency version from the module's build file or the version catalog (`gradle/libs.versions.toml`). - Confirm the `Application`, `Activity`, `Fragment`, or Compose owner responsible for initialization and cleanup. - Treat View-based UIKit surfaces as interop inside Compose unless a verified Compose API exists. -- Compile the affected module. When both a pinned regression set and latest compatibility set are relevant, report them separately. - - Find the JDK and Android SDK first: `eval "$(bash "${CLAUDE_PLUGIN_ROOT}/tools/local-sdk/android-toolchain.sh" )"`, then run the project's own `./gradlew` (for example `./gradlew :app:assembleDebug`) in the same shell. An unset `ANDROID_HOME` or `JAVA_HOME` is not a reason to skip the build. - - Never write the found paths into the project (`local.properties`, `gradle.properties`); they are only for this build. - - Hand the build off only when the script prints a `# missing:` line, and quote that line so the customer knows what to install. +- Do not run Gradle tasks (such as `./gradlew :app:assembleDebug`) or look for a JDK or an Android SDK; this run does not build (contract section 3). Never write SDK or JDK paths into the project (`local.properties`, `gradle.properties`). ## No-Fabrication Policy (non-negotiable) - Never invent an API name, signature, parameter, error code, enum case, or docs URL. Every emitted symbol must be verifiable in the sources listed under Source priority above. diff --git a/plugins/sendbird-client/agents/sendbird-ios-agent.md b/plugins/sendbird-client/agents/sendbird-ios-agent.md index 961ced1..28d6b9c 100644 --- a/plugins/sendbird-client/agents/sendbird-ios-agent.md +++ b/plugins/sendbird-client/agents/sendbird-ios-agent.md @@ -36,7 +36,7 @@ Run the detection toolkit before writing code: - Confirm the owning lifecycle entry (`UIApplicationDelegate`, `UISceneDelegate`, or SwiftUI `App`) before inserting initialization. - Confirm the package product and imported module from the resolved package, not from memory. - Keep UI presentation on the main actor or main queue when the verified API requires UI work. -- Build the affected scheme or Swift package target when Xcode is available. Report the destination and SDK version used. +- Do not build the project or run `xcodebuild`, `xcodegen`, or `swift build`; this run does not build (contract section 3). Check the package version in `Package.swift`, `project.yml`, or the Xcode project, and in `Package.resolved` when it exists, and report the SDK version used. - Do not proactively mention CocoaPods, `pod install`, or `.xcworkspace` unless the customer's project already has a Podfile, or the customer explicitly asks for CocoaPods. ## Templates diff --git a/plugins/sendbird-client/agents/sendbird-js-agent.md b/plugins/sendbird-client/agents/sendbird-js-agent.md index 280b386..0d389bf 100644 --- a/plugins/sendbird-client/agents/sendbird-js-agent.md +++ b/plugins/sendbird-client/agents/sendbird-js-agent.md @@ -32,7 +32,7 @@ Splice from `templates/js/{react|react-native}/{product}/` matching the detected - Preserve npm, yarn, or pnpm and use the resolved lockfile version as the customer-SDK source. - In React, confirm client-only SDK initialization is not recreated on render and is not executed during server rendering. - In React Native, verify the required native modules and `platformServices` implementation instead of substituting stubs. -- Type-check the affected files. Report pinned regression and latest-package compatibility checks separately when both are run. +- Do not run `tsc` or the project's `build` or `typecheck` scripts; this run does not build (contract section 3). Check that every Sendbird symbol you import is in the installed package's `api-surface.md`. ## No-Fabrication Policy (non-negotiable) - Never invent an API name, signature, parameter, error code, enum case, or docs URL. Every emitted symbol must be verifiable in the sources listed under Source priority above. diff --git a/plugins/sendbird-client/config/plugin-config.json b/plugins/sendbird-client/config/plugin-config.json index 9e64238..fb6fe93 100644 --- a/plugins/sendbird-client/config/plugin-config.json +++ b/plugins/sendbird-client/config/plugin-config.json @@ -1,5 +1,5 @@ { - "schemaVersion": "0.1.45", + "schemaVersion": "0.1.46", "knowledge": { "mode": "runtime-fetch", "_modes": [ diff --git a/plugins/sendbird-client/core/catalog.json b/plugins/sendbird-client/core/catalog.json index 3cee916..87a511b 100644 --- a/plugins/sendbird-client/core/catalog.json +++ b/plugins/sendbird-client/core/catalog.json @@ -1,6 +1,6 @@ { "version": 1, - "about": "Questions a caller shows before the plugin builds a new app. The setup skill asks them in this order (interactive), or reads the answers from the request (non-interactive). Each question has at most 4 options, the limit of Claude Code's question tool. Options with a product only appear when that product is in the plugin's scope. A question with \"offered\": false is a feature not offered in new-app setup for now: it is left out of the questions (set it to true or remove it to offer it again). A request that names that feature still gets it built.", + "about": "Questions a caller shows before the plugin builds a new app. The setup skill asks them in this order (interactive), or reads the answers from the request (non-interactive). Each question has at most 4 options, the limit of Claude Code's question tool. Options with a product only appear when that product is in the plugin's scope. A question with \"offered\": false is a feature not offered in new-app setup for now: it is left out of the questions (set it to true or remove it to offer it again). A request that names that feature still gets it built. The plan answer is stored as `plan` in the project profile; core/plans.json says which features each plan includes. A non-interactive run can also return a `confirm-` question (options yes and no) for a feature the plan does not include; the caller passes the answer back as `confirm-=yes` or `confirm-=no` with the catalog answers.", "questions": [ { "id": "platform", "type": "single", "required": true, @@ -28,6 +28,16 @@ { "id": "compose", "label": "Jetpack Compose" } ] }, + { + "id": "plan", "type": "single", "required": false, + "question": "Which Sendbird plan will this app use? Features your plan does not include are added only after you confirm.", + "options": [ + { "id": "starter", "label": "Starter" }, + { "id": "pro", "label": "Pro" }, + { "id": "enterprise", "label": "Enterprise" }, + { "id": "unsure", "label": "Free trial, or not decided yet" } + ] + }, { "id": "chat", "type": "multi", "required": false, "question": "Which chat features should the app have? Sign-in and connect are always included.", diff --git a/plugins/sendbird-client/core/index.json b/plugins/sendbird-client/core/index.json index ca95154..d26e86c 100644 --- a/plugins/sendbird-client/core/index.json +++ b/plugins/sendbird-client/core/index.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "generatedAt": "2026-10-14T19:23:16Z", - "count": 48, + "count": 49, "entries": [ { "file": "knowledge/curated/android/architecture.md", @@ -173,6 +173,14 @@ "2026-09-22" ] }, + { + "file": "knowledge/curated/common/plans.md", + "platform": "common", + "category": "plans", + "status": "populated", + "lastVerifiedAgainst": "https://sendbird.com/pricing/chat (Compare features table), 2026-10-15", + "verifiedDates": [] + }, { "file": "knowledge/curated/common/pricing-quotas.md", "platform": "common", diff --git a/plugins/sendbird-client/core/plans.json b/plugins/sendbird-client/core/plans.json new file mode 100644 index 0000000..74cfa42 --- /dev/null +++ b/plugins/sendbird-client/core/plans.json @@ -0,0 +1,25 @@ +{ + "version": 1, + "about": "Which Sendbird Chat plan each plan-limited feature needs. tools/detection/resolve-plan.sh reads this file to decide whether a requested feature is built as asked, built after the customer confirms, or not built (sales). Features every plan includes are not listed, nor are Dashboard-only features such as Data export, which this plugin does not build. Plan order is starter < pro < enterprise. See knowledge/curated/common/plans.md for how the skills use it.", + "source": "https://sendbird.com/pricing/chat (Compare features table: Free trial, Starter, Pro, Enterprise), read 2026-10-15", + "plans": ["starter", "pro", "enterprise"], + "unsure": "unsure", + "salesUrl": "https://sendbird.com/contact-sales", + "features": [ + { "id": "supergroup-channel", "label": "Supergroup channel", "minPlan": "pro", "where": "app" }, + { "id": "delivery-receipts", "label": "Delivery receipts", "minPlan": "pro", "where": "app" }, + { "id": "message-search", "label": "Message search", "minPlan": "pro", "where": "app" }, + { "id": "auto-translation", "label": "Auto message translation", "minPlan": "pro", "where": "app" }, + { "id": "on-demand-translation", "label": "On-demand translation", "minPlan": "pro", "where": "app" }, + { "id": "push-translation", "label": "Push translation", "minPlan": "pro", "where": "dashboard" }, + { "id": "announcements", "label": "Announcements", "minPlan": "pro", "where": "server" }, + { "id": "image-moderation", "label": "AI image moderation", "minPlan": "pro", "where": "dashboard" }, + { "id": "profanity-filter", "label": "Profanity filter", "minPlan": "pro", "where": "dashboard" }, + { "id": "advanced-analytics", "label": "Advanced analytics", "minPlan": "pro", "where": "server" }, + { "id": "moderation-rule-engine", "label": "Moderation rule engine", "minPlan": "enterprise", "where": "dashboard" }, + { "id": "moderation-ticket-system", "label": "Moderation ticket system", "minPlan": "enterprise", "where": "dashboard" }, + { "id": "moderation-logs", "label": "Moderation logs", "minPlan": "enterprise", "where": "dashboard" }, + { "id": "hive-moderation", "label": "Hive moderation", "minPlan": "enterprise", "where": "dashboard" }, + { "id": "extended-message-retention", "label": "Message retention longer than the Starter and Pro plans offer", "minPlan": "enterprise", "where": "server" } + ] +} diff --git a/plugins/sendbird-client/docs/AGENT_CONTRACT.md b/plugins/sendbird-client/docs/AGENT_CONTRACT.md index 01caa55..eed9811 100644 --- a/plugins/sendbird-client/docs/AGENT_CONTRACT.md +++ b/plugins/sendbird-client/docs/AGENT_CONTRACT.md @@ -46,6 +46,7 @@ The source must contain the symbol or exact signature. A related page is not evi - Preserve the template's `source:` comment when code is copied so the write-boundary guard can validate it. - Write files with the host's file-editing tool: Write and Edit in Claude Code, `apply_patch` in Codex. Do not write source files with shell redirection, heredocs, or `sed -i`. - Limit edits to the requested product and the lifecycle code required to support it. +- Some Chat features work only on higher Sendbird plans (`core/plans.json`, `knowledge/curated/common/plans.md`). Do not add one the customer did not ask for, and before adding one they did ask for, check it with `tools/detection/resolve-plan.sh --check `: build on `ok`, ask first on `confirm`, and write no code on `sales`. - Install dependencies so the project's next clean install works. Never pass `--legacy-peer-deps` or `--force` to npm (or `--ignore-engines` to yarn): they hide a version conflict that breaks the next `npm install`. When a package's peer range rejects the project's versions, install the newest version whose `peerDependencies` accept them; check with `npm view @ peerDependencies`. - Do not install tools or write files outside the project for your own checks (for example `npm i playwright` in `/tmp`). Use what the project and the machine already have, and report a check you could not run as not run. - Keep the signatures of existing functions, classes, and constructors you edit. Callers you cannot see would break. Get what the SDK needs (an Android `Context`, the SDK instance) from the `Application` class or a holder instead of a new parameter. @@ -58,23 +59,24 @@ Do every step that can be done inside the customer project before reporting. A s - On a SwiftUI host, start the Sendbird session from the app's own sign-in code on the one shared session the views also show (`knowledge/curated/ios/hosts/swiftui.md` "Start the session from the app's sign-in"). Do not pass the session to the sign-in object through a `weak` property set in `.onAppear`. - If the app already has a sign-out or logout function, disconnect there and clean up the handlers you added. Add a standalone helper only when no such function exists, and name the helper in the hand-off. - When the project already gets a Sendbird token from its own backend, register the session handler with that call. Without such a call, leave it out; do not add a placeholder endpoint. -- Find the build toolchain before saying a build cannot run. On Android, `tools/local-sdk/android-toolchain.sh` looks for a JDK and an Android SDK in the standard install locations; an unset `ANDROID_HOME` or `JAVA_HOME` alone is not a reason to skip the build. -- Files your own verification created (build outputs such as `.gradle/`, `build/`, `node_modules/`, a generated `.xcodeproj`) are not hand-off steps. Leave them out of `changes` and `manualSteps`; at most mention them once in the answer. +- This run does not build, compile, or type-check the project. Do not run `xcodebuild`, `xcodegen`, `swift build`, Gradle tasks (such as `./gradlew assembleDebug`), `tsc`, or the project's `build` or `typecheck` scripts, and do not look for a JDK or an Android SDK to build with. Run a build only when the customer explicitly asks for one. The plugin's own test suites build the code patterns it emits; a build here only makes the run longer. +- A build is not a hand-off step either. Do not put "build the project" or "run the type check" in `manualSteps`; at most say once in the answer that the customer can build the app as usual. +- Files that installing dependencies created (such as `node_modules/` or `.gradle/`) are not hand-off steps. Leave them out of `changes` and `manualSteps`; at most mention them once in the answer. - A hand-off step is allowed only for work that needs something the project does not contain: a token-issuing server, a dashboard setting, a signing key or certificate, a device or simulator run, or a value nobody supplied. Each step says what is missing and why the plugin could not do it. ## 4. Verify the result -Verification must exercise the edited path, not only inspect text: +Check the edited path by reading the project. These checks need no build: -- dependency resolves at the selected version -- generated source compiles or type-checks with the customer's toolchain when available +- the Sendbird dependency is declared at the selected version in the manifest (`package.json`, the Gradle build file or version catalog, `Package.swift`, `project.yml`, or the Xcode project), and the lockfile or `Package.resolved` names the same version when the project has one +- every Sendbird symbol in the edited files is in the evidence ledger (section 2) for that version - initialization occurs once at the detected lifecycle entry - session and token refresh handlers are registered before connection - listeners, delegates, and handlers have matching cleanup - the logout path: when the project has a sign-out or logout function (for example `onLogout`), it now disconnects, removes the handlers you added, and, when you set up push, unregisters the push token (`knowledge/curated//cross-cutting/push.md`). Do this in the project; it is never a `manualSteps` entry - host-specific requirements are present -Report each check as pass, fail, or not run. Never describe a skipped check as passed. +Report each check as pass, fail, or not run. Never describe a skipped check as passed. A build or type check is not one of these checks; the answer may say once that this run did not build the project. ## 5. Delegate once @@ -86,7 +88,7 @@ Return: 1. detected task envelope 2. changed files and why each changed -3. verification commands and their actual results +3. the checks from section 4 and their results 4. symbol-to-source evidence 5. anything not verified and the exact next action; only steps that "Finish what the project allows" (section 3) could not complete @@ -95,7 +97,7 @@ Return: When `SENDBIRD_NONINTERACTIVE` is set (for example `SENDBIRD_NONINTERACTIVE=1 claude -p ...` in CI or a script), nobody can answer a question during the run. - Never ask the user a question, and never end the answer with one. -- For a value you would otherwise ask for, use the environment (`SENDBIRD_APP_ID`, `SENDBIRD_PRODUCTS`, `SENDBIRD_REGION`) or the project's `profile.json` when they have it. +- For a value you would otherwise ask for, use the environment (`SENDBIRD_APP_ID`, `SENDBIRD_PRODUCTS`, `SENDBIRD_REGION`, `SENDBIRD_PLAN`) or the project's `profile.json` when they have it. - Adding the Sendbird dependency that the request clearly needs is allowed: the request is the consent. List it under `changes`. - A request to add a product's screen or feature includes installing and initializing that product. Do not stop to ask for a choice that has a safe default; use the default and say so in the answer: - the user ID: the one the app's existing sign-in code already has @@ -107,3 +109,5 @@ When `SENDBIRD_NONINTERACTIVE` is set (for example `SENDBIRD_NONINTERACTIVE=1 cl The caller answers by running again with the value in the environment or in the prompt (for example `host: swiftui`). +A feature the customer's plan does not include (section 3, `knowledge/curated/common/plans.md`) is asked about before any file is written: the run changes nothing and returns `needs_input` with a question whose id is `confirm-` and whose options are `yes` and `no`. The caller answers in the prompt with `confirm-=yes` (build it) or `confirm-=no` (leave it out), next to any other answers. + diff --git a/plugins/sendbird-client/hooks/welcome.sh b/plugins/sendbird-client/hooks/welcome.sh index e840163..7ac7975 100755 --- a/plugins/sendbird-client/hooks/welcome.sh +++ b/plugins/sendbird-client/hooks/welcome.sh @@ -16,6 +16,7 @@ ALWAYS-ON rules for ANY Sendbird answer (even without a skill): - Product scope: resolve with $ROOT/tools/detection/resolve-products.sh (SENDBIRD_PRODUCTS > profile enabledProducts > all). Decline products outside that scope instead of writing code for them. This edition covers Chat (incl. auth/session), UIKit, and Calls only; for AI Agent, Desk, or Live, tell the customer this plugin does not cover them. - Verified code templates: $ROOT/templates//// (each _README.md has splice steps). - Error codes: $ROOT/knowledge/curated//cross-cutting/errors.md is the verified table (e.g. 400302 = iOS accessTokenNotValid; connect is SendbirdChat.connect(userId:authToken:) on iOS v4). +- When writing Sendbird code, do not build, compile, or type-check the customer's project (no xcodebuild, xcodegen, Gradle tasks, tsc, or build/typecheck scripts) unless the customer explicitly asks for a build, and do not list a build under manualSteps. The plugin's own test suites build the code it emits. - iOS packaging is SPM-first: never introduce CocoaPods into a fresh/SPM project; sendbird-chat-ios-spm is legacy v3 — v4 lives in sendbird-chat-sdk-ios. - Never state pricing/quota figures or "latest" version numbers from memory; tokens are secrets — never hard-code or log them. EOF diff --git a/plugins/sendbird-client/knowledge/curated/common/plans.md b/plugins/sendbird-client/knowledge/curated/common/plans.md new file mode 100644 index 0000000..6ed7ad9 --- /dev/null +++ b/plugins/sendbird-client/knowledge/curated/common/plans.md @@ -0,0 +1,58 @@ + + +# common — features that depend on the Sendbird plan + +Some Chat features work only on higher plans. The plugin builds what the customer's plan includes, and asks before it adds a feature the plan does not include. Plan names and which plan includes a feature come from the pricing page's comparison table; prices and quota numbers are not quoted (see `knowledge/curated/common/pricing-quotas.md`). Verified 2026-10-15. + +## Where the plan comes from + +`bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/resolve-plan.sh" ` prints the plan: `SENDBIRD_PLAN` first, then `plan` in `.sendbird-client/profile.json`, otherwise `unsure`. The plan is one of `starter`, `pro`, `enterprise`, or `unsure` (a free trial, a plan not decided yet, or one the customer did not give). Both sources are read in any case with spaces ignored, and `free trial` reads as `unsure`. + +- New app: setup asks the `plan` question in `core/catalog.json` and saves the answer as `plan` in the profile. +- Existing project: when the plan is `unsure` and the customer names their plan, save it the same way so it is asked only once. +- The free trial includes every Pro feature ("All pro features" on the pricing page), but the plan the app moves to afterwards decides what keeps working, so a free trial counts as `unsure`. + +## Before adding a feature + +When a request needs a feature listed in `core/plans.json`, run `resolve-plan.sh --check ` before writing any file (in new-app setup, before the starter is copied) and follow `decision`: + +| `decision` | What to do | +| --- | --- | +| `ok` | The plan includes it. Build it as asked. For `where: "dashboard"`, it is turned on in the Sendbird Dashboard, not in code; say so. | +| `confirm` | Show `message` and wait for the customer's answer. Interactive: AskUserQuestion with "Add it" and "Leave it out". Non-interactive (`SENDBIRD_NONINTERACTIVE`): the caller answers with `confirm-=yes` (build it) or `confirm-=no` (leave it out). Without that answer, the run changes nothing at all, so check before writing any file, and ends with `status: "needs_input"` and one question per such feature, with id `confirm-` and options `yes` and `no` (a `needs_input` run summary lists no changes). If the customer says yes, build it and list it in the run summary's manual steps as needing the plan named in `requiredPlan`. | +| `sales` | Enterprise only. Do not write code for it. Show `message`. | + +Translate `message` into the customer's language; keep plan and feature names as written. + +Do not add a plan-limited feature the customer did not ask for, for example by choosing a Supergroup channel or adding message search on your own. A customer request that only works with such a feature counts as asking for it: check it first. + +## Plan-limited features + +From the pricing page's comparison table (Free trial, Starter, Pro, Enterprise). Every other Chat feature in that table is on every plan. + +| Feature (pricing-page name) | Lowest plan | Where it lives | Where the plugin's guidance names it | +| --- | --- | --- | --- | +| Supergroup channel | Pro | app code | the `isSuper` channel property (source: knowledge/curated/js/products/chat.md) (source: knowledge/curated/android/cross-cutting/troubleshooting.md) | +| Delivery receipts | Pro | app code | `SendbirdChat.markAsDelivered` for members who are offline (source: knowledge/curated/ios/cross-cutting/push.md) | +| Message search | Pro | app code | `SendbirdChat.createMessageSearchQuery` (source: knowledge/curated/ios/products/chat.md) (source: knowledge/curated/android/products/chat.md) (source: knowledge/curated/js/products/chat.md) | +| Auto message translation | Pro | app code | — | +| On-demand translation | Pro | app code | — | +| Push translation | Pro | Dashboard | — | +| Announcements | Pro | server (Platform API) | — | +| AI image moderation | Pro | Dashboard | A blocked file fails to send with 900066 (source: knowledge/curated/ios/cross-cutting/errors.md) | +| Profanity filter | Pro | Dashboard | A blocked message fails to send with 900060 (source: knowledge/curated/ios/cross-cutting/errors.md) (source: knowledge/curated/android/cross-cutting/errors.md) | +| Advanced analytics | Pro | server (Platform API) | — | +| Moderation rule engine, Moderation ticket system, Moderation logs, Hive moderation | Enterprise | Dashboard | — | +| Message retention beyond the 6 months listed for Starter and Pro | Enterprise ("Request a quote") | server | — | + +Data export is a Sendbird Dashboard feature, outside what this plugin builds: point the customer to the Dashboard. + +A "—" means this plugin's curated guidance does not name an SDK entry point for it yet: verify one before writing code, as for any other API. + +Handling 900060 or 900066 in app code (showing the customer why a message or file was not sent) needs no plan check. Turning the filter itself on is a Dashboard setting on Pro or higher. + +## Sales + +Enterprise features: https://sendbird.com/contact-sales (the "Contact sales" link on the pricing page). + +(source: https://sendbird.com/pricing/chat — Compare features table columns Free trial, Starter, Pro, Enterprise; the Free trial card's "All pro features"; the FAQ answer on the Developer plan; read 2026-10-15) diff --git a/plugins/sendbird-client/skills/add-feature/SKILL.md b/plugins/sendbird-client/skills/add-feature/SKILL.md index ec876e5..4933ba4 100644 --- a/plugins/sendbird-client/skills/add-feature/SKILL.md +++ b/plugins/sendbird-client/skills/add-feature/SKILL.md @@ -15,11 +15,13 @@ Add one feature to an existing integration. ## Steps 1. Run `bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/detect.sh" ` and resolve platform, host, product, and installed SDK versions. If an ambiguity changes the emitted code, ask one focused question. -2. This is a customization request: consult sources discussions-first per §6.3.2 (public discussions on the relevant UIKit mirror), then knowledge/curated (populated — see below), then the customer-local SDK / public source / docs. -3. Hand off to the platform agent to splice the matching template under `templates////` and wire imports/delegates/hooks. -4. Output the edit + a per-feature validation checklist + Related docs. +2. Check the plan: if the feature is listed in `core/plans.json`, run `bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/resolve-plan.sh" --check ` and follow `knowledge/curated/common/plans.md` before any file is changed. On `confirm`, show the message and build only after the customer says yes; on `sales`, show the message and write no code. In a non-interactive run, the request answers with `confirm-=yes` (build it) or `confirm-=no` (leave it out); without that answer, change nothing and return `status: "needs_input"` with one question: id `confirm-`, the decision's `message` as `question`, options `["yes", "no"]`. +3. This is a customization request: consult sources discussions-first per §6.3.2 (public discussions on the relevant UIKit mirror), then knowledge/curated (populated — see below), then the customer-local SDK / public source / docs. +4. Hand off to the platform agent to splice the matching template under `templates////` and wire imports/delegates/hooks. +5. Output the edit + a per-feature validation checklist + Related docs. ## Wired knowledge (populated and cited) +- Plan-limited features: `knowledge/curated/common/plans.md` (data in `core/plans.json`). - Per-product API: `knowledge/curated//products/.md` — channel/message (chat), prebuilt screens (uikit), dial (calls). - Verified base templates exist for every product on ios/uikit, android/view, js/react, js/react-native (each dir's `_README.md` has splice steps + variations). - If the specific feature isn't templated yet, derive it from the curated doc's cited sections or the customer-local SDK surface — never from memory. diff --git a/plugins/sendbird-client/skills/calls-incoming/SKILL.md b/plugins/sendbird-client/skills/calls-incoming/SKILL.md index 5535278..d977203 100644 --- a/plugins/sendbird-client/skills/calls-incoming/SKILL.md +++ b/plugins/sendbird-client/skills/calls-incoming/SKILL.md @@ -18,7 +18,7 @@ This skill works on an app that already uses Sendbird Calls. Calls is not offere 2. Map the current wiring with file:line evidence: where the SDK is configured or initialized, where the user authenticates, where the incoming-call listener or delegate is added, and whether push is wired (VoIP token, FCM token, push forwarding, the incoming-call UI). 3. Compare it with the platform checklist below and list each item as present, missing, or wrong, with evidence. 4. Report the gaps and the fix for each, cited. On confirmation, hand the changes to the platform agent once. Steps that need the dashboard (VoIP or FCM credentials), signing capabilities, or a real device are hand-off steps with the docs link; never describe dashboard click paths. -5. Verify with the customer's toolchain (docs/AGENT_CONTRACT.md section 4). Incoming calls in the background need a real device and a second caller, so report that check as not run unless the customer ran it. +5. Check the result by reading the project (docs/AGENT_CONTRACT.md section 4; this run does not build, contract section 3). Incoming calls in the background need a real device and a second caller, so report that check as not run unless the customer ran it. | Platform | Checklist (curated section) | | --- | --- | diff --git a/plugins/sendbird-client/skills/permissions-setup/SKILL.md b/plugins/sendbird-client/skills/permissions-setup/SKILL.md index 20973ad..19187ba 100644 --- a/plugins/sendbird-client/skills/permissions-setup/SKILL.md +++ b/plugins/sendbird-client/skills/permissions-setup/SKILL.md @@ -18,7 +18,7 @@ Resolve the active product scope with `bash "${CLAUDE_PLUGIN_ROOT}/tools/detecti 4. Server or Platform API: say that this plugin writes client code only and does not generate server or Platform API code, name what the server must do in one sentence, and link the Platform API overview (https://sendbird.com/docs/chat/platform-api/v3/overview) or a more specific page you have opened and checked. 5. Client: write the code through the platform agent, from the curated sections below. A client check only changes what the UI offers; it is not a security boundary. Say so whenever a requirement is really about preventing an action, and pair it with the setting or server item that enforces it. 6. Before you finish, follow each screen that used a control you removed or hid, and make sure a member can still reach it the way the requirement allows. Removing the only path into a channel screen leaves the app unusable even though every rule is met. -7. Verify with the customer's toolchain (docs/AGENT_CONTRACT.md section 4) and report each requirement as done in code, handed to settings, or handed to the server. +7. Check the result by reading the project (docs/AGENT_CONTRACT.md section 4; this run does not build, contract section 3) and report each requirement as done in code, handed to settings, or handed to the server. | Requirement | Layer | Source | | --- | --- | --- | diff --git a/plugins/sendbird-client/skills/setup/SKILL.md b/plugins/sendbird-client/skills/setup/SKILL.md index 92223f0..ed2466a 100644 --- a/plugins/sendbird-client/skills/setup/SKILL.md +++ b/plugins/sendbird-client/skills/setup/SKILL.md @@ -27,14 +27,19 @@ Use this when the request is to create a new app, or the project folder is empty 1. Read the questions from `${CLAUDE_PLUGIN_ROOT}/core/catalog.json`. Drop options whose `product` is outside the active scope (`resolve-products.sh`), and drop a question with no options left. Skip a question whose `when` does not match the answers so far. Leave out a question with `"offered": false`; that feature is not offered in new-app setup for now. If the request itself names that feature (for example in `notes`, or `--product calls`), build it as usual. 2. Get the answers: - Interactive: ask with AskUserQuestion (in Codex, request_user_input when it is listed), using the catalog's question text and option labels as written (translated into the customer's language if needed). With neither tool, or when request_user_input returns no answer, ask in your reply and stop until the customer answers; do not pick an answer for them. Use `multiSelect` for `multi` questions. Ask `platform` first, then the rest together (at most 4 questions per call). Do not add, drop, or reword options. - - Non-interactive (`SENDBIRD_NONINTERACTIVE`): read answers from the request, written as `answers: platform=react; chat=channel-list,conversation; notes=...`. An answer that is not a catalog option id is an error. If the request has no answers yet, change nothing and stop with `status: "needs_input"`, returning every catalog question in scope at once, in catalog order, each with its `id`, `question`, `type`, option ids as `options`, the option labels as `labels` (same order), and `when` when it has one, so the caller can ask them all and run again once (with `--resume` it continues this session). If answers are given but a `required` question that applies is missing, return only the missing ones the same way. When `SENDBIRD_LOCALE` is set (a language such as `ko` or `ja`), write `question` and `labels` in that language; never translate `id`, `options`, or `when`, since the caller passes answers back by option id. -3. Copy the starter named by `starters` in the catalog (`platform`, or `platform/`) from `${CLAUDE_PLUGIN_ROOT}/` into the project folder, then initialize git if the folder is not a repository. + - Non-interactive (`SENDBIRD_NONINTERACTIVE`): read answers from the request, written as `answers: platform=react; chat=channel-list,conversation; notes=...`. Besides the catalog questions, an answer may be `confirm-=yes` or `confirm-=no`, where `` is an `id` in `core/plans.json`: it answers the plan confirmation from step 3. Any other answer that is not a catalog option id is an error. If the request has no answers yet, change nothing and stop with `status: "needs_input"`, returning every catalog question in scope at once, in catalog order, each with its `id`, `question`, `type`, option ids as `options`, the option labels as `labels` (same order), and `when` when it has one, so the caller can ask them all and run again once (with `--resume` it continues this session). If answers are given but a `required` question that applies is missing, return only the missing ones the same way. When `SENDBIRD_LOCALE` is set (a language such as `ko` or `ja`), write `question` and `labels` in that language; never translate `id`, `options`, or `when`, since the caller passes answers back by option id. +3. Check the plan before writing any file. The plan is the `plan` answer; without one, it is what `bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/resolve-plan.sh" ` prints (`SENDBIRD_PLAN`, otherwise `unsure`). For each feature the `chat` or `notes` answers ask for that is listed in `core/plans.json`, run `SENDBIRD_PLAN= bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/resolve-plan.sh" --check ` and follow `knowledge/curated/common/plans.md`: build `ok` features, show the message for `sales` features and leave them out, and for `confirm` features: + - Interactive: show the message and ask with "Add it" and "Leave it out". + - Non-interactive: use the request's `confirm-` answer (`yes` builds it, `no` leaves it out). If a `confirm` feature has no answer, change nothing (no starter, no profile) and stop with `status: "needs_input"`, returning one question per such feature: id `confirm-`, the decision's `message` as `question`, `type` `single`, options `["yes", "no"]`, and `labels` `["Add it", "Leave it out"]` (in `SENDBIRD_LOCALE` when it is set). The caller runs again with the same answers plus `confirm-=yes` or `confirm-=no`. +4. Copy the starter named by `starters` in the catalog (`platform`, or `platform/`) from `${CLAUDE_PLUGIN_ROOT}/` into the project folder, then initialize git if the folder is not a repository. - For a new app that uses Chat and UIKit, the agent may start from `${CLAUDE_PLUGIN_ROOT}/templates/starters-bp//` instead (`react`, `react-native`, `ios-uikit`, `ios-swiftui`, `android-view`, `android-compose`): sign-in, connect, channel list, channel screen, and sign-out are already wired there. Read that folder's `_README.md` first, keep the practices listed in `templates/starters-bp/BEST_PRACTICES.md`, and tell the customer which starter was used. -4. Continue with Steps 2–5 above: App ID, then the platform agent implements sign-in and connect in the starter's `onLoginSucceeded` and `onLogout`, then every chosen feature, and shows each on screen. Install packages and build or type-check as the agent contract requires. -5. Write the run summary (`core/schemas/run-summary.schema.json`, with `skill: "setup"`) to the path in `SENDBIRD_RUN_SUMMARY_FILE` when it is set, in both modes, so the caller can read the result after the session ends. List the answers used under `steps`. +5. Save the `plan` answer as `plan` in `.sendbird-client/profile.json` (`unsure` when it was not answered). +6. Continue with Steps 2–5 above: App ID, then the platform agent implements sign-in and connect in the starter's `onLoginSucceeded` and `onLogout`, then every chosen feature that step 3 kept, and shows each on screen. A feature built after a confirmation goes under `manualSteps` as needing the plan in `requiredPlan`. Install packages as the agent contract requires. This run does not build or type-check the project (contract section 3). +7. Write the run summary (`core/schemas/run-summary.schema.json`, with `skill: "setup"`) to the path in `SENDBIRD_RUN_SUMMARY_FILE` when it is set, in both modes, so the caller can read the result after the session ends. List the answers used under `steps`. ## Wired knowledge (read these FIRST — populated and cited) - Install coordinates + packaging policy: `knowledge/curated//setup.md` (iOS is SPM-first). +- Plan-limited features and the confirm-before-adding rule: `knowledge/curated/common/plans.md` (data in `core/plans.json`). - Product init/connect/send: `knowledge/curated//products/.md` (chat/uikit/calls — all populated; iOS snippets build-verified, JS type-checked). - Verified splice code: `templates/ios/uikit/{chat/InitConnect.swift, uikit/SetupUIKit.swift, calls/SetupCalls.swift}` and the matching `templates/android/view/...`, `templates/js/react/...`, `templates/js/react-native/...` files (each `_README.md` documents splice steps). - Non-native hosts (SwiftUI/Compose): the host `_README.md` under templates explains the verified interop path — no host-native SDK API exists; do not invent one. diff --git a/plugins/sendbird-client/skills/start-chat/SKILL.md b/plugins/sendbird-client/skills/start-chat/SKILL.md index e8b7984..f184e92 100644 --- a/plugins/sendbird-client/skills/start-chat/SKILL.md +++ b/plugins/sendbird-client/skills/start-chat/SKILL.md @@ -17,7 +17,7 @@ Resolve the active product scope with `bash "${CLAUDE_PLUGIN_ROOT}/tools/detecti 3. Find or create the channel: create a group channel with only the other user's ID and `isDistinct` set to true. With distinct on, the server returns the existing channel that has the same members instead of creating a second one. Do not query for an existing channel first and do not create a non-distinct channel. Create only after connect has completed (`products/chat.md` "Call APIs only after connect completes"). 4. Open the channel screen by the URL of the returned channel, with no channel list in between, using the host's section below. Keep the app's navigation: push onto the existing stack or route, so the back action returns to the screen that had the button. 5. Push tap (only when asked, or when the app already handles Sendbird push): read the channel URL from the Sendbird payload and open the same screen. Use only the host sections below; where a host has no verified section, say so and leave push out. -6. Hand the splice to the platform agent once, with the host section and the files and lines from step 2. Verify with the customer's toolchain (docs/AGENT_CONTRACT.md section 4) and report pass, fail, or not run. +6. Hand the splice to the platform agent once, with the host section and the files and lines from step 2. Check the result by reading the project (docs/AGENT_CONTRACT.md section 4; this run does not build, contract section 3) and report each check as pass, fail, or not run. | Host | Open a channel by URL (and push tap) | | --- | --- | diff --git a/plugins/sendbird-client/skills/trace-sdk/SKILL.md b/plugins/sendbird-client/skills/trace-sdk/SKILL.md index ddf112f..ae7751f 100644 --- a/plugins/sendbird-client/skills/trace-sdk/SKILL.md +++ b/plugins/sendbird-client/skills/trace-sdk/SKILL.md @@ -13,7 +13,7 @@ Resolve the platform agent with `bash "${CLAUDE_PLUGIN_ROOT}/tools/routing/route Surface + docstrings for a public API (Intent A). ## Steps -1. Detect the platform and delegate once to its platform agent. In runtime-fetch mode, run `bash "${CLAUDE_PLUGIN_ROOT}/tools/local-sdk/read-surface.sh" [resolved-version]` to extract the available public surface into `.sendbird-client/cache//api-surface.md`, then search it for the keyword. If multiple Android AAR versions are installed, pass the version resolved by the customer build. +1. Detect the platform and delegate once to its platform agent. In runtime-fetch mode, run `bash "${CLAUDE_PLUGIN_ROOT}/tools/local-sdk/read-surface.sh" [resolved-version]` to extract the available public surface into `.sendbird-client/cache//api-surface.md`, then search it for the keyword. If multiple Android AAR versions are installed, pass the version the project's build file declares. 2. Also check `knowledge/curated//products/.md` (populated, cited) for the symbol's documented usage, and `knowledge/imports///api-surface.md` when present (bundled mode). Narrow by flags or context. 3. Return the public signature(s), public docstrings, and a call-flow summary with file references (customer-local cache path, public mirror name, or ROLE-TOKEN + line). diff --git a/plugins/sendbird-client/skills/verify-integration/SKILL.md b/plugins/sendbird-client/skills/verify-integration/SKILL.md index 6d49a00..2ac5970 100644 --- a/plugins/sendbird-client/skills/verify-integration/SKILL.md +++ b/plugins/sendbird-client/skills/verify-integration/SKILL.md @@ -10,7 +10,7 @@ allowed-tools: Read, Bash, Grep, Glob, WebFetch, Agent Resolve every plugin-owned path below from `${CLAUDE_PLUGIN_ROOT}`. Where that variable is empty (Codex does not set it for shell commands), the plugin root is the folder two levels above this SKILL.md. Resolve the platform agent with `bash "${CLAUDE_PLUGIN_ROOT}/tools/routing/route-agent.sh" code`, then call `Agent` with that exact agent name. Do not perform the platform checklist yourself or return an integration verdict before the agent responds. If `Agent` is unavailable or fails, report that the platform inspection was not completed; a router result alone is not an inspection. -Read-only sanity scan (Intent A — factual checks). +Read-only sanity scan (Intent A — factual checks). It reads the project and does not build, compile, or type-check it unless the customer explicitly asks for a build. ## Steps 1. Run `bash "${CLAUDE_PLUGIN_ROOT}/tools/detection/detect.sh" ` and resolve platform, host, products, and installed SDK versions. diff --git a/plugins/sendbird-client/tools/detection/resolve-plan.sh b/plugins/sendbird-client/tools/detection/resolve-plan.sh new file mode 100755 index 0000000..1d51757 --- /dev/null +++ b/plugins/sendbird-client/tools/detection/resolve-plan.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# Resolve the customer's Sendbird plan for one project, and decide what to do with a plan-limited feature. +# Usage: resolve-plan.sh -> starter | pro | enterprise | unsure +# resolve-plan.sh --check -> one JSON decision (see core/plans.json) +# Order: SENDBIRD_PLAN > .sendbird-client/profile.json plan > unsure (both read in any case; "free trial" is unsure). +# Decisions: ok (the plan includes it), confirm (ask the customer before building it), +# sales (Enterprise only, not built). +set -euo pipefail +dir="${1:?usage: resolve-plan.sh [--check ]}" +HERE="$(cd "$(dirname "$0")" && pwd)" +ROOT="$(cd "$HERE/../.." && pwd)" +P="$ROOT/core/plans.json" + +# The environment and the profile are read the same way: any case, spaces ignored, +# and a free trial counts as unsure (knowledge/curated/common/plans.md). +normalize() { + local p + p="$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')" + case "$p" in freetrial) p="unsure" ;; esac + printf '%s' "$p" +} +plan="" +if [ -n "${SENDBIRD_PLAN:-}" ]; then + plan="$(normalize "$SENDBIRD_PLAN")" +else + profile="$dir/.sendbird-client/profile.json" + [ -f "$profile" ] && plan="$(normalize "$(jq -r '.plan // empty' "$profile" 2>/dev/null || true)")" +fi +[ -n "$plan" ] || plan="unsure" +jq -e --arg p "$plan" '(.plans + [.unsure]) | index($p)' "$P" >/dev/null || { + echo "unknown plan: $plan (expected one of: $(jq -r '(.plans + [.unsure]) | join(", ")' "$P"))" >&2 + exit 1 +} + +if [ "${2:-}" != "--check" ]; then + printf '%s\n' "$plan" + exit 0 +fi +feature="${3:?usage: resolve-plan.sh --check }" +jq -e --arg f "$feature" '.features | map(.id) | index($f)' "$P" >/dev/null || { + echo "unknown feature: $feature (see core/plans.json)" >&2 + exit 2 +} + +jq -c --arg plan "$plan" --arg f "$feature" ' + def cap: (.[0:1] | ascii_upcase) + .[1:]; + .salesUrl as $sales | .plans as $order | + (.features[] | select(.id == $f)) as $x | + ($order | index($plan)) as $have | ($order | index($x.minPlan)) as $need | + (if $have != null and $need != null and $have >= $need then "ok" + elif $x.minPlan == "enterprise" then "sales" + else "confirm" end) as $decision | + { + feature: $x.id, label: $x.label, where: $x.where, plan: $plan, requiredPlan: $x.minPlan, decision: $decision, + message: ( + if $decision == "ok" then null + elif $decision == "sales" then "\($x.label) is available only on the Enterprise plan, so it is not added to the code. To get it, contact Sendbird sales: \($sales)" + elif $plan == "unsure" then "\($x.label) works only on the \($x.minPlan | cap) plan or higher (the free trial includes it), and the plan for this project is not known. Add it anyway?" + else "\($x.label) works only on the \($x.minPlan | cap) plan or higher, and this project is on the \($plan | cap) plan. Add it anyway? It will not work until the plan is changed in the Sendbird Dashboard." + end) + }' "$P"