Rebrand: TeamClaw -> Clawmates (clawmates.work)

Full-depth rename per the approved plan; the 'claw' product vocabulary
(claws, /claws routes, clawId, Claw Chat) stays — it is now the brand.

- Display brand: Clawmates (manifest, titles, hero, login/rail logo
  'clawmates'); default host app.clawmates.work; registry
  ghcr.io/clawmates
- Crates tc-* -> cm-* (16 crates + all imports); binaries
  clawmates-server/broker/bundler; images clawmates/*; env prefix
  CLAWMATES_* (+ CM_TEST_DATABASE_URL / CM_LIVE_LLM); config
  clawmates.toml; helm chart deploy/helm/clawmates with clawmates-*
  resources; db names clawmates*; sockets /run/clawmates; cookie
  cm_session; kind cluster clawmates-test; seccomp node profile
  clawmates-agent-profile.json
- All 9 Playwright brand assertions updated in lockstep; historical
  spec document left untouched as the only remaining 'TeamClaw'
- Local env migrated: dev pg clawmates-dev-pg/clawmates_dev, shared
  test server clawmates-test-pg, kind cluster recreated with image +
  profile, compose images rebuilt under clawmates/*

Verified end to end: 161 Rust + 68 frontend tests, 29 Playwright
journeys, 4 live kind tests, helm/install/LOC/placeholder gates, and
the clean-room install rehearsal serving the clawmates login page from
a signed bundle of the rebuilt images.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-10 12:31:25 -05:00
co-authored by Claude Fable 5
parent 8046853feb
commit add4f79fed
209 changed files with 1429 additions and 1422 deletions
+69
View File
@@ -0,0 +1,69 @@
use cm_llm::ToolDescriptor;
use cm_tools::Effect;
use serde_json::{json, Value};
use uuid::Uuid;
use super::{Tool, ToolContext};
/// Queues an outbound email — a §15 gated category (outbound message).
/// The real effect is an `outbox` row; the delivery transport drains the
/// queue in P4. This row must only ever exist after explicit approval.
pub struct EmailSend;
#[async_trait::async_trait]
impl Tool for EmailSend {
fn descriptor(&self) -> ToolDescriptor {
ToolDescriptor {
name: "email.send".into(),
description: "Sends an email outside the workspace. Requires \
human approval before it executes."
.into(),
input_schema: json!({
"type": "object",
"properties": {
"to": {"type": "string"},
"subject": {"type": "string"},
"body": {"type": "string"},
},
"required": ["to", "subject", "body"],
}),
}
}
fn effects(&self) -> &'static [Effect] {
&[Effect::SendsExternally]
}
fn preview(&self, input: &Value) -> Value {
json!({
"summary": format!(
"Send email to {}",
input["to"].as_str().unwrap_or("(missing recipient)")
),
"to": input["to"],
"subject": input["subject"],
"body": input["body"],
})
}
async fn execute(&self, ctx: &ToolContext, input: Value) -> Result<Value, String> {
let to = input["to"].as_str().ok_or("missing 'to'")?;
let subject = input["subject"].as_str().ok_or("missing 'subject'")?;
let body = input["body"].as_str().ok_or("missing 'body'")?;
let id = Uuid::now_v7();
sqlx::query!(
"INSERT INTO outbox (id, workspace_id, agent_id, recipient, subject, body)
VALUES ($1, $2, $3, $4, $5, $6)",
id,
ctx.workspace_id.as_uuid(),
ctx.agent_id.as_uuid(),
to,
subject,
body,
)
.execute(&ctx.pool)
.await
.map_err(|e| e.to_string())?;
Ok(json!({ "queued": true, "outbox_id": id.to_string() }))
}
}