Skip to main content

artifactize_tools/
lib.rs

1//! Portable read-only tools, scoped paths, and pinned no-follow file access.
2
3pub mod artf;
4pub mod builtin;
5pub mod cli;
6pub mod image;
7pub mod launch;
8pub mod opener;
9mod platform;
10pub mod result;
11pub mod schema;
12pub mod scope;
13mod terminal_text;
14
15pub use platform::{environment, files, outcome::exit_code, program, text};
16
17/// Temporary roots, links and executable files, shared with the integration tests.
18#[cfg(test)]
19#[path = "../tests/support/os.rs"]
20mod test_os;
21
22pub use result::{Content, ToolResult};
23
24use serde::{Deserialize, Serialize};
25
26#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
27#[serde(rename_all = "snake_case")]
28pub enum Builtin {
29    Read,
30    List,
31    Glob,
32    Grep,
33    ViewImage,
34    Section,
35    Help,
36    Open,
37    Graph,
38}
39
40/// JSON clients represent numbers as IEEE-754 doubles; larger integer counters
41/// and offsets cannot round-trip exactly through them.
42pub const MAX_SAFE_JSON_INTEGER: u64 = 9_007_199_254_740_991;