hoomanjs 1.40.1 → 1.40.2
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/dist/acp/acp-agent.js +0 -5
- package/dist/acp/acp-agent.js.map +1 -1
- package/dist/acp/utils/tool-kind.js +0 -1
- package/dist/acp/utils/tool-kind.js.map +1 -1
- package/dist/chat/app.js +0 -7
- package/dist/chat/app.js.map +1 -1
- package/dist/chat/index.d.ts +0 -1
- package/dist/chat/index.js +0 -2
- package/dist/chat/index.js.map +1 -1
- package/dist/cli.js +4 -10
- package/dist/cli.js.map +1 -1
- package/dist/core/agent/index.js +1 -2
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/modes/definitions.js +0 -2
- package/dist/core/modes/definitions.js.map +1 -1
- package/dist/core/prompts/harness/behaviour.md +3 -15
- package/dist/core/prompts/harness/communication.md +3 -16
- package/dist/core/prompts/harness/execution.md +6 -13
- package/dist/core/prompts/harness/guardrails.md +6 -12
- package/dist/core/prompts/static/daemon.md +4 -18
- package/dist/core/prompts/static/environment.md +2 -7
- package/dist/core/prompts/static/fetch.md +4 -30
- package/dist/core/prompts/static/identity.md +4 -19
- package/dist/core/prompts/static/planning.md +1 -9
- package/dist/core/prompts/static/subagents.md +4 -29
- package/dist/core/prompts/static/thinking.md +4 -24
- package/dist/core/prompts/static/todo.md +6 -32
- package/dist/core/prompts/system.js +0 -4
- package/dist/core/prompts/system.js.map +1 -1
- package/dist/core/sessions/lazy-session-manager.js +0 -2
- package/dist/core/sessions/lazy-session-manager.js.map +1 -1
- package/dist/core/skills/built-in/hooman-channels/SKILL.md +11 -148
- package/dist/core/skills/built-in/hooman-channels/channels.md +117 -0
- package/dist/core/skills/built-in/hooman-coding/SKILL.md +49 -44
- package/dist/core/skills/built-in/hooman-coding/debugging.md +26 -0
- package/dist/core/skills/built-in/hooman-coding/new-project.md +23 -0
- package/dist/core/skills/built-in/hooman-config/SKILL.md +19 -257
- package/dist/core/skills/built-in/hooman-config/providers.md +154 -0
- package/dist/core/skills/built-in/hooman-config/search.md +39 -0
- package/dist/core/skills/built-in/hooman-mcp/SKILL.md +22 -153
- package/dist/core/skills/built-in/hooman-skills/SKILL.md +10 -146
- package/dist/core/skills/built-in/hooman-skills/authoring.md +80 -0
- package/dist/core/state/tool-approvals.js +0 -2
- package/dist/core/state/tool-approvals.js.map +1 -1
- package/dist/core/tools/index.d.ts +0 -1
- package/dist/core/tools/index.js +0 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/sleep.js +1 -1
- package/dist/core/tools/sleep.js.map +1 -1
- package/dist/daemon/index.d.ts +1 -1
- package/dist/daemon/index.js +1 -11
- package/dist/daemon/index.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/prompts/static/bye.md +0 -15
- package/dist/core/prompts/static/sleep.md +0 -20
- package/dist/core/state/exit-request.d.ts +0 -14
- package/dist/core/state/exit-request.js +0 -16
- package/dist/core/state/exit-request.js.map +0 -1
- package/dist/core/tools/bye.d.ts +0 -4
- package/dist/core/tools/bye.js +0 -23
- package/dist/core/tools/bye.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hooman-mcp
|
|
3
|
-
description: Read and update Hooman's mcp.json
|
|
3
|
+
description: Read and update Hooman's ~/.hooman/mcp.json. Use when the user asks to list, add, update, remove, or configure MCP servers for Hooman — stdio commands, streamable-http or SSE URLs, env vars, and auth headers. For event-driven channel servers (cron, Slack, Telegram, WhatsApp, Jira) use hooman-channels instead; for config.json settings use hooman-config.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hooman MCP
|
|
@@ -9,69 +9,25 @@ Use this skill when the user asks you to inspect or change Hooman's MCP server c
|
|
|
9
9
|
|
|
10
10
|
## Source Of Truth
|
|
11
11
|
|
|
12
|
-
- Hooman MCP servers are stored in `~/.hooman/mcp.json
|
|
13
|
-
-
|
|
14
|
-
- Each key under `mcpServers` is the server name.
|
|
15
|
-
- Each value is a transport object.
|
|
16
|
-
|
|
17
|
-
Minimal valid file:
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"mcpServers": {}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
12
|
+
- Hooman MCP servers are stored in `~/.hooman/mcp.json`: one top-level `mcpServers` object where each key is a server name and each value is a transport object.
|
|
13
|
+
- Minimal valid file: `{"mcpServers": {}}`.
|
|
24
14
|
|
|
25
15
|
## Read/Write Rules
|
|
26
16
|
|
|
27
17
|
1. Read `~/.hooman/mcp.json` before changing it. If it does not exist, create it with `{"mcpServers": {}}`.
|
|
28
18
|
2. Preserve existing servers unless the user explicitly asks to replace or delete them.
|
|
29
|
-
3. Make the smallest JSON edit needed: add, update, or remove one server entry.
|
|
30
|
-
4.
|
|
31
|
-
5.
|
|
32
|
-
6.
|
|
33
|
-
7. Any change to `mcp.json` requires restarting the running Hooman agent/session before MCP server tools or instructions change.
|
|
34
|
-
|
|
35
|
-
## File Shape
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"mcpServers": {
|
|
40
|
-
"server-name": {
|
|
41
|
-
"type": "stdio",
|
|
42
|
-
"command": "npx",
|
|
43
|
-
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
|
|
44
|
-
"env": {
|
|
45
|
-
"TOKEN": "..."
|
|
46
|
-
},
|
|
47
|
-
"cwd": "/optional/working/directory"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Supported transport `type` values:
|
|
19
|
+
3. Make the smallest JSON edit needed: add, update, or remove one server entry. Keep JSON valid; comments are not supported.
|
|
20
|
+
4. Treat `env` and `headers` as potentially secret-bearing maps. Do not expose or rewrite secrets unnecessarily.
|
|
21
|
+
5. Use stable, descriptive server names such as `filesystem`, `slack`, `jira`, or `github`.
|
|
22
|
+
6. Any change to `mcp.json` requires restarting the running Hooman agent/session before MCP server tools or instructions change.
|
|
54
23
|
|
|
55
|
-
|
|
56
|
-
["stdio", "streamable-http", "sse"]
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Stdio Servers
|
|
60
|
-
|
|
61
|
-
Use `stdio` for local subprocess-based MCP servers.
|
|
62
|
-
|
|
63
|
-
Required:
|
|
64
|
-
|
|
65
|
-
- `type`: `"stdio"`
|
|
66
|
-
- `command`: executable command, for example `npx`, `node`, `python`, `uvx`, or an absolute binary path
|
|
24
|
+
## Transports
|
|
67
25
|
|
|
68
|
-
|
|
26
|
+
Supported `type` values: `"stdio"`, `"streamable-http"`, `"sse"`.
|
|
69
27
|
|
|
70
|
-
|
|
71
|
-
- `env`: environment variables as string key/value pairs
|
|
72
|
-
- `cwd`: working directory for the server process
|
|
28
|
+
### Stdio (local subprocess servers)
|
|
73
29
|
|
|
74
|
-
|
|
30
|
+
Required: `type: "stdio"` and `command` (e.g. `npx`, `node`, `python`, `uvx`, or an absolute binary path). Optional: `args` (string array), `env` (string map), `cwd` (working directory).
|
|
75
31
|
|
|
76
32
|
```json
|
|
77
33
|
{
|
|
@@ -81,45 +37,17 @@ Example:
|
|
|
81
37
|
"command": "npx",
|
|
82
38
|
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
|
|
83
39
|
"env": {
|
|
84
|
-
"
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Example with `cwd`:
|
|
92
|
-
|
|
93
|
-
```json
|
|
94
|
-
{
|
|
95
|
-
"mcpServers": {
|
|
96
|
-
"local-app": {
|
|
97
|
-
"type": "stdio",
|
|
98
|
-
"command": "node",
|
|
99
|
-
"args": ["dist/mcp-server.js"],
|
|
100
|
-
"cwd": "/Users/me/project",
|
|
101
|
-
"env": {
|
|
102
|
-
"API_KEY": "..."
|
|
103
|
-
}
|
|
40
|
+
"TOKEN": "..."
|
|
41
|
+
},
|
|
42
|
+
"cwd": "/optional/working/directory"
|
|
104
43
|
}
|
|
105
44
|
}
|
|
106
45
|
}
|
|
107
46
|
```
|
|
108
47
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
Use `streamable-http` for modern remote HTTP MCP servers.
|
|
48
|
+
### Streamable HTTP (modern remote servers)
|
|
112
49
|
|
|
113
|
-
Required:
|
|
114
|
-
|
|
115
|
-
- `type`: `"streamable-http"`
|
|
116
|
-
- `url`: full HTTP or HTTPS URL
|
|
117
|
-
|
|
118
|
-
Optional:
|
|
119
|
-
|
|
120
|
-
- `headers`: HTTP headers as string key/value pairs
|
|
121
|
-
|
|
122
|
-
Example:
|
|
50
|
+
Required: `type: "streamable-http"` and `url` (full HTTP/HTTPS URL). Optional: `headers` (string map).
|
|
123
51
|
|
|
124
52
|
```json
|
|
125
53
|
{
|
|
@@ -135,77 +63,18 @@ Example:
|
|
|
135
63
|
}
|
|
136
64
|
```
|
|
137
65
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
Use `sse` only for legacy remote MCP servers that still require SSE.
|
|
141
|
-
|
|
142
|
-
Required:
|
|
66
|
+
### SSE (legacy remote servers)
|
|
143
67
|
|
|
144
|
-
- `type
|
|
145
|
-
- `url`: full HTTP or HTTPS URL
|
|
146
|
-
|
|
147
|
-
Optional:
|
|
148
|
-
|
|
149
|
-
- `headers`: HTTP headers as string key/value pairs
|
|
150
|
-
|
|
151
|
-
Example:
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"mcpServers": {
|
|
156
|
-
"legacy": {
|
|
157
|
-
"type": "sse",
|
|
158
|
-
"url": "https://example.com/sse",
|
|
159
|
-
"headers": {
|
|
160
|
-
"Authorization": "Bearer ..."
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
68
|
+
Same shape as `streamable-http` but with `type: "sse"`. Use only for legacy remote MCP servers that still require SSE.
|
|
166
69
|
|
|
167
70
|
## Common Edits
|
|
168
71
|
|
|
169
|
-
Add a server by inserting a new entry under `mcpServers
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
{
|
|
173
|
-
"mcpServers": {
|
|
174
|
-
"github": {
|
|
175
|
-
"type": "stdio",
|
|
176
|
-
"command": "npx",
|
|
177
|
-
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
178
|
-
"env": {
|
|
179
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "..."
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Update a server by replacing only that server's object:
|
|
187
|
-
|
|
188
|
-
```json
|
|
189
|
-
{
|
|
190
|
-
"mcpServers": {
|
|
191
|
-
"github": {
|
|
192
|
-
"type": "stdio",
|
|
193
|
-
"command": "npx",
|
|
194
|
-
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
195
|
-
"env": {
|
|
196
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "...",
|
|
197
|
-
"GITHUB_TOOLSETS": "repos,issues,pull_requests"
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Delete a server by removing its key from `mcpServers`.
|
|
72
|
+
- Add a server by inserting a new entry under `mcpServers`.
|
|
73
|
+
- Update a server by replacing only that server's object (e.g. adding a key to its `env`).
|
|
74
|
+
- Delete a server by removing its key from `mcpServers`.
|
|
205
75
|
|
|
206
76
|
## Notes
|
|
207
77
|
|
|
208
78
|
- Prefer `streamable-http` over `sse` for remote servers unless the user specifically needs SSE.
|
|
209
|
-
- For bearer tokens, use `headers.Authorization`.
|
|
210
|
-
- For local subprocess secrets, use `env`.
|
|
79
|
+
- For bearer tokens, use `headers.Authorization`; for local subprocess secrets, use `env`.
|
|
211
80
|
- If a server package's README gives a specific JSON block, adapt it into the `mcpServers` object and preserve the required command, args, env, URL, and headers.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hooman-skills
|
|
3
|
-
description: Manage Hooman skills under ~/.hooman/skills. Use when the user asks to list, search,
|
|
3
|
+
description: Manage Hooman skills under ~/.hooman/skills. Use when the user asks to list, search, install, add, create, author, update, inspect, or remove Hooman skills or SKILL.md files. Not for activating or using a skill in the current task, and not for Hooman config or MCP server changes (use hooman-config or hooman-mcp).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hooman Skills
|
|
@@ -9,44 +9,26 @@ Use this skill when the user asks you to inspect, install, remove, create, or ch
|
|
|
9
9
|
|
|
10
10
|
## Source Of Truth
|
|
11
11
|
|
|
12
|
-
- Hooman user-installed skills live under `~/.hooman/skills
|
|
13
|
-
- Each installed skill is a directory directly under `~/.hooman/skills`.
|
|
14
|
-
- Each skill directory must contain a `SKILL.md` file.
|
|
12
|
+
- Hooman user-installed skills live under `~/.hooman/skills`; each installed skill is a directory directly under it containing a `SKILL.md` file (for example `~/.hooman/skills/code-review/SKILL.md`).
|
|
15
13
|
- Built-in skills shipped with Hooman are separate from user-installed skills. Do not edit bundled skill files when the user means their installed skills.
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
## Reference File
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
~/.hooman/skills/
|
|
21
|
-
code-review/
|
|
22
|
-
SKILL.md
|
|
23
|
-
reference.md
|
|
24
|
-
jira-workflow/
|
|
25
|
-
SKILL.md
|
|
26
|
-
```
|
|
17
|
+
Read `authoring.md` (next to this SKILL.md) before creating a new skill, editing a `SKILL.md`, or installing by manual copy. It covers frontmatter shape, naming rules, the creation checklist, update steps, and manual install steps.
|
|
27
18
|
|
|
28
19
|
## Operating Rules
|
|
29
20
|
|
|
30
21
|
1. Use the `skills` CLI for catalog search, installs, listing, and removal when the user asks for those operations.
|
|
31
22
|
2. Run every `skills` CLI command with working directory `~/.hooman` so the OpenClaw layout maps to `~/.hooman/skills`.
|
|
32
23
|
3. Hooman discovers installed skills by scanning direct child directories under `~/.hooman/skills` for `SKILL.md`.
|
|
33
|
-
4. Preserve unrelated skill folders and files.
|
|
34
|
-
5.
|
|
35
|
-
6.
|
|
36
|
-
7.
|
|
37
|
-
8. Any skill install, removal, creation, or edit requires restarting the running Hooman agent/session before the runtime skill inventory changes.
|
|
24
|
+
4. Preserve unrelated skill folders and files; treat files inside a skill directory as user data and read before overwriting.
|
|
25
|
+
5. Never delete a skill folder unless the user explicitly asks to remove that skill.
|
|
26
|
+
6. For custom local authoring or edits, create/edit files directly under `~/.hooman/skills/<folder>`.
|
|
27
|
+
7. Any skill install, removal, creation, or edit requires restarting the running Hooman agent/session before the runtime skill inventory changes.
|
|
38
28
|
|
|
39
29
|
## Exact CLI Commands
|
|
40
30
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Working directory:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
mkdir -p ~/.hooman && cd ~/.hooman
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Run the following commands from that directory. If using a shell tool that supports a working-directory option, set it to `~/.hooman` instead of relying on a previous `cd`.
|
|
31
|
+
Run from `~/.hooman` (`mkdir -p ~/.hooman && cd ~/.hooman`), or set the shell tool's working-directory option to `~/.hooman`.
|
|
50
32
|
|
|
51
33
|
List installed skills:
|
|
52
34
|
|
|
@@ -76,127 +58,9 @@ Command notes:
|
|
|
76
58
|
|
|
77
59
|
- `<source>` can be a package source accepted by the skills CLI, such as `owner/repo`, a GitHub URL, or a local path.
|
|
78
60
|
- Use `--copy` for Hooman installs so skill files are copied into `~/.hooman/skills` instead of relying on symlinks.
|
|
79
|
-
- If `list --json` fails or output is not useful,
|
|
61
|
+
- If `list --json` fails or output is not useful, list skills by inspecting `~/.hooman/skills` directly: read each direct child directory's `SKILL.md` frontmatter and report `name`, `description`, folder name, and path. Ignore directories without `SKILL.md`.
|
|
80
62
|
- After installing or removing, verify the result by checking `~/.hooman/skills/<folder>/SKILL.md`.
|
|
81
63
|
|
|
82
|
-
## SKILL.md Shape
|
|
83
|
-
|
|
84
|
-
Every `SKILL.md` should start with YAML frontmatter:
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
---
|
|
88
|
-
name: skill-name
|
|
89
|
-
description: What this skill does and when Hooman should use it.
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
# Skill Title
|
|
93
|
-
|
|
94
|
-
Instructions for the agent.
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Rules:
|
|
98
|
-
|
|
99
|
-
- `name` should be lowercase words separated by hyphens when possible.
|
|
100
|
-
- `description` should be specific and include trigger scenarios, because Hooman uses it to decide when the skill applies.
|
|
101
|
-
- Keep the main `SKILL.md` focused. Put long references in nearby files such as `reference.md` and link to them.
|
|
102
|
-
- Use relative links only inside the same skill directory.
|
|
103
|
-
|
|
104
|
-
## Listing Skills
|
|
105
|
-
|
|
106
|
-
To list installed skills without relying on CLI output:
|
|
107
|
-
|
|
108
|
-
1. Open `~/.hooman/skills`.
|
|
109
|
-
2. For each direct child directory, look for `SKILL.md`.
|
|
110
|
-
3. Read each `SKILL.md` frontmatter.
|
|
111
|
-
4. Report the frontmatter `name`, `description`, folder name, and `SKILL.md` path.
|
|
112
|
-
|
|
113
|
-
Ignore files and directories that do not contain `SKILL.md`.
|
|
114
|
-
|
|
115
|
-
## Creating A Skill Manually
|
|
116
|
-
|
|
117
|
-
Create a new skill by making a directory under `~/.hooman/skills`:
|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
~/.hooman/skills/<folder>/SKILL.md
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Use a safe folder name:
|
|
124
|
-
|
|
125
|
-
- lowercase letters, numbers, and hyphens
|
|
126
|
-
- no slashes
|
|
127
|
-
- no `..`
|
|
128
|
-
- no spaces
|
|
129
|
-
|
|
130
|
-
Minimal example:
|
|
131
|
-
|
|
132
|
-
```markdown
|
|
133
|
-
---
|
|
134
|
-
name: pull-request-review
|
|
135
|
-
description: Review pull requests for correctness, maintainability, tests, and project conventions. Use when the user asks to review a PR, diff, branch, or code changes.
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
# Pull Request Review
|
|
139
|
-
|
|
140
|
-
When reviewing code, lead with findings ordered by severity. Focus on bugs,
|
|
141
|
-
regressions, missing tests, and maintainability risks.
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Creation checklist:
|
|
145
|
-
|
|
146
|
-
- Clarify the skill's purpose, trigger scenarios, and expected behavior.
|
|
147
|
-
- Choose a folder name that is short, lowercase, and hyphenated.
|
|
148
|
-
- Write a specific frontmatter `description` that includes when to use the skill.
|
|
149
|
-
- Keep `SKILL.md` concise and actionable.
|
|
150
|
-
- Put longer reference material in files next to `SKILL.md`, such as `reference.md` or `examples.md`.
|
|
151
|
-
- Link supporting files with relative links.
|
|
152
|
-
- Avoid time-sensitive claims unless the skill explicitly needs them.
|
|
153
|
-
- Do not include secrets in skill files.
|
|
154
|
-
|
|
155
|
-
## Updating A Skill
|
|
156
|
-
|
|
157
|
-
To update an installed skill:
|
|
158
|
-
|
|
159
|
-
1. Locate the folder under `~/.hooman/skills`.
|
|
160
|
-
2. Read its current `SKILL.md` and any referenced files.
|
|
161
|
-
3. Make the smallest edit that satisfies the request.
|
|
162
|
-
4. Preserve frontmatter unless the user asked to rename or retarget the skill.
|
|
163
|
-
5. Keep supporting files in the same skill directory.
|
|
164
|
-
|
|
165
|
-
If changing the frontmatter `name`, consider whether the folder name should also change. Rename only when the user asks or the old folder name is clearly wrong.
|
|
166
|
-
|
|
167
|
-
## Installing By Copying Or CLI
|
|
168
|
-
|
|
169
|
-
Prefer the CLI for normal installs:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
npx --yes skills@latest add "<source>" -y -a openclaw --copy
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
To install from a local skill directory manually:
|
|
176
|
-
|
|
177
|
-
1. Verify the source directory contains `SKILL.md`.
|
|
178
|
-
2. Choose a destination folder under `~/.hooman/skills`.
|
|
179
|
-
3. Copy the skill directory into that destination.
|
|
180
|
-
4. If the destination already exists, ask before replacing or merge carefully after reading both copies.
|
|
181
|
-
|
|
182
|
-
For GitHub or web sources, prefer `skills add`. Fetch or clone manually only when the user asks or the CLI cannot handle the source. After retrieval, install by copying the actual skill directory into `~/.hooman/skills`.
|
|
183
|
-
|
|
184
|
-
## Removing A Skill
|
|
185
|
-
|
|
186
|
-
To remove a skill:
|
|
187
|
-
|
|
188
|
-
1. Confirm the exact skill name or folder.
|
|
189
|
-
2. Prefer the CLI removal command:
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
npx --yes skills@latest remove "<skill-or-folder>" -y
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
3. Verify the folder is gone from `~/.hooman/skills`.
|
|
196
|
-
4. If manual deletion is required, verify the folder contains `SKILL.md` and delete only that folder.
|
|
197
|
-
|
|
198
|
-
Do not remove built-in Hooman skills or unrelated folders.
|
|
199
|
-
|
|
200
64
|
## Common Mistakes
|
|
201
65
|
|
|
202
66
|
- Do not create a single `~/.hooman/skills/SKILL.md`; each skill needs its own folder.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Authoring And Editing Hooman Skills
|
|
2
|
+
|
|
3
|
+
Reference for creating, updating, and manually installing skills under `~/.hooman/skills`.
|
|
4
|
+
|
|
5
|
+
## SKILL.md Shape
|
|
6
|
+
|
|
7
|
+
Every `SKILL.md` should start with YAML frontmatter:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
name: skill-name
|
|
12
|
+
description: What this skill does and when Hooman should use it.
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Skill Title
|
|
16
|
+
|
|
17
|
+
Instructions for the agent.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Rules:
|
|
21
|
+
|
|
22
|
+
- `name` should be lowercase words separated by hyphens when possible.
|
|
23
|
+
- `description` should be specific and include trigger scenarios, because Hooman uses it to decide when the skill applies.
|
|
24
|
+
- Keep the main `SKILL.md` focused. Put long references in nearby files such as `reference.md` and link to them.
|
|
25
|
+
- Use relative links only inside the same skill directory.
|
|
26
|
+
|
|
27
|
+
## Creating A Skill Manually
|
|
28
|
+
|
|
29
|
+
Create a new skill by making a directory under `~/.hooman/skills`:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
~/.hooman/skills/<folder>/SKILL.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use a safe folder name: lowercase letters, numbers, and hyphens; no slashes, no `..`, no spaces.
|
|
36
|
+
|
|
37
|
+
Minimal example:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
---
|
|
41
|
+
name: pull-request-review
|
|
42
|
+
description: Review pull requests for correctness, maintainability, tests, and project conventions. Use when the user asks to review a PR, diff, branch, or code changes.
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# Pull Request Review
|
|
46
|
+
|
|
47
|
+
When reviewing code, lead with findings ordered by severity. Focus on bugs,
|
|
48
|
+
regressions, missing tests, and maintainability risks.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Creation checklist:
|
|
52
|
+
|
|
53
|
+
- Clarify the skill's purpose, trigger scenarios, and expected behavior.
|
|
54
|
+
- Choose a folder name that is short, lowercase, and hyphenated.
|
|
55
|
+
- Write a specific frontmatter `description` that includes when to use the skill.
|
|
56
|
+
- Keep `SKILL.md` concise and actionable.
|
|
57
|
+
- Put longer reference material in files next to `SKILL.md`, such as `reference.md` or `examples.md`, linked with relative links.
|
|
58
|
+
- Avoid time-sensitive claims unless the skill explicitly needs them.
|
|
59
|
+
- Do not include secrets in skill files.
|
|
60
|
+
|
|
61
|
+
## Updating A Skill
|
|
62
|
+
|
|
63
|
+
1. Locate the folder under `~/.hooman/skills`.
|
|
64
|
+
2. Read its current `SKILL.md` and any referenced files.
|
|
65
|
+
3. Make the smallest edit that satisfies the request.
|
|
66
|
+
4. Preserve frontmatter unless the user asked to rename or retarget the skill.
|
|
67
|
+
5. Keep supporting files in the same skill directory.
|
|
68
|
+
|
|
69
|
+
If changing the frontmatter `name`, consider whether the folder name should also change. Rename only when the user asks or the old folder name is clearly wrong.
|
|
70
|
+
|
|
71
|
+
## Installing By Copying Manually
|
|
72
|
+
|
|
73
|
+
Prefer the `skills` CLI for normal installs. To install from a local skill directory manually:
|
|
74
|
+
|
|
75
|
+
1. Verify the source directory contains `SKILL.md`.
|
|
76
|
+
2. Choose a destination folder under `~/.hooman/skills`.
|
|
77
|
+
3. Copy the skill directory into that destination.
|
|
78
|
+
4. If the destination already exists, ask before replacing or merge carefully after reading both copies.
|
|
79
|
+
|
|
80
|
+
For GitHub or web sources, prefer `skills add`. Fetch or clone manually only when the user asks or the CLI cannot handle the source. After retrieval, install by copying the actual skill directory into `~/.hooman/skills`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-approvals.js","sourceRoot":"","sources":["../../../src/core/state/tool-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAW/D,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AACvD,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC7C,oBAAoB;IACpB,QAAQ;IACR,4BAA4B;IAC5B,eAAe;IACf,2BAA2B;IAC3B,QAAQ;IACR,cAAc;IACd,WAAW;IACX,OAAO;IACP,wBAAwB;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,4BAA4B;IAC5B,QAAQ;IACR,OAAO;IACP,
|
|
1
|
+
{"version":3,"file":"tool-approvals.js","sourceRoot":"","sources":["../../../src/core/state/tool-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAW/D,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AACvD,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC7C,oBAAoB;IACpB,QAAQ;IACR,4BAA4B;IAC5B,eAAe;IACf,2BAA2B;IAC3B,QAAQ;IACR,cAAc;IACd,WAAW;IACX,OAAO;IACP,wBAAwB;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,4BAA4B;IAC5B,QAAQ;IACR,OAAO;IACP,OAAO;IACP,cAAc;IACd,kBAAkB;IAClB,wCAAwC;IACxC,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,MAAM;IACN,6EAA6E;IAC7E,4EAA4E;IAC5E,6EAA6E;IAC7E,oBAAoB;CACrB,CAAC,CAAC;AAEH,SAAS,mBAAmB,CAAC,KA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IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAgB,EAChB,SAAmB;IAEnB,OAAO,CACL,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAC7E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,IAAiB,EACjB,QAAgB,EAChB,OAAuC;IAEvC,MAAM,cAAc,GAAG,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACzD,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,cAAc,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/core/tools/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,kCAAkC,GACnC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/core/tools/sleep.js
CHANGED
|
@@ -9,7 +9,7 @@ export function createSleepTools() {
|
|
|
9
9
|
return [
|
|
10
10
|
tool({
|
|
11
11
|
name: "sleep",
|
|
12
|
-
description: "Wait for a specified number of seconds without
|
|
12
|
+
description: "Wait for a specified number of seconds without holding a shell process. Use when the user asks to wait, pause, or retry later, or while waiting for an external event where immediate polling would be wasteful. Choose the shortest useful delay; the wait can be cancelled by the user.",
|
|
13
13
|
inputSchema: z.object({
|
|
14
14
|
seconds: z.coerce
|
|
15
15
|
.number()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../../src/core/tools/sleep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,CAAC;AAElC,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAc,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,gBAAgB;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,CAAC,GAAG,IAAI;qBAC/C,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;wBAC1D,OAAO,WAAW,CAAC;4BACjB,MAAM,EAAE,WAAW;4BACnB,iBAAiB,EAAE,KAAK,CAAC,OAAO;4BAChC,aAAa,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI;yBAC/C,CAAC,CAAC;oBACL,CAAC;oBACD,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/dist/daemon/index.d.ts
CHANGED
package/dist/daemon/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { stderr } from "node:process";
|
|
2
2
|
import { Message, TextBlock, } from "@strands-agents/sdk";
|
|
3
3
|
import { HOOMAN_CHANNEL } from "../core/mcp/index.js";
|
|
4
|
-
import { consumeExitRequest } from "../core/state/exit-request.js";
|
|
5
4
|
import { runWithAgentMemoryScope } from "../core/memory/index.js";
|
|
6
5
|
import { attachmentPathsToPromptBlocks } from "../core/utils/attachments.js";
|
|
7
6
|
import { createQueue } from "./queue.js";
|
|
@@ -50,8 +49,7 @@ export async function main(options) {
|
|
|
50
49
|
const channels = [HOOMAN_CHANNEL];
|
|
51
50
|
debug(`starting daemon for channel(s): ${channels.join(", ")}`);
|
|
52
51
|
let unsubscribe = () => { };
|
|
53
|
-
|
|
54
|
-
const [queue, stop, shutdown] = await createQueue(async (message) => {
|
|
52
|
+
const [queue, stop] = await createQueue(async (message) => {
|
|
55
53
|
const tag = `${message.meta.subscription.server}:${message.meta.subscription.channel}`;
|
|
56
54
|
const session = resolveSessionId(message, options.session);
|
|
57
55
|
const user = resolveUserId(message, session);
|
|
@@ -91,13 +89,6 @@ export async function main(options) {
|
|
|
91
89
|
const text = error instanceof Error ? error.message : String(error);
|
|
92
90
|
debug(`turn failed → ${tag} session=${session} user=${user}: ${text}`);
|
|
93
91
|
}
|
|
94
|
-
finally {
|
|
95
|
-
if (consumeExitRequest(options.agent)) {
|
|
96
|
-
exitRequested = true;
|
|
97
|
-
debug("exit requested by agent");
|
|
98
|
-
shutdown();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
92
|
}, () => unsubscribe());
|
|
102
93
|
const handle = await options.manager.subscribeToChannels(channels, (message) => {
|
|
103
94
|
debug(`received notification → ${message.meta.subscription.server}:${message.meta.subscription.channel}`);
|
|
@@ -111,6 +102,5 @@ export async function main(options) {
|
|
|
111
102
|
finally {
|
|
112
103
|
debug("stopping daemon");
|
|
113
104
|
}
|
|
114
|
-
return exitRequested;
|
|
115
105
|
}
|
|
116
106
|
//# sourceMappingURL=index.js.map
|
package/dist/daemon/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/daemon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,OAAO,EACP,SAAS,GAGV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAMtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/daemon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,OAAO,EACP,SAAS,GAGV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAMtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASzC,MAAM,oBA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F,KAAK,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC,CACF,CAAC;IACF,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACjC,KAAK,CAAC,gBAAgB,mBAAmB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAEnE,IAAI,CAAC;QACH,MAAM,IAAI,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type { BeginAuthorizationResult as McpBeginAuthorizationResult, McpOAuthC
|
|
|
24
24
|
export { McpTransportSchema, SseSchema, StdioSchema, StreamableHttpSchema, } from "./core/mcp/types.js";
|
|
25
25
|
export type { McpTransport, Sse, Stdio, StreamableHttp, } from "./core/mcp/types.js";
|
|
26
26
|
export { PrefixedMcpTool } from "./core/mcp/prefixed-mcp-tool.js";
|
|
27
|
-
export {
|
|
27
|
+
export { createFetchTools, createFilesystemTools, createGrepTools, createShellTools, createSleepTools, createThinkingTools, createTimeTools, createTodoTools, createWebSearchTools, } from "./core/tools/index.js";
|
|
28
28
|
export { UPDATE_TODOS_TOOL_NAME } from "./core/tools/todo.js";
|
|
29
29
|
export { getTerminalBackend, setTerminalBackend, type TerminalBackend, type TerminalRunRequest, type TerminalRunResult, } from "./core/tools/terminal-backend.js";
|
|
30
30
|
export { getTextFsBackend, setTextFsBackend, type TextFsBackend, type TextFsReadOptions, } from "./core/tools/text-fs-backend.js";
|
|
@@ -54,7 +54,6 @@ export { TolerantFileStorage } from "./core/sessions/tolerant-file-storage.js";
|
|
|
54
54
|
export { latestCliSession, listCliSessions, type CliSessionSummary, } from "./core/sessions/list-cli-sessions.js";
|
|
55
55
|
export { SUBAGENT_TOOL_NAME_PREFIX, createSubagentTools, loadSubagentRegistry, } from "./core/subagents/index.js";
|
|
56
56
|
export type { SubagentKindConfig, SubagentKindDefinition, SubagentRegistry, } from "./core/subagents/index.js";
|
|
57
|
-
export { EXIT_REQUESTED_CODE, EXIT_REQUESTED_STATE_KEY, consumeExitRequest, isExitRequested, requestExit, } from "./core/state/exit-request.js";
|
|
58
57
|
export { INTERNAL_ALWAYS_ALLOWED as TOOL_APPROVAL_INTERNAL_ALWAYS_ALLOWED, isImplicitlyAllowed, isToolVisible, planModeWriteEditRejectionMessage, } from "./core/state/tool-approvals.js";
|
|
59
58
|
export { Allowlist, getAllowlist, type AllowlistOptions, type AllowlistRule, } from "./core/approvals/allowlist.js";
|
|
60
59
|
export { arityPrefix, splitCommands, tokenize, } from "./core/approvals/bash-arity.js";
|