hajimi-claw 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Cargo.lock CHANGED
@@ -118,6 +118,58 @@ version = "1.5.0"
118
118
  source = "registry+https://github.com/rust-lang/crates.io-index"
119
119
  checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
120
120
 
121
+ [[package]]
122
+ name = "axum"
123
+ version = "0.8.8"
124
+ source = "registry+https://github.com/rust-lang/crates.io-index"
125
+ checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8"
126
+ dependencies = [
127
+ "axum-core",
128
+ "bytes",
129
+ "form_urlencoded",
130
+ "futures-util",
131
+ "http",
132
+ "http-body",
133
+ "http-body-util",
134
+ "hyper",
135
+ "hyper-util",
136
+ "itoa",
137
+ "matchit",
138
+ "memchr",
139
+ "mime",
140
+ "percent-encoding",
141
+ "pin-project-lite",
142
+ "serde_core",
143
+ "serde_json",
144
+ "serde_path_to_error",
145
+ "serde_urlencoded",
146
+ "sync_wrapper",
147
+ "tokio",
148
+ "tower",
149
+ "tower-layer",
150
+ "tower-service",
151
+ "tracing",
152
+ ]
153
+
154
+ [[package]]
155
+ name = "axum-core"
156
+ version = "0.5.6"
157
+ source = "registry+https://github.com/rust-lang/crates.io-index"
158
+ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1"
159
+ dependencies = [
160
+ "bytes",
161
+ "futures-core",
162
+ "http",
163
+ "http-body",
164
+ "http-body-util",
165
+ "mime",
166
+ "pin-project-lite",
167
+ "sync_wrapper",
168
+ "tower-layer",
169
+ "tower-service",
170
+ "tracing",
171
+ ]
172
+
121
173
  [[package]]
122
174
  name = "base64"
123
175
  version = "0.22.1"
@@ -232,6 +284,12 @@ dependencies = [
232
284
  "cipher",
233
285
  ]
234
286
 
287
+ [[package]]
288
+ name = "data-encoding"
289
+ version = "2.10.0"
290
+ source = "registry+https://github.com/rust-lang/crates.io-index"
291
+ checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"
292
+
235
293
  [[package]]
236
294
  name = "digest"
237
295
  version = "0.10.7"
@@ -458,7 +516,7 @@ dependencies = [
458
516
 
459
517
  [[package]]
460
518
  name = "hajimi-claw"
461
- version = "0.1.0"
519
+ version = "0.1.1"
462
520
  dependencies = [
463
521
  "anyhow",
464
522
  "hajimi-claw-daemon",
@@ -467,7 +525,7 @@ dependencies = [
467
525
 
468
526
  [[package]]
469
527
  name = "hajimi-claw-agent"
470
- version = "0.1.0"
528
+ version = "0.1.1"
471
529
  dependencies = [
472
530
  "anyhow",
473
531
  "chrono",
@@ -478,6 +536,7 @@ dependencies = [
478
536
  "hajimi-claw-store",
479
537
  "hajimi-claw-tools",
480
538
  "hajimi-claw-types",
539
+ "regex",
481
540
  "serde_json",
482
541
  "tempfile",
483
542
  "tokio",
@@ -487,10 +546,12 @@ dependencies = [
487
546
 
488
547
  [[package]]
489
548
  name = "hajimi-claw-bot"
490
- version = "0.1.0"
549
+ version = "0.1.1"
491
550
  dependencies = [
492
551
  "anyhow",
552
+ "axum",
493
553
  "chrono",
554
+ "futures",
494
555
  "hajimi-claw-gateway",
495
556
  "hajimi-claw-store",
496
557
  "hajimi-claw-types",
@@ -498,12 +559,14 @@ dependencies = [
498
559
  "serde",
499
560
  "serde_json",
500
561
  "tokio",
562
+ "tokio-tungstenite",
501
563
  "tracing",
564
+ "url",
502
565
  ]
503
566
 
504
567
  [[package]]
505
568
  name = "hajimi-claw-daemon"
506
- version = "0.1.0"
569
+ version = "0.1.1"
507
570
  dependencies = [
508
571
  "anyhow",
509
572
  "chrono",
@@ -516,16 +579,20 @@ dependencies = [
516
579
  "hajimi-claw-store",
517
580
  "hajimi-claw-tools",
518
581
  "hajimi-claw-types",
582
+ "reqwest",
519
583
  "serde",
584
+ "serde_json",
585
+ "tempfile",
520
586
  "tokio",
521
587
  "toml",
522
588
  "tracing",
523
589
  "tracing-subscriber",
590
+ "uuid",
524
591
  ]
525
592
 
526
593
  [[package]]
527
594
  name = "hajimi-claw-exec"
528
- version = "0.1.0"
595
+ version = "0.1.1"
529
596
  dependencies = [
530
597
  "anyhow",
531
598
  "async-trait",
@@ -542,7 +609,7 @@ dependencies = [
542
609
 
543
610
  [[package]]
544
611
  name = "hajimi-claw-gateway"
545
- version = "0.1.0"
612
+ version = "0.1.1"
546
613
  dependencies = [
547
614
  "anyhow",
548
615
  "async-trait",
@@ -563,7 +630,7 @@ dependencies = [
563
630
 
564
631
  [[package]]
565
632
  name = "hajimi-claw-llm"
566
- version = "0.1.0"
633
+ version = "0.1.1"
567
634
  dependencies = [
568
635
  "anyhow",
569
636
  "async-stream",
@@ -580,7 +647,7 @@ dependencies = [
580
647
 
581
648
  [[package]]
582
649
  name = "hajimi-claw-policy"
583
- version = "0.1.0"
650
+ version = "0.1.1"
584
651
  dependencies = [
585
652
  "chrono",
586
653
  "hajimi-claw-types",
@@ -591,7 +658,7 @@ dependencies = [
591
658
 
592
659
  [[package]]
593
660
  name = "hajimi-claw-store"
594
- version = "0.1.0"
661
+ version = "0.1.1"
595
662
  dependencies = [
596
663
  "aes-gcm",
597
664
  "anyhow",
@@ -606,7 +673,7 @@ dependencies = [
606
673
 
607
674
  [[package]]
608
675
  name = "hajimi-claw-tools"
609
- version = "0.1.0"
676
+ version = "0.1.1"
610
677
  dependencies = [
611
678
  "anyhow",
612
679
  "async-trait",
@@ -623,7 +690,7 @@ dependencies = [
623
690
 
624
691
  [[package]]
625
692
  name = "hajimi-claw-types"
626
- version = "0.1.0"
693
+ version = "0.1.1"
627
694
  dependencies = [
628
695
  "async-trait",
629
696
  "chrono",
@@ -712,6 +779,12 @@ version = "1.10.1"
712
779
  source = "registry+https://github.com/rust-lang/crates.io-index"
713
780
  checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
714
781
 
782
+ [[package]]
783
+ name = "httpdate"
784
+ version = "1.0.3"
785
+ source = "registry+https://github.com/rust-lang/crates.io-index"
786
+ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
787
+
715
788
  [[package]]
716
789
  name = "hyper"
717
790
  version = "1.8.1"
@@ -725,6 +798,7 @@ dependencies = [
725
798
  "http",
726
799
  "http-body",
727
800
  "httparse",
801
+ "httpdate",
728
802
  "itoa",
729
803
  "pin-project-lite",
730
804
  "pin-utils",
@@ -747,7 +821,7 @@ dependencies = [
747
821
  "tokio",
748
822
  "tokio-rustls",
749
823
  "tower-service",
750
- "webpki-roots",
824
+ "webpki-roots 1.0.6",
751
825
  ]
752
826
 
753
827
  [[package]]
@@ -1020,12 +1094,24 @@ dependencies = [
1020
1094
  "regex-automata",
1021
1095
  ]
1022
1096
 
1097
+ [[package]]
1098
+ name = "matchit"
1099
+ version = "0.8.4"
1100
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1101
+ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
1102
+
1023
1103
  [[package]]
1024
1104
  name = "memchr"
1025
1105
  version = "2.8.0"
1026
1106
  source = "registry+https://github.com/rust-lang/crates.io-index"
1027
1107
  checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
1028
1108
 
1109
+ [[package]]
1110
+ name = "mime"
1111
+ version = "0.3.17"
1112
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1113
+ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
1114
+
1029
1115
  [[package]]
1030
1116
  name = "mio"
1031
1117
  version = "1.1.1"
@@ -1321,7 +1407,7 @@ dependencies = [
1321
1407
  "wasm-bindgen-futures",
1322
1408
  "wasm-streams",
1323
1409
  "web-sys",
1324
- "webpki-roots",
1410
+ "webpki-roots 1.0.6",
1325
1411
  ]
1326
1412
 
1327
1413
  [[package]]
@@ -1468,6 +1554,17 @@ dependencies = [
1468
1554
  "zmij",
1469
1555
  ]
1470
1556
 
1557
+ [[package]]
1558
+ name = "serde_path_to_error"
1559
+ version = "0.1.20"
1560
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1561
+ checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457"
1562
+ dependencies = [
1563
+ "itoa",
1564
+ "serde",
1565
+ "serde_core",
1566
+ ]
1567
+
1471
1568
  [[package]]
1472
1569
  name = "serde_spanned"
1473
1570
  version = "0.6.9"
@@ -1489,6 +1586,17 @@ dependencies = [
1489
1586
  "serde",
1490
1587
  ]
1491
1588
 
1589
+ [[package]]
1590
+ name = "sha1"
1591
+ version = "0.10.6"
1592
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1593
+ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
1594
+ dependencies = [
1595
+ "cfg-if",
1596
+ "cpufeatures",
1597
+ "digest",
1598
+ ]
1599
+
1492
1600
  [[package]]
1493
1601
  name = "sha2"
1494
1602
  version = "0.10.9"
@@ -1694,6 +1802,22 @@ dependencies = [
1694
1802
  "tokio",
1695
1803
  ]
1696
1804
 
1805
+ [[package]]
1806
+ name = "tokio-tungstenite"
1807
+ version = "0.28.0"
1808
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1809
+ checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857"
1810
+ dependencies = [
1811
+ "futures-util",
1812
+ "log",
1813
+ "rustls",
1814
+ "rustls-pki-types",
1815
+ "tokio",
1816
+ "tokio-rustls",
1817
+ "tungstenite",
1818
+ "webpki-roots 0.26.11",
1819
+ ]
1820
+
1697
1821
  [[package]]
1698
1822
  name = "tokio-util"
1699
1823
  version = "0.7.18"
@@ -1761,6 +1885,7 @@ dependencies = [
1761
1885
  "tokio",
1762
1886
  "tower-layer",
1763
1887
  "tower-service",
1888
+ "tracing",
1764
1889
  ]
1765
1890
 
1766
1891
  [[package]]
@@ -1799,6 +1924,7 @@ version = "0.1.44"
1799
1924
  source = "registry+https://github.com/rust-lang/crates.io-index"
1800
1925
  checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
1801
1926
  dependencies = [
1927
+ "log",
1802
1928
  "pin-project-lite",
1803
1929
  "tracing-attributes",
1804
1930
  "tracing-core",
@@ -1860,6 +1986,25 @@ version = "0.2.5"
1860
1986
  source = "registry+https://github.com/rust-lang/crates.io-index"
1861
1987
  checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
1862
1988
 
1989
+ [[package]]
1990
+ name = "tungstenite"
1991
+ version = "0.28.0"
1992
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1993
+ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442"
1994
+ dependencies = [
1995
+ "bytes",
1996
+ "data-encoding",
1997
+ "http",
1998
+ "httparse",
1999
+ "log",
2000
+ "rand",
2001
+ "rustls",
2002
+ "rustls-pki-types",
2003
+ "sha1",
2004
+ "thiserror",
2005
+ "utf-8",
2006
+ ]
2007
+
1863
2008
  [[package]]
1864
2009
  name = "typenum"
1865
2010
  version = "1.19.0"
@@ -1906,6 +2051,12 @@ dependencies = [
1906
2051
  "serde",
1907
2052
  ]
1908
2053
 
2054
+ [[package]]
2055
+ name = "utf-8"
2056
+ version = "0.7.6"
2057
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2058
+ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
2059
+
1909
2060
  [[package]]
1910
2061
  name = "utf8_iter"
1911
2062
  version = "1.0.4"
@@ -2101,6 +2252,15 @@ dependencies = [
2101
2252
  "wasm-bindgen",
2102
2253
  ]
2103
2254
 
2255
+ [[package]]
2256
+ name = "webpki-roots"
2257
+ version = "0.26.11"
2258
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2259
+ checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
2260
+ dependencies = [
2261
+ "webpki-roots 1.0.6",
2262
+ ]
2263
+
2104
2264
  [[package]]
2105
2265
  name = "webpki-roots"
2106
2266
  version = "1.0.6"
package/Cargo.toml CHANGED
@@ -15,7 +15,7 @@ members = [
15
15
  resolver = "2"
16
16
 
17
17
  [workspace.package]
18
- version = "0.1.0"
18
+ version = "0.1.1"
19
19
  edition = "2024"
20
20
  license = "MIT"
21
21
  authors = ["OpenAI Codex"]
@@ -25,6 +25,7 @@ aes-gcm = "0.10"
25
25
  anyhow = "1.0"
26
26
  async-stream = "0.3"
27
27
  async-trait = "0.1"
28
+ axum = "0.8"
28
29
  base64 = "0.22"
29
30
  chrono = { version = "0.4", features = ["serde"] }
30
31
  futures = "0.3"
@@ -36,11 +37,13 @@ serde_json = "1.0"
36
37
  sha2 = "0.10"
37
38
  tempfile = "3.13"
38
39
  thiserror = "2.0"
39
- tokio = { version = "1.39", features = ["fs", "io-util", "macros", "process", "rt-multi-thread", "signal", "sync", "time"] }
40
+ tokio = { version = "1.39", features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
40
41
  tokio-stream = "0.1"
42
+ tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
41
43
  toml = "0.8"
42
44
  tracing = "0.1"
43
45
  tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
46
+ url = "2.5"
44
47
  uuid = { version = "1.10", features = ["serde", "v4"] }
45
48
  windows = { version = "0.58", features = ["Win32_Foundation", "Win32_Security", "Win32_System_JobObjects", "Win32_System_Threading"] }
46
49
 
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dongshan_Randeng
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,30 +1,36 @@
1
1
  # hajimi-claw
2
2
 
3
- Single-user Telegram-first ops agent in Rust.
3
+ Single-user Telegram/Feishu-first ops agent in Rust.
4
4
 
5
5
  ## Current scope
6
6
 
7
7
  - Telegram channel -> gateway -> runtime command flow
8
+ - Feishu webhook channel -> gateway -> runtime command flow
8
9
  - Telegram long polling command surface
9
10
  - Single active task gate
10
11
  - Structured tools for file access, Docker, and systemd
11
- - Guarded local command execution with approvals and short-lived elevated lease
12
+ - Guarded local command execution with approval mode, short-lived elevated mode, and full elevated mode
12
13
  - SQLite audit/task/session persistence
13
14
  - Windows-safe execution mode with allowlist checks and Job Object cleanup
14
- - Telegram onboarding flow for custom providers and chat-level provider binding
15
+ - Channel-aware onboarding for Telegram or Feishu plus provider/model setup
16
+ - Configurable multi-agent orchestration with coordinator/worker/integrator flow
15
17
 
16
18
  ## Running
17
19
 
18
- 1. Copy `config.example.toml` to `config.toml`.
19
- 2. Fill in the Telegram bot token and admin ids.
20
- 3. Set the provider secret key env var before starting:
21
- `set HAJIMI_CLAW_MASTER_KEY=replace-me-with-a-long-random-string`
22
- 4. Optional: fill in the `llm` section to bootstrap a default provider on first start.
23
- 5. Run `cargo run`.
24
- 6. In Telegram, use `/onboard` to add or switch providers interactively.
20
+ 1. Run `cargo run -- onboard` or `hajimi onboard`.
21
+ 2. `hajimi onboard` lets you choose `telegram`, `feishu`, or `skip`, verifies the channel credentials when configured, and then interactively guides provider model selection.
22
+ 3. Start the daemon with `cargo run` or `hajimi`.
23
+ 4. In Telegram, use `/menu` for the main quick-action panel, or just send plain text and let hajimi reply in natural language.
24
+ 5. In Feishu mode, configure the app's event subscription URL to point at `http(s)://<your-host><event_path>` for the local webhook listener.
25
25
 
26
26
  Set `HAJIMI_CLAW_CONFIG` if you want to load a different config path.
27
27
 
28
+ For background use without keeping a terminal open:
29
+
30
+ - `hajimi launch`
31
+ - `hajimi status`
32
+ - `hajimi stop`
33
+
28
34
  ## Install
29
35
 
30
36
  ### Windows
@@ -34,7 +40,7 @@ Set `HAJIMI_CLAW_CONFIG` if you want to load a different config path.
34
40
  - System-wide install:
35
41
  `powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1 -System`
36
42
 
37
- The installer copies `hajimi-claw.exe` and `config.example.toml`, and updates `PATH`.
43
+ The installer copies `hajimi-claw.exe`, creates the `hajimi.exe` alias, copies `config.example.toml`, and updates `PATH`.
38
44
 
39
45
  ### Linux
40
46
 
@@ -45,7 +51,7 @@ The installer copies `hajimi-claw.exe` and `config.example.toml`, and updates `P
45
51
  - System-wide install with systemd unit:
46
52
  `sudo sh ./scripts/install.sh --system --install-service`
47
53
 
48
- The Linux installer copies the binary to `PREFIX/bin` and `config.example.toml` to `PREFIX/share/hajimi-claw`.
54
+ The Linux installer copies the binary to `PREFIX/bin/hajimi-claw`, creates the `PREFIX/bin/hajimi` alias, and copies `config.example.toml` to `PREFIX/share/hajimi-claw`.
49
55
 
50
56
  ### npm
51
57
 
@@ -54,20 +60,143 @@ The Linux installer copies the binary to `PREFIX/bin` and `config.example.toml`
54
60
  - Global install from the repo:
55
61
  `npm install -g .`
56
62
 
57
- The npm package builds the Rust binary locally during `postinstall`, so `cargo` must already be installed on the target machine.
63
+ The npm package exposes both `hajimi` and `hajimi-claw`, and builds the Rust binary locally during `postinstall`, so `cargo` must already be installed on the target machine.
64
+
65
+ ## Channels
66
+
67
+ - `telegram`
68
+ - `feishu`
69
+
70
+ `hajimi onboard` now lets you pick the primary channel:
71
+
72
+ - `telegram`: verifies the bot token and can auto-pair the admin user/chat
73
+ - `feishu`: asks for `app_id` and `app_secret`, verifies them by requesting a tenant access token, and supports both `webhook` and `long-connection` modes
74
+ - `skip`: leaves channel setup empty for now so you can finish provider/model setup first
75
+
76
+ Current Feishu limitations:
77
+
78
+ - In `webhook` mode, you still need to configure the Feishu event subscription URL manually in the Feishu developer console
79
+ - In `long-connection` mode, message receive events can come through the WebSocket connection, but card button callbacks still need the lightweight HTTP callback path
80
+ - Feishu card support currently targets `menu/provider/model` style button flows; it is not a full parity implementation of Telegram inline interactions
81
+
82
+ ## CLI
83
+
84
+ - `hajimi`
85
+ - `hajimi daemon`
86
+ - `hajimi launch`
87
+ - `hajimi stop`
88
+ - `hajimi status`
89
+ - `hajimi onboard`
90
+ - `hajimi providers`
91
+ - `hajimi provider current`
92
+ - `hajimi provider use <provider-id>`
93
+ - `hajimi provider models [provider-id]`
94
+ - `hajimi provider set-model <provider-id> <model>`
95
+ - `hajimi model current`
96
+ - `hajimi model use [model]`
97
+ - `hajimi models [provider-id]`
98
+ - `hajimi restart`
99
+ - `hajimi help`
100
+
101
+ ## Multi-Agent
102
+
103
+ `hajimi` can split one natural-language request into multiple sub-agents. This is configured in
104
+ `config.toml` under `[multi_agent]`:
105
+
106
+ ```toml
107
+ [multi_agent]
108
+ enabled = true
109
+ auto_delegate = false
110
+ default_workers = 3
111
+ max_workers = 8
112
+ worker_timeout_secs = 90
113
+ max_context_chars_per_worker = 24000
114
+ ```
115
+
116
+ Natural-language triggers:
117
+
118
+ - `use 4 agents to analyze this`
119
+ - `开 6 个 agent 帮我排查`
120
+ - `please use sub agents for this`
121
+
122
+ Behavior:
123
+
124
+ - If the prompt explicitly asks for `N agents` or `N workers`, hajimi uses that count up to
125
+ `max_workers`
126
+ - If the prompt says `sub agent` / `multi agent`, hajimi uses `default_workers`
127
+ - `auto_delegate = true` enables light automatic delegation for obviously parallel analysis tasks
128
+ - Worker agents only perform parallel reasoning in v1; local command execution still stays behind
129
+ the existing single runtime/policy path
130
+ - Session-level controls are available in chat:
131
+ - `/agents on`
132
+ - `/agents off`
133
+ - `/agents auto`
134
+ - `/agents status`
135
+ - When a natural-language task is about to run in multi-agent mode, Telegram now shows a temporary
136
+ progress card and Feishu sends a status card before the final reply
137
+
138
+ ## Persona Files
139
+
140
+ `hajimi onboard` now creates empty persona files in `~/.hajimi/`:
141
+
142
+ - `soul.md`
143
+ - `agents.md`
144
+ - `tools.md`
145
+ - `skills.md`
146
+
147
+ `hajimi` reloads these files on each request, so Telegram edits take effect on the next `/ask`.
148
+
149
+ - Auto-discovered files: `soul.md`, `agents.md`, `AGENTS.md`, `tools.md`, `skills.md`
150
+ - Search roots: the current working directory, the config directory, and `~/.hajimi`
151
+ - Optional explicit list: set `[persona].prompt_files` in `config.toml`
152
+
153
+ Use these files for:
154
+
155
+ - `soul.md`: tone, temperament, and high-level persona
156
+ - `agents.md` or `AGENTS.md`: repo or operator instructions
157
+ - `tools.md`: tool-use policy and operational preferences
158
+ - `skills.md`: extra habits, playbooks, and skill-selection hints
58
159
 
59
160
  ## Telegram commands
60
161
 
61
162
  - `/onboard`
62
163
  - `/onboard cancel`
63
164
  - `/provider list`
165
+ - `/provider add`
64
166
  - `/provider current`
65
167
  - `/provider use <id>`
66
168
  - `/provider bind <id>`
67
169
  - `/provider test [id]`
68
170
  - `/provider models [id]`
171
+ - `/provider set-model <provider-id> <model>`
172
+ - `/model current`
173
+ - `/model use [model]`
174
+ - `/persona list`
175
+ - `/persona read <soul|agents|tools|skills>`
176
+ - `/persona write <file> <content>`
177
+ - `/persona append <file> <content>`
69
178
  - `/ask <text>`
70
179
  - `/shell open [name]`
71
180
  - `/shell exec <cmd>`
72
181
  - `/shell close`
73
182
  - `/status`
183
+ - `/menu`
184
+ - `/elevated on`
185
+ - `/elevated off`
186
+ - `/elevated ask`
187
+ - `/elevated full`
188
+
189
+ Plain Telegram text now defaults to a natural-language task, so `/ask` is optional for normal requests. hajimi sends a Telegram `typing` action, posts a short placeholder, and then edits that message with the final answer.
190
+
191
+ The bot also registers Telegram slash commands with `setMyCommands` on startup and exposes an inline quick-action menu via `/menu` and `/help`. `/provider current` and `/model current` now return inline buttons so you can switch provider/model directly from Telegram without typing full commands.
192
+
193
+ ## Provider And Model Switching
194
+
195
+ - Add a new provider: `hajimi onboard` or Telegram `/provider add`
196
+ - List configured providers: `hajimi providers` or Telegram `/provider list`
197
+ - Switch the default provider: `hajimi provider use <provider-id>` or Telegram `/provider use <id>`
198
+ - See the current model: `hajimi model current` or Telegram `/model current`
199
+ - Switch the current model on the active provider: `hajimi model use [model]` or Telegram `/model use [model]`
200
+ - Open the model picker with inline buttons: `hajimi model use` or Telegram `/model use`
201
+ - Switch a specific provider to a specific model: `hajimi provider set-model <provider-id> <model>` or Telegram `/provider set-model <provider-id> <model>`
202
+ - `hajimi onboard` now supports optional fallback models per provider; if the primary model fails, hajimi will retry the provider using the configured fallback models in order