UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

27 lines • 1.43 kB
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. ========= // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ========= Copyright 2026 @ Strukto.AI All Rights Reserved. ========= import { makeStat } from "../hierarchy/stat.js"; import { resolveAppEntry } from "./entry.js"; /** * The stat of a Google app mount: a file resolves through Drive. A file a * corpus listing named is answered by the mount from that listing; one it did * not is fetched by its id alone. Sheets, Docs and Slides stat the same tree * and differ only in the MIME type a file carries and what they name it. * Mirrors Python's `make_app_stat`. */ export function makeAppStat(mime, detectScope, makeFilename) { const fileStat = (accessor, match, path) => resolveAppEntry(accessor.drive, match, path, mime, makeFilename); return makeStat(detectScope, { overrides: { file: fileStat } }); } //# sourceMappingURL=stat.js.map