Tech
Validate the manifest, reject on failure, and your plugin client is non-conformant
Agent Plugins 1.0.0 ships a JSON Schema for plugin.json . It sets
additionalProperties: false . So the obvious loader is four lines:
const manifest = JSON . parse ( await readFile ( join ( dir , ' plugin.json ' )));
if ( ! validate ( manifest )) return reject ( ' invalid manifest ' );
That loader is wrong, and the specification says so in a sentence most people
never reach. §5.2:
Clients MUST report and ignore each unknown fi...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to