rsclaw 2026.6.26

AI Agent Engine Compatible with OpenClaw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
# rsclaw defaults — provider, channel, and search engine definitions
#
# Edit this file to customize providers, channels, search engines, etc.
# Generated on first `rsclaw setup`. On a defaults_version bump, releases
# refresh the built-in (shipped) entries to the latest definitions and keep
# any entries you added yourself; the previous file is saved as defaults.toml.bak.*.

[meta]
defaults_version = "2026.6.18"

# ──────────────────────────────────────────────────────────────────────────────
# Providers
# ──────────────────────────────────────────────────────────────────────────────

# RsClaw stateful incremental session protocol (kvCacheMode=2). Default
# fleet at api.rsclaw.ai; self-host by pointing base_url at a local
# rsclaw-llm worker. See: src/provider/rsclaw.rs.
[[providers]]
name       = "rsclaw"
label      = "RsClaw (recommended)"
env_var    = "RSCLAW_API_KEY"
model      = "rsclaw/rsclaw-agent-v1"
base_url   = "https://api.rsclaw.ai/v1"
api_type   = "rsclaw"
needs_key  = true
name_zh         = "RsClaw"
name_en         = "RsClaw"
tag_zh          = "增量协议 · 业内首发"
tag_en          = "Incremental · Industry-first"
key_label       = "RsClaw API Key"
key_placeholder = "sk-..."
has_base_url     = true
order_zh        = 0
order_en        = 0

# Agnes AI (Sapiens AI) — OpenAI-compatible chat/completions, plus
# /v1/images/generations and an async /v1/videos surface. Free tier as of
# 2026-06. Text speaks standard OpenAI Chat Completions, so api_type is the
# default openai-completions. See: https://agnes-ai.com/doc
[[providers]]
name       = "agnes"
label      = "Agnes AI"
env_var    = "AGNES_API_KEY"
model      = "agnes/agnes-2.0-flash"
base_url   = "https://apihub.agnes-ai.com/v1"
needs_key  = true
name_zh         = "Agnes AI"
name_en         = "Agnes AI"
tag_zh          = "免费 · 文图视"
tag_en          = "Free · text/image/video"
key_label       = "Agnes API Key"
key_placeholder = "sk-..."
has_base_url     = true
order_zh        = 1
order_en        = 1

[[providers]]
name       = "doubao"
label      = "Doubao (ByteDance)"
env_var    = "ARK_API_KEY"
model      = "doubao/doubao-seed-2.0-pro"
base_url   = "https://ark.cn-beijing.volces.com/api/v3"
api_type   = "openai-responses"
needs_key  = true
name_zh         = "Doubao (豆包)"
name_en         = "Doubao (豆包)"
tag_zh          = "字节跳动"
tag_en          = "ByteDance"
key_label       = "ARK API Key"
key_placeholder = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
has_base_url     = true
order_zh        = 4
order_en        = 11

[[providers]]
name       = "qwen"
label      = "Qwen (千问)"
env_var    = "DASHSCOPE_API_KEY"
model      = "qwen/qwen-plus"
base_url   = "https://dashscope.aliyuncs.com/compatible-mode/v1"
needs_key  = true
name_zh         = "Qwen (千问)"
name_en         = "Qwen (千问)"
tag_zh          = "国内直连"
tag_en          = "China direct"
key_label       = "DashScope API Key"
key_placeholder = "sk-..."
order_zh        = 2
order_en        = 12

[[providers]]
name       = "minimax"
label      = "MiniMax"
env_var    = "MINIMAX_API_KEY"
model      = "minimax/MiniMax-M2.5"
base_url   = "https://api.minimaxi.com/v1"
needs_key  = true
name_zh         = "MiniMax"
name_en         = "MiniMax"
tag_zh          = "国内"
tag_en          = "China"
key_label       = "MiniMax API Key"
key_placeholder = "eyJ..."
order_zh        = 7
order_en        = 13

[[providers]]
name       = "deepseek"
label      = "DeepSeek"
env_var    = "DEEPSEEK_API_KEY"
model      = "deepseek/deepseek-v4-flash"
base_url   = "https://api.deepseek.com/v1"
needs_key  = true
name_zh         = "DeepSeek"
name_en         = "DeepSeek"
tag_zh          = "低成本"
tag_en          = "Low cost"
key_label       = "DeepSeek API Key"
key_placeholder = "sk-..."
order_zh        = 3
order_en        = 14

[[providers]]
name       = "kimi"
label      = "Kimi"
env_var    = "MOONSHOT_API_KEY"
model      = "kimi/kimi-k2.6"
base_url   = "https://api.moonshot.cn/v1"
user_agent = "rsclaw/2026.6.16"
needs_key  = true
name_zh         = "Kimi"
name_en         = "Kimi"
tag_zh          = "国内"
tag_en          = "China"
key_label       = "Kimi API Key"
key_placeholder = "sk-..."
has_base_url     = true
order_zh        = 8
order_en        = 15

[[providers]]
name       = "zhipu"
label      = "Zhipu (GLM)"
env_var    = "ZHIPU_API_KEY"
model      = "zhipu/glm-4-plus"
base_url   = "https://open.bigmodel.cn/api/paas/v4"
needs_key  = true
name_zh         = "Zhipu (GLM)"
name_en         = "Zhipu (GLM)"
tag_zh          = "国内"
tag_en          = "China"
key_label       = "Zhipu API Key"
key_placeholder = "sk-..."
order_zh        = 9
order_en        = 16

[[providers]]
name       = "gaterouter"
label      = "GateRouter"
env_var    = "GATEROUTER_API_KEY"
model      = "gaterouter/auto"
base_url   = "https://api.gaterouter.ai/openai/v1"
needs_key  = true
name_zh         = "GateRouter"
name_en         = "GateRouter"
tag_zh          = "聚合路由"
tag_en          = "Aggregator"
key_label       = "GateRouter Key"
key_placeholder = "sk-..."
order_zh        = 11
order_en        = 17

[[providers]]
name       = "openrouter"
label      = "OpenRouter"
env_var    = "OPENROUTER_API_KEY"
model      = "openrouter/anthropic/claude-sonnet-4.6"
base_url   = "https://openrouter.ai/api/v1"
needs_key  = true
name_zh         = "OpenRouter"
name_en         = "OpenRouter"
tag_zh          = "聚合路由"
tag_en          = "Aggregator"
key_label       = "OpenRouter Key"
key_placeholder = "sk-or-..."
order_zh        = 12
order_en        = 6

[[providers]]
name       = "anthropic"
label      = "Anthropic (Claude)"
env_var    = "ANTHROPIC_API_KEY"
model      = "anthropic/claude-sonnet-4-6"
base_url   = "https://api.anthropic.com/v1"
api_type   = "anthropic"
needs_key  = true
name_zh         = "Anthropic (Claude)"
name_en         = "Anthropic (Claude)"
tag_zh          = "推荐"
tag_en          = "Recommended"
key_label       = "Anthropic API Key"
key_placeholder = "sk-ant-..."
order_zh        = 13
order_en        = 2

[[providers]]
name       = "openai"
label      = "OpenAI (GPT)"
env_var    = "OPENAI_API_KEY"
model      = "openai/gpt-4o"
base_url   = "https://api.openai.com/v1"
needs_key  = true
name_zh         = "OpenAI (GPT)"
name_en         = "OpenAI (GPT)"
key_label       = "OpenAI API Key"
key_placeholder = "sk-..."
order_zh        = 14
order_en        = 3

[[providers]]
name       = "gemini"
label      = "Google Gemini"
env_var    = "GEMINI_API_KEY"
model      = "gemini/gemini-2.5-flash"
base_url   = "https://generativelanguage.googleapis.com/v1beta"
api_type   = "gemini"
needs_key  = true
name_zh         = "Google Gemini"
name_en         = "Google Gemini"
key_label       = "Gemini API Key"
key_placeholder = "AIza..."
order_zh        = 15
order_en        = 4

[[providers]]
name       = "xai"
label      = "xAI (Grok)"
env_var    = "XAI_API_KEY"
model      = "xai/grok-3"
base_url   = "https://api.x.ai/v1"
needs_key  = true
name_zh         = "xAI (Grok)"
name_en         = "xAI (Grok)"
key_label       = "xAI API Key"
key_placeholder = "xai-..."
order_zh        = 16
order_en        = 5

[[providers]]
name       = "groq"
label      = "Groq"
env_var    = "GROQ_API_KEY"
model      = "groq/llama-3.3-70b-versatile"
base_url   = "https://api.groq.com/openai/v1"
needs_key  = true
name_zh         = "Groq"
name_en         = "Groq"
tag_zh          = "快速推理"
tag_en          = "Fast"
key_label       = "Groq API Key"
key_placeholder = "gsk_..."
order_zh        = 17
order_en        = 10

[[providers]]
name       = "siliconflow"
label      = "SiliconFlow"
env_var    = "SILICONFLOW_API_KEY"
model      = "siliconflow/deepseek-ai/DeepSeek-V3"
base_url   = "https://api.siliconflow.cn/v1"
needs_key  = true
name_zh         = "SiliconFlow"
name_en         = "SiliconFlow"
tag_zh          = "国内加速"
tag_en          = "China accel"
key_label       = "SiliconFlow Key"
key_placeholder = "sk-..."
order_zh        = 18
order_en        = 18

[[providers]]
name       = "ollama"
label      = "Ollama (local)"
env_var    = ""
model      = "ollama/llama3.3"
base_url   = "http://127.0.0.1:11434"
api_type   = "ollama"
needs_key  = false
name_zh         = "Ollama (local)"
name_en         = "Ollama (local)"
tag_zh          = "无需 Key"
tag_en          = "No Key"
key_label       = "URL"
key_placeholder = "http://localhost:11434/v1"
is_url           = true
order_zh        = 10
order_en        = 7

[[providers]]
name       = "codingplan"
label      = "CodingPlan (编码计划)"
env_var    = ""
model      = ""
base_url   = ""
api_type   = "openai"
user_agent = "claude-code/0.1.0"
needs_key  = false
name_zh         = "CodingPlan"
name_en         = "CodingPlan"
tag_zh          = "编程计划"
tag_en          = "Coding Plan"
key_label       = "API URL"
key_placeholder = "https://api.example.com/v1"
is_url           = true
order_zh        = 6
order_en        = 9

[[providers]]
name       = "custom"
label      = "Custom Provider"
env_var    = ""
model      = ""
base_url   = ""
api_type   = "openai"
needs_key  = false
name_zh         = "Custom Provider"
name_en         = "Custom Provider"
tag_zh          = "自定义"
tag_en          = "Custom"
key_label       = "API URL"
key_placeholder = "https://api.example.com/v1"
is_url           = true
order_zh        = 5
order_en        = 8

# ──────────────────────────────────────────────────────────────────────────────
# Channels
# ──────────────────────────────────────────────────────────────────────────────

[[channels]]
name  = "feishu"
label = "Feishu / Lark"
login = true
multi_account = true
name_zh     = "飞书 / Lark"
icon        = ""
has_qr      = true
qr_label_zh = "扫码"
qr_label_en = "QR"
order_zh    = 0
order_en    = 7
fields = [
  { key = "appId",     prompt = "App ID",     secret = false, placeholder = "cli_xxx" },
  { key = "appSecret", prompt = "App Secret", secret = true,  placeholder = "" },
]

[[channels]]
name  = "wechat"
label = "Weixin"
login = true
multi_account = true
name_zh     = "微信"
icon        = ""
has_qr      = true
qr_label_zh = "扫码"
qr_label_en = "QR"
order_zh    = 1
order_en    = 8
fields = [
  { key = "botToken", prompt = "Bot Token (from QR login)", secret = true,  placeholder = "" },
  { key = "botId",    prompt = "Bot ID",                     secret = false, placeholder = "" },
]

[[channels]]
name  = "wecom"
label = "WeCom"
multi_account = true
name_zh  = "企业微信"
icon     = "WC"
has_qr   = false
order_zh = 2
order_en = 9
fields = [
  { key = "botId",  prompt = "Bot ID",  secret = false, placeholder = "" },
  { key = "secret",  prompt = "Secret",  secret = true,  placeholder = "" },
]

[[channels]]
name  = "qq"
label = "QQ Bot"
multi_account = true
name_zh  = "QQ Bot"
icon     = "QQ"
has_qr   = false
order_zh = 3
order_en = 10
fields = [
  { key = "appId",     prompt = "App ID",     secret = false, placeholder = "" },
  { key = "appSecret", prompt = "App Secret", secret = true,  placeholder = "" },
]

[[channels]]
name  = "dingtalk"
label = "DingTalk"
multi_account = true
name_zh  = "钉钉"
icon     = "DT"
has_qr   = false
order_zh = 4
order_en = 11
fields = [
  { key = "appKey",    prompt = "App Key",    secret = false, placeholder = "" },
  { key = "appSecret", prompt = "App Secret", secret = true,  placeholder = "" },
]

[[channels]]
name  = "telegram"
label = "Telegram"
multi_account = true
name_zh  = "Telegram"
icon     = "Tg"
has_qr   = false
order_zh = 5
order_en = 0
fields = [
  { key = "botToken", prompt = "Bot Token", secret = true, placeholder = "123456:ABC-DEF..." },
]

[[channels]]
name  = "matrix"
label = "Matrix"
multi_account = true
name_zh  = "Matrix"
icon     = "Mx"
has_qr   = false
order_zh = 6
order_en = 1
fields = [
  { key = "homeserver",  prompt = "Homeserver URL (e.g. https://matrix.org)", secret = false, placeholder = "https://matrix.org" },
  { key = "accessToken", prompt = "Access Token", secret = true, placeholder = "" },
  { key = "userId",      prompt = "Bot User ID (e.g. @bot:matrix.org)", secret = false, placeholder = "@bot:matrix.org" },
  { key = "deviceId",    prompt = "Device ID (optional, auto-generated)", secret = false, placeholder = "" },
  { key = "recoveryKey", prompt = "E2EE Recovery Key (optional)", secret = true, placeholder = "" },
]

[[channels]]
name  = "discord"
label = "Discord"
multi_account = true
name_zh  = "Discord"
icon     = "Dc"
has_qr   = false
order_zh = 7
order_en = 2
fields = [
  { key = "token", prompt = "Bot Token", secret = true, placeholder = "" },
]

[[channels]]
name  = "slack"
label = "Slack"
multi_account = true
name_zh  = "Slack"
icon     = "Sl"
has_qr   = false
order_zh = 8
order_en = 3
fields = [
  { key = "botToken", prompt = "Bot Token", secret = true, placeholder = "xoxb-..." },
  { key = "appToken", prompt = "App Token", secret = true, placeholder = "xapp-..." },
]

[[channels]]
name  = "whatsapp"
label = "WhatsApp"
multi_account = true
name_zh  = "WhatsApp"
icon     = "WA"
has_qr   = false
order_zh = 9
order_en = 4
fields = [
  { key = "phoneNumberId", prompt = "Phone Number ID", secret = false, placeholder = "" },
  { key = "accessToken",   prompt = "Access Token",    secret = true,  placeholder = "" },
]

[[channels]]
name  = "signal"
label = "Signal"
multi_account = true
name_zh  = "Signal"
icon     = "Sg"
has_qr   = false
order_zh = 10
order_en = 5
fields = [
  { key = "phoneNumber", prompt = "Phone Number (E.164)", secret = false, placeholder = "+1234567890" },
]

[[channels]]
name  = "line"
label = "LINE"
multi_account = true
name_zh  = "LINE"
icon     = "Li"
has_qr   = false
order_zh = 11
order_en = 6
fields = [
  { key = "channelAccessToken", prompt = "Channel Access Token", secret = true, placeholder = "" },
  { key = "channelSecret",      prompt = "Channel Secret",       secret = true, placeholder = "" },
]

[[channels]]
name  = "zalo"
label = "Zalo"
multi_account = true
name_zh  = "Zalo"
icon     = "Za"
has_qr   = false
order_zh = 12
order_en = 12
fields = [
  { key = "accessToken", prompt = "Access Token", secret = true, placeholder = "" },
  { key = "oaSecret",    prompt = "OA Secret",    secret = true, placeholder = "" },
]

# ──────────────────────────────────────────────────────────────────────────────
# Search Engines (used by web_search tool)
# ──────────────────────────────────────────────────────────────────────────────

# Free scraper-based engines (no API key required).
[[search_engines]]
name     = "bing-free"
label    = "Bing (free)"
label_zh = "Bing (免费)"
label_en = "Bing (free)"
url      = ""
env_var  = ""
needs_key = false
order    = 0

[[search_engines]]
name     = "baidu-free"
label    = "Baidu (free)"
label_zh = "百度 (免费)"
label_en = "Baidu (free)"
url      = ""
env_var  = ""
needs_key = false
order    = 1

[[search_engines]]
name     = "sogou"
label    = "Sogou (free)"
label_zh = "搜狗 (免费)"
label_en = "Sogou (free)"
url      = ""
env_var  = ""
needs_key = false
order    = 2

[[search_engines]]
name     = "360"
label    = "360 Search (free)"
label_zh = "360搜索 (免费)"
label_en = "360 Search (free)"
url      = ""
env_var  = ""
needs_key = false
order    = 3

[[search_engines]]
name     = "duckduckgo"
label    = "DuckDuckGo"
label_zh = "DuckDuckGo (免费)"
label_en = "DuckDuckGo (free)"
url      = "https://html.duckduckgo.com/html/"
env_var  = ""
needs_key = false
order    = 4

[[search_engines]]
name     = "google"
label    = "Google"
label_zh = "Google (需 API Key)"
label_en = "Google (API key)"
url      = "https://www.googleapis.com/customsearch/v1"
env_var  = "GOOGLE_SEARCH_API_KEY"
needs_key = true
order    = 5

[[search_engines]]
name     = "bing"
label    = "Bing"
label_zh = "Bing (需 API Key)"
label_en = "Bing (API key)"
url      = "https://api.bing.microsoft.com/v7.0/search"
env_var  = "BING_API_KEY"
needs_key = true
order    = 6

[[search_engines]]
name     = "brave"
label    = "Brave Search"
label_zh = "Brave (需 API Key)"
label_en = "Brave (API key)"
url      = "https://api.search.brave.com/res/v1/web/search"
env_var  = "BRAVE_API_KEY"
needs_key = true
order    = 7

[[search_engines]]
name     = "serper"
label    = "Serper"
label_zh = "Serper (需 API Key)"
label_en = "Serper (API key)"
url      = "https://google.serper.dev/search"
env_var  = "SERPER_API_KEY"
needs_key = true
order    = 8

# ──────────────────────────────────────────────────────────────────────────────
# Video Generation Providers (used by video_gen tool)
# ──────────────────────────────────────────────────────────────────────────────

[video_providers.seedance]
label       = "Seedance 2.0 (ByteDance)"
env_var     = "ARK_API_KEY"
# Variants (use the exact ARK model id): pro = doubao-seedance-2-0-260128,
# fast = doubao-seedance-2-0-fast-260128. Override per-call via the video_gen
# `model` arg or agents.defaults.model.video (e.g. doubao/<id>).
model       = "doubao-seedance-2-0-260128"
base_url    = "https://ark.cn-beijing.volces.com/api/v3"

[video_providers.rsclaw]
label       = "RsClaw Gen (avatar / mv 聚合)"
env_var     = "RSCLAW_API_KEY"
model       = "rsclaw-video-v1"
base_url    = "https://api.rsclaw.ai"

[video_providers.agnes]
label       = "Agnes Video V2.0 (Sapiens AI)"
env_var     = "AGNES_API_KEY"
model       = "agnes-video-v2.0"
base_url    = "https://apihub.agnes-ai.com"

# OpenAI-compatible (Sora-2 shape). Defaults to api.openai.com; point
# `models.providers.openai.base_url` at any OAI-compatible video gateway to
# redirect. Same baseUrl passthrough as the gpt-image path on image_gen.
[video_providers.openai]
label       = "OpenAI / Sora-2 (OAI-compatible)"
env_var     = "OPENAI_API_KEY"
model       = "sora-2"
base_url    = "https://api.openai.com/v1"

# ──────────────────────────────────────────────────────────────────────────────
# Skill Registries (used by rsclaw skills install/search)
# ──────────────────────────────────────────────────────────────────────────────

[skill_registries.clawhub]
label        = "ClawHub"
api_base     = "https://clawhub.ai/api"

[skill_registries.skillhub]
label        = "SkillHub"
search_url   = "https://api.skillhub.cn/api/skills"
download_url = "https://api.skillhub.cn/api/v1/skills/{slug}/files"
index_url    = "https://api.skillhub.cn/api/skills?pageSize=200"
primary_download_url = "https://api.skillhub.cn/api/v1/skills"

# 同花顺 iWenCai 金融技能库 (curated finance/quant skills).
# Endpoints filled in once iwencai publishes the public API contract.
# `base_url` is overridable via IWENCAI_BASE_URL env var; the API key
# itself never lives in defaults.toml — it's read from IWENCAI_API_KEY
# at request time (matches the [[providers]] env_var pattern).
[skill_registries.iwencai]
label                = "iWenCai SkillHub (同花顺金融技能库)"
list_url             = "http://ms.10jqka.com.cn/gateway/market/api/v1/skills/square"
install_url_template = "http://ms.10jqka.com.cn/gateway/market/api/v1/skills/square/download?name={slug}"
# These are the MARKETPLACE URLs (ms.10jqka.com.cn, unauthenticated). They are
# NOT rebased by `IWENCAI_BASE_URL` — that env points at the openapi.iwencai.com
# DATA gateway (which an installed skill calls at runtime with IWENCAI_API_KEY +
# X-Claw-Skill-Version) and 401s these marketplace endpoints. Use the dedicated
# `IWENCAI_MARKET_BASE_URL` only if the marketplace host itself moves.
base_url_env         = "IWENCAI_MARKET_BASE_URL"
env_var              = "IWENCAI_API_KEY"
needs_key            = false

# ──────────────────────────────────────────────────────────────────────────────
# Direct API sources — invoked by query_planner intent dispatchers.
# Only URLs and parser anchor strings (e.g. the JS variable name an
# endpoint wraps its JSON in) live here, since those occasionally
# change with no algorithm change (jinse → jinse2.com kind of rebrand).
# Response parsing logic stays in code.
# Schema lives in src/agent/direct_apis.rs.
# ──────────────────────────────────────────────────────────────────────────────

[direct_apis.weather.weather_cn]
# Chinese national weather service — 15-day precise forecast + 40-day
# projection for CN cities. Two-step: search to resolve cityid, then
# pull the calendar payload (wrapped in `var fc40 = [...]`).
city_search_url = "https://toy1.weather.com.cn/search?cityname={name}"
calendar_url    = "https://d1.weather.com.cn/calendar_new/{year}/{cityid}_{yyyymm}.html?_={now_ms}"
js_var_name     = "fc40"
referer         = "https://www.weather.com.cn/"
cityid_prefix   = "10"

[direct_apis.weather.openmeteo]
# Free 7-day forecast, lat/lon based, worldwide coverage.
url = "https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,weathercode&forecast_days=7&timezone=Asia/Shanghai"

[direct_apis.weather.wttr]
# Universal fallback. Accepts city names in any language; 3-day forecast.
url = "https://wttr.in/{location}?format=j1"

[direct_apis.crypto.coingecko]
# Multi-coin, multi-currency. Returns USD + CNY in one call. Primary.
url = "https://api.coingecko.com/api/v3/simple/price?ids={coin}&vs_currencies=usd,cny"

[direct_apis.crypto.cryptocompare]
# Lightweight single-coin quote. Backup when CoinGecko throttles or
# its DNS is degraded (both observed intermittently in CN networks).
url = "https://min-api.cryptocompare.com/data/price?fsym={symbol}&tsyms=USD,CNY"

[direct_apis.crypto.jinse]
# 金色财经 — Chinese crypto news aggregator. News only (no price quotes).
# Domain rebranded from `jinse.com` to `jinse2.com` in 2026-05 — the
# externalisation of this URL specifically avoided a code+rebuild cycle
# for the rename.
news_url = "https://api.jinse2.com/v6/information/list?catelogue_key=news&limit={limit}"

# ──────────────────────────────────────────────────────────────────────────────
# Exec Safety Rules
# ──────────────────────────────────────────────────────────────────────────────

[exec_safety]
deny = [
  "\\bsudo\\b",
  "\\brunas\\b",
  "rm\\s+-rf\\s+[/~]",
  "rd\\s+/s\\s+/q\\s+[A-Z]:\\\\",
  "del\\s+/f\\s+/s\\s+/q\\s+[A-Z]:\\\\",
  "\\bmkfs\\b",
  "\\bdd\\b\\s+if=.*of=/dev/",
  "\\bformat\\b\\s+[A-Z]:",
  "\\bdiskpart\\b",
  ":\\(\\)\\s*\\{",
  "%0\\|%0",
  "\\bshutdown\\b",
  "\\breboot\\b",
  "\\bhalt\\b",
  "\\bpoweroff\\b",
  "\\bkill\\s+-9\\s+(-1|1)$",
  "iptables\\s+-F",
  "\\bufw\\s+disable\\b",
  "pfctl\\s+-d",
  "\\bpasswd\\b",
  "\\buseradd\\b",
  "\\buserdel\\b",
  "curl.*\\|.*sh",
  "wget.*\\|.*bash",
  "powershell.*-ep\\s+bypass",
  "iex\\(iwr",
  "\\benv\\b$",
  "\\bprintenv\\b$",
  "crontab\\s+-r",
  "systemctl\\s+disable",
  "launchctl\\s+unload",
  "csrutil\\s+disable",
  "reg\\s+delete\\s+HKLM",
  ">\\s*/dev/",
  ">\\s*/etc/",
  ">\\s*/usr/",
  ">\\s*/bin/",
  ">\\s*~/.bashrc",
  ">\\s*~/.zshrc",
  ">\\s*~/.profile",
  ">\\s*~/.ssh/",
  "tee\\s+/etc/",
  "tee\\s+/dev/",
  # Block reading sensitive files
  "cat.*~/.ssh/",
  "cat.*/\\.ssh/",
  "cat.*/etc/shadow",
  "cat.*/etc/gshadow",
  "cat.*/etc/master\\.passwd",
  "less.*~/.ssh/",
  "head.*~/.ssh/",
  "tail.*~/.ssh/",
  "cp.*~/.ssh/",
  "scp.*id_rsa",
  "scp.*id_ed25519",
  "base64.*id_rsa",
  "base64.*id_ed25519",
  "xxd.*id_rsa",
  "xxd.*id_ed25519",
  "cat.*/\\.env",
  "cat.*/\\.aws/credentials",
  "cat.*/\\.kube/config",
  "cat.*/\\.docker/config\\.json",
  "cat.*/\\.gnupg/",
  "cat.*/\\.netrc",
  "cat.*/\\.pgpass",
  # AI tool credentials & config (contain API keys)
  "cat.*/\\.claude/",
  "cat.*/\\.opencode/",
  "cat.*/\\.openclaw/credentials",
  "cat.*/\\.rsclaw/credentials",
  "cat.*openclaw\\.json",
  "cat.*rsclaw\\.json5",
  "cat.*auth-profiles\\.json",
]

confirm = [
  "rm\\s+-rf",
  "rd\\s+/s",
  "git\\s+push\\s+--force",
  "git\\s+reset\\s+--hard",
  "git\\s+clean\\s+-fd",
  "drop\\s+(database|table)",
  "truncate\\s+table",
  "docker\\s+(rm|rmi|system\\s+prune)",
  "kubectl\\s+delete",
]

allow = []