Ansight.Tools.FileSystem
1.7.0
dotnet add package Ansight.Tools.FileSystem --version 1.7.0
NuGet\Install-Package Ansight.Tools.FileSystem -Version 1.7.0
<PackageReference Include="Ansight.Tools.FileSystem" Version="1.7.0" />
<PackageVersion Include="Ansight.Tools.FileSystem" Version="1.7.0" />
<PackageReference Include="Ansight.Tools.FileSystem" />
paket add Ansight.Tools.FileSystem --version 1.7.0
#r "nuget: Ansight.Tools.FileSystem, 1.7.0"
#:package Ansight.Tools.FileSystem@1.7.0
#addin nuget:?package=Ansight.Tools.FileSystem&version=1.7.0
#tool nuget:?package=Ansight.Tools.FileSystem&version=1.7.0
Ansight.Tools.FileSystem
Grouped sandboxed file access tool registrations for the Ansight .NET SDK.
License
The Ansight SDK is source-available software under the PolyForm Shield 1.0.0. It permits use, modification and redistribution for purposes allowed by the licence, which excludes providing competing products. Local development features require no Ansight account or subscription.
Registered tools:
files.list_directoryfiles.read_filefiles.get_file_checksumfiles.download_filefiles.begin_binary_downloadfiles.push_filefiles.copy_filefiles.move_filefiles.delete_file
Usage
using Ansight;
using Ansight.Tools.FileSystem;
var options = Options.CreateBuilder()
.WithFileSystemTools()
.WithReadOnlyToolAccess()
.Build();
File checksums
files.get_file_checksum computes one or more hexadecimal checksums for a sandboxed file without returning file contents.
Checksum request arguments:
root: optional sandbox root aliaspath: file path relative to the rootalgorithms: optional comma-separated list ofmd5,sha1,sha256,sha384,sha512,crc32, orall; defaults tosha256
Checksum response highlights:
fileName,fileExtension,mimeTypesizeBytes,lastModifiedUtc,versionchecksums: array of{ algorithm, checksum, encoding }
Binary file transfer
files.begin_binary_download streams raw bytes over the pairing WebSocket so the receiving host can materialize the file in a caller-chosen local temp directory. The app SDK does not choose or know that temp path; it only returns metadata and then emits binary frames keyed by a transferId.
Binary download request arguments:
root: optional sandbox root aliaspath: file path relative to the rootchunkBytes: maximum bytes to include in each binary websocket framedownloadId: optional caller-supplied correlation id for mapping the transfer to a local temp file
Binary download response highlights:
downloadId,transferIdfileName,fileExtension,mimeTypesizeBytes,lastModifiedUtc,versiondeliveryMode = websocket_binarywireProtocol = ansight.file-transfer.v1
The receiving host is expected to:
- choose the temp directory and local file path
- call
files.begin_binary_download - map
transferIdto that local temp file - write incoming
ASFTbinary frames into the chosen file until thecompleteframe arrives
files.download_file remains available as a JSON fallback when the caller cannot consume binary websocket frames. It stays inside the configured sandbox roots, returns best-effort file metadata for tool selection, and pages large files through ordinary tool.result payloads.
JSON fallback request arguments:
root: optional sandbox root aliaspath: file path relative to the rootoffsetBytes: starting byte offset for the chunkmaxBytes: maximum bytes to return for the chunkencoding:auto,utf8, orbase64expectedVersion: optional version token from a prior chunk
JSON fallback response highlights:
fileName,fileExtension,mimeTypesizeBytes,lastModifiedUtc,versionoffsetBytes,bytesRead,hasMore,nextOffsetBytescontentType,encoding, and eithertextorbase64nextRequest, which contains the nexttool.callpayload to continue the download safely
File writes and file management
files.push_file writes caller-provided content into a folder under an approved sandbox root. Callers should pass arbitrary files as contentBase64; text is available for UTF-8 text payloads.
Push request arguments:
root: optional sandbox root aliasdirectoryPath: destination folder path relative to the rootfileName: destination file name, not a pathcontentBase64ortext: provide exactly oneoverwrite: replace an existing filecreateDirectory: create the destination folder when missing
files.copy_file and files.move_file accept:
root: optional source sandbox root aliassourcePath: source file path relative to the source rootdestinationRoot: optional destination sandbox root aliasdestinationPath: destination file path relative to the destination rootoverwrite: replace an existing destination filecreateDirectory: create the destination folder when missing
files.delete_file accepts root and path and uses ToolPolicy.Critical.
Use WithAllToolAccess() or a custom critical-enabled ToolGuard to execute
it. files.push_file, files.copy_file, and files.move_file use
ToolPolicy.Write and require WithReadWriteToolAccess(),
WithAllToolAccess(), or a custom write-enabled guard.
Configure additional tagged roots:
using Ansight;
using Ansight.Tools.FileSystem;
var options = Options.CreateBuilder()
.WithFileSystemTools(fileSystem =>
{
fileSystem.AddRoot("logs", "/absolute/path/to/logs");
})
.WithReadOnlyToolAccess()
.Build();
Build-time remote tool policy
Projects that reference this package are covered by AnsightRemoteToolsPolicy. The default AllowedWithWarnings policy logs detected tool type and assembly details and emits a build warning when remote tools are included. Because this package contains remote tools, Disallowed only succeeds when the package is omitted from that build, for example with Debug-only package references. Use Allowed to bypass remote tool scanning and warnings. Set AnsightLogRemoteTools=false to suppress the detected-tool list.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-android35.0 is compatible. net9.0-browser was computed. net9.0-ios was computed. net9.0-ios18.0 is compatible. net9.0-maccatalyst was computed. net9.0-maccatalyst18.0 is compatible. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Ansight.Core (>= 1.7.0)
-
net9.0-android35.0
- Ansight.Core (>= 1.7.0)
-
net9.0-ios18.0
- Ansight.Core (>= 1.7.0)
-
net9.0-maccatalyst18.0
- Ansight.Core (>= 1.7.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ansight.Tools.FileSystem:
| Package | Downloads |
|---|---|
|
Ansight
.NET and MAUI SDK for Ansight: runtime evidence from your app for coding agents. Screenshots, visual trees, logs, network, telemetry, and app state, with pairing and remote tools included. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.7.0 | 0 | 10/6/2026 |
| 1.6.3 | 66 | 10/1/2026 |
| 1.6.2 | 74 | 10/1/2026 |
| 1.6.1 | 124 | 9/23/2026 |
| 1.6.0 | 122 | 9/17/2026 |
| 1.5.0 | 124 | 9/14/2026 |
| 1.4.0 | 148 | 9/7/2026 |
| 1.4.0-preview.5 | 105 | 8/26/2026 |
| 1.4.0-preview.3 | 78 | 8/25/2026 |
| 1.4.0-preview.1 | 105 | 8/24/2026 |
| 1.3.0-preview.12 | 85 | 8/24/2026 |
| 1.3.0-preview.11 | 85 | 8/23/2026 |
| 1.3.0-preview.10 | 85 | 8/21/2026 |
| 1.3.0-preview.9 | 90 | 8/20/2026 |
| 1.3.0-preview.8 | 91 | 8/20/2026 |
| 1.3.0-preview.6 | 99 | 8/19/2026 |
| 1.3.0-preview.5 | 84 | 8/19/2026 |
| 1.3.0-preview.4 | 86 | 8/17/2026 |
| 1.3.0-preview.3 | 86 | 8/10/2026 |
| 1.3.0-preview.2 | 82 | 8/10/2026 |