@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
44 lines • 1.56 kB
JavaScript
// ========= 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 { read as jaegerRead } from "../../core/jaeger/read.js";
import { readdir as jaegerReaddir } from "../../core/jaeger/readdir.js";
import { stat as jaegerStat } from "../../core/jaeger/stat.js";
import { BaseVFS } from "../base.js";
export const VFS_MD = `\`\`\`text
{prefix}
services/
<service-name>/
operations.json
traces/
<trace-id>.json
\`\`\``;
/**
* Jaeger's functions over its accessor, which a host package builds
* over its own transport.
*/
export class JaegerVFS extends BaseVFS {
handed = {
stat: ['entry'],
};
readdir(path) {
return jaegerReaddir(this.accessor, path);
}
async read(path) {
return jaegerRead(this.accessor, path);
}
stat(path, handed) {
return jaegerStat(this.accessor, path, handed?.entry);
}
}
//# sourceMappingURL=jaeger.js.map