feat: convert schema.toml to machine-parseable format#30
Conversation
Replace comment-based documentation format with structured TOML that can be deserialized into the RegistrySchema Rust type. All 6 content types (provider, agent, hand, integration, skill, plugin) preserved with every field, description, enum option, and nested section.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc92ff0cbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
schema.toml
Outdated
| type = "string" | ||
| required = false | ||
| description = "Integration category" | ||
| options = ["devtools", "communication", "storage", "monitoring", "data", "productivity"] |
There was a problem hiding this comment.
Expand integration category enum to include live categories
The new machine-readable enum omits categories already present in the registry (cloud and ai), so schema-driven validation/forms will reject or fail to round-trip existing integrations such as integrations/aws.toml, integrations/azure-mcp.toml, integrations/gcp-mcp.toml, integrations/brave-search.toml, and integrations/exa-search.toml.
Useful? React with 👍 / 👎.
| type = "string" | ||
| required = true | ||
| description = "Type of requirement" | ||
| options = ["binary", "package", "service"] |
There was a problem hiding this comment.
Add current requirement types to hand dependency enum
This enum currently allows only binary/package/service, but active hand manifests use additional requirement types (api_key, any_env_var), so tools consuming this schema as a whitelist will mark valid files as invalid (for example hands/twitter/HAND.toml, hands/reddit/HAND.toml, and hands/creator/HAND.toml).
Useful? React with 👍 / 👎.
| type = "string" | ||
| required = true | ||
| description = "Display format for the metric value" | ||
| options = ["number", "currency", "percentage"] |
There was a problem hiding this comment.
Include existing dashboard metric formats in enum
The metric format enum is now machine-enforced but excludes formats already used by hands (text and duration), which will break schema-based editing/validation for current manifests like hands/collector/HAND.toml, hands/trader/HAND.toml, hands/apitester/HAND.toml, and hands/clip/HAND.toml.
Useful? React with 👍 / 👎.
| type = "string" | ||
| required = false | ||
| description = "How often this hand runs" | ||
| options = ["continuous", "on-demand", "scheduled"] |
There was a problem hiding this comment.
Add currently used frequencies to hand metadata enum
The frequency enum omits values already present in the registry (daily, hourly), so schema consumers that trust options will incorrectly reject valid hand metadata (e.g., hands/linkedin/HAND.toml, hands/twitter/HAND.toml, hands/reddit/HAND.toml).
Useful? React with 👍 / 👎.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Convert schema.toml from comment-based documentation to structured TOML that can be parsed by
RegistrySchematypes in librefang core.Changes
type,required,description,example,default,optionssectionswithrepeatable = truefor array-of-tables patternsMotivation
The core API endpoint
GET /api/registry/schema(PR librefang/librefang#1715) needs to parse this file to serve schema metadata to the dashboard for dynamic form generation.Format
Test plan
toml::from_str::<RegistrySchema>()parses successfullymake validatestill passes