21875bbd08
- CommandRule + DEFAULT_DENY_REASON in policy/types; SpecPolicy matches paths through classify_paths/path_hidden (wildcard_regex gone) - SessionProfile / WorkspacePermissions / MountPermissions document in workspace/session/profile, resolver (inherit, tighten, rebase, bound_hidden, compile_profile) in workspace/session/resolve - Workspace(permissions=, profiles=), Mount(permissions=), create_session(profile=, permissions=), YAML permissions:/profiles: - workspace and mount hides ride Session.bound_hidden, never persisted - guards= / Policies.add(GuardSpec) / YAML guards: removed
54 lines
1.8 KiB
Python
54 lines
1.8 KiB
Python
# ========= 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. =========
|
|
|
|
# isort: skip_file
|
|
from mirage.resource.disk import DiskResource
|
|
from mirage.resource.ram import RAMResource
|
|
from mirage.commands.registry import command
|
|
from mirage.commands.cli import CLIInvocation, CLISpec, register_cli_spec
|
|
from mirage.types import FileStat, MountBackend, MountMode
|
|
from mirage.policy import Action, CommandContext, Deny, Policy
|
|
from mirage.workspace import (ExecutionNode, Workspace, WorkspaceRunner)
|
|
from mirage.workspace.fuse import FuseManager
|
|
from mirage.workspace.mount.spec import Mount
|
|
from mirage.types import ConsistencyPolicy
|
|
from mirage.utils.ids import new_session_id, new_workspace_id, uuid7
|
|
from mirage.version import __version__ as __version__
|
|
|
|
__all__ = [
|
|
"__version__",
|
|
"Workspace",
|
|
"WorkspaceRunner",
|
|
"RAMResource",
|
|
"DiskResource",
|
|
"Action",
|
|
"CommandContext",
|
|
"ConsistencyPolicy",
|
|
"Deny",
|
|
"ExecutionNode",
|
|
"FileStat",
|
|
"FuseManager",
|
|
"Policy",
|
|
"Mount",
|
|
"MountBackend",
|
|
"MountMode",
|
|
"CLIInvocation",
|
|
"CLISpec",
|
|
"register_cli_spec",
|
|
"command",
|
|
"new_session_id",
|
|
"new_workspace_id",
|
|
"uuid7",
|
|
]
|