Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
679 changes: 679 additions & 0 deletions atomic-agent/src/hooks/grok.rs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions atomic-agent/src/hooks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub mod copilot;
pub mod cursor;
pub mod devin;
pub mod gemini_cli;
pub mod grok;
pub mod hermes;
pub mod kilo;
pub mod kiro;
Expand Down Expand Up @@ -310,6 +311,7 @@ impl AgentRegistry {
/// - Cursor (`cursor`)
/// - Devin Desktop (`devin`)
/// - Gemini CLI (`gemini-cli`)
/// - Grok Build (`grok`)
/// - Hermes Agent (`hermes`)
/// - Kilo Code (`kilo`)
/// - Kiro (`kiro`)
Expand All @@ -326,6 +328,7 @@ impl AgentRegistry {
registry.register(Box::new(cursor::CursorHook::new()));
registry.register(Box::new(devin::DevinHook::new()));
registry.register(Box::new(gemini_cli::GeminiCliHook::new()));
registry.register(Box::new(grok::GrokHook::new()));
registry.register(Box::new(hermes::HermesHook::new()));
registry.register(Box::new(kilo::KiloHook::new()));
registry.register(Box::new(kiro::KiroHook::new()));
Expand Down
4 changes: 4 additions & 0 deletions atomic-agent/src/integrations/registry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ view = "release"
url = "https://atomic.atomic.storage/workspaces/oss/projects/atomic-kiro/code"
view = "release"

[agents.grok]
url = "https://atomic.atomic.storage/workspaces/oss/projects/atomic-grok/code"
view = "main"

[agents.opencode]
url = "https://atomic.atomic.storage/workspaces/oss/projects/atomic-opencode/code"
view = "release"
Expand Down
1 change: 1 addition & 0 deletions atomic-agent/src/record/provenance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ pub(crate) fn vendor_from_agent_name(agent_name: &str) -> AIVendor {
"copilot" => AIVendor::Other("github".to_string()),
"cursor" => AIVendor::Anthropic,
"opencode" => AIVendor::OpenAI,
"grok" => AIVendor::XAI,
_ => AIVendor::Other(agent_name.to_string()),
}
}
Expand Down
5 changes: 5 additions & 0 deletions atomic-agent/src/record/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,11 @@ fn test_vendor_from_agent_name_codex() {
assert_eq!(vendor_from_agent_name("codex"), AIVendor::OpenAI);
}

#[test]
fn test_vendor_from_agent_name_grok() {
assert_eq!(vendor_from_agent_name("grok"), AIVendor::XAI);
}

#[test]
fn test_vendor_from_agent_name_kiro() {
assert_eq!(vendor_from_agent_name("kiro"), AIVendor::AmazonBedrock);
Expand Down
1 change: 1 addition & 0 deletions atomic-agent/src/turn/orchestrator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ pub(crate) fn vendor_from_agent_name(agent_name: &str) -> &'static str {
"codex" => "openai",
"kiro" => "amazon-bedrock",
"opencode" => "openai",
"grok" => "xai",
_ => "unknown",
}
}
Expand Down
3 changes: 3 additions & 0 deletions atomic-cli/src/commands/agent/attest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ fn pretty_vendor(canonical: &str) -> String {
"cohere" => "Cohere",
"amazon-bedrock" => "Amazon Bedrock",
"azure-openai" => "Azure OpenAI",
"xai" => "xAI",
"local" => "Local",
other => other,
}
Expand Down Expand Up @@ -622,6 +623,7 @@ fn pretty_tool(description: &str) -> String {
"sherpa" => "Sherpa",
"pi" => "Pi",
"kilo" => "Kilo Code",
"grok" => "Grok Build",
other => other,
}
.to_string()
Expand Down Expand Up @@ -800,6 +802,7 @@ mod tests {
assert_eq!(pretty_tool("IDE Plugin: copilot"), "Copilot");
assert_eq!(pretty_tool("CLI: gemini-cli"), "Gemini CLI");
assert_eq!(pretty_tool("CLI: kilo"), "Kilo Code");
assert_eq!(pretty_tool("CLI: grok"), "Grok Build");
}

#[test]
Expand Down
3 changes: 3 additions & 0 deletions atomic-core/src/change/provenance/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ fn test_vendor_from_str() {
assert_eq!(AIVendor::parse("openai"), AIVendor::OpenAI);
assert_eq!(AIVendor::parse("gpt"), AIVendor::OpenAI);
assert_eq!(AIVendor::parse("ollama"), AIVendor::Local);
assert_eq!(AIVendor::parse("xai"), AIVendor::XAI);
assert_eq!(AIVendor::parse("grok"), AIVendor::XAI);
assert_eq!(AIVendor::XAI.name(), "xai");
assert_eq!(
AIVendor::parse("custom-ai"),
AIVendor::Other("custom-ai".to_string())
Expand Down
4 changes: 4 additions & 0 deletions atomic-core/src/change/provenance/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub enum AIVendor {
AmazonBedrock,
/// Azure OpenAI Service
AzureOpenAI,
/// xAI (Grok models)
XAI,
/// Local/self-hosted model
Local,
/// Other/custom provider
Expand All @@ -53,6 +55,7 @@ impl AIVendor {
AIVendor::Cohere => "cohere",
AIVendor::AmazonBedrock => "amazon-bedrock",
AIVendor::AzureOpenAI => "azure-openai",
AIVendor::XAI => "xai",
AIVendor::Local => "local",
AIVendor::Other(name) => name,
}
Expand All @@ -69,6 +72,7 @@ impl AIVendor {
"cohere" => AIVendor::Cohere,
"bedrock" | "amazon-bedrock" | "aws" => AIVendor::AmazonBedrock,
"azure" | "azure-openai" => AIVendor::AzureOpenAI,
"xai" | "grok" => AIVendor::XAI,
"local" | "self-hosted" | "ollama" => AIVendor::Local,
other => AIVendor::Other(other.to_string()),
}
Expand Down
4 changes: 3 additions & 1 deletion atomic-repository/src/repository/provenance_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl Repository {
/// appear in the `<agent>+<short>` author shape. Keep in sync with the agent
/// registry (atomic-agent/src/hooks/).
const KNOWN_AGENT_PREFIXES: &[&str] = &[
"claude", "codex", "gemini", "cursor", "cline", "opencode", "copilot", "sherpa", "pi",
"claude", "codex", "gemini", "cursor", "cline", "opencode", "copilot", "sherpa", "pi", "grok",
];

/// Heuristically detect an agent-identity Author produced by
Expand Down Expand Up @@ -258,6 +258,8 @@ fn author_is_agent_identity(author: &Author) -> bool {
| "sherpa"
| "Pi"
| "pi"
| "Grok Build"
| "grok"
)
}

Expand Down
1 change: 1 addition & 0 deletions docs/adding-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Each agent reads its system prompt from a different file convention:
| `AGENTS.md` at root | Codex, Devin, Gemini |
| `agents/*.md` | OpenCode, Pi |
| `rules/*.md` | Cursor, Cline |
| `~/.grok/rules/*.md` (home rules) / `AGENTS.md` | Grok Build |
| `steering/*.md` | Kiro |
| `copilot-instructions.md` | Copilot |

Expand Down
Loading