-
Notifications
You must be signed in to change notification settings - Fork 0
[Types] Upgrade types and include new required model card fields #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # CODEOWNERS file for managing repository permissions | ||
| # Format: path-pattern @username @org/team-name | ||
|
|
||
| # Maintainers: Default owners for all files | ||
| * @roostorg/roosters | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,12 +4,13 @@ | |
| * 2. Random Score – numeric [0, 1], threshold set in the rule (tests score vs threshold). | ||
| */ | ||
|
|
||
| import type { | ||
| CoopIntegrationPlugin, | ||
| IntegrationManifest, | ||
| ModelCard, | ||
| PluginSignalContext, | ||
| PluginSignalDescriptor, | ||
| import { | ||
| assertModelCardHasRequiredSections, | ||
| type CoopIntegrationPlugin, | ||
| type IntegrationManifest, | ||
| type ModelCard, | ||
| type PluginSignalContext, | ||
| type PluginSignalDescriptor, | ||
| } from '@roostorg/types'; | ||
|
|
||
| const SIGNAL_TYPE_RANDOM_SELECTION = 'RANDOM_SIGNAL_SELECTION'; | ||
|
|
@@ -20,48 +21,104 @@ const DEFAULT_TRUE_PERCENTAGE = 50; | |
| const modelCard: ModelCard = { | ||
| modelName: 'COOP Integration Example', | ||
| version: '1.0.0', | ||
| releaseDate: '2026', | ||
| releaseDate: 'March 2026', | ||
| sections: [ | ||
| { | ||
| id: 'modelDetails', | ||
| title: 'Model Details', | ||
| id: 'trainingData', | ||
| title: 'Training Data', | ||
| fields: [ | ||
| { label: 'Model Name', value: 'COOP Integration Example' }, | ||
| { | ||
| label: 'Purpose', | ||
| label: 'Overview', | ||
| value: | ||
| 'Example plugin with two signals: one uses org config (boolean), one returns a numeric score so you can set a threshold in the rule (over/under).', | ||
| 'This reference integration does not use a trained model. Outputs are randomly generated for demonstration and testing of COOP rules, configuration, and UI only.', | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: 'policyAndTaxonomy', | ||
| title: 'Policy and Taxonomy', | ||
| fields: [ | ||
| { | ||
| label: 'Scope', | ||
| value: | ||
| 'Not a content policy engine. Signals are placeholders: boolean “coin flip” with configurable probability and a numeric random score for threshold exercises in rules.', | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: 'annotationMethodology', | ||
| title: 'Annotation Methodology', | ||
| fields: [ | ||
| { | ||
| label: 'Method', | ||
| value: | ||
| 'No human or automated labeling pipeline. Values are produced with Math.random() (or equivalent logic) at evaluation time.', | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: 'performanceBenchmarks', | ||
| title: 'Performance and Benchmarks', | ||
| fields: [ | ||
| { | ||
| label: 'Benchmarks', | ||
| value: | ||
| 'No precision, recall, or latency benchmarks apply. Do not use performance claims from this package in production decisions.', | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: 'biasAndLimitations', | ||
| title: 'Bias and Limitations', | ||
| fields: [ | ||
| { | ||
| label: 'Limitations', | ||
| value: | ||
| 'Outputs are uncorrelated with input content. Unsuitable for safety, compliance, or moderation decisions. For integration testing and developer learning only.', | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: 'implementationGuidance', | ||
| title: 'Implementation Guidance', | ||
| fields: [ | ||
| { | ||
| label: 'Signals', | ||
| value: `${SIGNAL_TYPE_RANDOM_SELECTION} (boolean, config-driven) and ${SIGNAL_TYPE_RANDOM_SCORE} (number 0–1, threshold in rule).`, | ||
| value: `${SIGNAL_TYPE_RANDOM_SELECTION} (boolean; org config truePercentage 0–100). ${SIGNAL_TYPE_RANDOM_SCORE} (number; set threshold and above/below in the rule).`, | ||
| }, | ||
| { | ||
| label: 'Configuration', | ||
| value: | ||
| 'Random Signal Selection requires org integration config (true percentage). Random Score requires no integration config.', | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: 'technicalIntegration', | ||
| title: 'Technical Integration', | ||
| id: 'relevantLinks', | ||
| title: 'Relevant Links', | ||
| fields: [ | ||
| { | ||
| label: 'Signal types', | ||
| value: `${SIGNAL_TYPE_RANDOM_SELECTION}, ${SIGNAL_TYPE_RANDOM_SCORE}`, | ||
| label: 'Repository', | ||
| value: 'https://github.com/roostorg/coop-integration-example', | ||
| }, | ||
| { | ||
| label: 'Config', | ||
| value: 'truePercentage (0–100) for Random Signal Selection only; Random Score needs no config.', | ||
| label: 'Documentation', | ||
| value: 'https://roostorg.github.io/coop/INTEGRATIONS_PLUGIN.html', | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| assertModelCardHasRequiredSections(modelCard); | ||
|
|
||
| const manifest: IntegrationManifest = { | ||
| id: INTEGRATION_ID, | ||
| name: 'COOP Integration Example', | ||
| version: '1.0.0', | ||
|
||
| description: | ||
| 'Example plugin with two signals: config-driven boolean and a numeric score you compare with a threshold in the rule.', | ||
| docsUrl: 'https://github.com/roostorg/coop/tree/main/coop-integration-example', | ||
| docsUrl: 'https://roostorg.github.io/coop/INTEGRATIONS_PLUGIN.html', | ||
| requiresConfig: true, | ||
| configurationFields: [ | ||
| { | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of versions here - making sure this is the version of the model card for this integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that it is OK to be 1.0.0 even though the types package has moved to 2.0.0. I think this is fine, would like your eyes on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually updated all to 2.0 as this package was upgraded to 2.0 given types also changed,