Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:36:40.523Z 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

extension.rs

46 lines · 1.6 KB · rust
1use std::sync::Arc;
2
3use collections::HashMap;
4use schemars::JsonSchema;
5use serde::{Deserialize, Serialize};
6use settings_macros::{MergeFrom, with_fallible_options};
7
8#[with_fallible_options]
9#[derive(Debug, PartialEq, Clone, Default, Serialize, Deserialize, JsonSchema, MergeFrom)]
10pub struct ExtensionSettingsContent {
11    /// The extensions that should be automatically installed by Omega.
12    ///
13    /// This is used to make functionality provided by extensions (e.g., language support)
14    /// available out-of-the-box.
15    ///
16    /// Default: { "html": true }
17    #[serde(default)]
18    pub auto_install_extensions: HashMap<Arc<str>, bool>,
19    #[serde(default)]
20    pub auto_update_extensions: HashMap<Arc<str>, bool>,
21    /// The capabilities granted to extensions.
22    pub granted_extension_capabilities: Option<Vec<ExtensionCapabilityContent>>,
23}
24
25/// A capability for an extension.
26#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, JsonSchema)]
27#[serde(tag = "kind", rename_all = "snake_case")]
28pub enum ExtensionCapabilityContent {
29    #[serde(rename = "process:exec")]
30    ProcessExec {
31        /// The command to execute.
32        command: String,
33        /// The arguments to pass to the command. Use `*` for a single wildcard argument.
34        /// If the last element is `**`, then any trailing arguments are allowed.
35        args: Vec<String>,
36    },
37    DownloadFile {
38        host: String,
39        path: Vec<String>,
40    },
41    #[serde(rename = "npm:install")]
42    NpmInstallPackage {
43        package: String,
44    },
45}
46
Served at tenant.openagents/omega Member data and write actions are omitted.