@kolisachint/hoocode-agent 0.4.74 → 0.4.76
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 +57 -0
- package/dist/cli/args.d.ts +0 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +0 -11
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-frontmatter.d.ts.map +1 -1
- package/dist/core/agent-frontmatter.js +2 -2
- package/dist/core/agent-frontmatter.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +0 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +0 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -17
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +10 -199
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +7 -4
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +8 -5
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +13 -4
- package/dist/core/exec.js.map +1 -1
- package/dist/core/model-categories.d.ts +28 -0
- package/dist/core/model-categories.d.ts.map +1 -0
- package/dist/core/model-categories.js +51 -0
- package/dist/core/model-categories.js.map +1 -0
- package/dist/core/model-registry.d.ts +0 -6
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +0 -32
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/sdk.d.ts +0 -6
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +0 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +16 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/subagent-pool-instance.d.ts.map +1 -1
- package/dist/core/subagent-pool-instance.js +9 -1
- package/dist/core/subagent-pool-instance.js.map +1 -1
- package/dist/core/subagent-pool.d.ts +5 -0
- package/dist/core/subagent-pool.d.ts.map +1 -1
- package/dist/core/subagent-pool.js +13 -2
- package/dist/core/subagent-pool.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +3 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +132 -40
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +7 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/fd-utils.d.ts +23 -0
- package/dist/core/tools/fd-utils.d.ts.map +1 -0
- package/dist/core/tools/fd-utils.js +47 -0
- package/dist/core/tools/fd-utils.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js +15 -2
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +3 -24
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/glob.d.ts +42 -0
- package/dist/core/tools/glob.d.ts.map +1 -0
- package/dist/core/tools/glob.js +432 -0
- package/dist/core/tools/glob.js.map +1 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +34 -19
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +13 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +12 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +58 -33
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +4 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +39 -20
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/output-compression.d.ts +53 -0
- package/dist/core/tools/output-compression.d.ts.map +1 -0
- package/dist/core/tools/output-compression.js +392 -0
- package/dist/core/tools/output-compression.js.map +1 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +9 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +9 -2
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +4 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +0 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +2 -2
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/task-panel.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-panel.js +10 -26
- package/dist/modes/interactive/components/task-panel.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +16 -0
- package/dist/utils/tools-manager.js.map +1 -1
- 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/templates/agents/explore.md +1 -1
- package/templates/agents/general-purpose.md +1 -1
- package/templates/agents/plan.md +1 -1
- package/dist/core/routing/local-inference.d.ts +0 -128
- package/dist/core/routing/local-inference.d.ts.map +0 -1
- package/dist/core/routing/local-inference.js +0 -145
- package/dist/core/routing/local-inference.js.map +0 -1
- package/dist/core/routing/metrics.d.ts +0 -27
- package/dist/core/routing/metrics.d.ts.map +0 -1
- package/dist/core/routing/metrics.js +0 -35
- package/dist/core/routing/metrics.js.map +0 -1
- package/dist/core/routing/mlx-server.d.ts +0 -43
- package/dist/core/routing/mlx-server.d.ts.map +0 -1
- package/dist/core/routing/mlx-server.js +0 -115
- package/dist/core/routing/mlx-server.js.map +0 -1
- package/dist/core/routing/tool-result-prompts.d.ts +0 -26
- package/dist/core/routing/tool-result-prompts.d.ts.map +0 -1
- package/dist/core/routing/tool-result-prompts.js +0 -45
- package/dist/core/routing/tool-result-prompts.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-result-prompts.d.ts","sourceRoot":"","sources":["../../../src/core/routing/tool-result-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,yBAAyB,QAEkD,CAAC;AAWzF,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExE;AAED,gEAAgE;AAChE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI1F;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKnD","sourcesContent":["/**\n * Validated per-tool extractive compression prompts.\n *\n * These prompts were validated against Qwen3-4B (see\n * docs/local-executor-routing.md). Only `bash` output compresses safely: its\n * verbose output is mostly low-value noise (progress/passing lines) around a\n * few load-bearing facts (errors, counts, exit codes). `read` was removed after\n * measurement showed ~0% reduction on real source code (every line is a\n * keep-line). Fact-list outputs (grep/find/ls) are intentionally excluded:\n * every line is a distinct fact, so compression drops matches.\n *\n * The prompt is extractive (keep identifiers, drop only redundant filler),\n * not abstractive (rewrite in prose), which is what made retention reliable.\n */\n\nexport const TOOL_RESULT_SYSTEM_PROMPT =\n\t\"You compress tool output for another AI to consume. Be extractive: keep exact identifiers, \" +\n\t\"never paraphrase facts, and never invent anything. Output only the compressed result.\";\n\nconst BASH_PROMPT =\n\t\"Compress this command output. Keep ONLY: the command, every error/warning with its file:line:col \" +\n\t\"and code, and any final counts/timings/exit code. Drop progress bars, info lines, and passing/OK \" +\n\t\"lines. Keep all numbers and paths exactly. No prose.\";\n\nconst TOOL_RESULT_PROMPTS: Record<string, string> = {\n\tbash: BASH_PROMPT,\n};\n\n/** Get the extractive compression prompt for a tool, or undefined if not compressible. */\nexport function getToolResultPrompt(toolName: string): string | undefined {\n\treturn TOOL_RESULT_PROMPTS[toolName];\n}\n\n/** Build the full prompt text for compressing a tool result. */\nexport function buildToolResultPrompt(toolName: string, output: string): string | undefined {\n\tconst instruction = getToolResultPrompt(toolName);\n\tif (!instruction) return undefined;\n\treturn `${instruction}\\n\\n${output}`;\n}\n\n/**\n * Remove reasoning-model `<think>...</think>` blocks (including empty ones that\n * Qwen3 emits even under `/no_think`) and trim the result. Reasoning models\n * leave these tags in the text stream; they must not leak into context.\n */\nexport function stripThinkTags(text: string): string {\n\treturn text\n\t\t.replace(/<think>[\\s\\S]*?<\\/think>/g, \"\")\n\t\t.replace(/<\\/?think>/g, \"\")\n\t\t.trim();\n}\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validated per-tool extractive compression prompts.
|
|
3
|
-
*
|
|
4
|
-
* These prompts were validated against Qwen3-4B (see
|
|
5
|
-
* docs/local-executor-routing.md). Only `bash` output compresses safely: its
|
|
6
|
-
* verbose output is mostly low-value noise (progress/passing lines) around a
|
|
7
|
-
* few load-bearing facts (errors, counts, exit codes). `read` was removed after
|
|
8
|
-
* measurement showed ~0% reduction on real source code (every line is a
|
|
9
|
-
* keep-line). Fact-list outputs (grep/find/ls) are intentionally excluded:
|
|
10
|
-
* every line is a distinct fact, so compression drops matches.
|
|
11
|
-
*
|
|
12
|
-
* The prompt is extractive (keep identifiers, drop only redundant filler),
|
|
13
|
-
* not abstractive (rewrite in prose), which is what made retention reliable.
|
|
14
|
-
*/
|
|
15
|
-
export const TOOL_RESULT_SYSTEM_PROMPT = "You compress tool output for another AI to consume. Be extractive: keep exact identifiers, " +
|
|
16
|
-
"never paraphrase facts, and never invent anything. Output only the compressed result.";
|
|
17
|
-
const BASH_PROMPT = "Compress this command output. Keep ONLY: the command, every error/warning with its file:line:col " +
|
|
18
|
-
"and code, and any final counts/timings/exit code. Drop progress bars, info lines, and passing/OK " +
|
|
19
|
-
"lines. Keep all numbers and paths exactly. No prose.";
|
|
20
|
-
const TOOL_RESULT_PROMPTS = {
|
|
21
|
-
bash: BASH_PROMPT,
|
|
22
|
-
};
|
|
23
|
-
/** Get the extractive compression prompt for a tool, or undefined if not compressible. */
|
|
24
|
-
export function getToolResultPrompt(toolName) {
|
|
25
|
-
return TOOL_RESULT_PROMPTS[toolName];
|
|
26
|
-
}
|
|
27
|
-
/** Build the full prompt text for compressing a tool result. */
|
|
28
|
-
export function buildToolResultPrompt(toolName, output) {
|
|
29
|
-
const instruction = getToolResultPrompt(toolName);
|
|
30
|
-
if (!instruction)
|
|
31
|
-
return undefined;
|
|
32
|
-
return `${instruction}\n\n${output}`;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Remove reasoning-model `<think>...</think>` blocks (including empty ones that
|
|
36
|
-
* Qwen3 emits even under `/no_think`) and trim the result. Reasoning models
|
|
37
|
-
* leave these tags in the text stream; they must not leak into context.
|
|
38
|
-
*/
|
|
39
|
-
export function stripThinkTags(text) {
|
|
40
|
-
return text
|
|
41
|
-
.replace(/<think>[\s\S]*?<\/think>/g, "")
|
|
42
|
-
.replace(/<\/?think>/g, "")
|
|
43
|
-
.trim();
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=tool-result-prompts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-result-prompts.js","sourceRoot":"","sources":["../../../src/core/routing/tool-result-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GACrC,6FAA6F;IAC7F,uFAAuF,CAAC;AAEzF,MAAM,WAAW,GAChB,mGAAmG;IACnG,mGAAmG;IACnG,sDAAsD,CAAC;AAExD,MAAM,mBAAmB,GAA2B;IACnD,IAAI,EAAE,WAAW;CACjB,CAAC;AAEF,0FAA0F;AAC1F,MAAM,UAAU,mBAAmB,CAAC,QAAgB,EAAsB;IACzE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAAA,CACrC;AAED,gEAAgE;AAChE,MAAM,UAAU,qBAAqB,CAAC,QAAgB,EAAE,MAAc,EAAsB;IAC3F,MAAM,WAAW,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,IAAI,CAAC,WAAW;QAAE,OAAO,SAAS,CAAC;IACnC,OAAO,GAAG,WAAW,OAAO,MAAM,EAAE,CAAC;AAAA,CACrC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAU;IACpD,OAAO,IAAI;SACT,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC;SACxC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,IAAI,EAAE,CAAC;AAAA,CACT","sourcesContent":["/**\n * Validated per-tool extractive compression prompts.\n *\n * These prompts were validated against Qwen3-4B (see\n * docs/local-executor-routing.md). Only `bash` output compresses safely: its\n * verbose output is mostly low-value noise (progress/passing lines) around a\n * few load-bearing facts (errors, counts, exit codes). `read` was removed after\n * measurement showed ~0% reduction on real source code (every line is a\n * keep-line). Fact-list outputs (grep/find/ls) are intentionally excluded:\n * every line is a distinct fact, so compression drops matches.\n *\n * The prompt is extractive (keep identifiers, drop only redundant filler),\n * not abstractive (rewrite in prose), which is what made retention reliable.\n */\n\nexport const TOOL_RESULT_SYSTEM_PROMPT =\n\t\"You compress tool output for another AI to consume. Be extractive: keep exact identifiers, \" +\n\t\"never paraphrase facts, and never invent anything. Output only the compressed result.\";\n\nconst BASH_PROMPT =\n\t\"Compress this command output. Keep ONLY: the command, every error/warning with its file:line:col \" +\n\t\"and code, and any final counts/timings/exit code. Drop progress bars, info lines, and passing/OK \" +\n\t\"lines. Keep all numbers and paths exactly. No prose.\";\n\nconst TOOL_RESULT_PROMPTS: Record<string, string> = {\n\tbash: BASH_PROMPT,\n};\n\n/** Get the extractive compression prompt for a tool, or undefined if not compressible. */\nexport function getToolResultPrompt(toolName: string): string | undefined {\n\treturn TOOL_RESULT_PROMPTS[toolName];\n}\n\n/** Build the full prompt text for compressing a tool result. */\nexport function buildToolResultPrompt(toolName: string, output: string): string | undefined {\n\tconst instruction = getToolResultPrompt(toolName);\n\tif (!instruction) return undefined;\n\treturn `${instruction}\\n\\n${output}`;\n}\n\n/**\n * Remove reasoning-model `<think>...</think>` blocks (including empty ones that\n * Qwen3 emits even under `/no_think`) and trim the result. Reasoning models\n * leave these tags in the text stream; they must not leak into context.\n */\nexport function stripThinkTags(text: string): string {\n\treturn text\n\t\t.replace(/<think>[\\s\\S]*?<\\/think>/g, \"\")\n\t\t.replace(/<\\/?think>/g, \"\")\n\t\t.trim();\n}\n"]}
|