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,13 +1,13 @@
[package]
name = "ironclaw_common"
name = "optimclaw_common"
version = "0.1.0"
edition = "2024"
rust-version = "1.92"
description = "Shared types and utilities for the IronClaw workspace"
description = "Shared types and utilities for the OptimClaw workspace"
authors = ["NEAR AI <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/nearai/ironclaw"
repository = "https://github.com/nearai/ironclaw"
homepage = "https://github.com/nearai/optimclaw"
repository = "https://github.com/nearai/optimclaw"
[package.metadata.dist]
dist = false
@@ -1,4 +1,4 @@
//! Shared types and utilities for the IronClaw workspace.
//! Shared types and utilities for the OptimClaw workspace.
mod event;
mod util;
@@ -1,13 +1,13 @@
[package]
name = "ironclaw_safety"
name = "optimclaw_safety"
version = "0.2.0"
edition = "2024"
rust-version = "1.92"
description = "Prompt injection defense, input validation, secret leak detection, and safety policy enforcement"
authors = ["NEAR AI <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/nearai/ironclaw"
repository = "https://github.com/nearai/ironclaw"
homepage = "https://github.com/nearai/optimclaw"
repository = "https://github.com/nearai/optimclaw"
[package.metadata.dist]
dist = false
@@ -1,5 +1,5 @@
[package]
name = "ironclaw-safety-fuzz"
name = "optimclaw-safety-fuzz"
version = "0.0.0"
publish = false
edition = "2021"
@@ -11,7 +11,7 @@ cargo-fuzz = true
libfuzzer-sys = "0.4"
serde_json = "1"
[dependencies.ironclaw_safety]
[dependencies.optimclaw_safety]
path = ".."
[[bin]]
@@ -1,6 +1,6 @@
# ironclaw_safety Fuzz Targets
# optimclaw_safety Fuzz Targets
Fuzz testing for the `ironclaw_safety` crate using [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) (libFuzzer).
Fuzz testing for the `optimclaw_safety` crate using [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) (libFuzzer).
## Targets
@@ -22,7 +22,7 @@ rustup install nightly
## Running
```bash
cd crates/ironclaw_safety
cd crates/optimclaw_safety
# Run a specific target (runs until stopped or crash found)
cargo +nightly fuzz run fuzz_safety_sanitizer
@@ -1,5 +1,5 @@
#![no_main]
use ironclaw_safety::{LeakDetector, Sanitizer, Validator};
use optimclaw_safety::{LeakDetector, Sanitizer, Validator};
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
@@ -1,5 +1,5 @@
#![no_main]
use ironclaw_safety::params_contain_manual_credentials;
use optimclaw_safety::params_contain_manual_credentials;
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
@@ -1,5 +1,5 @@
#![no_main]
use ironclaw_safety::LeakDetector;
use optimclaw_safety::LeakDetector;
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
@@ -1,5 +1,5 @@
#![no_main]
use ironclaw_safety::{Sanitizer, Severity};
use optimclaw_safety::{Sanitizer, Severity};
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
@@ -1,5 +1,5 @@
#![no_main]
use ironclaw_safety::Validator;
use optimclaw_safety::Validator;
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
@@ -381,7 +381,7 @@ mod tests {
/// Adversarial tests for credential detection with Unicode, control chars,
/// and case folding edge cases.
/// See <https://github.com/nearai/ironclaw/issues/1025>.
/// See <https://github.com/nearai/optimclaw/issues/1025>.
mod adversarial {
use super::*;
@@ -836,7 +836,7 @@ mod tests {
}
/// Adversarial tests for leak detector regex patterns and masking.
/// See <https://github.com/nearai/ironclaw/issues/1025>.
/// See <https://github.com/nearai/optimclaw/issues/1025>.
mod adversarial {
use crate::leak_detector::{LeakDetector, mask_secret};
@@ -147,7 +147,7 @@ impl SafetyLayer {
pub fn scan_inbound_for_secrets(&self, input: &str) -> Option<String> {
let warning = "Your message appears to contain a secret (API key, token, or credential). \
For security, it was not sent to the AI. Please remove the secret and try again. \
To store credentials, use the setup form or `ironclaw config set <name> <value>`.";
To store credentials, use the setup form or `optimclaw config set <name> <value>`.";
match self.leak_detector.scan_and_clean(input) {
Ok(cleaned) if cleaned != input => Some(warning.to_string()),
Err(_) => Some(warning.to_string()),
@@ -506,7 +506,7 @@ mod tests {
}
/// Adversarial tests for SafetyLayer truncation at multi-byte boundaries.
/// See <https://github.com/nearai/ironclaw/issues/1025>.
/// See <https://github.com/nearai/optimclaw/issues/1025>.
mod adversarial {
use super::*;
@@ -302,7 +302,7 @@ mod tests {
}
/// Adversarial tests for policy regex patterns.
/// See <https://github.com/nearai/ironclaw/issues/1025>.
/// See <https://github.com/nearai/optimclaw/issues/1025>.
mod adversarial {
use super::*;
@@ -433,7 +433,7 @@ mod tests {
}
/// Adversarial tests for regex backtracking, Unicode edge cases, and
/// control character variants. See <https://github.com/nearai/ironclaw/issues/1025>.
/// control character variants. See <https://github.com/nearai/optimclaw/issues/1025>.
mod adversarial {
use super::*;
@@ -471,7 +471,7 @@ mod tests {
/// Adversarial tests for validator whitespace ratio, repetition detection,
/// and Unicode edge cases.
/// See <https://github.com/nearai/ironclaw/issues/1025>.
/// See <https://github.com/nearai/optimclaw/issues/1025>.
mod adversarial {
use super::*;