Repository navigation
feat(plugin): validate and pack the chatgpt upload package - #229
Open
Jerod Santo (jerodsanto) wants to merge 3 commits into
Open
Jerod Santo (jerodsanto) wants to merge 3 commits into
Jerod Santo (jerodsanto) wants to merge 3 commits into
Conversation
Encode the OpenAI plugin submission requirements as pure checks over the package contents, and build the upload ZIP from plugins/chatgpt. The archive is written outside the repository, with plugin.json, mcp.json, and assets/icon.png at its root. The rules and the IO are separate modules so the requirements stay unit-testable without a fixture directory. An error blocks the ZIP and a warning does not. demo_recording_url is a warning because recording the walkthrough requires first installing the ZIP in developer mode; --strict promotes warnings for the pre-submission gate.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Bugbot Autofix is ON, but none of the reported issues met your autofix severity threshold.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 30a7a3d. Configure here.
… document SCRIPT_META declares json: 'result', so the fleet runner already renders a JSON document from what main() returns. Printing one as well put two documents on stdout and left --json unparseable. Carry the findings and output path on ScriptResult.data, which puts them at .data in the runner's single document.
A presence check that accepts '' let a blank demo_recording_url skip its warning, and blank review-case fields, capability entries, and category values pass as set, so --strict could pass a package the portal rejects. stringField now reads an empty string as absent, matching how envString treats an empty environment variable, and a blank capability entry is rejected explicitly.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

plugins/chatgpt/had no repeatable way to check or build its upload archive - step 2 of the release checklist was "build the ZIP" by hand. This addspnpm run plugin:chatgpt:pack, which checks the package against OpenAI's submission requirements and writes the archive.Developer tooling only. No runtime path changes and the published package is untouched.
What it checks
The
agent-plugins.orgschemas typeextensionsas a bare{"type": "object"}, so nothing insidecom.openai- the block submission review actually reads - is schema-checked. These rules cover that gap:displayName30,shortDescription30,longDescription4000,developerName80,capabilities20 items of 120websiteURL,supportURL,privacyPolicyURL,termsOfServiceURLpresent, HTTPS, under 1024headersblock, which is where a credential would ride along into the uploadErrors block the ZIP, warnings do not
demo_recording_urlis required for submission but is a warning here, because recording the walkthrough requires first installing this very ZIP in developer mode. Making it an error would deadlock the process.--strictpromotes warnings to errors for the pre-submission gate.Layout
requirements.mtsholds the rules as pure functions over the package's in-memory contents;pack.mtsis the IO shell and CLI. The split keeps the rules unit-testable without a fixture directory on disk.The archive uses the fleet's existing dep-zero ZIP writer - no new dependency - and lands in the OS temp directory so a build artifact never enters the tracked tree.
--out <dir>overrides the destination.Validation
Ran: 19 tests in
test/repo/unit/plugin-chatgpt-requirements.test.mts. They assert the shipped package passes with only the expecteddemo_recording_urlwarning, that each rule rejects a correspondingly broken manifest, and that the archive round-trips its three entries byte-identical at the root.Both manifests were also validated against the live
agent-plugins.org/schemas/1.0.0/*schemas, and the validator itself was checked against deliberately broken inputs so a pass means something.tsc --noEmitreports 0 errors repo-wide; oxlint is clean on every file touched.Known gap, tracked separately: the archive this writes is rejected by the ChatGPT upload dialog.
createZipArchiveemits a zeroed DOS timestamp (1980-00-00) and zero file-mode bits, which some extractors map to mode0000. A conventionally-built archive with the same bytes is under test to confirm the cause before this script's writer is changed.Note
Low Risk
Release-time developer tooling and docs only; no MCP server or published npm runtime changes.
Overview
Adds
pnpm run plugin:chatgpt:packso the ChatGPT plugin upload archive is validated and built repeatably instead of hand-zippingplugins/chatgpt/.The CLI reads
plugin.json,mcp.json, andassets/icon.png, runs OpenAI submission checks (listing limits, HTTPS URLs, 5/3 review cases, PNG icon rules, MCP over HTTPS with noheaders), then writes a versioned ZIP to the OS temp dir by default (--out,--strict,--json). Errors block the ZIP;demo_recording_urlis a warning until--strictbecause the demo needs the ZIP installed first.Rules live in testable
requirements.mts;pack.mtshandles IO. Release docs step 2 now points at this script.PLUGIN_CHATGPT_DIRis added to repo paths. Unit tests cover the shipped package and each gate.Reviewed by Cursor Bugbot for commit 30a7a3d. Configure here.