supercode_interchange/ontology/
identity.rs1use schemars::JsonSchema;
4use serde::{Deserialize, Serialize};
5
6#[derive(
8 Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize, JsonSchema,
9)]
10#[serde(transparent)]
11pub struct HarnessId(pub String);
12
13impl HarnessId {
14 pub const CLAUDE_CODE: &'static str = "claude-code";
16 pub const CODEX: &'static str = "codex";
18 pub const PI: &'static str = "pi";
20 pub const OPENCODE: &'static str = "opencode";
22 pub const GROK: &'static str = "grok";
24 pub const GEMINI: &'static str = "gemini";
26 pub const GOOSE: &'static str = "goose";
28 pub const HERMES: &'static str = "hermes";
30 pub const OPENCLAW: &'static str = "openclaw";
32 pub const SUPERCODE: &'static str = "supercode";
34 pub const ORCHESTRATOR: &'static str = "orchestrator";
38
39 pub fn new(value: impl Into<String>) -> Self {
41 Self(value.into())
42 }
43
44 pub fn as_str(&self) -> &str {
46 &self.0
47 }
48}
49
50impl From<&str> for HarnessId {
51 fn from(value: &str) -> Self {
52 Self::new(value)
53 }
54}