Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:15:09.066Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

manifest.rs

29 lines · 1.1 KB · rust
1use std::sync::Arc;
2
3use settings::WorktreeId;
4use util::rel_path::RelPath;
5
6// Re-export ManifestName from language_core.
7pub use language_core::ManifestName;
8
9/// Represents a manifest query; given a path to a file, the manifest provider is tasked with finding a path to the directory containing the manifest for that file.
10///
11/// Since parts of the path might have already been explored, there's an additional `depth` parameter that indicates to what ancestry level a given path should be explored.
12/// For example, given a path like `foo/bar/baz`, a depth of 2 would explore `foo/bar/baz` and `foo/bar`, but not `foo`.
13pub struct ManifestQuery {
14    /// Path to the file, relative to worktree root.
15    pub path: Arc<RelPath>,
16    pub depth: usize,
17    pub delegate: Arc<dyn ManifestDelegate>,
18}
19
20pub trait ManifestProvider {
21    fn name(&self) -> ManifestName;
22    fn search(&self, query: ManifestQuery) -> Option<Arc<RelPath>>;
23}
24
25pub trait ManifestDelegate: Send + Sync {
26    fn worktree_id(&self) -> WorktreeId;
27    fn exists(&self, path: &RelPath, is_dir: Option<bool>) -> bool;
28}
29
Served at tenant.openagents/omega Member data and write actions are omitted.