Repository navigation
feat(sdk,launcher): add permission-gated environment.getPaths() - #1089
Conversation
Add cross-platform OS user directory resolution (home, appData, localAppData, config) via environment.getPaths(), gated behind the files:read permission so unprivileged extensions cannot fingerprint OS usernames or filesystem layouts. - Rust: add environment_get_paths command using Tauri PathResolver OS directories (not app_data_dir), normalized with dunce, and gate asyar:api:environment:getPaths under files:read in permissions.rs - Launcher IPC: wire environment:getPaths in ExtensionIpcRouter and buildServiceRegistry with unit tests - SDK: add EnvironmentPaths and getPaths() to IEnvironmentService, EnvironmentServiceProxy, and environment facade (worker & view) - Docs: document environment.getPaths(), files:read requirement, and OS directory mappings in environment.md and permissions.md
|
No actionable comments were generated in the recent review. WalkthroughThe change adds a Tauri command that returns four host directory paths. Extension calls require ChangesEnvironment paths
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk:
|
Add cross-platform OS user directory resolution (home, appData,
localAppData, config) via environment.getPaths(), gated behind the
files:read permission so unprivileged extensions cannot fingerprint
OS usernames or filesystem layouts.
OS directories (not app_data_dir), normalized with dunce, and gate
asyar:api:environment:getPaths under files:read in permissions.rs
buildServiceRegistry with unit tests
EnvironmentServiceProxy, and environment facade (worker & view)
OS directory mappings in environment.md and permissions.md
What changed
Affected areas
asyar-sdk, extension runtime, IPC contracts, manifest)Manual smoke test & Validation
pnpm dev) and visually verified the fix/feature works.AI usage
asyar-contributionskill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.Boundaries
pnpm check:ci(or the relevant inner-loop checks) passes locally.Summary by CodeRabbit
files:readpermission.