hajimi-claw 0.1.2 → 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 +109 -7
- package/config.example.toml +26 -3
- package/npm/platforms/linux-arm64-gnu/package.json +1 -1
- package/npm/platforms/linux-x64-gnu/package.json +1 -1
- package/npm/platforms/win32-arm64-msvc/package.json +1 -1
- package/npm/platforms/win32-x64-msvc/package.json +1 -1
- package/package.json +5 -5
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
|
|
|
@@ -142,6 +144,16 @@ Current Feishu limitations:
|
|
|
142
144
|
## CLI
|
|
143
145
|
|
|
144
146
|
- `hajimi`
|
|
147
|
+
- `hajimi ask <prompt>`
|
|
148
|
+
- `hajimi tasks`
|
|
149
|
+
- `hajimi approvals`
|
|
150
|
+
- `hajimi approve <request-id>`
|
|
151
|
+
- `hajimi shell open [name]`
|
|
152
|
+
- `hajimi shell status <session-id>`
|
|
153
|
+
- `hajimi shell exec <session-id> <command>`
|
|
154
|
+
- `hajimi shell close <session-id>`
|
|
155
|
+
- `hajimi profile show`
|
|
156
|
+
- `hajimi profile use <ops-safe|dev-agent|computer-use>`
|
|
145
157
|
- `hajimi daemon`
|
|
146
158
|
- `hajimi launch`
|
|
147
159
|
- `hajimi stop`
|
|
@@ -158,6 +170,72 @@ Current Feishu limitations:
|
|
|
158
170
|
- `hajimi restart`
|
|
159
171
|
- `hajimi help`
|
|
160
172
|
|
|
173
|
+
`hajimi ask` now records task state and tool invocations in SQLite. If a guarded command blocks on
|
|
174
|
+
approval, `hajimi approve <request-id>` resumes the blocked task instead of asking you to rerun it.
|
|
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
|
+
|
|
161
239
|
## Multi-Agent
|
|
162
240
|
|
|
163
241
|
`hajimi` can split one natural-language request into multiple sub-agents. This is configured in
|
|
@@ -197,25 +275,43 @@ Behavior:
|
|
|
197
275
|
|
|
198
276
|
## Persona Files
|
|
199
277
|
|
|
200
|
-
`hajimi onboard`
|
|
278
|
+
`hajimi onboard` seeds persona files in `~/.hajimi/`:
|
|
201
279
|
|
|
280
|
+
- `identity.md`
|
|
202
281
|
- `soul.md`
|
|
203
282
|
- `agents.md`
|
|
204
283
|
- `tools.md`
|
|
205
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
|
|
206
296
|
|
|
207
|
-
|
|
297
|
+
Auto-discovery behavior:
|
|
208
298
|
|
|
209
|
-
- Auto-discovered files: `soul.md`, `agents.md`, `AGENTS.md`, `tools.md`, `skills.md`
|
|
210
|
-
- Search roots
|
|
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
|
|
211
305
|
- Optional explicit list: set `[persona].prompt_files` in `config.toml`
|
|
212
306
|
|
|
213
307
|
Use these files for:
|
|
214
308
|
|
|
215
|
-
- `
|
|
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
|
|
216
311
|
- `agents.md` or `AGENTS.md`: repo or operator instructions
|
|
217
312
|
- `tools.md`: tool-use policy and operational preferences
|
|
218
|
-
- `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
|
|
219
315
|
|
|
220
316
|
## Telegram commands
|
|
221
317
|
|
|
@@ -232,10 +328,16 @@ Use these files for:
|
|
|
232
328
|
- `/model current`
|
|
233
329
|
- `/model use [model]`
|
|
234
330
|
- `/persona list`
|
|
235
|
-
- `/persona
|
|
331
|
+
- `/persona guide`
|
|
332
|
+
- `/persona read <identity|heartbeat|soul|agents|tools|skills>`
|
|
236
333
|
- `/persona write <file> <content>`
|
|
237
334
|
- `/persona append <file> <content>`
|
|
238
335
|
- `/ask <text>`
|
|
336
|
+
- `/capabilities`
|
|
337
|
+
- `/skills`
|
|
338
|
+
- `/skill run <name> <json-or-text>`
|
|
339
|
+
- `/mcp`
|
|
340
|
+
- `/mcp tools [server]`
|
|
239
341
|
- `/shell open [name]`
|
|
240
342
|
- `/shell exec <cmd>`
|
|
241
343
|
- `/shell close`
|
package/config.example.toml
CHANGED
|
@@ -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.
|
|
@@ -34,6 +36,9 @@ master_key_env = "HAJIMI_CLAW_MASTER_KEY"
|
|
|
34
36
|
|
|
35
37
|
[execution]
|
|
36
38
|
mode = "auto"
|
|
39
|
+
profile = "ops-safe"
|
|
40
|
+
browser_enabled = false
|
|
41
|
+
computer_enabled = false
|
|
37
42
|
|
|
38
43
|
[multi_agent]
|
|
39
44
|
enabled = true
|
|
@@ -44,12 +49,30 @@ worker_timeout_secs = 90
|
|
|
44
49
|
max_context_chars_per_worker = 24000
|
|
45
50
|
|
|
46
51
|
[persona]
|
|
47
|
-
# hajimi onboard
|
|
52
|
+
# hajimi onboard seeds identity.md, soul.md, agents.md, tools.md, skills.md, and heartbeat.md here.
|
|
48
53
|
directory = "~/.hajimi"
|
|
49
|
-
# Optional. If empty, hajimi auto-loads
|
|
50
|
-
# and skills.md from
|
|
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.
|
|
51
59
|
prompt_files = []
|
|
52
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
|
+
|
|
53
76
|
[policy]
|
|
54
77
|
admin_user_id = 123456789
|
|
55
78
|
admin_chat_id = 123456789
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hajimi-claw",
|
|
3
|
-
"version": "0.1.
|
|
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.
|
|
16
|
-
"hajimi-claw-linux-x64-gnu": "0.1.
|
|
17
|
-
"hajimi-claw-win32-arm64-msvc": "0.1.
|
|
18
|
-
"hajimi-claw-win32-x64-msvc": "0.1.
|
|
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",
|