hajimi-claw 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -14,6 +14,8 @@ Single-user Telegram/Feishu-first ops agent in Rust.
14
14
  - Windows-safe execution mode with allowlist checks and Job Object cleanup
15
15
  - Channel-aware onboarding for Telegram or Feishu plus provider/model setup
16
16
  - Configurable multi-agent orchestration with coordinator/worker/integrator flow
17
+ - Executable skills registered as first-class tools with shared approval, audit, and persistence
18
+ - Capability inventory and MCP server status surfaced in chat via `/capabilities`, `/skills`, and `/mcp`
17
19
 
18
20
  ## Running
19
21
 
@@ -171,6 +173,69 @@ Current Feishu limitations:
171
173
  `hajimi ask` now records task state and tool invocations in SQLite. If a guarded command blocks on
172
174
  approval, `hajimi approve <request-id>` resumes the blocked task instead of asking you to rerun it.
173
175
 
176
+ ## Skills and MCP
177
+
178
+ Hajimi now treats native tools, executable skills, and MCP-discovered tools as one capability
179
+ surface.
180
+
181
+ - Native tools keep their existing names such as `read_file` or `exec_once`
182
+ - When `[telegram].bot_token` is configured, a native `telegram_api` tool is also registered
183
+ - Executable skills are configured in `[skills]` and are registered as tool names like
184
+ `skill.deploy`
185
+ - MCP tools will be exposed as namespaced tool names like `mcp.<server>.<tool>`
186
+ - All three flow through the same runtime path for approval, audit logging, task persistence, and
187
+ model tool-calling
188
+
189
+ `skills.md` remains prompt guidance only. Use it for playbooks, habits, and routing hints. It is
190
+ not the executable source of truth for runnable skills.
191
+
192
+ ### Config
193
+
194
+ `config.example.toml` now includes these sections:
195
+
196
+ ```toml
197
+ [skills]
198
+ enabled = true
199
+ directory = "./skills"
200
+ manifest_paths = []
201
+ entries = []
202
+
203
+ [mcp]
204
+ enabled = true
205
+ servers = []
206
+ ```
207
+
208
+ Skill manifests and inline entries deserialize into `ExecutableSkillConfig`, including `name`,
209
+ `description`, `command`, `args`, `cwd`, `env_allowlist`, `requires_approval`, `timeout_secs`,
210
+ `max_output_bytes`, and `input_schema`.
211
+
212
+ Relative paths in skill manifests, `skills.directory`, `skills.manifest_paths`, and MCP server
213
+ `cwd` values resolve relative to the config file.
214
+
215
+ ### Telegram capability commands
216
+
217
+ - `/capabilities` — list the effective native tools, executable skills, and MCP tools
218
+ - `/skills` — list executable skills only
219
+ - `/skill run <name> <json-or-text>` — explicitly invoke one configured skill through the runtime
220
+ - `/mcp` — show configured MCP server status
221
+ - `/mcp tools [server]` — list discovered MCP tools, optionally filtered by server
222
+
223
+ Natural-language requests stay primary. Once a skill or MCP tool is registered in the runtime, the
224
+ model can choose it during normal `/ask` or plain-text requests just like built-in tools.
225
+
226
+ `telegram_api` calls the configured Telegram Bot API token directly from the native tool layer. A
227
+ typical invocation looks like:
228
+
229
+ ```json
230
+ {
231
+ "method": "sendMessage",
232
+ "params": {
233
+ "text": "deploy finished"
234
+ },
235
+ "use_default_chat_id": true
236
+ }
237
+ ```
238
+
174
239
  ## Multi-Agent
175
240
 
176
241
  `hajimi` can split one natural-language request into multiple sub-agents. This is configured in
@@ -210,25 +275,43 @@ Behavior:
210
275
 
211
276
  ## Persona Files
212
277
 
213
- `hajimi onboard` now creates empty persona files in `~/.hajimi/`:
278
+ `hajimi onboard` seeds persona files in `~/.hajimi/`:
214
279
 
280
+ - `identity.md`
215
281
  - `soul.md`
216
282
  - `agents.md`
217
283
  - `tools.md`
218
284
  - `skills.md`
285
+ - `heartbeat.md`
286
+
287
+ `hajimi` reloads persona prompt files on each request, so edits take effect on the next `/ask`.
288
+
289
+ Layered prompt order:
290
+
291
+ 1. base system prompt
292
+ 2. `identity.md`
293
+ 3. `soul.md`
294
+ 4. `agents.md` / `AGENTS.md` / `tools.md` / `skills.md`
295
+ 5. runtime overlays such as shell-session metadata and multi-agent role instructions
219
296
 
220
- `hajimi` reloads these files on each request, so Telegram edits take effect on the next `/ask`.
297
+ Auto-discovery behavior:
221
298
 
222
- - Auto-discovered files: `soul.md`, `agents.md`, `AGENTS.md`, `tools.md`, `skills.md`
223
- - Search roots: the current working directory, the config directory, and `~/.hajimi`
299
+ - Auto-discovered files: `identity.md`, `soul.md`, `agents.md`, `AGENTS.md`, `tools.md`, `skills.md`
300
+ - Search roots and precedence: `persona.directory` -> config directory -> current working directory
301
+ - `identity.md` and `soul.md` support optional front matter, but plain markdown still works
302
+ - Structured `identity.md` / `soul.md` fields override by precedence while freeform notes accumulate
303
+ - Extension files stay additive in precedence order
304
+ - `heartbeat.md` is runtime config only and is never appended into the prompt
224
305
  - Optional explicit list: set `[persona].prompt_files` in `config.toml`
225
306
 
226
307
  Use these files for:
227
308
 
228
- - `soul.md`: tone, temperament, and high-level persona
309
+ - `identity.md`: user profile, owned systems, environments, durable preferences, and hard constraints
310
+ - `soul.md`: Hajimi's stable role, tone, style, and behavioral stance
229
311
  - `agents.md` or `AGENTS.md`: repo or operator instructions
230
312
  - `tools.md`: tool-use policy and operational preferences
231
- - `skills.md`: extra habits, playbooks, and skill-selection hints
313
+ - `skills.md`: extra habits, playbooks, and skill-selection hints for the prompt layer only
314
+ - `heartbeat.md`: daemon heartbeat runtime config
232
315
 
233
316
  ## Telegram commands
234
317
 
@@ -245,10 +328,16 @@ Use these files for:
245
328
  - `/model current`
246
329
  - `/model use [model]`
247
330
  - `/persona list`
248
- - `/persona read <soul|agents|tools|skills>`
331
+ - `/persona guide`
332
+ - `/persona read <identity|heartbeat|soul|agents|tools|skills>`
249
333
  - `/persona write <file> <content>`
250
334
  - `/persona append <file> <content>`
251
335
  - `/ask <text>`
336
+ - `/capabilities`
337
+ - `/skills`
338
+ - `/skill run <name> <json-or-text>`
339
+ - `/mcp`
340
+ - `/mcp tools [server]`
252
341
  - `/shell open [name]`
253
342
  - `/shell exec <cmd>`
254
343
  - `/shell close`
@@ -4,6 +4,8 @@ kind = "telegram"
4
4
  [telegram]
5
5
  bot_token = "123456:replace-me"
6
6
  poll_timeout_secs = 30
7
+ # When bot_token is configured, hajimi also registers a native `telegram_api` tool.
8
+ # Set `use_default_chat_id = true` in tool input to reuse policy.admin_chat_id.
7
9
 
8
10
  [feishu]
9
11
  # `mode = "webhook"`: expose listen_addr + event_path through your reverse proxy or public host.
@@ -47,12 +49,30 @@ worker_timeout_secs = 90
47
49
  max_context_chars_per_worker = 24000
48
50
 
49
51
  [persona]
50
- # hajimi onboard creates soul.md, agents.md, tools.md, and skills.md here.
52
+ # hajimi onboard seeds identity.md, soul.md, agents.md, tools.md, skills.md, and heartbeat.md here.
51
53
  directory = "~/.hajimi"
52
- # Optional. If empty, hajimi auto-loads soul.md, agents.md, AGENTS.md, tools.md,
53
- # and skills.md from the current working directory, the config directory, and persona.directory.
54
+ # Optional. If empty, hajimi auto-loads identity.md, soul.md, agents.md, AGENTS.md,
55
+ # tools.md, and skills.md from persona.directory, the config directory, and the current
56
+ # working directory, in that precedence order.
57
+ # identity.md and soul.md are layered first-class persona files; heartbeat.md is runtime
58
+ # config only and is never appended into the prompt.
54
59
  prompt_files = []
55
60
 
61
+ [skills]
62
+ # Executable skills are registered as tools named `skill.<name>`.
63
+ enabled = true
64
+ # Optional directory of TOML manifests. Relative paths resolve from this config file.
65
+ directory = "./skills"
66
+ # Optional extra manifest files.
67
+ manifest_paths = []
68
+ # Optional inline entries.
69
+ entries = []
70
+
71
+ [mcp]
72
+ # MCP servers currently surface inventory/status in the runtime. Tool transport wiring is next.
73
+ enabled = true
74
+ servers = []
75
+
56
76
  [policy]
57
77
  admin_user_id = 123456789
58
78
  admin_chat_id = 123456789
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hajimi-claw-linux-arm64-gnu",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Prebuilt Linux arm64 glibc binary for hajimi-claw",
5
5
  "os": [
6
6
  "linux"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hajimi-claw-linux-x64-gnu",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Prebuilt Linux x64 glibc binary for hajimi-claw",
5
5
  "os": [
6
6
  "linux"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hajimi-claw-win32-arm64-msvc",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Prebuilt Windows arm64 binary for hajimi-claw",
5
5
  "os": [
6
6
  "win32"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hajimi-claw-win32-x64-msvc",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Prebuilt Windows x64 binary for hajimi-claw",
5
5
  "os": [
6
6
  "win32"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hajimi-claw",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Single-user Telegram-first ops agent in Rust",
5
5
  "bin": {
6
6
  "hajimi": "bin/hajimi-claw.js",
@@ -12,10 +12,10 @@
12
12
  "node": ">=18"
13
13
  },
14
14
  "optionalDependencies": {
15
- "hajimi-claw-linux-arm64-gnu": "0.1.3",
16
- "hajimi-claw-linux-x64-gnu": "0.1.3",
17
- "hajimi-claw-win32-arm64-msvc": "0.1.3",
18
- "hajimi-claw-win32-x64-msvc": "0.1.3"
15
+ "hajimi-claw-linux-arm64-gnu": "0.1.4",
16
+ "hajimi-claw-linux-x64-gnu": "0.1.4",
17
+ "hajimi-claw-win32-arm64-msvc": "0.1.4",
18
+ "hajimi-claw-win32-x64-msvc": "0.1.4"
19
19
  },
20
20
  "files": [
21
21
  "bin",