Add report_dreaming_artifact tool to engine-tools MCP server#20
Draft
dario-nunez wants to merge 1 commit into
Draft
Add report_dreaming_artifact tool to engine-tools MCP server#20dario-nunez wants to merge 1 commit into
dario-nunez wants to merge 1 commit into
Conversation
Adds a report_dreaming_artifact MCP tool so dream jobs can hand a generated artifact back to the platform over the existing job-progress channel, without exposing the engine token to the model. - client.ts: DreamingArtifact type, DREAMING_* progress constants, and PlatformClient.sendDreamingArtifact() which posts on the first-party "dreaming" progress namespace (not the default sessions-v2 namespace). - mcp-server.ts: register report_dreaming_artifact, mirroring reply_to_comment; guards on platformClient and enforces a MAX_DREAMING_ARTIFACT_CONTENT_BYTES size cap before sending. - index.ts: export the new public symbols. Tool name, payload schema, and size limit are provisional M0 defaults (github/agents issue 1476) and may change once finalized. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
What
Adds a
report_dreaming_artifacttool to theengine-toolsMCP server so Dreaming jobs can report a generated artifact back to the platform.Implements the SDK piece of github/agents issue 1476 (Dreaming M0: add Dreaming artifact reporting tool).
Why
Dream jobs (e.g. memory-voting) produce an artifact that needs to reach the platform. MCP tools do not have the engine job-progress token, so the tool hands the artifact to
PlatformClient, which already holds the token and nonce and posts to the job-progress endpoint. The token never reaches the model.Changes
client.tsDreamingArtifacttype (title,summary, optionaldata).DREAMING_PROGRESS_NAMESPACE = "dreaming",DREAMING_ARTIFACT_KIND = "artifact",DREAMING_ARTIFACT_VERSION = 0.PlatformClient.sendDreamingArtifact()posts a progress payload on the first-partydreamingnamespace (deliberately not the defaultsessions-v2), so downstream consumers can filter on it.mcp-server.tsreport_dreaming_artifact, mirroring the existingreply_to_commenttool.config.platformClientand enforcesMAX_DREAMING_ARTIFACT_CONTENT_BYTES(256 KiB) before sending, so oversized artifacts are rejected up front rather than failing on the downstream hydro topic.index.tsProvisional decisions (M0)
These three items from the issue are resolved here with reasonable defaults and may change:
report_dreaming_artifact{ title, summary, data? }Verification
npm run build(typecheck + esbuild bundle) passes.dist, using the MCP in-memory transport and a stubbedfetch, confirms:title+summaryinput schema;jobs/{jobId}/progresswithnamespace: "dreaming",kind: "artifact",version: 0, the auth bearer + job-nonce headers, andcontentround-tripping the artifact;isErrorand issues no HTTP call.This repo has no test runner, so no automated tests were added.
Follow-ups (out of scope here)
dreamingprogress namespace to its emit list so the payload is forwarded to hydro.report_dreaming_artifactin its tools and prompt for it.