Skip to content
Open
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
14 changes: 7 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AlpClaw Configuration
# Splash Configuration
# Copy this to .env and fill in your values

# Provider API Keys (add the ones you need)
Expand All @@ -8,19 +8,19 @@ GOOGLE_API_KEY=
DEEPSEEK_API_KEY=

# Default provider: claude | openai | gemini | deepseek
ALPCLAW_DEFAULT_PROVIDER=claude
SPLASH_DEFAULT_PROVIDER=claude

# Default model per provider
ALPCLAW_DEFAULT_MODEL=claude-sonnet-4-20250514
SPLASH_DEFAULT_MODEL=claude-sonnet-4-20250514

# Safety mode: strict | standard | permissive
ALPCLAW_SAFETY_MODE=standard
SPLASH_SAFETY_MODE=standard

# Log level: debug | info | warn | error
ALPCLAW_LOG_LEVEL=info
SPLASH_LOG_LEVEL=info

# Memory storage path
ALPCLAW_MEMORY_PATH=.alpclaw/memory
SPLASH_MEMORY_PATH=.splash/memory

# Max retries for self-correction
ALPCLAW_MAX_RETRIES=3
SPLASH_MAX_RETRIES=3
Binary file modified .gitignore
Binary file not shown.
21 changes: 0 additions & 21 deletions bin/alpclaw.mjs

This file was deleted.

1 change: 0 additions & 1 deletion bin/splash.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const __dirname = dirname(__filename);
const packageRoot = resolve(__dirname, "..");

process.env.SPLASH_HOME = packageRoot;
process.env.ALPCLAW_HOME = packageRoot;
process.env.FORCE_COLOR = "1";

const distCliPath = resolve(packageRoot, "dist", "examples", "cli.js");
Expand Down
8 changes: 4 additions & 4 deletions bots/discord.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* AlpClaw Discord connector node.
* Splash Discord connector node.
*
* Uses Discord's Interactions HTTP endpoint — no websocket gateway library
* required. Point your bot's Interactions Endpoint URL at:
Expand All @@ -14,7 +14,7 @@
import * as crypto from "node:crypto";
import * as http from "node:http";
import pc from "picocolors";
import { runChatTask, getAlpClaw, chunkText } from "./lib/chat-agent.js";
import { runChatTask, getSplash, chunkText } from "./lib/chat-agent.js";

const DISCORD_API = "https://discord.com/api/v10";
const MAX_MSG = 1900;
Expand Down Expand Up @@ -61,7 +61,7 @@ async function sendFollowup(appId: string, token: string, text: string) {
}

async function main() {
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " AlpClaw Discord Connector");
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " Splash Discord Connector");

const publicKey = process.env.DISCORD_PUBLIC_KEY;
const botToken = process.env.DISCORD_BOT_TOKEN;
Expand All @@ -77,7 +77,7 @@ async function main() {
process.exit(1);
}

getAlpClaw();
getSplash();
console.log(pc.green("✓ Framework initialized."));

const server = http.createServer(async (req, res) => {
Expand Down
20 changes: 10 additions & 10 deletions bots/lib/chat-agent.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
* Shared chat-agent helper — used by every platform adapter.
* Keeps one AlpClaw instance alive per process and exposes a simple
* Keeps one Splash instance alive per process and exposes a simple
* "text in → text out" interface so platform bots stay tiny.
*/

import { AlpClaw } from "@alpclaw/core";
import { Splash } from "@splash/core";
import * as fs from "node:fs";
import * as path from "node:path";
import * as os from "node:os";

let _alpclaw: AlpClaw | null = null;
let _splash: Splash | null = null;
let _personaCache: string | undefined = undefined;

function getPersona() {
if (_personaCache !== undefined) return _personaCache;
const localChar = path.resolve(process.cwd(), "character.md");
const globalChar = path.resolve(os.homedir(), ".alpclaw", "character.md");
const globalChar = path.resolve(os.homedir(), ".splash", "character.md");

if (fs.existsSync(localChar)) {
_personaCache = fs.readFileSync(localChar, "utf-8");
Expand All @@ -27,9 +27,9 @@ function getPersona() {
return _personaCache;
}

export async function getAlpClaw(): Promise<AlpClaw> {
if (!_alpclaw) _alpclaw = await AlpClaw.create();
return _alpclaw;
export async function getSplash(): Promise<Splash> {
if (!_splash) _splash = await Splash.create();
return _splash;
}

export interface ChatRunResult {
Expand All @@ -45,10 +45,10 @@ export async function runChatTask(text: string): Promise<ChatRunResult> {

try {
const persona = getPersona();
const alpclaw = await getAlpClaw();
const splash = await getSplash();

// Conversational Fast-Path (Sub-second response for basic chat)
const router = alpclaw.router;
const router = splash.router;
const fastCheck = await router.route({
messages: [
{ role: "system", content: "You are a fast intent classifier. Does the user's message require using external tools, searching the web, reading/writing files, or doing any complex tasks? Reply strictly with 'YES' or 'NO'." },
Expand All @@ -71,7 +71,7 @@ export async function runChatTask(text: string): Promise<ChatRunResult> {
}

// Full Agent Loop (Complex tasks)
const agent = alpclaw.createAgent({
const agent = splash.createAgent({
systemPersona: persona ? persona : undefined
});
const result = await agent.run(trimmed);
Expand Down
8 changes: 4 additions & 4 deletions bots/messenger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* AlpClaw Facebook Messenger connector node.
* Splash Facebook Messenger connector node.
*
* Configure your Messenger app's webhook with:
* Callback URL: https://<your-host>/messenger/webhook
Expand All @@ -13,7 +13,7 @@

import * as http from "node:http";
import pc from "picocolors";
import { runChatTask, getAlpClaw, chunkText } from "./lib/chat-agent.js";
import { runChatTask, getSplash, chunkText } from "./lib/chat-agent.js";

const GRAPH = "https://graph.facebook.com/v19.0";
const MAX_MSG = 1900; // Messenger hard limit is 2000
Expand Down Expand Up @@ -52,7 +52,7 @@ function readBody(req: http.IncomingMessage): Promise<string> {
}

async function main() {
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " AlpClaw Messenger Connector");
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " Splash Messenger Connector");

const verifyToken = process.env.MESSENGER_VERIFY_TOKEN;
const pageToken = process.env.MESSENGER_PAGE_TOKEN;
Expand All @@ -63,7 +63,7 @@ async function main() {
process.exit(1);
}

getAlpClaw();
getSplash();
console.log(pc.green("✓ Framework initialized."));

const seen = new Set<string>();
Expand Down
8 changes: 4 additions & 4 deletions bots/slack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* AlpClaw Slack connector node.
* Splash Slack connector node.
*
* Uses Slack's Events API over a plain HTTP endpoint — no SDK dependency.
* Configure your Slack app with:
Expand All @@ -15,7 +15,7 @@
import * as crypto from "node:crypto";
import * as http from "node:http";
import pc from "picocolors";
import { runChatTask, getAlpClaw, chunkText } from "./lib/chat-agent.js";
import { runChatTask, getSplash, chunkText } from "./lib/chat-agent.js";

const SLACK_API = "https://slack.com/api";
const MAX_MSG = 3500;
Expand Down Expand Up @@ -65,7 +65,7 @@ function readBody(req: http.IncomingMessage): Promise<string> {
}

async function main() {
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " AlpClaw Slack Connector");
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " Splash Slack Connector");

const token = process.env.SLACK_BOT_TOKEN;
const secret = process.env.SLACK_SIGNING_SECRET;
Expand All @@ -76,7 +76,7 @@ async function main() {
process.exit(1);
}

getAlpClaw(); // warm up the agent platform
getSplash(); // warm up the agent platform
console.log(pc.green("✓ Framework initialized."));

const seen = new Set<string>();
Expand Down
12 changes: 6 additions & 6 deletions bots/telegram.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* AlpClaw Telegram connector node.
* Splash Telegram connector node.
*
* Configure:
* TELEGRAM_BOT_TOKEN from @BotFather
Expand All @@ -12,8 +12,8 @@

import { Telegraf, Markup } from "telegraf";
import pc from "picocolors";
import { runChatTask, getAlpClaw, chunkText } from "./lib/chat-agent.js";
import { readGlobalConfig, writeGlobalConfig } from "@alpclaw/config";
import { runChatTask, getSplash, chunkText } from "./lib/chat-agent.js";
import { readGlobalConfig, writeGlobalConfig } from "@splash/config";
import * as fs from "node:fs";
import * as path from "node:path";

Expand All @@ -36,7 +36,7 @@ async function main() {
}

// Initialize the agent framework
getAlpClaw();
getSplash();
const bot = new Telegraf(token);

// Auto-identify — fetch bot info from Telegram API
Expand Down Expand Up @@ -176,8 +176,8 @@ async function main() {

bot.command("provider", async (ctx) => {
try {
const alpclaw = await getAlpClaw();
const providers = alpclaw.router.listProviders();
const splash = await getSplash();
const providers = splash.router.listProviders();
const current = readGlobalConfig().providers?.default || "openrouter";

const buttons = providers.map(p => [
Expand Down
8 changes: 4 additions & 4 deletions bots/whatsapp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* AlpClaw WhatsApp connector node — Twilio-compatible webhook.
* Splash WhatsApp connector node — Twilio-compatible webhook.
*
* Configure a Twilio WhatsApp Sender to POST messages to:
* https://<your-host>/whatsapp/incoming
Expand All @@ -13,7 +13,7 @@
import * as crypto from "node:crypto";
import * as http from "node:http";
import pc from "picocolors";
import { runChatTask, getAlpClaw, chunkText } from "./lib/chat-agent.js";
import { runChatTask, getSplash, chunkText } from "./lib/chat-agent.js";

function parseForm(body: string): Record<string, string> {
const out: Record<string, string> = {};
Expand Down Expand Up @@ -73,7 +73,7 @@ function twiml(texts: string[]): string {
}

async function main() {
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " AlpClaw WhatsApp Connector");
console.log(pc.bgCyan(pc.black(" SYSTEM BOOT ")) + " Splash WhatsApp Connector");

const authToken = process.env.TWILIO_AUTH_TOKEN;
const port = Number(process.env.WHATSAPP_PORT || 3002);
Expand All @@ -84,7 +84,7 @@ async function main() {
process.exit(1);
}

getAlpClaw();
getSplash();
console.log(pc.green("✓ Framework initialized."));

const server = http.createServer(async (req, res) => {
Expand Down
Loading
Loading