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
//! Jarvy-managed entry markers, consolidated.
//!
//! Each on-disk format uses a slightly different shape to tag the entries
//! we own — JSON uses a sentinel key, YAML uses comment fences, Cline
//! uses a filename infix. Keeping the strings together in one module
//! prevents drift (e.g. accidentally using `_` in one and `-` in
//! another) and gives auditors a single source of truth.
/// JSON key used on every Jarvy-managed entry inside an agent settings
/// file. Paired with the entry's content hash to detect impersonation
/// before `remove` strips it.
pub const JSON_MARKER_KEY: &str = "_jarvy_managed";
/// JSON key holding the content hash of a Jarvy-managed entry. Computed
/// over (name, event, matcher, command, windows_command, timeout_ms).
/// Used by `remove` / `check` to refuse foreign entries that impersonate
/// the marker.
pub const JSON_HASH_KEY: &str = "_jarvy_sha256";
/// Begin sentinel for the Jarvy-managed block in Continue's YAML.
pub const YAML_BLOCK_BEGIN: &str = "# jarvy-managed begin";
/// End sentinel for the Jarvy-managed block in Continue's YAML.
pub const YAML_BLOCK_END: &str = "# jarvy-managed end";
/// Infix in Cline fragment filenames: `<Event>.jarvy.<hook-name>.sh`.
pub const FILENAME_INFIX: &str = ".jarvy.";