Skip to main content

artifactize_tools/
lib.rs

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