@kolisachint/hoocode-agent 0.4.75 → 0.4.77

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 (60) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/core/agent-session.d.ts.map +1 -1
  3. package/dist/core/agent-session.js +7 -1
  4. package/dist/core/agent-session.js.map +1 -1
  5. package/dist/core/exec.d.ts.map +1 -1
  6. package/dist/core/exec.js +13 -4
  7. package/dist/core/exec.js.map +1 -1
  8. package/dist/core/session-manager.d.ts.map +1 -1
  9. package/dist/core/session-manager.js +16 -3
  10. package/dist/core/session-manager.js.map +1 -1
  11. package/dist/core/subagent-pool.d.ts.map +1 -1
  12. package/dist/core/subagent-pool.js +6 -1
  13. package/dist/core/subagent-pool.js.map +1 -1
  14. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  15. package/dist/core/tools/edit-diff.js +97 -37
  16. package/dist/core/tools/edit-diff.js.map +1 -1
  17. package/dist/core/tools/fd-utils.d.ts +23 -0
  18. package/dist/core/tools/fd-utils.d.ts.map +1 -0
  19. package/dist/core/tools/fd-utils.js +47 -0
  20. package/dist/core/tools/fd-utils.js.map +1 -0
  21. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
  22. package/dist/core/tools/file-mutation-queue.js +15 -2
  23. package/dist/core/tools/file-mutation-queue.js.map +1 -1
  24. package/dist/core/tools/find.d.ts.map +1 -1
  25. package/dist/core/tools/find.js +3 -24
  26. package/dist/core/tools/find.js.map +1 -1
  27. package/dist/core/tools/glob.d.ts.map +1 -1
  28. package/dist/core/tools/glob.js +3 -19
  29. package/dist/core/tools/glob.js.map +1 -1
  30. package/dist/core/tools/grep.d.ts.map +1 -1
  31. package/dist/core/tools/grep.js +30 -18
  32. package/dist/core/tools/grep.js.map +1 -1
  33. package/dist/core/tools/ls.d.ts +12 -1
  34. package/dist/core/tools/ls.d.ts.map +1 -1
  35. package/dist/core/tools/ls.js +58 -33
  36. package/dist/core/tools/ls.js.map +1 -1
  37. package/dist/core/tools/output-accumulator.d.ts +1 -0
  38. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  39. package/dist/core/tools/output-accumulator.js +36 -24
  40. package/dist/core/tools/output-accumulator.js.map +1 -1
  41. package/dist/core/tools/read.d.ts.map +1 -1
  42. package/dist/core/tools/read.js +5 -0
  43. package/dist/core/tools/read.js.map +1 -1
  44. package/dist/core/tools/render-utils.d.ts.map +1 -1
  45. package/dist/core/tools/render-utils.js +9 -2
  46. package/dist/core/tools/render-utils.js.map +1 -1
  47. package/dist/core/tools/write.d.ts.map +1 -1
  48. package/dist/core/tools/write.js +4 -1
  49. package/dist/core/tools/write.js.map +1 -1
  50. package/dist/modes/interactive/components/task-panel.d.ts.map +1 -1
  51. package/dist/modes/interactive/components/task-panel.js +6 -2
  52. package/dist/modes/interactive/components/task-panel.js.map +1 -1
  53. package/dist/utils/tools-manager.d.ts.map +1 -1
  54. package/dist/utils/tools-manager.js +16 -0
  55. package/dist/utils/tools-manager.js.map +1 -1
  56. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  57. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  58. package/examples/extensions/sandbox/package.json +1 -1
  59. package/examples/extensions/with-deps/package.json +1 -1
  60. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.77] - 2026-06-21
4
+
5
+ ## [0.4.76] - 2026-06-21
6
+
7
+ ### Fixed
8
+
9
+ - Tool calls that shell out to `fd`/`rg` (`grep`, `find`, `glob`) no longer
10
+ re-run a synchronous `spawnSync(<tool>, ["--version"])` probe on every
11
+ invocation. When a tool resolves from `PATH` instead of `~/.hoocode/bin`,
12
+ this blocking probe ran on each call and stalled the event loop; the resolved
13
+ path is now cached for the process lifetime.
14
+ - `ls` tool uses `readdir` with `{ withFileTypes: true }` on the default local
15
+ filesystem backend, replacing N sequential `stat()` syscalls with a single
16
+ `readdir` call that returns file type info inline. Extension backends that
17
+ only implement the existing `readdir` string return continue to work via the
18
+ fallback path.
19
+ - `grep` tool output now shows each filename once per file instead of repeating
20
+ it on every matching line, reducing token usage for multi-file matches.
21
+ - `edit` tool now matches blocks even when leading indentation differs (for
22
+ example the model emits 2-space indentation against a tab-indented file). A
23
+ third indentation-tolerant matching tier runs only after exact and fuzzy
24
+ matching fail, comparing whole lines with leading/trailing whitespace ignored,
25
+ while keeping the uniqueness guardrail and replacing in the original content so
26
+ surrounding formatting is preserved. This addresses frequent "Could not find
27
+ the exact text" failures caused by whitespace drift.
28
+ - `edit` tool no longer re-normalizes the entire file just to count occurrences
29
+ on the exact-match path; occurrence counting now reuses the resolved match
30
+ spans.
31
+ - File mutation queue caches resolved realpaths instead of running a blocking
32
+ `realpathSync.native` syscall on every edit/write.
33
+ - `read` tool reuses the original file string for whole-file reads instead of
34
+ splitting into lines and rejoining them.
35
+ - `write` tool reports the actual UTF-8 byte count instead of the JavaScript
36
+ string length (which differs for multibyte content).
37
+ - `OutputAccumulator.snapshot()` caches its result and invalidates the cache
38
+ only when new output is appended or the stream finishes, so the streaming UI's
39
+ timer-driven polling no longer re-runs tail truncation/compression on every
40
+ tick when no new data has arrived.
41
+ - `execCommand` (extension command helper) now decodes child process output with
42
+ streaming `TextDecoder`s and joins collected chunks, fixing corruption of
43
+ multibyte UTF-8 sequences split across chunk boundaries and avoiding quadratic
44
+ string concatenation for large output.
45
+ - Hoisted the retryable-error regex (`agent-session`) and the inherited-model
46
+ fallback regex (`subagent-pool`) to module-level constants so they are compiled
47
+ once instead of on every error check.
48
+ - Session tree sorting parses each entry timestamp once (decorate-sort-undecorate)
49
+ instead of allocating two `Date` objects per comparison.
50
+ - Branch-session label creation reuses a single collision-id set instead of
51
+ rebuilding a `Set` on every label iteration.
52
+ - `getTextOutput` partitions tool result content in a single pass instead of
53
+ filtering the same array twice.
54
+
55
+ ### Changed
56
+
57
+ - Extracted the duplicated fd path-normalization and glob-argument helpers from
58
+ `find` and `glob` into a shared `fd-utils.ts` module.
59
+
3
60
  ## [0.4.75] - 2026-06-21
4
61
 
5
62
  ## [0.4.74] - 2026-06-21