@kolisachint/hoocode-agent 0.5.12 → 0.5.14
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 +73 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -0
- package/dist/config.js.map +1 -1
- package/dist/core/context-files.d.ts +16 -3
- package/dist/core/context-files.d.ts.map +1 -1
- package/dist/core/context-files.js +77 -6
- package/dist/core/context-files.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +18 -6
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +35 -19
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/plugins/install.d.ts +51 -10
- package/dist/core/extensions/plugins/install.d.ts.map +1 -1
- package/dist/core/extensions/plugins/install.js +178 -31
- package/dist/core/extensions/plugins/install.js.map +1 -1
- package/dist/core/extensions/plugins/listing.d.ts +8 -2
- package/dist/core/extensions/plugins/listing.d.ts.map +1 -1
- package/dist/core/extensions/plugins/listing.js +29 -5
- package/dist/core/extensions/plugins/listing.js.map +1 -1
- package/dist/core/extensions/plugins/locations.d.ts +62 -12
- package/dist/core/extensions/plugins/locations.d.ts.map +1 -1
- package/dist/core/extensions/plugins/locations.js +74 -18
- package/dist/core/extensions/plugins/locations.js.map +1 -1
- package/dist/core/extensions/plugins/marketplace.d.ts +29 -3
- package/dist/core/extensions/plugins/marketplace.d.ts.map +1 -1
- package/dist/core/extensions/plugins/marketplace.js +40 -7
- package/dist/core/extensions/plugins/marketplace.js.map +1 -1
- package/dist/core/extensions/plugins/trust.d.ts +56 -0
- package/dist/core/extensions/plugins/trust.d.ts.map +1 -0
- package/dist/core/extensions/plugins/trust.js +88 -0
- package/dist/core/extensions/plugins/trust.js.map +1 -0
- package/dist/core/learn/digest.d.ts +17 -0
- package/dist/core/learn/digest.d.ts.map +1 -0
- package/dist/core/learn/digest.js +131 -0
- package/dist/core/learn/digest.js.map +1 -0
- package/dist/core/learn/extract.d.ts +178 -0
- package/dist/core/learn/extract.d.ts.map +1 -0
- package/dist/core/learn/extract.js +705 -0
- package/dist/core/learn/extract.js.map +1 -0
- package/dist/core/learn/normalize.d.ts +65 -0
- package/dist/core/learn/normalize.d.ts.map +1 -0
- package/dist/core/learn/normalize.js +245 -0
- package/dist/core/learn/normalize.js.map +1 -0
- package/dist/core/learn/state.d.ts +115 -0
- package/dist/core/learn/state.d.ts.map +1 -0
- package/dist/core/learn/state.js +151 -0
- package/dist/core/learn/state.js.map +1 -0
- package/dist/core/settings-defaults.d.ts +6 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +6 -0
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +21 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +31 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +6 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/tools/plugins.d.ts.map +1 -1
- package/dist/core/tools/plugins.js +18 -3
- package/dist/core/tools/plugins.js.map +1 -1
- package/dist/extensions/core/hoo-core.d.ts.map +1 -1
- package/dist/extensions/core/hoo-core.js +2 -0
- package/dist/extensions/core/hoo-core.js.map +1 -1
- package/dist/extensions/core/learn.d.ts +22 -0
- package/dist/extensions/core/learn.d.ts.map +1 -0
- package/dist/extensions/core/learn.js +167 -0
- package/dist/extensions/core/learn.js.map +1 -0
- package/dist/extensions/core/marketplace.d.ts +7 -3
- package/dist/extensions/core/marketplace.d.ts.map +1 -1
- package/dist/extensions/core/marketplace.js +103 -11
- package/dist/extensions/core/marketplace.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +15 -2
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +6 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/resource-display.d.ts.map +1 -1
- package/dist/modes/interactive/resource-display.js +6 -1
- package/dist/modes/interactive/resource-display.js.map +1 -1
- package/docs/settings.md +31 -0
- package/docs/usage.md +64 -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/package.json +4 -4
package/docs/usage.md
CHANGED
|
@@ -47,6 +47,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
47
47
|
| `/fork` | Create a new session from a previous user message |
|
|
48
48
|
| `/clone` | Duplicate the current active branch into a new session |
|
|
49
49
|
| `/compact [prompt]` | Manually compact context, optionally with custom instructions |
|
|
50
|
+
| `/learn [all\|stats]` | Mine recent sessions for repeated directives, fixes, and workflows and promote them to `AGENTS.md` or a skill; `stats` reports what became of past proposals |
|
|
50
51
|
| `/copy` | Copy last assistant message to clipboard |
|
|
51
52
|
| `/export [file]` | Export session to HTML |
|
|
52
53
|
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
@@ -92,14 +93,75 @@ See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
|
|
|
92
93
|
|
|
93
94
|
## Context Files
|
|
94
95
|
|
|
95
|
-
HooCode loads `AGENTS.md` or `CLAUDE.md` at startup from:
|
|
96
|
+
HooCode loads `AGENTS.md` or `CLAUDE.md` at startup from, least specific first:
|
|
96
97
|
|
|
97
|
-
- `~/.
|
|
98
|
+
- `~/.agents/AGENTS.md` — the cross-vendor user scope, shared with other agent tools
|
|
99
|
+
- `~/.hoocode/agent/AGENTS.md` — hoocode's own global instructions, which win on conflict
|
|
98
100
|
- parent directories, walking up from the current working directory
|
|
99
101
|
- the current directory
|
|
100
102
|
|
|
103
|
+
Both user scopes are read additively: neither shadows the other, so an existing
|
|
104
|
+
`~/.hoocode` file keeps working when you add a `~/.agents` one.
|
|
105
|
+
|
|
101
106
|
Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
|
|
102
107
|
|
|
108
|
+
Context files are re-sent on **every** request, so their size is a recurring
|
|
109
|
+
cost. HooCode warns when one file grows past ~2k tokens, truncates it past ~10k,
|
|
110
|
+
and warns again when the set as a whole passes ~6k — trimming the least specific
|
|
111
|
+
scope first past ~16k. The startup listing shows the running total.
|
|
112
|
+
|
|
113
|
+
Long or conditional guidance belongs in a [skill](skills.md) instead: skills load
|
|
114
|
+
on demand, context files load always.
|
|
115
|
+
|
|
116
|
+
### Learning rules from your sessions
|
|
117
|
+
|
|
118
|
+
`/learn` reads recent session transcripts for this directory, and reports what
|
|
119
|
+
repeated:
|
|
120
|
+
|
|
121
|
+
- **Directives you restated** across sessions — candidate rules, with the count
|
|
122
|
+
that justifies them. An item marked `restated` is already covered by a rule
|
|
123
|
+
that is not working and wants rewriting, not duplicating.
|
|
124
|
+
- **Failures you resolved** — a command that failed, then later succeeded
|
|
125
|
+
unchanged, with the work in between.
|
|
126
|
+
- **Repeated tool sequences** — candidate skills. Only procedures qualify: a
|
|
127
|
+
sequence has to chain at least two distinct doing-commands (test then commit,
|
|
128
|
+
build then publish). The edit/test rhythm is one command and every rotation of
|
|
129
|
+
itself, so it is not reported.
|
|
130
|
+
|
|
131
|
+
It then proposes edits to the repo `AGENTS.md`, to `~/.agents/AGENTS.md` for
|
|
132
|
+
habits that travel with you, or as a new skill. Nothing is written without the
|
|
133
|
+
usual edit approval. Because it reads transcripts from disk rather than the live
|
|
134
|
+
conversation, it still works after the session has been compacted.
|
|
135
|
+
|
|
136
|
+
`/learn stats` reports what became of past proposals: how many were shown, and
|
|
137
|
+
what share of the directive proposals you actually wrote down. It reads the
|
|
138
|
+
history file rather than re-mining sessions, so it is instant.
|
|
139
|
+
|
|
140
|
+
Read the number carefully. Adoption is a proxy for usefulness, not ground truth
|
|
141
|
+
— a proposal you correctly rejected as not durable counts against it exactly like
|
|
142
|
+
a junk one. Near zero means the extractor is proposing the wrong things; near
|
|
143
|
+
100% means the bar is too low and everything is getting through. The trend
|
|
144
|
+
matters more than the value, and it is the fastest way to tell whether a change
|
|
145
|
+
to `learnMinRepeats` helped.
|
|
146
|
+
|
|
147
|
+
`/learn` remembers what it has already shown you, per directory. An item comes
|
|
148
|
+
back only once it recurs *after* it was last put in front of you — so a rule you
|
|
149
|
+
accepted is not re-proposed, and one you passed on does not reappear every run
|
|
150
|
+
unchanged. Something you keep saying anyway will return, which is the point: that
|
|
151
|
+
is the case where the existing rule is not working. Run `/learn all` to ignore
|
|
152
|
+
that memory and re-propose everything in the window.
|
|
153
|
+
|
|
154
|
+
An item shown before that still is not written down anywhere is flagged as
|
|
155
|
+
previously declined, so it is proposed tentatively rather than pressed a second
|
|
156
|
+
time. That inference reads context files and skills alike, so a proposal you
|
|
157
|
+
routed to `~/.agents/AGENTS.md` or turned into a skill both count as adopted.
|
|
158
|
+
|
|
159
|
+
When a directive is already covered by a **skill** and you keep asking for it by
|
|
160
|
+
hand, it comes back marked `has-skill` rather than as a new rule. That is a
|
|
161
|
+
triggering problem, not a missing rule: the skill's `description` frontmatter
|
|
162
|
+
probably does not describe the situation you were in, so sharpening it is the fix
|
|
163
|
+
rather than writing a rule that duplicates the skill.
|
|
164
|
+
|
|
103
165
|
### System Prompt Files
|
|
104
166
|
|
|
105
167
|
Replace the default system prompt with:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolisachint/hoocode-agent",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"hoocodeConfig": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"prepublishOnly": "npm run clean && npm run build"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kolisachint/hoocode-agent-core": "^0.5.
|
|
53
|
-
"@kolisachint/hoocode-ai": "^0.5.
|
|
54
|
-
"@kolisachint/hoocode-tui": "^0.5.
|
|
52
|
+
"@kolisachint/hoocode-agent-core": "^0.5.14",
|
|
53
|
+
"@kolisachint/hoocode-ai": "^0.5.14",
|
|
54
|
+
"@kolisachint/hoocode-tui": "^0.5.14",
|
|
55
55
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
56
56
|
"chalk": "^5.5.0",
|
|
57
57
|
"cli-highlight": "^2.1.11",
|