hoomanjs 1.23.3 → 1.23.5
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 +2 -4
- package/dist/acp/approvals.js +15 -1
- package/dist/acp/approvals.js.map +1 -1
- package/dist/acp/sessions/config-options.js +2 -2
- package/dist/acp/sessions/config-options.js.map +1 -1
- package/dist/chat/app.js +8 -8
- package/dist/chat/app.js.map +1 -1
- package/dist/chat/approvals.js +6 -1
- package/dist/chat/approvals.js.map +1 -1
- package/dist/chat/components/SlashCommands.js +3 -3
- package/dist/chat/components/SlashCommands.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/configure/app.js +0 -1
- package/dist/configure/app.js.map +1 -1
- package/dist/core/agent/index.js +3 -2
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/agent/mode-aware-tool-registry.js +15 -5
- package/dist/core/agent/mode-aware-tool-registry.js.map +1 -1
- package/dist/core/config.d.ts +0 -3
- package/dist/core/config.js +0 -3
- package/dist/core/config.js.map +1 -1
- package/dist/core/mcp/manager.js +15 -4
- package/dist/core/mcp/manager.js.map +1 -1
- package/dist/core/mcp/prefixed-mcp-tool.d.ts +3 -1
- package/dist/core/mcp/prefixed-mcp-tool.js +4 -1
- package/dist/core/mcp/prefixed-mcp-tool.js.map +1 -1
- package/dist/core/prompts/modes/ask.md +1 -3
- package/dist/core/prompts/modes/plan.md +24 -23
- package/dist/core/prompts/session-mode-appendix.d.ts +13 -2
- package/dist/core/prompts/session-mode-appendix.js +57 -12
- package/dist/core/prompts/session-mode-appendix.js.map +1 -1
- package/dist/core/prompts/skills.js +1 -0
- package/dist/core/prompts/skills.js.map +1 -1
- package/dist/core/prompts/static/skills.md +1 -0
- package/dist/core/prompts/system.js +0 -1
- package/dist/core/prompts/system.js.map +1 -1
- package/dist/core/skills/built-in/hooman-coding/SKILL.md +69 -0
- package/dist/core/skills/built-in/hooman-config/SKILL.md +137 -62
- package/dist/core/state/tool-approvals.d.ts +9 -1
- package/dist/core/state/tool-approvals.js +34 -1
- package/dist/core/state/tool-approvals.js.map +1 -1
- package/dist/core/tools/plan.js +4 -0
- package/dist/core/tools/plan.js.map +1 -1
- package/dist/daemon/approvals.js +6 -1
- package/dist/daemon/approvals.js.map +1 -1
- package/dist/exec/approvals.js +6 -1
- package/dist/exec/approvals.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/prompts/harness/engineering.md +0 -40
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/core/prompts/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;AAE/B,gEAAgE;AAChE,MAAM,mBAAmB,GAAG;IAC1B,aAAa;IACb,gBAAgB;IAChB,QAAQ;IACR,SAAS;IACT,aAAa;IACb,eAAe;IACf,UAAU;IACV,eAAe;IACf,UAAU;IACV,UAAU;IACV,QAAQ;IACR,WAAW;IACX,SAAS;IACT,WAAW;IACX,cAAc;IACd,aAAa;CACL,CAAC;AAEX,MAAM,oBAAoB,GAAG;IAC3B,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE;IAC1C,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE;IAClD,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE;IAC1C,EAAE,GAAG,EAAE,
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CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,oEAAoE;IAC5D,OAAO;QACb,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;YACtB,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;YACpB,WAAW,EAAE,2BAA2B,EAAE;YAC1C,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG;YAC1B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI;YAC5B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU;YAClC,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hooman-coding
|
|
3
|
+
description: Playbook for coding work—research, secure implementation, tests, lint/format/build verification, and RCA for bugs. Read when creating or changing source, tests, tooling config, or dependencies; or whenever the task is clearly programming-related.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Coding / Software Engineering
|
|
7
|
+
|
|
8
|
+
Act like a senior engineer: ship correct, maintainable changes that match **this** repository. Prefer **local** patterns, tooling, and conventions over generic or invented architecture—then align those choices with current industry practice where it helps.
|
|
9
|
+
|
|
10
|
+
## Before you implement
|
|
11
|
+
|
|
12
|
+
- **Research**: Combine what you know with targeted lookup when needed—official docs, release notes, GitHub issues/PRs, Stack Overflow, migration guides, and security advisories. Prefer solutions and APIs that are widely used, documented, and actively maintained.
|
|
13
|
+
- **Dependencies**: When adding or upgrading packages, favor **latest stable** releases that are **maintained** (recent publishes, healthy issue/PR activity, clear ownership). Avoid abandoned forks and deprecated APIs unless the project already depends on them or the user directs otherwise.
|
|
14
|
+
- **Conventions**: Infer structure, naming, formatting, and architectural boundaries from existing code and project docs (`CONTRIBUTING`, linters, CI). Match the house style; do not impose a different framework or layout without a strong, stated reason.
|
|
15
|
+
|
|
16
|
+
## Implementation discipline
|
|
17
|
+
|
|
18
|
+
- Treat vague requests as **real engineering work** in repo context: prefer an actual code change over a superficial text-only reply.
|
|
19
|
+
- Respect the user’s scope; do not refuse work solely because it is large—confirm only when ambiguity would cause harm.
|
|
20
|
+
- **Read** surrounding code and **open a file before editing it**. Preserve public behavior unless the user asked for a change or the behavior is clearly wrong.
|
|
21
|
+
- Keep edits **narrow**, **coherent**, and easy to review. Prefer **simple** code that fully solves the problem over clever or over-generalized designs.
|
|
22
|
+
- Add abstractions only when they remove real duplication, clarify a real concept, or mirror an established local pattern.
|
|
23
|
+
- Avoid throwaway compatibility shims, placeholder re-exports, “removed” tombstones, and legacy aliases when old code can be deleted cleanly.
|
|
24
|
+
- **Comments**: do not add them by default. Add only for non-obvious constraints, invariants, workarounds, or surprising behavior.
|
|
25
|
+
- Avoid drive-by changes: no unrelated types, docstrings, formatting-only edits, new files, features, config knobs, speculative validation, feature flags, or defensive branches for impossible scenarios. Do not invent one-off helpers for hypothetical futures.
|
|
26
|
+
|
|
27
|
+
## Testing
|
|
28
|
+
|
|
29
|
+
- **Default**: add or update **unit tests** and/or **integration tests** that match the project’s existing test stack and locations—unless the user **explicitly** asks to skip tests or the repo genuinely has no test harness for that layer.
|
|
30
|
+
- Prefer focused tests that lock in the behavior you changed or fixed; follow existing patterns (fixtures, mocks, snapshots) instead of introducing a parallel style.
|
|
31
|
+
|
|
32
|
+
## Verification each turn
|
|
33
|
+
|
|
34
|
+
When the project provides the hooks, **after substantive edits** in a turn:
|
|
35
|
+
|
|
36
|
+
1. Run **formatter** and **linter** using the repo’s configured commands (or IDE-equivalent rules).
|
|
37
|
+
2. Run **build** (compile/bundle) if applicable.
|
|
38
|
+
3. Run **tests** relevant to the change (full suite when reasonable and fast enough; otherwise the narrowest meaningful subset).
|
|
39
|
+
|
|
40
|
+
If a command fails, **diagnose from output** before retrying or changing approach; do not mask failures.
|
|
41
|
+
|
|
42
|
+
## Security and correctness
|
|
43
|
+
|
|
44
|
+
- **Credentials**: Keep secrets out of source. Prefer **environment variables**, **per-environment** local files when the stack uses them (e.g. `.env`, `.env.local`, `.env.development`), or **dedicated secrets files** under paths the project already documents (plus provider secret stores in deployed environments). In a **Git** repo, ensure those paths are **`.gitignore`d** (or equivalent) so keys never get committed; wire reads through the stack’s normal config loader. Do not embed API keys, tokens, or passwords in code, fixtures, or checked-in JSON unless the user explicitly demands it—and still prefer env or secret injection.
|
|
45
|
+
- Stay alert to injection (command, SQL), XSS, path traversal, unsafe deserialization, authz mistakes, and secret leakage in code, logs, and errors.
|
|
46
|
+
- Prefer **structured parsers and APIs** over fragile string parsing for structured data.
|
|
47
|
+
- Treat generated artifacts, lockfiles, migrations, and shared config as **contracts**: touch them only when the task requires it, and keep them consistent.
|
|
48
|
+
- Do not swallow errors with broad catches, silent fallbacks, disabled hooks, or weakened checks unless the codebase already establishes that pattern for a good reason.
|
|
49
|
+
|
|
50
|
+
## Bug fixes: root cause first
|
|
51
|
+
|
|
52
|
+
1. **Gather evidence**: logs, stack traces, CI output, terminal repro, failing tests, and user steps.
|
|
53
|
+
2. **Trace**: follow the failure from symptom to the responsible code path; form a **root cause hypothesis** (RCA) before editing.
|
|
54
|
+
3. **Fix**: apply the smallest change that addresses the cause, with tests when appropriate.
|
|
55
|
+
4. **Close the loop**: at the end of the turn, give the user a concise **RCA** (what broke and why) and a **fix summary** (what changed and how it resolves the issue). If certainty is limited, say what remains unproven and what would verify it.
|
|
56
|
+
|
|
57
|
+
Avoid blind retries; if blocked after investigation, ask **one focused question**.
|
|
58
|
+
|
|
59
|
+
## Project hygiene
|
|
60
|
+
|
|
61
|
+
- Work on the **current** working tree; do not revert user changes unless asked.
|
|
62
|
+
- If unrelated local changes affect the task, inspect and adapt; ask only when safe progress is impossible.
|
|
63
|
+
- Do **not** create commits, push, amend, force-push, or alter remotes unless the user explicitly requests it.
|
|
64
|
+
- Never put secrets in commits, patches, or user-facing text; align with **`.gitignore`d** env/secrets files when adding new credential plumbing. If credentials appear exposed, warn **without repeating** the secret.
|
|
65
|
+
|
|
66
|
+
## Communication
|
|
67
|
+
|
|
68
|
+
- Skip time estimates; describe what you did and what remains.
|
|
69
|
+
- When research influenced a decision (e.g., a known framework bug or recommended API), mention it briefly so the user can trace it.
|
|
@@ -18,7 +18,7 @@ Use this skill when the user asks you to inspect, explain, or change Hooman's ow
|
|
|
18
18
|
|
|
19
19
|
1. Read the existing JSON first. Preserve user values, comments are not supported, and secrets such as API keys may be present.
|
|
20
20
|
2. Make the smallest JSON edit that satisfies the request. Do not rewrite unrelated sections or normalize formatting beyond valid pretty JSON.
|
|
21
|
-
3. `name` and `
|
|
21
|
+
3. `name` and `llms` are required. `llms` must be a **non-empty array** of entries (see below). `search`, `prompts`, `tools`, and `compaction` are optional in input, but Hooman expands them with defaults when loading.
|
|
22
22
|
4. Unknown keys are unsupported and may be dropped when Hooman parses and persists the config.
|
|
23
23
|
5. If changing `tools.ltm` or `tools.wiki`, preserve the existing `chroma` object unless the user asked to change it.
|
|
24
24
|
6. Any change to `config.json` or `instructions.md` requires restarting the running Hooman agent/session before it takes effect.
|
|
@@ -30,11 +30,17 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
32
32
|
"name": "Hooman",
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
"llms": [
|
|
34
|
+
{
|
|
35
|
+
"name": "Default",
|
|
36
|
+
"options": {
|
|
37
|
+
"provider": "ollama",
|
|
38
|
+
"model": "gemma4:e4b",
|
|
39
|
+
"params": {}
|
|
40
|
+
},
|
|
41
|
+
"default": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
38
44
|
"search": {
|
|
39
45
|
"enabled": false,
|
|
40
46
|
"provider": "brave",
|
|
@@ -52,7 +58,6 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
52
58
|
"behaviour": true,
|
|
53
59
|
"communication": true,
|
|
54
60
|
"execution": true,
|
|
55
|
-
"engineering": true,
|
|
56
61
|
"guardrails": true
|
|
57
62
|
},
|
|
58
63
|
"tools": {
|
|
@@ -104,15 +109,25 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
104
109
|
## Top-Level Options
|
|
105
110
|
|
|
106
111
|
- `name`: non-empty display name for the agent.
|
|
107
|
-
- `
|
|
112
|
+
- `llms`: required non-empty list of named LLM configs (see **LLMs array**).
|
|
108
113
|
- `search`: optional web search config; defaults to disabled Brave.
|
|
109
114
|
- `prompts`: optional built-in static prompt toggles; omitted fields default to `true`. Custom user instructions live in `~/.hooman/instructions.md`.
|
|
110
115
|
- `tools`: optional tool toggles and tool-specific settings.
|
|
111
116
|
- `compaction`: optional context compaction settings. `ratio` must be `0..1`; `keep` must be a non-negative integer.
|
|
112
117
|
|
|
113
|
-
##
|
|
118
|
+
## LLMs array
|
|
119
|
+
|
|
120
|
+
Each element of `llms` has:
|
|
114
121
|
|
|
115
|
-
`
|
|
122
|
+
- `name`: non-empty label for this entry (for display and editing).
|
|
123
|
+
- `options`: the provider configuration (`provider`, `model`, `params`) — same semantics as the former single `llm` object.
|
|
124
|
+
- `default`: boolean; mark **one** entry `"default": true` for the active model. If several have `true`, the **first** in the array wins; if none have `true`, Hooman uses the **first** entry—so keep a single default when possible.
|
|
125
|
+
|
|
126
|
+
Runtime APIs may still expose a single active profile as `llm` (derived from the default entry); on disk the source of truth is always `llms`.
|
|
127
|
+
|
|
128
|
+
### LLM Providers
|
|
129
|
+
|
|
130
|
+
`options.provider` must be one of:
|
|
116
131
|
|
|
117
132
|
```json
|
|
118
133
|
[
|
|
@@ -127,23 +142,29 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
127
142
|
]
|
|
128
143
|
```
|
|
129
144
|
|
|
130
|
-
Common shape:
|
|
145
|
+
Common shape (single default model):
|
|
131
146
|
|
|
132
147
|
```json
|
|
133
148
|
{
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
"llms": [
|
|
150
|
+
{
|
|
151
|
+
"name": "Default",
|
|
152
|
+
"options": {
|
|
153
|
+
"provider": "anthropic",
|
|
154
|
+
"model": "claude-sonnet-4-20250514",
|
|
155
|
+
"params": {
|
|
156
|
+
"apiKey": "...",
|
|
157
|
+
"temperature": 0.2,
|
|
158
|
+
"maxTokens": 4096
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"default": true
|
|
141
162
|
}
|
|
142
|
-
|
|
163
|
+
]
|
|
143
164
|
}
|
|
144
165
|
```
|
|
145
166
|
|
|
146
|
-
Provider notes:
|
|
167
|
+
Provider notes (these refer to fields inside `options.params` unless noted):
|
|
147
168
|
|
|
148
169
|
- `anthropic`: `params.apiKey`, `authToken`, `baseURL`, and `headers` configure the provider. Other keys are forwarded as Vercel model config, such as `temperature` and `maxTokens`.
|
|
149
170
|
- `google`: `params.apiKey`, `client`, `clientConfig`, and `builtInTools` are top-level Google model options. Other keys become Gemini generation params, such as `temperature`, `maxOutputTokens`, `topP`, and `topK`.
|
|
@@ -158,60 +179,109 @@ Examples:
|
|
|
158
179
|
|
|
159
180
|
```json
|
|
160
181
|
{
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"params": {
|
|
165
|
-
"host": "http://127.0.0.1:11434",
|
|
166
|
-
"think": "medium",
|
|
182
|
+
"llms": [
|
|
183
|
+
{
|
|
184
|
+
"name": "Local",
|
|
167
185
|
"options": {
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
|
|
186
|
+
"provider": "ollama",
|
|
187
|
+
"model": "qwen3:8b",
|
|
188
|
+
"params": {
|
|
189
|
+
"host": "http://127.0.0.1:11434",
|
|
190
|
+
"think": "medium",
|
|
191
|
+
"options": {
|
|
192
|
+
"num_ctx": 32768,
|
|
193
|
+
"temperature": 0.2
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"default": true
|
|
171
198
|
}
|
|
172
|
-
|
|
199
|
+
]
|
|
173
200
|
}
|
|
174
201
|
```
|
|
175
202
|
|
|
176
203
|
```json
|
|
177
204
|
{
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
205
|
+
"llms": [
|
|
206
|
+
{
|
|
207
|
+
"name": "Gemini",
|
|
208
|
+
"options": {
|
|
209
|
+
"provider": "google",
|
|
210
|
+
"model": "gemini-2.5-flash",
|
|
211
|
+
"params": {
|
|
212
|
+
"apiKey": "...",
|
|
213
|
+
"temperature": 0.2,
|
|
214
|
+
"maxOutputTokens": 8192
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"default": true
|
|
185
218
|
}
|
|
186
|
-
|
|
219
|
+
]
|
|
187
220
|
}
|
|
188
221
|
```
|
|
189
222
|
|
|
190
223
|
```json
|
|
191
224
|
{
|
|
192
|
-
"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
225
|
+
"llms": [
|
|
226
|
+
{
|
|
227
|
+
"name": "Bedrock",
|
|
228
|
+
"options": {
|
|
229
|
+
"provider": "bedrock",
|
|
230
|
+
"model": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
231
|
+
"params": {
|
|
232
|
+
"region": "us-west-2",
|
|
233
|
+
"clientConfig": {
|
|
234
|
+
"profile": "dev",
|
|
235
|
+
"maxAttempts": 3,
|
|
236
|
+
"credentials": {
|
|
237
|
+
"accessKeyId": "AKIA...",
|
|
238
|
+
"secretAccessKey": "...",
|
|
239
|
+
"sessionToken": "..."
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"temperature": 0.2,
|
|
243
|
+
"maxTokens": 4096
|
|
204
244
|
}
|
|
205
245
|
},
|
|
206
|
-
"
|
|
207
|
-
"maxTokens": 4096
|
|
246
|
+
"default": true
|
|
208
247
|
}
|
|
209
|
-
|
|
248
|
+
]
|
|
210
249
|
}
|
|
211
250
|
```
|
|
212
251
|
|
|
213
252
|
For Bedrock, prefer leaving `clientConfig.credentials` out when the runtime already has AWS credentials. Without explicit credentials or `profile`, Hooman falls back to the AWS SDK default credential chain, such as `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, optional `AWS_SESSION_TOKEN`, `AWS_PROFILE`, and AWS CLI/shared credential files.
|
|
214
253
|
|
|
254
|
+
### Multiple models
|
|
255
|
+
|
|
256
|
+
You may list several entries and flip which one is default:
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"llms": [
|
|
261
|
+
{
|
|
262
|
+
"name": "Fast",
|
|
263
|
+
"options": {
|
|
264
|
+
"provider": "openai",
|
|
265
|
+
"model": "gpt-4.1-mini",
|
|
266
|
+
"params": { "apiKey": "..." }
|
|
267
|
+
},
|
|
268
|
+
"default": true
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "Heavy",
|
|
272
|
+
"options": {
|
|
273
|
+
"provider": "anthropic",
|
|
274
|
+
"model": "claude-opus-4-20250514",
|
|
275
|
+
"params": { "apiKey": "..." }
|
|
276
|
+
},
|
|
277
|
+
"default": false
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
When editing `llms`, preserve unrelated entries and API keys unless the user asks to remove or replace them.
|
|
284
|
+
|
|
215
285
|
## Search
|
|
216
286
|
|
|
217
287
|
`search.provider` must be `"brave"`, `"serper"`, or `"tavily"`.
|
|
@@ -238,7 +308,7 @@ Defaults: `enabled: false`, `provider: "brave"`, all provider API keys unset.
|
|
|
238
308
|
|
|
239
309
|
## Prompts
|
|
240
310
|
|
|
241
|
-
Each prompt toggle is optional and defaults to `true`.
|
|
311
|
+
Each prompt toggle is optional and defaults to `true`. Coding and software-engineering guidance is not a config toggle; it lives in the built-in **hooman-coding** skill and is loaded when relevant (see the system prompt skills section).
|
|
242
312
|
|
|
243
313
|
```json
|
|
244
314
|
{
|
|
@@ -246,13 +316,12 @@ Each prompt toggle is optional and defaults to `true`.
|
|
|
246
316
|
"behaviour": true,
|
|
247
317
|
"communication": true,
|
|
248
318
|
"execution": true,
|
|
249
|
-
"engineering": true,
|
|
250
319
|
"guardrails": true
|
|
251
320
|
}
|
|
252
321
|
}
|
|
253
322
|
```
|
|
254
323
|
|
|
255
|
-
Set a prompt to `false` only when the user explicitly wants to omit that
|
|
324
|
+
Set a prompt to `false` only when the user explicitly wants to omit that harness section.
|
|
256
325
|
|
|
257
326
|
## Tools
|
|
258
327
|
|
|
@@ -319,7 +388,7 @@ Agents:
|
|
|
319
388
|
}
|
|
320
389
|
```
|
|
321
390
|
|
|
322
|
-
Defaults: `todo`, `fetch`, `filesystem`, `shell`, `sleep`, and `agents` enabled; `ltm` and `wiki` disabled; Chroma URL `http://127.0.0.1:8000`; memory collection `memory`; wiki collection `wiki`. MCP server definitions and installed skill files are not controlled by config tool toggles; do not inspect or edit them for this skill. A missing config file is created with `agents.concurrency: 2`; if `tools.agents.concurrency` is omitted
|
|
391
|
+
Defaults: `todo`, `fetch`, `filesystem`, `shell`, `sleep`, and `agents` enabled; `ltm` and `wiki` disabled; Chroma URL `http://127.0.0.1:8000`; memory collection `memory`; wiki collection `wiki`. MCP server definitions and installed skill files are not controlled by config tool toggles; do not inspect or edit them for this skill. A missing config file is created with `agents.concurrency: 2`; if `tools.agents.concurrency` is omitted while merging partial tool config, Hooman uses `3`.
|
|
323
392
|
|
|
324
393
|
## Instructions
|
|
325
394
|
|
|
@@ -346,11 +415,17 @@ Keep instruction edits focused and preserve existing wording unless the user ask
|
|
|
346
415
|
```json
|
|
347
416
|
{
|
|
348
417
|
"name": "Hooman",
|
|
349
|
-
"
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
418
|
+
"llms": [
|
|
419
|
+
{
|
|
420
|
+
"name": "Default",
|
|
421
|
+
"options": {
|
|
422
|
+
"provider": "ollama",
|
|
423
|
+
"model": "gemma4:e4b",
|
|
424
|
+
"params": {}
|
|
425
|
+
},
|
|
426
|
+
"default": true
|
|
427
|
+
}
|
|
428
|
+
]
|
|
354
429
|
}
|
|
355
430
|
```
|
|
356
431
|
|
|
@@ -12,6 +12,12 @@ export declare const PLAN_MODE_ALWAYS_ALLOWED: Set<string>;
|
|
|
12
12
|
export declare const PLAN_MODE_VISIBLE: Set<string>;
|
|
13
13
|
/** Same narrowed surface as plan mode but without plan lifecycle tools. */
|
|
14
14
|
export declare const ASK_MODE_VISIBLE: Set<string>;
|
|
15
|
+
/**
|
|
16
|
+
* In session mode `plan`, block `write_file` / `edit_file` unless the target path resolves
|
|
17
|
+
* under the app plans directory. Runs before session-wide “always allow” so plan boundaries
|
|
18
|
+
* cannot be overridden by tooling preferences.
|
|
19
|
+
*/
|
|
20
|
+
export declare function planModeWriteEditRejectionMessage(agent: AgentLike, toolName: string, toolInput: unknown): string | null;
|
|
15
21
|
export declare function getSessionAllowedTools(agent: AgentLike): string[];
|
|
16
22
|
/**
|
|
17
23
|
* Session-wide tool allowlist ("always allow" in UI), plus implicit allow for
|
|
@@ -19,6 +25,8 @@ export declare function getSessionAllowedTools(agent: AgentLike): string[];
|
|
|
19
25
|
* or plans only (writes/edits).
|
|
20
26
|
*/
|
|
21
27
|
export declare function isToolSessionAllowed(agent: AgentLike, toolName: string, toolInput?: unknown): boolean;
|
|
22
|
-
export declare function isToolVisible(mode: string, toolName: string
|
|
28
|
+
export declare function isToolVisible(mode: string, toolName: string, options?: {
|
|
29
|
+
mcpReadOnlyHint?: boolean;
|
|
30
|
+
}): boolean;
|
|
23
31
|
export declare function allowToolForSession(agent: AgentLike, toolName: string): void;
|
|
24
32
|
export {};
|
|
@@ -98,6 +98,32 @@ export const ASK_MODE_VISIBLE = new Set([...PLAN_MODE_VISIBLE].filter((name) =>
|
|
|
98
98
|
function isPlainObjectRecord(value) {
|
|
99
99
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* In session mode `plan`, block `write_file` / `edit_file` unless the target path resolves
|
|
103
|
+
* under the app plans directory. Runs before session-wide “always allow” so plan boundaries
|
|
104
|
+
* cannot be overridden by tooling preferences.
|
|
105
|
+
*/
|
|
106
|
+
export function planModeWriteEditRejectionMessage(agent, toolName, toolInput) {
|
|
107
|
+
if (getModeState(agent).mode !== "plan") {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
if (toolName !== WRITE_FILE_TOOL && toolName !== EDIT_FILE_TOOL) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const plansRoot = plansPath();
|
|
114
|
+
if (!isPlainObjectRecord(toolInput)) {
|
|
115
|
+
return `In plan mode, "${toolName}" only applies to files under the plans directory (${plansRoot}).`;
|
|
116
|
+
}
|
|
117
|
+
const raw = toolInput.path;
|
|
118
|
+
if (typeof raw !== "string" || !raw.trim()) {
|
|
119
|
+
return `In plan mode, "${toolName}" requires a path under the plans directory (${plansRoot}).`;
|
|
120
|
+
}
|
|
121
|
+
const resolved = normalizeUserPath(raw.trim());
|
|
122
|
+
if (isResolvedPathInsideDir(resolved, plansRoot)) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return `In plan mode, "${toolName}" was rejected automatically: path must be under the plans directory (${plansRoot}).`;
|
|
126
|
+
}
|
|
101
127
|
/** Skip approval for filesystem tools when targets stay inside trusted app-home dirs. */
|
|
102
128
|
function isImplicitPathAllowed(toolName, toolInput) {
|
|
103
129
|
const attachments = attachmentsPath();
|
|
@@ -184,14 +210,21 @@ export function isToolSessionAllowed(agent, toolName, toolInput) {
|
|
|
184
210
|
}
|
|
185
211
|
return false;
|
|
186
212
|
}
|
|
187
|
-
export function isToolVisible(mode, toolName) {
|
|
213
|
+
export function isToolVisible(mode, toolName, options) {
|
|
214
|
+
const readOnlyHinted = options?.mcpReadOnlyHint === true;
|
|
188
215
|
if (mode === "default") {
|
|
189
216
|
return true;
|
|
190
217
|
}
|
|
191
218
|
if (mode === "plan") {
|
|
219
|
+
if (readOnlyHinted) {
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
192
222
|
return PLAN_MODE_VISIBLE.has(toolName);
|
|
193
223
|
}
|
|
194
224
|
if (mode === "ask") {
|
|
225
|
+
if (readOnlyHinted) {
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
195
228
|
return ASK_MODE_VISIBLE.has(toolName);
|
|
196
229
|
}
|
|
197
230
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-approvals.js","sourceRoot":"","sources":["../../../src/core/state/tool-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAW3E,MAA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M,IAAI,IAAI,KAAK,KAAK,CAAC;QACnC,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC,EACtC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IACE,mBAAmB,CAAC,SAAS,CAAC;QAC9B,qBAAqB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAC1C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,
|
|
1
|
+
{"version":3,"file":"tool-approvals.js","sourceRoot":"","sources":["../../../src/core/state/tool-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAW3E,MAAM,yBAAyB,GAAG,cAAc,CAAC;AAEjD,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,2BAA2B;IAC3B,QAAQ;IACR,cAAc;IACd,WAAW;IACX,OAAO;IACP,sBAAsB;IACtB,oBAAoB;IACpB,QAAQ;IACR,OAAO;IACP,oBAAoB;IACpB,KAAK;IACL,OAAO;IACP,cAAc;IACd,kBAAkB;IAClB,OAAO;IACP,sBAAsB;IACtB,iBAAiB;IACjB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AE,QAAgB;IACpE,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO;IACT,CAAC;IACD,MAAM,OAAO,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,OAAO;IACT,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/core/tools/plan.js
CHANGED
|
@@ -4,6 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { tool } from "@strands-agents/sdk";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { applySessionMode } from "../agent/sync-tool-registry-mode.js";
|
|
7
|
+
import { refreshAgentFullSystemPrompt } from "../prompts/session-mode-appendix.js";
|
|
7
8
|
import { clearPlanState, getPlanState, setPlanState } from "../state/plan.js";
|
|
8
9
|
import { clearModeToDefault, getModeState, setSessionMode, } from "../state/session-mode.js";
|
|
9
10
|
import { ENTER_PLAN_MODE_TOOL, EXIT_PLAN_MODE_TOOL, } from "../state/tool-approvals.js";
|
|
@@ -37,6 +38,7 @@ If you are already in that phase, calling again keeps working with the same docu
|
|
|
37
38
|
}
|
|
38
39
|
const plan = getPlanState(agent);
|
|
39
40
|
if (mode === "plan" && plan.planFile) {
|
|
41
|
+
await refreshAgentFullSystemPrompt(agent);
|
|
40
42
|
return toJsonValue({
|
|
41
43
|
mode: "plan",
|
|
42
44
|
plan_file: plan.planFile,
|
|
@@ -60,6 +62,7 @@ If you are already in that phase, calling again keeps working with the same docu
|
|
|
60
62
|
enterReason: input.reason,
|
|
61
63
|
});
|
|
62
64
|
applySessionMode(agent);
|
|
65
|
+
await refreshAgentFullSystemPrompt(agent);
|
|
63
66
|
return toJsonValue({
|
|
64
67
|
mode: "plan",
|
|
65
68
|
plan_file: planFile,
|
|
@@ -100,6 +103,7 @@ Only call this after you have started planning with enter_plan_mode.`,
|
|
|
100
103
|
clearModeToDefault(agent);
|
|
101
104
|
clearPlanState(agent);
|
|
102
105
|
applySessionMode(agent);
|
|
106
|
+
await refreshAgentFullSystemPrompt(agent);
|
|
103
107
|
return toJsonValue({
|
|
104
108
|
exited: true,
|
|
105
109
|
plan_file: planPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/core/tools/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,sBAAsB,GAAG,CAAC,GAAG,IAAI,CAAC;AAExC,MAAM,aAAa,GAAG,YAAY,CAAC;AAEnC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CA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AK,CAAC,CAAC;gBAC1B,cAAc,CAAC,KAAK,CAAC,CAAC;gBACtB,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBACxB,MAAM,4BAA4B,CAAC,KAAK,CAAC,CAAC;gBAE1C,OAAO,WAAW,CAAC;oBACjB,MAAM,EAAE,IAAI;oBACZ,SAAS,EAAE,QAAQ;oBACnB,OAAO;oBACP,SAAS;iBACV,CAAC,CAAC;YACL,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/dist/daemon/approvals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INTERNAL_ALWAYS_ALLOWED, allowToolForSession, isToolSessionAllowed, } from "../core/state/tool-approvals.js";
|
|
1
|
+
import { INTERNAL_ALWAYS_ALLOWED, allowToolForSession, isToolSessionAllowed, planModeWriteEditRejectionMessage, } from "../core/state/tool-approvals.js";
|
|
2
2
|
import { isYoloEnabled } from "../core/state/yolo.js";
|
|
3
3
|
const TOOL_DESCRIPTION_PREVIEW_LIMIT = 50;
|
|
4
4
|
const TOOL_ARGS_PREVIEW_LIMIT = 50;
|
|
@@ -48,6 +48,11 @@ function readOrigin(agent) {
|
|
|
48
48
|
export function createDaemonApprovalHandler(manager, agent) {
|
|
49
49
|
return async (event) => {
|
|
50
50
|
const name = event.toolUse.name;
|
|
51
|
+
const planReject = planModeWriteEditRejectionMessage(event.agent, name, event.toolUse.input);
|
|
52
|
+
if (planReject) {
|
|
53
|
+
event.cancel = planReject;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
51
56
|
if (isYoloEnabled(event.agent)) {
|
|
52
57
|
return;
|
|
53
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../src/daemon/approvals.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../src/daemon/approvals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AC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;YACtI,OAAO;QACT,CAAC;QAED,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC9B,OAAO;QACT,CAAC;QACD,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;YAChC,mBAAmB,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACvC,OAAO;QACT,CAAC;QAED,KAAK,CAAC,MAAM,GAAG,SAAS,IAAI,oCAAoC,CAAC;IACnE,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/exec/approvals.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createInterface } from "node:readline/promises";
|
|
2
2
|
import { stdin, stdout } from "node:process";
|
|
3
|
-
import { INTERNAL_ALWAYS_ALLOWED, allowToolForSession, isToolSessionAllowed, } from "../core/state/tool-approvals.js";
|
|
3
|
+
import { INTERNAL_ALWAYS_ALLOWED, allowToolForSession, isToolSessionAllowed, planModeWriteEditRejectionMessage, } from "../core/state/tool-approvals.js";
|
|
4
4
|
import { isYoloEnabled } from "../core/state/yolo.js";
|
|
5
5
|
const INPUT_PREVIEW_LIMIT = 1_024;
|
|
6
6
|
function inputPreview(input) {
|
|
@@ -50,6 +50,11 @@ async function promptForApproval(event) {
|
|
|
50
50
|
export function createToolApprovalHandler() {
|
|
51
51
|
return async function onBeforeToolCallEvent(event) {
|
|
52
52
|
const name = event.toolUse.name;
|
|
53
|
+
const planReject = planModeWriteEditRejectionMessage(event.agent, name, event.toolUse.input);
|
|
54
|
+
if (planReject) {
|
|
55
|
+
event.cancel = planReject;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
53
58
|
if (isYoloEnabled(event.agent)) {
|
|
54
59
|
return;
|
|
55
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../src/exec/approvals.ts"],"names":[],"mappings":"AA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