diff --git a/README.md b/README.md index 31ebfb1..aa29d3d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @roostorg/coop-integration-example -Example [COOP](https://github.com/roostorg/coop) integration plugin. Reference repository showing how to build a custom integration and signals for use in COOP. +Example [Coop](https://github.com/roostorg/coop) integration plugin. Reference repository showing how to build a custom integration and signals for use in Coop. - **Integration config** – saving and loading per-org config (e.g. “True percentage”) - **Routing rules** – using the plugin signal in conditions @@ -29,12 +29,12 @@ npm run build npm install @roostorg/coop-integration-example ``` -## Configure in COOP +## Configure in Coop -In your COOP `integrations.config.json` (or `INTEGRATIONS_CONFIG_PATH`), add: +In your Coop `integrations.config.json` (or `INTEGRATIONS_CONFIG_PATH`), add: **Local path (development):** -If you cloned this repo next to your COOP server directory, use a path relative to the server (e.g. from `server/`): +If you cloned this repo next to your Coop server directory, use a path relative to the server (e.g. from `server/`): ```json { @@ -54,18 +54,18 @@ If you cloned this repo next to your COOP server directory, use a path relative } ``` -Restart the COOP server so it loads the plugin. +Restart the Coop server so it loads the plugin. ## Use in the app -1. **Org settings → Integrations** – you should see “COOP Integration Example”. Open it and set **True percentage (0–100)** (e.g. `70`) for Random Signal Selection. Save. +1. **Org settings → Integrations** – you should see Coop Integration Example”. Open it and set **True percentage (0–100)** (e.g. `70`) for Random Signal Selection. Save. 2. **Rules (routing or enforcement)** – when adding a condition: - **Random Signal Selection**: Pick that signal; the condition uses your configured percentage (true/false). - **Random Score**: Pick “Random Score”, then set a **threshold** on the 0–100 scale (e.g. `50`) and choose **above** or **below**. The rule compares the random score to your threshold. ## Contract -This package implements the COOP plugin contract from `@roostorg/types`: +This package implements the Coop plugin contract from `@roostorg/types`: - **Default export:** `CoopIntegrationPlugin` with `manifest` and `createSignals(context)`. - **Manifest:** `id`, `name`, `version`, `requiresConfig`, `configurationFields`, `signalTypeIds`, `modelCard` (must include every section id in `REQUIRED_MODEL_CARD_SECTION_IDS` from `@roostorg/types`; call `assertModelCardHasRequiredSections(modelCard)` when registering). diff --git a/package-lock.json b/package-lock.json index 2f537f5..23c92fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@roostorg/coop-integration-example", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@roostorg/coop-integration-example", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache-2.0", "devDependencies": { "@roostorg/types": "^2.0.0", diff --git a/package.json b/package.json index 7c4eb91..7d67e78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@roostorg/coop-integration-example", - "version": "2.0.0", + "version": "2.0.1", "description": "Example package to show how a custom integration and signal can be used in COOP this is meant to be a reference repository and provide basic determination", "type": "module", "main": "dist/index.js", diff --git a/roost-example-logo.png b/roost-example-logo.png index 77634d8..9249b95 100644 Binary files a/roost-example-logo.png and b/roost-example-logo.png differ diff --git a/src/index.ts b/src/index.ts index bcf5684..c948068 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ /** - * Example COOP integration plugin with two signal types: + * Example Coop integration plugin with two signal types: * 1. Random Signal Selection – boolean, probability from org config (tests config saving). * 2. Random Score – numeric 0–100, threshold set in the rule (tests score vs threshold). */ @@ -19,8 +19,8 @@ const INTEGRATION_ID = 'COOP_INTEGRATION_EXAMPLE'; const DEFAULT_TRUE_PERCENTAGE = 50; const modelCard: ModelCard = { - modelName: 'COOP Integration Example', - version: '2.0.0', + modelName: 'Coop Integration Example', + version: '2.0.1', releaseDate: 'March 2026', sections: [ { @@ -119,9 +119,9 @@ assertModelCardHasRequiredSections(modelCard); const manifest: IntegrationManifest = { id: INTEGRATION_ID, - name: 'COOP Integration Example', + name: 'Coop Integration Example', /** Same semver as modelCard.version: this plugin’s release, not @roostorg/types. */ - version: '2.0.0', + version: '2.0.1', description: 'Example plugin with two signals: config-driven boolean and a numeric score you compare with a threshold in the rule.', docsUrl: 'https://roostorg.github.io/coop/INTEGRATIONS_PLUGIN.html',