feat(mirage): Add Mirage integration as Agent tool#3530
Open
bogdankostic wants to merge 6 commits into
Open
Conversation
Contributor
Coverage report (mirage)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
julian-risch
requested changes
Jul 3, 2026
julian-risch
left a comment
Member
There was a problem hiding this comment.
Looks good to me in general. I have two remarks on the more complex parts where I am not entirely sure if what I expect should be in scope. I believe it should.
julian-risch
approved these changes
Jul 3, 2026
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.
Related Issues
Proposed Changes:
Adds a new
mirage-haystackintegration that exposes Mirage — a unified virtual filesystem that mounts heterogeneous backends (object storage, databases, SaaS apps, local disk) as one filesystem. It lets anAgentoperate over all of those backends with plain bash through a single tool.MirageMount— a declarative, serializable description of one mounted backend (path,resourceregistry name,config,read_only). A single generic constructor covers all of Mirage's backends uniformly;configvalues may be plain values, HaystackSecrets, or an OAuth token source, and are resolved only when the live workspace is built.MirageWorkspace— holds the mount tree and cache configuration, lazily builds a livemirage.Workspaceon first use via Mirage's resource registry, serializes cleanly (resolvingSecrets / token sources only at build time), and exposesrun/run_asyncthat normalize and truncate output for an LLM.MirageShellTool— a HaystackToolthat gives anAgentone guarded bash command surface across every mount.How did you test it?
tests/test_workspace.pyandtests/test_shell_tool.py, covering mount/workspace construction and validation,Secretand OAuth-token-source serialization round-trips (no plaintext leakage), per-mount read-only enforcement, RAM/disk command execution, output truncation, tool shape andto_dict/from_dict, and the command guard — including the substitution/backtick/subshell bypass cases and fail-closed behavior for quoted or variable command names.Agentdriving the shell tool end to end).Notes for the reviewer
mirage-ai==0.0.3: Mirage is pre-1.0 and has shipped breaking changes across 0.0.x releases.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.