1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! The `airsstack` Lua standard library, and the seam for extending it.
//!
//! Exists as a module tree so each capability the plugin scripts need is one file with its own
//! tests, rather than one large surface. Every submodule here implements [`HostModule`] and is
//! installed as a subtable of the single `airsstack` global — `airsstack.json.decode`,
//! `airsstack.fs.read`. Downstream crates add their own the same way, which is what makes this
//! crate a shared Lua integration point instead of a fixed runner.
//!
//! Responsibilities:
//!
//! - [`registry`] — the [`HostModule`] trait, [`InstallContext`] and [`ModuleSet`].
//! - [`mod@env`] — environment variables, guarded by a name allowlist.
//! - [`mod@fs`] — filesystem access, guarded by the policy's filesystem grants.
//! - [`mod@proc`] — subprocesses, guarded by an executable allowlist.
//! - [`mod@regex`] — real regular expressions, needing no authority.
//! - [`mod@hash`] — SHA-256 and SHA-1; `hash_file` inherits the filesystem read grants.
//! - [`mod@time`] — timestamps and formatting, needing no authority.
//! - [`mod@glob`] — glob matching; `walk` inherits the filesystem read grants.
//! - [`mod@stdio`] — the process's own standard streams.
//! - [`mod@hook`] — the agent-hook contract, over `stdio` and `json`.
//! - [`json`] — JSON encoding and decoding.
//! - [`mod@path`] — path manipulation, needing no authority.
//! - [`mod@stdlib`] — the default module set the engine installs.
//!
//! Non-responsibilities: sandboxing. Which Lua standard libraries a script sees is
//! [`crate::Policy`]'s decision, applied by the engine before any of these are installed.
pub use Env;
pub use Fs;
pub use Glob;
pub use Hash;
pub use Hook;
pub use Json;
pub use Path;
pub use procProc;
pub use Regex;
pub use ;
pub use Stdio;
pub use stdlib;
pub use Time;