Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/plugin-ops/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plugin-ops",
"version": "0.2.3",
"version": "0.2.4",
"description": "Install, update, migrate, and validate Codex plugins and marketplace catalogs.",
"author": {
"name": "Melodic Software",
Expand Down
19 changes: 18 additions & 1 deletion plugins/plugin-ops/skills/verify-plugin/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ contract or repository-adaptation design is correct.
node <skill-directory>/scripts/validate-marketplace.mjs <target-root>
```

Add `--json` when machine-readable output is useful.
Add `--json` when machine-readable output is useful; its shape is the
contract in [JSON output](#json-output).
4. Fix structural errors before judgment-based review. Do not weaken the
validator to accept a malformed package.
5. Review the user-goal and architecture contract:
Expand Down Expand Up @@ -80,3 +81,19 @@ contract or repository-adaptation design is correct.
Report errors first, then warnings and untested behavior. Include exact file
paths, commands, live upstream URLs and date checked, context cases, adapter and
fallback decisions, and behavioral evidence.

## JSON output

`--json` prints one object with these keys, in this order. Paths are absolute.
Comment thread
kyle-sexton marked this conversation as resolved.
Resolved

| Key | Type | Meaning |
| --- | --- | --- |
| `target` | string | Validated root. |
| `kind` | `"marketplace"`, `"plugin"`, or `null` | What the target was; `null` when the target is neither or could not be inspected. |
| `catalog` | string or `null` | Catalog Codex loads; `null` for a plugin target. |
| `manifests` | array | One `{plugin, manifest, format}` per resolved plugin: its root, the manifest Codex loads, and `format` (`agent-plugin`, `codex`, `claude`, or `cursor`). An entry may add `overlay`, the `.codex-plugin` file read as the Codex overlay. |
| `errors` | array | `{code, file, message}` entries that fail validation. |
| `warnings` | array | `{code, file, message}` entries that do not. |

Adding a key is compatible. Renaming or removing one, or changing its type, is
breaking. The exit code is 0 only when `errors` is empty.
Comment thread
kyle-sexton marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ test("rejects an unparsable marketplace file", async (t) => {
});

test("skips a catalog slot that is not a file, as Codex does", async (t) => {
// Codex checks `is_file()` on each `MARKETPLACE_MANIFEST_RELATIVE_PATHS` entry in
// codex-rs/core-plugins/src/marketplace.rs (rust-v0.162.0).
const root = await tempRoot(t);
await mkdir(path.join(root, ".agents", "plugins", "marketplace.json"), { recursive: true });
const result = await validateTarget(root);
Expand Down Expand Up @@ -834,6 +836,7 @@ test("command line emits the documented result shape with --json", async (t) =>
const root = await completeMarketplace(t);
const { stdout } = await run(process.execPath, [VALIDATOR, root, "--json"]);
const parsed = JSON.parse(stdout);
// The key list is the contract in SKILL.md, section "JSON output".
assert.deepEqual(Object.keys(parsed), ["target", "kind", "catalog", "manifests", "errors", "warnings"]);
assert.equal(parsed.target, root);
assert.equal(parsed.kind, "marketplace");
Expand Down
2 changes: 1 addition & 1 deletion tests/plugin-ops-plugin.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const paths = skillPaths("plugin-ops");
test("the marketplace exposes the Plugin Ops plugin", async () => {
await assertMarketplacePlugin({
name: "plugin-ops",
version: "0.2.3",
version: "0.2.4",
category: "Developer Tools",
});
});
Expand Down