UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

48 lines • 2.34 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. ========= /** Capture unresolved program names without taking over the workspace shell. */ export const EXTERNAL_COMMANDS = '@external'; /** Capture the whole line, Mirage's own commands included (a line executor). Mirrors Python's WHOLE_LINE. */ export const WHOLE_LINE = '@line'; /** * The most requests one runtime file adapter keeps in flight. * * Classifying or preloading an entry is a request of its own on a * mount that keeps no listing index, so an unbounded listing puts a * whole directory's worth of requests on the wire together. Every * request an entry point sends shares the one cap, a preload walk's included. */ export const LISTING_ENTRY_CONCURRENCY = 16; /** * What a stat or a listing may answer "not there" with. A directory is * an answer to both rather than an absence, and a backend that refused * the op has not said the path is gone: folding a permission or a * transport failure into "no" reports it as an absence the guest cannot * tell from a real one, so nothing else belongs here. */ export const ABSENT_PATH = new Set(['ENOENT', 'ENOTDIR']); /** * What a hard link is refused with, wherever one can be spelled (node's * patched `fs.link`): a hard link is a second name for one inode, and * nothing above a mount holds that. */ export const HARD_LINK_REFUSAL = 'EPERM'; /** * How long one policy program (a profile's `policy:` or the `routePolicy`) * may run before the action it judges is refused or the route it decides * fails. One bound for every stage; a holder object so tests can tighten * it. */ export const SCRIPT_EVAL_TIMEOUT = { seconds: 10 }; //# sourceMappingURL=constants.js.map