Repository navigation
feat(mcp): the app server and its card for a chat app, and a check in h5p-author that reads no file (#270) - #271
Merged
Merged
Conversation
… h5p-author that reads no file (#270)
Contributor
There was a problem hiding this comment.
4 issues found across 15 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/author/lib/media.mjs">
<violation number="1" location="packages/author/lib/media.mjs:199">
P3: The MediaAccess doc says each file under `unread` is judged by its name alone, but web addresses are left as written and never listed in `unread`. Reword the doc to say only path-named files are judged and listed, or list web addresses too.</violation>
</file>
<file name="packages/mcp/README.md">
<violation number="1" location="packages/mcp/README.md:84">
P3: `h5p_types` calls do not carry an activity source or run the source check; restrict this privacy description to `h5p_play` calls.</violation>
</file>
<file name="design/mcp.md">
<violation number="1" location="design/mcp.md:131">
P3: This says ChatGPT integration was hand-checked, but this PR leaves ChatGPT and other chat apps unverified; mark ChatGPT as unverified or limit the claim to the stand-in page.</violation>
</file>
<file name="packages/mcp/lib/card.html">
<violation number="1" location="packages/mcp/lib/card.html:149">
P2: The card handles only one attachment even when the checked source has multiple unread files, despite telling the user it will ask for the others. Accept and map all attachment references, or explicitly reject multi-file sources instead of building with missing or misnamed files.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…ress, the card says when a file did not come and guesses no name, and the test counts connections (#270)
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
… and the note on unread says when a file is listed (#270)
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.
Closes #270. Part of #210.
The probe on the owner's machine played an activity in a ChatGPT reply and saved its
.h5pfrom there. This is the same server and card as a part of the toolkit: a second command of@missing-elements/h5p-mcp, with its tests.What is in it
h5p-mcp-app, an MCP server over HTTP (lib/app.mjs,bin/h5p-mcp-app.mjs).createApp()is a web-standardfetch(request)handler; the command serves it on a port. The endpoint is/mcp.h5p_types, the local server's, without its lines on folders.h5p_playchecks a source and answers ash5p_builddoes: the problems by their paths, or the type, the notes and what the activity holds.lib/card.html): the probe's last one without its test report and without its reports to the server. It frames the play page of the org site and gives it what only the chat has: the attached file's address and size, a save for a package up to 8 MB, an open tab for a link of the site's.lib/answers.mjs: what both servers say alike, moved out ofserver.mjsso neither holds a copy. The local server's answers are unchanged, and its tests pass as they were.h5p-author: a check that reads no file,buildPackage(source, undefined, { check: true, unread: true }). No file is looked for, none downloaded and no site asked; a file named by a path is judged by its name and listed in the result'sunread. The probe told a missing file's problem from another by its wording, and so gave no outline for an activity with a video; now it has one.What the server holds of a request
Nothing, by the owner's rule that no server of ours processes a person's file:
_meta, which the model does not see, and only the person's browser asks the chat's store.For the chat
Tests
packages/mcp/tests/app.test.ts, new: the command on a free port, asked over HTTP with the SDK's client. The two tools and their words (under 6,000 characters), the file input's schema, the card and its policy, a source checked and one refused, an attachment handed to the card alone with a file store that counts requests never asked, a call whose file is no reference, a body over 1 MB, and that nothing was written.packages/author/tests/confine.test.ts: four tests ofunread.pnpm testinpackages/mcp: 30 pass.pnpm test:unitinpackages/author: 291 pass. Both type checks pass.Checked by hand
The card as this server serves it, in a page that stands in for a chat: ChatGPT's values on the window, the MCP Apps handshake, a host that saves what it is handed, and the card's frame sandboxed so that it saves no file and opens no tab, as ChatGPT's was found to. The play page was the org site's build, served locally.
Screenshots of the loader and of the played card looked at, light and dark.
Not verified
To decide after this
h5p-authorfirst (a minor, forunread), thenh5p-mcp.Summary by cubic
Closes #270 and part of #210. Adds a second command to
@missing-elements/h5p-mcp—h5p-mcp-app, an MCP server over HTTP for a chat app that shows a card in its reply, ChatGPT first — and a check inh5p-authorthat reads no file.The app server and its card
createApp()is a web-standardfetch(request)handler, served by the command on a port at/mcp.h5p_types(the local server's, without its lines on folders) andh5p_play, which checks a source and answers ash5p_builddoes — the problems by their paths, or the type, notes and outline.lib/card.html) frames the play page of the org site and gives it what only the chat has: the attached file's address and size, a save for packages up to 8 MB, and an open tab for a link of the site's._meta, which the model does not see; only the person's browser asks the chat's store. An attachment is handed to the card only when the source names a file; one it does not name is not used. It stores and logs nothing of a request; a body over 1 MB is refused.lib/answers.mjs; the local server's answers and tests are unchanged.The unread check in
h5p-authorbuildPackage(source, undefined, { check: true, unread: true })checks a source whose files are elsewhere, as an attachment in a chat is: no file is looked for, none downloaded and no site asked; a file named by a path is judged by its name — a problem where its field takes no such type — and listed in the result'sunreadwhere it does, andbase,withinandfetchare not used. Withoutcheck,unreadthrows.Release
h5p-authorfirst (a minor, forunread), thenh5p-mcp. Hosting, the privacy policy and the listing are #210.Written for commit ed795ce. Summary will update on new commits.