@kolisachint/hoocode-agent 0.4.24 → 0.4.25
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/CHANGELOG.md +17 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +13 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +27 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +23 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +48 -11
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/resource-loader.d.ts +5 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +40 -5
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +1 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +1 -0
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +4 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +14 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/subagent.d.ts +1 -1
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +1 -1
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/extensions/core/hoo-core.d.ts.map +1 -1
- package/dist/extensions/core/hoo-core.js +4 -1
- package/dist/extensions/core/hoo-core.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/command-executor.d.ts +64 -0
- package/dist/modes/interactive/command-executor.d.ts.map +1 -0
- package/dist/modes/interactive/command-executor.js +547 -0
- package/dist/modes/interactive/command-executor.js.map +1 -0
- package/dist/modes/interactive/components/ask-options.d.ts.map +1 -1
- package/dist/modes/interactive/components/ask-options.js +2 -0
- package/dist/modes/interactive/components/ask-options.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +9 -20
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +86 -552
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/prompt-templates.md +34 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/08-prompt-templates.ts +1 -0
- package/package.json +4 -4
package/docs/prompt-templates.md
CHANGED
|
@@ -16,6 +16,20 @@ HooCode loads prompt templates from:
|
|
|
16
16
|
|
|
17
17
|
Disable discovery with `--no-prompt-templates`.
|
|
18
18
|
|
|
19
|
+
### Slash command directories
|
|
20
|
+
|
|
21
|
+
Templates are also loaded from dedicated command directories, invoked the same way (`/name`):
|
|
22
|
+
|
|
23
|
+
- Global: `~/.hoocode/commands/*.md`
|
|
24
|
+
- Project: `.hoocode/commands/*.md`
|
|
25
|
+
- Claude Code (native import): `~/.claude/commands/*.md` and `.claude/commands/*.md`, at lower precedence than `.hoocode/commands/`
|
|
26
|
+
- Settings: `slashCommands` array with files or directories
|
|
27
|
+
- CLI: `--slash-command <path>` (repeatable)
|
|
28
|
+
|
|
29
|
+
Disable discovery with `--no-slash-commands` (`-nsc`). Explicit `--slash-command` paths still load when discovery is disabled.
|
|
30
|
+
|
|
31
|
+
Claude Code commands are loaded with hoocode's prompt-template engine, so the supported subset is `description`/`argument-hint` frontmatter and `$1`/`$@`/`$ARGUMENTS` substitution. Claude-specific features (`allowed-tools`/`model` frontmatter, `!` bash execution, `@` file references, subdirectory `namespace:command` naming) are not interpreted, and discovery is non-recursive.
|
|
32
|
+
|
|
19
33
|
## Format
|
|
20
34
|
|
|
21
35
|
```markdown
|
|
@@ -82,7 +96,25 @@ Create a React component named $1 with features: $@
|
|
|
82
96
|
|
|
83
97
|
Usage: `/component Button "onClick handler" "disabled support"`
|
|
84
98
|
|
|
99
|
+
## Injection Type
|
|
100
|
+
|
|
101
|
+
Commands may set a `type` in frontmatter to control how the expanded text is injected. This applies to templates loaded from any location.
|
|
102
|
+
|
|
103
|
+
- `user` (default): the expanded text is sent as a normal user message.
|
|
104
|
+
- `system`: the expanded text is appended to the system prompt for the turn. If arguments are passed, the raw argument string is sent as the user message.
|
|
105
|
+
- `context`: the expanded text is added as a hidden context message (not displayed). If arguments are passed, the raw argument string is sent as the user message.
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
---
|
|
109
|
+
description: Enforce strict review standards for the rest of the session
|
|
110
|
+
type: system
|
|
111
|
+
---
|
|
112
|
+
You are in strict review mode. Reject any change that lacks tests.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
An unrecognized `type` value falls back to `user`.
|
|
116
|
+
|
|
85
117
|
## Loading Rules
|
|
86
118
|
|
|
87
|
-
- Template discovery in `prompts/` is non-recursive.
|
|
88
|
-
- If you want templates in subdirectories, add them explicitly via `prompts` settings or a package manifest.
|
|
119
|
+
- Template discovery in `prompts/` and `commands/` is non-recursive.
|
|
120
|
+
- If you want templates in subdirectories, add them explicitly via `prompts`/`slashCommands` settings or a package manifest.
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
const deployTemplate: PromptTemplate = {
|
|
18
18
|
name: "deploy",
|
|
19
19
|
description: "Deploy the application",
|
|
20
|
+
type: "user",
|
|
20
21
|
filePath: "/virtual/prompts/deploy.md",
|
|
21
22
|
sourceInfo: createSyntheticSourceInfo("/virtual/prompts/deploy.md", { source: "sdk" }),
|
|
22
23
|
content: `# Deploy Instructions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolisachint/hoocode-agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.25",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"hoocodeConfig": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"prepublishOnly": "npm run clean && npm run build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@kolisachint/hoocode-agent-core": "^0.4.
|
|
48
|
-
"@kolisachint/hoocode-ai": "^0.4.
|
|
49
|
-
"@kolisachint/hoocode-tui": "^0.4.
|
|
47
|
+
"@kolisachint/hoocode-agent-core": "^0.4.25",
|
|
48
|
+
"@kolisachint/hoocode-ai": "^0.4.25",
|
|
49
|
+
"@kolisachint/hoocode-tui": "^0.4.25",
|
|
50
50
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
51
51
|
"chalk": "^5.5.0",
|
|
52
52
|
"cli-highlight": "^2.1.11",
|