chore: rename project to ByteClaw (module, binary, env prefix BYTECLAW_, Android package/app/theme)

This commit is contained in:
OpenClaw Dev 2026-10-25 04:28:22 +01:00
parent bf00f56117
commit 399bcd46fb
28 changed files with 104 additions and 101 deletions

View file

@ -6,9 +6,9 @@ import (
"fmt"
"sync"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/openclaw/internal/store"
"github.com/crypto/openclaw/internal/tools"
"github.com/crypto/byteclaw/internal/llm"
"github.com/crypto/byteclaw/internal/store"
"github.com/crypto/byteclaw/internal/tools"
)
// Event is streamed to clients while the agent works.

View file

@ -7,9 +7,9 @@ import (
"testing"
"time"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/openclaw/internal/store"
"github.com/crypto/openclaw/internal/tools"
"github.com/crypto/byteclaw/internal/llm"
"github.com/crypto/byteclaw/internal/store"
"github.com/crypto/byteclaw/internal/tools"
)
// scripted provider returns queued responses and records requests.

View file

@ -1,4 +1,4 @@
// Package config loads OpenClaw configuration from YAML/JSON files and env vars.
// Package config loads ByteClaw configuration from YAML/JSON files and env vars.
package config
import (
@ -67,7 +67,7 @@ func Default() Config {
Temperature: 0.7,
},
Agent: Agent{
SystemPrompt: "You are OpenClaw, a concise and helpful self-hosted assistant. Use tools when they help.",
SystemPrompt: "You are ByteClaw, a concise and helpful self-hosted assistant. Use tools when they help.",
MaxIterations: 8,
HistoryLimit: 50,
},
@ -110,14 +110,14 @@ func applyEnv(c *Config, get func(string) string) {
*dst = v
}
}
set("OPENCLAW_LISTEN", &c.Listen)
set("OPENCLAW_AUTH_TOKEN", &c.AuthToken)
set("OPENCLAW_DATA_DIR", &c.DataDir)
set("OPENCLAW_WORKSPACE", &c.Workspace)
set("OPENCLAW_LLM_BASE_URL", &c.LLM.BaseURL)
set("OPENCLAW_LLM_API_KEY", &c.LLM.APIKey)
set("OPENCLAW_LLM_MODEL", &c.LLM.Model)
if v := get("OPENCLAW_ALLOWED_ORIGINS"); v != "" {
set("BYTECLAW_LISTEN", &c.Listen)
set("BYTECLAW_AUTH_TOKEN", &c.AuthToken)
set("BYTECLAW_DATA_DIR", &c.DataDir)
set("BYTECLAW_WORKSPACE", &c.Workspace)
set("BYTECLAW_LLM_BASE_URL", &c.LLM.BaseURL)
set("BYTECLAW_LLM_API_KEY", &c.LLM.APIKey)
set("BYTECLAW_LLM_MODEL", &c.LLM.Model)
if v := get("BYTECLAW_ALLOWED_ORIGINS"); v != "" {
c.AllowedOrigins = nil
for _, o := range strings.Split(v, ",") {
if o = strings.TrimSpace(o); o != "" {
@ -131,7 +131,7 @@ func applyEnv(c *Config, get func(string) string) {
func (c Config) Validate() error {
var errs []error
if len(c.AuthToken) < 16 {
errs = append(errs, errors.New("auth_token must be set and at least 16 characters (OPENCLAW_AUTH_TOKEN)"))
errs = append(errs, errors.New("auth_token must be set and at least 16 characters (BYTECLAW_AUTH_TOKEN)"))
}
if c.LLM.BaseURL == "" || c.LLM.Model == "" {
errs = append(errs, errors.New("llm.base_url and llm.model are required"))

View file

@ -10,8 +10,8 @@ func TestLoadYAMLAndEnv(t *testing.T) {
dir := t.TempDir()
p := filepath.Join(dir, "c.yaml")
os.WriteFile(p, []byte("auth_token: aaaaaaaaaaaaaaaaaaaa\nllm:\n model: llama3\n"), 0o600)
t.Setenv("OPENCLAW_LLM_BASE_URL", "http://localhost:11434/v1")
t.Setenv("OPENCLAW_ALLOWED_ORIGINS", "https://a.example, https://b.example")
t.Setenv("BYTECLAW_LLM_BASE_URL", "http://localhost:11434/v1")
t.Setenv("BYTECLAW_ALLOWED_ORIGINS", "https://a.example, https://b.example")
c, err := Load(p)
if err != nil {
t.Fatal(err)
@ -37,7 +37,7 @@ func TestLoadJSON(t *testing.T) {
}
func TestValidateRequiresToken(t *testing.T) {
t.Setenv("OPENCLAW_AUTH_TOKEN", "")
t.Setenv("BYTECLAW_AUTH_TOKEN", "")
if _, err := Load(""); err == nil {
t.Fatal("expected error without token")
}

View file

@ -16,8 +16,8 @@ import (
"github.com/coder/websocket"
"github.com/coder/websocket/wsjson"
"github.com/crypto/openclaw/internal/agent"
"github.com/crypto/openclaw/internal/store"
"github.com/crypto/byteclaw/internal/agent"
"github.com/crypto/byteclaw/internal/store"
)
const maxBody = 256 << 10

View file

@ -15,10 +15,10 @@ import (
"github.com/coder/websocket"
"github.com/coder/websocket/wsjson"
"github.com/crypto/openclaw/internal/agent"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/openclaw/internal/store"
"github.com/crypto/openclaw/internal/tools"
"github.com/crypto/byteclaw/internal/agent"
"github.com/crypto/byteclaw/internal/llm"
"github.com/crypto/byteclaw/internal/store"
"github.com/crypto/byteclaw/internal/tools"
)
const tok = "test-token-0123456789"

View file

@ -11,7 +11,7 @@ import (
"fmt"
"time"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/byteclaw/internal/llm"
_ "modernc.org/sqlite"
)

View file

@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/byteclaw/internal/llm"
)
func TestStoreRoundTrip(t *testing.T) {

View file

@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/byteclaw/internal/llm"
)
// Workspace confines file access to a root directory using os.Root

View file

@ -6,7 +6,7 @@ import (
"fmt"
"time"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/byteclaw/internal/llm"
)
// TimeNow returns the current time, optionally in an IANA time zone.

View file

@ -7,7 +7,7 @@ import (
"fmt"
"sort"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/byteclaw/internal/llm"
)
type Tool interface {

View file

@ -14,7 +14,7 @@ import (
"syscall"
"time"
"github.com/crypto/openclaw/internal/llm"
"github.com/crypto/byteclaw/internal/llm"
)
// WebFetch downloads a URL with timeout and size limit. By default it refuses
@ -91,7 +91,7 @@ func (w *WebFetch) Call(ctx context.Context, raw json.RawMessage) (string, error
if err != nil {
return "", err
}
req.Header.Set("User-Agent", "OpenClaw/0.1 (+self-hosted assistant)")
req.Header.Set("User-Agent", "ByteClaw/0.1 (+self-hosted assistant)")
resp, err := w.client.Do(req)
if err != nil {
return "", err