English (default) | 简体中文
A customized fork of OpenClaw for the Kosbling AI Studio e-commerce assistant platform.
- Upstream repository:
https://github.com/openclaw/openclaw.git - Sync strategy:
git merge --no-ff(preserve merge history) - Current baseline:
upstream/main(synced 2026-03-09, includesv2026.3.8)
All custom changes are marked in source code with // KOSBLING-PATCH.
-
Model Isolation (
src/agents/edition-isolation.ts+ multiple files)- Root-level
modelIsolationconfig with fully isolatedmain/secondarygroups - Explicitly blocks
/model, cron model payload overrides, and spawn-time model overrides - Supports per-agent model override (must be in the group allowlist)
- See Model Isolation
- Proposal submitted upstream: Feature Proposal
- Root-level
-
CLI branding in banner (
src/cli/banner.ts)✦ Kosbling Edition ✦under ASCII art- Single-line banner:
[Kosbling Edition]
-
CLI
--versionincludes git commit hash (src/cli/program/context.ts)openclaw -voutput format:2026.3.3-kosbling.6 (34ada4a)
-
Update flow disabled (
src/infra/update-startup.ts+src/cli/update-cli/update-command.ts+src/config/io.ts)openclaw updatenow guides users togit pull- Startup update check and config version warning are skipped
-
System prompt injection (
src/agents/system-prompt.ts)- Adds Kosbling Edition guidance to all agent system prompts
- Includes model-isolation behavior and config guidance
-
Global network SSRF policy for tool fetch paths (
src/infra/net/trusted-network-ssrf.ts+ related tools/config)- Adds root-level
network.ssrfPolicyas the default SSRF policy for non-browser network tools - Current inherited paths:
web_fetch,imageremote URL loading, and message attachment URL fetching tools.web.fetch.ssrfPolicyremains a per-tool override (higher priority thannetwork.ssrfPolicy)- Legacy compatibility: if
network.ssrfPolicyis unset, runtime falls back tobrowser.ssrfPolicy - Recommended steady-state: use
network.ssrfPolicyfor global behavior and keep browser policy browser-scoped
- Adds root-level
[Upstream]means an issue in upstream code.[Kosbling]means a follow-up fix needed for our custom behavior.
-
[Upstream]HTTP provider errors (401/403/503...) did not trigger model fallback (src/agents/pi-embedded-runner/run.ts)- Provider HTTP failures returned as
lastAssistant.stopReason="error", wrapped intoisError=truepayloads, and never thrown runWithModelFallbackcatch branch could not trigger- Fix: detect
stopReason="error"in the loop and throwFailoverErrorviacoerceToFailoverError
- Provider HTTP failures returned as
-
[Upstream]model fallback logs were invisible (src/agents/model-fallback.ts)- No visible logs during fallback attempts
- Fix: add info-level fallback attempt logs to
gateway.log(stdout)
-
[Kosbling]fallbackConfiguredignoredmodelIsolationfallbacks (src/agents/pi-embedded-runner/run.ts)- Upstream only checked
agents.defaults.model.fallbacks - In isolation mode, this caused fallback checks to be skipped
- Fix: extend check to include
modelIsolation.enabled+main/secondary.fallbacks
- Upstream only checked
-
[Kosbling]false fallback status in/status(src/auto-reply/status.ts)- Before first runtime model selection, isolation branch could incorrectly display fallback state
- Fix: add
hasRuntimeModelguard
-
[Upstream]block_deliver.dm_enabledid not apply in Feishu DM (p2p) chats (src/channels/chat-type.ts+ tests)- Upstream DM normalization recognized
direct/dmonly and did not map Feishup2p - Result: with
block_deliver.block_disable=trueanddm_enable=true, Feishu DMs were still filtered as non-DM targets - Fix: normalize
p2p -> directso the DM exception path works as expected
- Upstream DM normalization recognized
-
[Upstream]provider transient INTERNAL errors are retryable failover timeouts (src/agents/pi-embedded-helpers/failover-matches.ts)got status: INTERNALand payloads like{"status":"INTERNAL","code":500}are classified as transient timeout-style failover errors.
- Models merge-mode provider baseUrl precedence + api drift refresh (
src/agents/models-config.ts)- Fork-specific merge/baseUrl preservation patches were removed; behavior now follows upstream
planOpenClawModelsJsonflow and upstream test coverage.
- Fork-specific merge/baseUrl preservation patches were removed; behavior now follows upstream
- HTTP 529 classification in failover path (
src/agents/failover-error.ts)- Fork-specific HTTP status mapping patch was removed; behavior now uses upstream shared classifier (
classifyFailoverReasonFromHttpStatus), including529 -> rate_limit.
- Fork-specific HTTP status mapping patch was removed; behavior now uses upstream shared classifier (
- Gateway supervised restart guardrails (
src/infra/process-respawn.ts)- The current implementation now comes from upstream and includes supervised-env markers + launchd kickstart flow.
openclaw.json example:
{
"modelIsolation": {
"enabled": true,
"main": {
"model": "anthropic/claude-opus-4-6",
"fallbacks": ["anthropic/claude-sonnet-4-6"]
},
"secondary": {
"model": "anthropic/claude-sonnet-4-6",
"fallbacks": ["anthropic/claude-haiku-3-5"]
}
}
}{
agents: {
defaults: {
block_deliver: {
block_disable: true, // disable block delivery for non-webchat channel targets
dm_enable: true, // when block_disable is true, still allow block delivery in DMs
},
},
},
}block_disable: whentrue, non-webchattargets no longer receive block/stream chunks and only receive final replies.dm_enable: whentrueandblock_disable=true, direct-message chats still receive block/stream chunks.- Feishu note:
p2pchat type is treated asdirect.
- Feishu note:
Behavior summary:
enabled: falseor missing: upstream behavior, no impactenabled: true:maingroup handles primary agent conversations (DM/group/TUI/webchat),secondarygroup handles cron/subagents- Groups are fully isolated, fallback does not cross groups, and full failure surfaces as error
/modelis intercepted; spawn/cron model overrides are rejected with explicit errors- Session model overrides (
/model) are persisted per session; undermodelIsolation, requested models are normalized to the active group allowlist. /statusshows session-specific override status while keeping the group baseline on theEditionline.
For custom provider merge behavior (openclaw.json vs per-agent models.json), see Models registry.
For token-window cache reset after model/fallback drift, run openclaw sessions cleanup --enforce --clear-context-tokens (optional: add --clear-total-tokens-fresh).
modelIsolation.main.tokenGuardrail adds a per-agent guardrail for main-group sessions.
If weighted token usage across that agent's main-group sessions exceeds the configured
window threshold, main-group runs are paused for that agent until you manually disable
the guardrail.
{
modelIsolation: {
enabled: true,
main: {
tokenGuardrail: {
enabled: true,
windowMinutes: 5,
maxTokens: 20000,
},
},
},
}Current weighted accounting:
input * 1cacheRead * 0.1cacheWrite * 1.2output * 5
Disable for a specific agent:
openclaw agents isolation-guardrail disable --agent <agent-id>Legacy paths edition.modelIsolation and kosbling.modelIsolation are auto-migrated to root-level modelIsolation at startup.
Every change must also update this README:
- Feature change -> add under "Feature Changes"
- Bug fix -> add under "Bug Fixes"
- If it is an upstream bug, include upstream issue links
Any functional change must be evaluated for updates in the Kosbling Edition section of src/agents/system-prompt.ts.
All custom edits must include // KOSBLING-PATCH comments to simplify upstream conflict resolution.
- Node.js 22+
- pnpm
git clone https://github.com/kosbling-ai/openclaw.git ~/.openclaw-kosbling
cd ~/.openclaw-kosbling
./build-and-link.shcd ~/.openclaw-kosbling
git pull
./build-and-link.shRunning ./build-and-link.sh in the fork source repo only builds and does not register global CLI links (to avoid conflicts with runtime repos).
After code changes:
./build-and-link.sh # build only, validate compile
git add -A && git commit # commit
git push origin main # pushThen pull and build in your runtime repo (~/.openclaw-kosbling) to deploy.
Version format: {upstream_version}-kosbling.{patch}
Example: 2026.3.3-kosbling.6
Version is maintained in root VERSION. build-and-link.sh reads it and writes into package.json during build.
# 1) Update VERSION
echo "2026.3.3-kosbling.6" > VERSION
# 2) Commit and push
git add -A && git commit -m "release: v2026.3.3-kosbling.6"
git push origin maingit fetch upstream
git checkout upstream
git merge v2026.2.xx
git checkout main
git merge upstream --no-ff -m "Merge upstream v2026.2.xx"
git push origin main upstreammain- primary development branch with all Kosbling Edition customizationsupstream- tracks upstream OpenClaw for merge/sync operations
Same license as upstream OpenClaw.