fork: rename IronClaw → OptimClaw

Full rename of all identifiers, filenames, and references:
  ironclaw → optimclaw
  IronClaw → OptimClaw
  IRONCLAW → OPTIMCLAW
  ironclaw_common → optimclaw_common
  ironclaw_safety → optimclaw_safety

Upstream: nearai/ironclaw
This commit is contained in:
OutBack Dingo
2026-03-29 06:27:52 +07:00
parent 8a320ae9db
commit 6d9dbbb3b9
404 changed files with 2382 additions and 2382 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "github-tool"
version = "0.2.1"
edition = "2021"
description = "GitHub integration tool for IronClaw (WASM component)"
description = "GitHub integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+21 -21
View File
@@ -1,4 +1,4 @@
# GitHub Tool for IronClaw
# GitHub Tool for OptimClaw
WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
@@ -17,7 +17,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
3. Store the token:
```
ironclaw secret set github_token YOUR_TOKEN
optimclaw secret set github_token YOUR_TOKEN
```
## Usage Examples
@@ -28,7 +28,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "get_repo",
"owner": "nearai",
"repo": "ironclaw"
"repo": "optimclaw"
}
```
@@ -38,7 +38,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "list_issues",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"state": "open",
"limit": 10
}
@@ -50,7 +50,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "create_issue",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"title": "Bug: Something is broken",
"body": "Detailed description...",
"labels": ["bug", "help wanted"]
@@ -63,7 +63,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "list_pull_requests",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"state": "open",
"limit": 5
}
@@ -75,7 +75,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "create_pr_review",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"pr_number": 42,
"body": "LGTM! Great work.",
"event": "APPROVE"
@@ -88,7 +88,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "create_pull_request",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"title": "feat: add event-driven routines",
"head": "feat/event-routines",
"base": "main",
@@ -102,7 +102,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "merge_pull_request",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"pr_number": 42,
"merge_method": "squash"
}
@@ -114,7 +114,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "list_issue_comments",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"issue_number": 42,
"limit": 10
}
@@ -126,7 +126,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "create_issue_comment",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"issue_number": 42,
"body": "Thanks for reporting this!"
}
@@ -138,7 +138,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "list_pull_request_comments",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"pr_number": 42,
"limit": 30
}
@@ -150,7 +150,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "reply_pull_request_comment",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"comment_id": 123456789,
"body": "Fixed in the latest commit."
}
@@ -162,7 +162,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "get_pull_request_reviews",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"pr_number": 42
}
```
@@ -173,7 +173,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "get_combined_status",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"ref": "main"
}
```
@@ -184,7 +184,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "get_file_content",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"path": "README.md",
"ref": "main"
}
@@ -196,7 +196,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "trigger_workflow",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"workflow_id": "ci.yml",
"ref": "main",
"inputs": {
@@ -211,7 +211,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "get_workflow_runs",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"limit": 5
}
```
@@ -222,7 +222,7 @@ WASM tool for GitHub integration - manage repos, issues, PRs, and workflows.
{
"action": "get_workflow_runs",
"owner": "nearai",
"repo": "ironclaw",
"repo": "optimclaw",
"limit": 5,
"page": 2
}
@@ -251,7 +251,7 @@ Invalid event: 'INVALID'. Must be one of: APPROVE, REQUEST_CHANGES, COMMENT
### Missing Token
```text
GitHub token not found in secret store. Set it with: ironclaw secret set github_token <token>...
GitHub token not found in secret store. Set it with: optimclaw secret set github_token <token>...
```
## Troubleshooting
@@ -265,7 +265,7 @@ GitHub token not found in secret store. Set it with: ironclaw secret set github_
### "GitHub API error 401: Bad credentials"
- The token might be invalid or expired.
- Update the token: `ironclaw secret set github_token NEW_TOKEN`.
- Update the token: `optimclaw secret set github_token NEW_TOKEN`.
### Rate Limiting
+9 -9
View File
@@ -1,4 +1,4 @@
//! GitHub WASM Tool for IronClaw.
//! GitHub WASM Tool for OptimClaw.
//!
//! Provides GitHub integration for reading repos, managing issues,
//! reviewing PRs, and triggering workflows.
@@ -6,7 +6,7 @@
//! # Authentication
//!
//! Store your GitHub Personal Access Token:
//! `ironclaw secret set github_token <token>`
//! `optimclaw secret set github_token <token>`
//!
//! Token needs these permissions:
//! - repo (for private repos)
@@ -424,7 +424,7 @@ fn get_github_token() -> Result<String, String> {
return Ok("present".to_string());
}
Err("GitHub token not found in secret store. Set it with: ironclaw secret set github_token <token>. \
Err("GitHub token not found in secret store. Set it with: optimclaw secret set github_token <token>. \
Token needs 'repo', 'workflow', and 'read:org' scopes.".into())
}
@@ -436,7 +436,7 @@ fn github_request(method: &str, path: &str, body: Option<String>) -> Result<Stri
let headers = serde_json::json!({
"Accept": "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
"User-Agent": "IronClaw-GitHub-Tool"
"User-Agent": "OptimClaw-GitHub-Tool"
});
let body_bytes = body.map(|b| b.into_bytes());
@@ -1555,7 +1555,7 @@ mod tests {
let payload = serde_json::json!({
"action": "created",
"repository": {
"full_name": "nearai/ironclaw",
"full_name": "nearai/optimclaw",
"owner": { "login": "nearai" }
},
"sender": { "login": "maintainer1" },
@@ -1570,7 +1570,7 @@ mod tests {
github_enriched_payload("issue_comment", &headers, &payload, "issue.comment.created");
assert_eq!(
enriched.get("repository_name").and_then(|v| v.as_str()),
Some("nearai/ironclaw")
Some("nearai/optimclaw")
);
// Original repository object is preserved
assert!(enriched
@@ -1594,10 +1594,10 @@ mod tests {
"action": "created",
"issue": {
"number": 42,
"pull_request": { "url": "https://api.github.com/repos/nearai/ironclaw/pulls/42" }
"pull_request": { "url": "https://api.github.com/repos/nearai/optimclaw/pulls/42" }
},
"comment": { "body": "LGTM", "user": { "login": "reviewer" } },
"repository": { "full_name": "nearai/ironclaw", "owner": { "login": "nearai" } },
"repository": { "full_name": "nearai/optimclaw", "owner": { "login": "nearai" } },
"sender": { "login": "reviewer" }
});
@@ -1632,7 +1632,7 @@ mod tests {
body_json: Some(serde_json::json!({
"action":"opened",
"issue":{"number":42},
"repository":{"full_name":"nearai/ironclaw"},
"repository":{"full_name":"nearai/optimclaw"},
"sender":{"login":"maintainer1"}
})),
})
+1 -1
View File
@@ -2,7 +2,7 @@
name = "gmail-tool"
version = "0.2.0"
edition = "2021"
description = "Gmail integration tool for IronClaw (WASM component)"
description = "Gmail integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+2 -2
View File
@@ -1,4 +1,4 @@
//! Gmail WASM Tool for IronClaw.
//! Gmail WASM Tool for OptimClaw.
//!
//! Provides Gmail integration for reading, searching, sending, drafting,
//! and replying to emails.
@@ -120,7 +120,7 @@ impl exports::near::agent::tool::Guest for GmailTool {
fn execute_inner(params: &str) -> Result<String, String> {
if !crate::near::agent::host::secret_exists("google_oauth_token") {
return Err(
"Google OAuth token not configured. Run `ironclaw tool auth gmail` to set up \
"Google OAuth token not configured. Run `optimclaw tool auth gmail` to set up \
OAuth, or set the GOOGLE_OAUTH_TOKEN environment variable."
.to_string(),
);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "google-calendar-tool"
version = "0.2.0"
edition = "2021"
description = "Google Calendar integration tool for IronClaw (WASM component)"
description = "Google Calendar integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+2 -2
View File
@@ -1,4 +1,4 @@
//! Google Calendar WASM Tool for IronClaw.
//! Google Calendar WASM Tool for OptimClaw.
//!
//! Provides Google Calendar integration for viewing, creating, updating,
//! and deleting calendar events.
@@ -139,7 +139,7 @@ impl exports::near::agent::tool::Guest for GoogleCalendarTool {
fn execute_inner(params: &str) -> Result<String, String> {
if !crate::near::agent::host::secret_exists("google_oauth_token") {
return Err(
"Google OAuth token not configured. Run `ironclaw tool auth google-calendar` \
"Google OAuth token not configured. Run `optimclaw tool auth google-calendar` \
to set up OAuth, or set the GOOGLE_OAUTH_TOKEN environment variable."
.to_string(),
);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "google-docs-tool"
version = "0.2.0"
edition = "2021"
description = "Google Docs integration tool for IronClaw (WASM component)"
description = "Google Docs integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+2 -2
View File
@@ -1,4 +1,4 @@
//! Google Docs WASM Tool for IronClaw.
//! Google Docs WASM Tool for OptimClaw.
//!
//! Provides Google Docs integration for creating, reading, editing,
//! and formatting documents. Use Google Drive tool to search for
@@ -209,7 +209,7 @@ impl exports::near::agent::tool::Guest for GoogleDocsTool {
fn execute_inner(params: &str) -> Result<String, String> {
if !crate::near::agent::host::secret_exists("google_oauth_token") {
return Err(
"Google OAuth token not configured. Run `ironclaw tool auth google-docs` to set up \
"Google OAuth token not configured. Run `optimclaw tool auth google-docs` to set up \
OAuth, or set the GOOGLE_OAUTH_TOKEN environment variable."
.to_string(),
);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "google-drive-tool"
version = "0.2.0"
edition = "2021"
description = "Google Drive integration tool for IronClaw (WASM component)"
description = "Google Drive integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+1 -1
View File
@@ -223,7 +223,7 @@ pub fn upload_file(
parent_id: Option<&str>,
description: Option<&str>,
) -> Result<FileResult, String> {
let boundary = "ironclaw_upload_boundary_42";
let boundary = "optimclaw_upload_boundary_42";
let mut metadata = serde_json::json!({
"name": name,
+2 -2
View File
@@ -1,4 +1,4 @@
//! Google Drive WASM Tool for IronClaw.
//! Google Drive WASM Tool for OptimClaw.
//!
//! Provides Google Drive integration for searching, accessing, uploading,
//! sharing, and organizing files and folders. Supports both personal and
@@ -170,7 +170,7 @@ impl exports::near::agent::tool::Guest for GoogleDriveTool {
fn execute_inner(params: &str) -> Result<String, String> {
if !crate::near::agent::host::secret_exists("google_oauth_token") {
return Err(
"Google OAuth token not configured. Run `ironclaw tool auth google-drive` to set up \
"Google OAuth token not configured. Run `optimclaw tool auth google-drive` to set up \
OAuth, or set the GOOGLE_OAUTH_TOKEN environment variable."
.to_string(),
);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "google-sheets-tool"
version = "0.2.0"
edition = "2021"
description = "Google Sheets integration tool for IronClaw (WASM component)"
description = "Google Sheets integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+2 -2
View File
@@ -1,4 +1,4 @@
//! Google Sheets WASM Tool for IronClaw.
//! Google Sheets WASM Tool for OptimClaw.
//!
//! Provides Google Sheets integration for creating, reading, writing,
//! and formatting spreadsheets. Use Google Drive tool to search for
@@ -184,7 +184,7 @@ impl exports::near::agent::tool::Guest for GoogleSheetsTool {
fn execute_inner(params: &str) -> Result<String, String> {
if !crate::near::agent::host::secret_exists("google_oauth_token") {
return Err(
"Google OAuth token not configured. Run `ironclaw tool auth google-sheets` to set up \
"Google OAuth token not configured. Run `optimclaw tool auth google-sheets` to set up \
OAuth, or set the GOOGLE_OAUTH_TOKEN environment variable."
.to_string(),
);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "google-slides-tool"
version = "0.2.0"
edition = "2021"
description = "Google Slides integration tool for IronClaw (WASM component)"
description = "Google Slides integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+2 -2
View File
@@ -1,4 +1,4 @@
//! Google Slides WASM Tool for IronClaw.
//! Google Slides WASM Tool for OptimClaw.
//!
//! Provides Google Slides integration for creating, reading, editing,
//! and formatting presentations. Use Google Drive tool to search for
@@ -219,7 +219,7 @@ impl exports::near::agent::tool::Guest for GoogleSlidesTool {
fn execute_inner(params: &str) -> Result<String, String> {
if !crate::near::agent::host::secret_exists("google_oauth_token") {
return Err(
"Google OAuth token not configured. Run `ironclaw tool auth google-slides` to set up \
"Google OAuth token not configured. Run `optimclaw tool auth google-slides` to set up \
OAuth, or set the GOOGLE_OAUTH_TOKEN environment variable."
.to_string(),
);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "llm-context-tool"
version = "0.1.0"
edition = "2021"
description = "Brave Search LLM Context tool for IronClaw (WASM component)"
description = "Brave Search LLM Context tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+4 -4
View File
@@ -1,4 +1,4 @@
//! Brave Search LLM Context WASM Tool for IronClaw.
//! Brave Search LLM Context WASM Tool for OptimClaw.
//!
//! Fetches pre-extracted web content from the Brave Search LLM Context API,
//! optimized for grounding LLM responses (RAG, fact-checking, research).
@@ -6,7 +6,7 @@
//! # Authentication
//!
//! Uses the same Brave Search API key as the Web Search tool:
//! `ironclaw secret set brave_api_key <key>`
//! `optimclaw secret set brave_api_key <key>`
//!
//! Get a key at: https://brave.com/search/api/
@@ -246,7 +246,7 @@ fn execute_inner(params: &str) -> Result<String, String> {
fn preflight_check() -> Result<(), String> {
if !near::agent::host::secret_exists("brave_api_key") {
return Err("Brave API key not found in secret store. Set it with: \
ironclaw secret set brave_api_key <key>. \
optimclaw secret set brave_api_key <key>. \
Get a key at: https://brave.com/search/api/"
.into());
}
@@ -450,7 +450,7 @@ fn build_request_headers(params: &LlmContextParams) -> serde_json::Value {
);
map.insert(
"User-Agent".to_string(),
serde_json::Value::String("IronClaw-LlmContext-Tool/0.1".to_string()),
serde_json::Value::String("OptimClaw-LlmContext-Tool/0.1".to_string()),
);
// Location-aware headers: (X-Loc-* name, optional value from params)
+1 -1
View File
@@ -2,7 +2,7 @@
name = "slack-tool"
version = "0.2.0"
edition = "2021"
description = "Slack integration tool for IronClaw (WASM component)"
description = "Slack integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+8 -8
View File
@@ -1,6 +1,6 @@
# Slack WASM Tool
A standalone WASM component that provides Slack integration for IronClaw. This serves as both a functional tool and a template for building custom WASM tools.
A standalone WASM component that provides Slack integration for OptimClaw. This serves as both a functional tool and a template for building custom WASM tools.
## Features
@@ -50,9 +50,9 @@ target/wasm32-wasip2/release/slack_tool.wasm
Copy the WASM and capabilities files to the agent's tools directory:
```bash
mkdir -p ~/.ironclaw/tools
cp target/wasm32-wasip2/release/slack_tool.wasm ~/.ironclaw/tools/slack.wasm
cp slack.capabilities.json ~/.ironclaw/tools/
mkdir -p ~/.optimclaw/tools
cp target/wasm32-wasip2/release/slack_tool.wasm ~/.optimclaw/tools/slack.wasm
cp slack.capabilities.json ~/.optimclaw/tools/
```
### Option B: Database Storage (Production)
@@ -60,7 +60,7 @@ cp slack.capabilities.json ~/.ironclaw/tools/
Use the agent CLI or API to store the tool:
```bash
ironclaw tool install \
optimclaw tool install \
--name slack \
--wasm target/wasm32-wasip2/release/slack_tool.wasm \
--capabilities slack.capabilities.json
@@ -71,7 +71,7 @@ ironclaw tool install \
Store your Slack bot token as a secret:
```bash
ironclaw secret set slack_bot_token "xoxb-your-token-here"
optimclaw secret set slack_bot_token "xoxb-your-token-here"
```
Or via SQL:
@@ -88,7 +88,7 @@ VALUES ('your_user_id', 'slack_bot_token', ...);
{
"action": "send_message",
"channel": "#general",
"text": "Hello from IronClaw!"
"text": "Hello from OptimClaw!"
}
```
@@ -214,7 +214,7 @@ world sandboxed-tool {
Ensure you've stored the secret:
```bash
ironclaw secret set slack_bot_token "xoxb-..."
optimclaw secret set slack_bot_token "xoxb-..."
```
### "Endpoint not in allowlist"
+1 -1
View File
@@ -1,4 +1,4 @@
//! Slack WASM Tool for IronClaw.
//! Slack WASM Tool for OptimClaw.
//!
//! This is a standalone WASM component that provides Slack integration.
//! It demonstrates how to build external tools that can be dynamically
+1 -1
View File
@@ -2,7 +2,7 @@
name = "telegram-tool"
version = "0.2.0"
edition = "2021"
description = "Telegram user-mode integration tool for IronClaw (WASM component)"
description = "Telegram user-mode integration tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+3 -3
View File
@@ -1,4 +1,4 @@
//! Telegram User-Mode WASM Tool for IronClaw.
//! Telegram User-Mode WASM Tool for OptimClaw.
//!
//! Provides Telegram integration operating from the **user's personal account**,
//! not a bot. This tool sends encrypted MTProto messages directly to Telegram's
@@ -24,8 +24,8 @@
//! # Prerequisites
//!
//! 1. Get Telegram API credentials from https://my.telegram.org/apps
//! 2. Store them: `ironclaw secret set telegram_api_id <id>`
//! `ironclaw secret set telegram_api_hash <hash>`
//! 2. Store them: `optimclaw secret set telegram_api_id <id>`
//! `optimclaw secret set telegram_api_hash <hash>`
//! 3. Use the `login` action with your phone number
//!
//! # Authentication Flow
+1 -1
View File
@@ -2,7 +2,7 @@
name = "web-search-tool"
version = "0.2.0"
edition = "2021"
description = "Brave Web Search tool for IronClaw (WASM component)"
description = "Brave Web Search tool for OptimClaw (WASM component)"
license = "MIT OR Apache-2.0"
publish = false
+4 -4
View File
@@ -1,11 +1,11 @@
//! Brave Web Search WASM Tool for IronClaw.
//! Brave Web Search WASM Tool for OptimClaw.
//!
//! Searches the web using the Brave Search API and returns structured results.
//!
//! # Authentication
//!
//! Store your Brave Search API key:
//! `ironclaw secret set brave_api_key <key>`
//! `optimclaw secret set brave_api_key <key>`
//!
//! Get a key at: https://brave.com/search/api/
@@ -130,7 +130,7 @@ fn execute_inner(params: &str) -> Result<String, String> {
if !near::agent::host::secret_exists("brave_api_key") {
return Err(
"Brave API key not found in secret store. Set it with: \
ironclaw secret set brave_api_key <key>. \
optimclaw secret set brave_api_key <key>. \
Get a key at: https://brave.com/search/api/"
.into(),
);
@@ -142,7 +142,7 @@ fn execute_inner(params: &str) -> Result<String, String> {
// X-Subscription-Token is injected by the host via credential config.
let headers = serde_json::json!({
"Accept": "application/json",
"User-Agent": "IronClaw-WebSearch-Tool/0.1"
"User-Agent": "OptimClaw-WebSearch-Tool/0.1"
});
// Retry loop for transient errors (429 rate limit, 5xx server errors).