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