feat(miniapp): add scoped agent context files - #2597
Merged
nonoqing merged 3 commits intoAug 28, 2026
Conversation
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.
Summary
contextFiles.miniapp-context/<scope>ReadandGrepinspect only the current snapshot without writing it to a MiniApp or workspace filesystemminiapp_agent_context_files_v1for Peer Device runs so older peers cannot silently drop contextMotivation
MiniApps can invoke Agent Runtime, but large structured inputs do not belong inline in the prompt. Previously an Agent-backed MiniApp could receive only a truncated summary and had no scoped tool path for inspecting the full payload. This adds a reusable, opt-in framework capability; it is not specific to one MiniApp or one data format.
Verification
pnpm --dir src/web-ui exec vitest run ...(6 focused files, 100 tests)pnpm --dir src/web-ui run type-checkcargo test -p bitfun-core --no-default-features --features agent-runtime,tools-miniapp,git --lib miniapp::agent_context::testscargo test -p bitfun-core --no-default-features --features agent-runtime,tools-miniapp,git --lib miniapp_context_runtime::testscargo test -p bitfun-core --no-default-features --features agent-runtime,tools-miniapp,git --lib runtime_read_rootscargo test -p bitfun-agent-tools --no-default-featurescargo test -p bitfun-desktop --lib peer_ping_advertises_mutation_capabilitiespnpm run check:core-boundariesRemote scenarios
Scope note
This PR provides the reusable framework. The external Stock Market Lens MiniApp package still needs to pass its full market payload through
contextFilesand receive a separate end-to-end Agent smoke test before that app-specific issue is considered fully resolved.