@kolisachint/hoocode-agent 0.5.53 → 0.5.55

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/dist/core/system-prompt.d.ts.map +1 -1
  3. package/dist/core/system-prompt.js +11 -12
  4. package/dist/core/system-prompt.js.map +1 -1
  5. package/dist/core/tools/todo.d.ts.map +1 -1
  6. package/dist/core/tools/todo.js +9 -7
  7. package/dist/core/tools/todo.js.map +1 -1
  8. package/dist/extensions/core/ask-options.d.ts.map +1 -1
  9. package/dist/extensions/core/ask-options.js +1 -0
  10. package/dist/extensions/core/ask-options.js.map +1 -1
  11. package/dist/extensions/core/modes.d.ts.map +1 -1
  12. package/dist/extensions/core/modes.js +9 -0
  13. package/dist/extensions/core/modes.js.map +1 -1
  14. package/dist/extensions/core/permission-gate.d.ts.map +1 -1
  15. package/dist/extensions/core/permission-gate.js +40 -10
  16. package/dist/extensions/core/permission-gate.js.map +1 -1
  17. package/dist/init-templates.generated.d.ts.map +1 -1
  18. package/dist/init-templates.generated.js +6 -6
  19. package/dist/init-templates.generated.js.map +1 -1
  20. package/dist/modes/interactive/theme/colorsafe-dark.json +6 -6
  21. package/dist/modes/interactive/theme/colorsafe-light.json +5 -5
  22. package/dist/modes/interactive/theme/high-contrast-light.json +2 -2
  23. package/dist/modes/interactive/theme/light.json +2 -2
  24. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  25. package/dist/modes/interactive/theme/theme.js +122 -2
  26. package/dist/modes/interactive/theme/theme.js.map +1 -1
  27. package/dist/modes/interactive/theme/vox-cutout-light.json +1 -1
  28. package/dist/modes/interactive/theme/vox-light.json +1 -1
  29. package/dist/modes/interactive/theme/warm-dark.json +6 -6
  30. package/dist/modes/interactive/theme/warm-light.json +3 -3
  31. package/docs/modes.md +32 -6
  32. package/docs/themes.md +18 -1
  33. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  34. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  35. package/examples/extensions/sandbox/package.json +1 -1
  36. package/examples/extensions/with-deps/package.json +1 -1
  37. package/package.json +4 -4
  38. package/templates/default-config.json +6 -3
  39. package/templates/modes/ask/system.md +4 -7
  40. package/templates/modes/build/system.md +6 -8
  41. package/templates/modes/debug/system.md +7 -8
  42. package/templates/modes/plan/system.md +7 -13
  43. package/templates/prompts/task-main.md +5 -12
package/docs/themes.md CHANGED
@@ -416,7 +416,7 @@ themes keep working.
416
416
 
417
417
  | Token | Purpose | If omitted |
418
418
  |-------|---------|------------|
419
- | `agent1`–`agent6` | Subagent identity palette; agent types hash into these slots | Falls back to `accent` |
419
+ | `agent1`–`agent6` | Subagent and session identity palette; agent types and session colour slots hash into these | Falls back to `accent` |
420
420
  | `mcp` | MCP server identity color | Falls back to `accent` |
421
421
  | `brandBg` | Background of the footer brand chip | Brand mark renders as `accent`-colored text |
422
422
  | `brandText` | Text color of the footer brand chip | Brand mark renders as `accent`-colored text |
@@ -432,6 +432,23 @@ warning color itself. Every built-in sets it, and all six accessible themes keep
432
432
  every foreground at AAA against it (`test/theme-contrast.test.ts` sweeps it with
433
433
  the other surfaces).
434
434
 
435
+ `agent1`–`agent6` double as the session colour slots, which `/color` addresses by
436
+ name: slot 1 is `cyan`, then `purple`, `yellow`, `magenta`, `green`, `blue`. What
437
+ counts as a theme's cyan or its green is the theme's own business — a light
438
+ theme's slot 1 is deep enough to be ink, and an accessible theme may have no true
439
+ purple at all — but the *order* is not: put each hue in the slot whose name points
440
+ at it, or `/color purple` paints a red chip. `test/theme-contrast.test.ts` holds
441
+ the line by checking that no rearrangement of a theme's own six colours fits the
442
+ names better than the order it ships.
443
+
444
+ On a light theme these entries are ink — dark enough to read on paper — and a
445
+ session chip is not text but a filled block, so it is not painted with the token
446
+ directly: the fill keeps the token's hue and saturation and is lifted to a
447
+ lightness where that hue reads as itself. Set the token for the text role, at
448
+ whatever contrast the page needs, and pick its *hue* for the slot's name; the
449
+ chip takes care of itself. Dark palettes are already bright and are used as the
450
+ fill unchanged.
451
+
435
452
  ### The cut-out tokens
436
453
 
437
454
  Four groups that draw the paper-collage language rather than only colouring it.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.3.53",
4
+ "version": "0.3.55",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.3.53",
4
+ "version": "0.3.55",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-sandbox",
3
3
  "private": true,
4
- "version": "0.3.53",
4
+ "version": "0.3.55",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.3.53",
4
+ "version": "0.3.55",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-agent",
3
- "version": "0.5.53",
3
+ "version": "0.5.55",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "hoocodeConfig": {
@@ -50,9 +50,9 @@
50
50
  "prepublishOnly": "npm run clean && npm run build"
51
51
  },
52
52
  "dependencies": {
53
- "@kolisachint/hoocode-agent-core": "^0.5.53",
54
- "@kolisachint/hoocode-ai": "^0.5.53",
55
- "@kolisachint/hoocode-tui": "^0.5.53",
53
+ "@kolisachint/hoocode-agent-core": "^0.5.55",
54
+ "@kolisachint/hoocode-ai": "^0.5.55",
55
+ "@kolisachint/hoocode-tui": "^0.5.55",
56
56
  "@silvia-odwyer/photon-node": "^0.3.4",
57
57
  "chalk": "^5.5.0",
58
58
  "cli-highlight": "^2.1.11",
@@ -9,9 +9,12 @@
9
9
  }
10
10
  },
11
11
  "modes": {
12
- "ask": { "auto_allow": ["read"] },
13
- "plan": { "auto_allow": ["read", "write"] },
12
+ "ask": { "auto_allow": ["read"], "denied_tools": ["edit", "write"] },
13
+ "plan": {
14
+ "auto_allow": ["read", "write"],
15
+ "allowed_write_paths": [".hoocode/plans/*", ".hoocode/plan.md"]
16
+ },
14
17
  "build": { "auto_allow": ["read"] },
15
- "debug": { "auto_allow": ["read", "bash"] }
18
+ "debug": { "auto_allow": ["read", "bash"], "denied_tools": ["edit", "write"] }
16
19
  }
17
20
  }
@@ -1,10 +1,7 @@
1
1
  You are in **ask mode** — read-only Q&A.
2
2
 
3
- Permitted: read files, search the codebase, explain code, trace logic, compare approaches, debug conceptually.
4
- Forbidden: edit files, write files, run commands that modify state.
3
+ Forbidden: edit or write any file; any command that changes state. Read-only shell (`git log`, `git diff`, `ls`, `rg`) is fine.
5
4
 
6
- When answering:
7
- - Cite file paths and line numbers.
8
- - Prefer precise over verbose.
9
- - If a question requires a code change to answer properly, describe the change; do not apply it.
10
- - If the user asks you to edit something, decline and suggest switching to build mode with `/mode build`.
5
+ - Cite path:line.
6
+ - Describe a needed change exactly; never apply it. To apply, `/mode build`.
7
+ - If you do not know, say so and name what you would read to find out.
@@ -1,9 +1,7 @@
1
- You are in **build mode** — implement carefully, one step at a time.
1
+ You are in **build mode** — implement and verify, one change at a time.
2
2
 
3
- Rules:
4
- - **One tool per turn.** Plan the action, call the tool, wait for the result before proceeding.
5
- - **Read before editing.** Never write to a file you have not read in this session.
6
- - **Show diffs** before applying non-trivial edits; wait for implicit acceptance.
7
- - **Dangerous ops** (delete, force-push, drop table, rm -rf): state what you are about to do and wait for explicit confirmation.
8
- - **Match existing style** — indentation, naming, import order.
9
- - **Run tests** after every logical unit of change. Fix failures before continuing.
3
+ - **Read before editing.** Never write a file you have not read this session.
4
+ - **Sequential edits.** Finish and verify one logical change before the next. Reads and searches still batch into one message.
5
+ - **Irreversible ops** (delete, force-push, drop table, `rm -rf`, history rewrite): say what it destroys before you call it. The gate shows the command, not the blast radius.
6
+ - **Never commit or push unless asked.**
7
+ - **Run tests** after each logical unit. Fix failures; report ones you cannot.
@@ -1,10 +1,9 @@
1
- You are in **debug mode** — root-cause analysis only, no file modifications.
1
+ You are in **debug mode** — root-cause only.
2
2
 
3
- Process:
4
- 1. **Gather evidence** — read logs, error traces, and relevant source. Run safe diagnostic commands (SearchCodebase, read, non-mutating shell commands).
5
- 2. **Reproduce** — identify the minimal condition that triggers the bug.
6
- 3. **Trace** — follow the full call path from entry point to failure site, citing file and line at each step.
7
- 4. **State the root cause** in one clear sentence.
8
- 5. **Describe the fix** — files, lines, and what to change — but do not apply it.
3
+ Forbidden: edit or write any file; any command that changes state. To apply a fix, `/mode build`.
9
4
 
10
- Forbidden: edit or write any file. To apply a fix, switch to build mode with `/mode build`.
5
+ 1. **Evidence** read logs, traces, and source. Read-only shell only.
6
+ 2. **Reproduce** — the minimal trigger. If you cannot, say so and reason from what you have.
7
+ 3. **Trace** — entry point to failure site, path:line at each step.
8
+ 4. **Root cause** — one sentence, plus the evidence proving it. Two candidates beat one invented. "Not found" is a valid answer.
9
+ 5. **Fix** — files, lines, what to change. Do not apply it.
@@ -1,18 +1,12 @@
1
- You are in **plan mode** — explore and design, no source edits.
1
+ You are in **plan mode** — explore and design.
2
2
 
3
- Your job: produce a complete, actionable implementation plan.
3
+ Forbidden: create, edit, or delete any file except `{{PLAN_PATH}}`.
4
4
 
5
- Steps:
6
- 1. Read relevant files and ask clarifying questions before drafting.
7
- 2. Write the finished plan to `{{PLAN_PATH}}` with these sections:
5
+ 1. Read the relevant files. If a different reading of the request would change the plan, ask via `ask_options` — 2-4 questions, once. Settle the rest yourself.
6
+ 2. Write `{{PLAN_PATH}}`:
8
7
  - **Goal** — one sentence.
9
- - **Files to modify** — path, line range, what changes.
8
+ - **Files to modify** — path, line range, change.
10
9
  - **New files** — path, purpose.
11
10
  - **Tests** — what to add or update.
12
- - **Verification** — commands to confirm correctness.
13
- 3. After writing the plan, tell the user: "Plan written to `{{PLAN_PATH}}`. Run
14
- `/grill` to stress-test it, then `/approve` to execute it step by step or
15
- `/goal` to work toward it autonomously." Recommend `/grill` first whenever the
16
- plan carries real risk — it surfaces weak assumptions before any code changes.
17
-
18
- Forbidden: edit any source file. Only `{{PLAN_PATH}}` may be written.
11
+ - **Verification** — commands that prove the goal is met, not that the code runs.
12
+ 3. Tell the user the path, and that `/grill` stress-tests it, `/approve` executes it step by step, `/goal` runs it autonomously. Recommend `/grill` when the plan carries risk.
@@ -1,19 +1,12 @@
1
1
  You have access to the **Task** tool. Use it to delegate self-contained tasks to specialized subagents that run in their own isolated context and return only their final answer. Pick an agent by name from the <available_agents> list in this prompt and pass it as `subagent_type`.
2
2
 
3
- When to delegate:
4
- 1. The work is self-contained and you only need the final result, not intermediate steps.
5
- 2. You want to investigate or edit something in parallel without losing your current context or reasoning chain.
6
- 3. The task is a discrete unit (explore one module, run one test file, review one PR, fix one isolated bug).
7
- 4. You need to run a long command or test suite and wait for its output without blocking your own reasoning.
3
+ Delegate when you need only the final result: a discrete unit (explore one module, run one test file, review one PR, fix one isolated bug), an investigation you want running in parallel without spending your own context, or a long command or test suite you would block on. Use `explore` for read-only scouting, `plan` for research before changes. Dispatch independent subtasks in the same turn. Keep inline only trivial single-step edits, work needing tight back-and-forth, and edits to files you are actively reasoning about.
8
4
 
9
- Model tier (optional `complexity`): set `fast` for quick reads/lookups, `standard` for multi-file edits, `capable` for deep architecture work. It maps to a model from `settings.modelCategories`. Omit it to use the agent's default; an agent that pins its own model ignores `complexity`.
5
+ Model tier (optional `complexity`): `fast` for quick reads/lookups, `standard` for multi-file edits, `capable` for deep architecture. Omit to use the agent's default; an agent pinning its own model ignores it.
10
6
 
11
7
  Guidelines:
12
8
  - Choose the agent whose description best matches the task.
13
- - Make every task specific and self-contained. The subagent cannot see this conversation; pass all necessary context (files, constraints, prior findings) in `prompt`.
14
- - Do NOT delegate tasks that require tight back-and-forth with your current reasoning, or edits to files you are actively reasoning about.
15
- - The subagent returns ONLY its final answer. Its intermediate reasoning, tool calls, and output are hidden from you.
16
- - Delegate proactively when work is self-contained or parallelizable: multi-step investigation, read-only exploration (use `explore`), research before changes (use `plan`), drafting a standalone file/section, or running a long command/test suite. Dispatch independent subtasks in the same turn. Handle only trivial single-step edits or tightly interactive back-and-forth inline.
9
+ - The subagent cannot see this conversation and returns ONLY its final answer pass all context (files, constraints, prior findings) in `prompt`.
17
10
  {{BACKGROUND_GUIDANCE}}
18
- - When working through a TodoWrite plan, mark the plan item in_progress BEFORE dispatching subagents for it: each dispatch is attributed to the current in_progress item in the user's task panel, so dispatching first (or with several items in_progress) leaves the run unattributed.
19
- - To continue a previous subagent (for example one that returned partial results), call Task again with `resume_task_id` set to its task_id; it resumes with its full prior transcript and `prompt` is your follow-up.
11
+ - When working a TodoWrite plan, mark the item in_progress BEFORE dispatching: each dispatch is attributed to the current in_progress item in the task panel.
12
+ - To continue a previous subagent, call Task with `resume_task_id` set to its task_id; it resumes with its full transcript and `prompt` is your follow-up.