@kolisachint/hoocode-agent 0.4.20 → 0.4.23
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 +16 -0
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +5 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +2 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -9
- package/dist/config.js.map +1 -1
- package/dist/core/agent-frontmatter.d.ts +3 -0
- package/dist/core/agent-frontmatter.d.ts.map +1 -1
- package/dist/core/agent-frontmatter.js +41 -1
- package/dist/core/agent-frontmatter.js.map +1 -1
- package/dist/core/agent-manifest-paths.d.ts +17 -0
- package/dist/core/agent-manifest-paths.d.ts.map +1 -0
- package/dist/core/agent-manifest-paths.js +27 -0
- package/dist/core/agent-manifest-paths.js.map +1 -0
- package/dist/core/agent-registry.d.ts +14 -7
- package/dist/core/agent-registry.d.ts.map +1 -1
- package/dist/core/agent-registry.js +114 -8
- package/dist/core/agent-registry.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +9 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +26 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +8 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +2 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/package-manager.d.ts +2 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +38 -9
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader.d.ts +14 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +12 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +2 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/skills.d.ts +9 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +32 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/source-info.d.ts +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/subagent-pool-instance.d.ts +7 -0
- package/dist/core/subagent-pool-instance.d.ts.map +1 -1
- package/dist/core/subagent-pool-instance.js +14 -1
- package/dist/core/subagent-pool-instance.js.map +1 -1
- package/dist/core/subagent-pool.d.ts +10 -0
- package/dist/core/subagent-pool.d.ts.map +1 -1
- package/dist/core/subagent-pool.js +14 -2
- package/dist/core/subagent-pool.js.map +1 -1
- package/dist/core/system-prompt.d.ts +7 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +15 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +10 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +34 -0
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/extensions/core/hoo-core.d.ts +10 -3
- package/dist/extensions/core/hoo-core.d.ts.map +1 -1
- package/dist/extensions/core/hoo-core.js +254 -13
- package/dist/extensions/core/hoo-core.js.map +1 -1
- package/dist/init-templates.generated.d.ts.map +1 -1
- package/dist/init-templates.generated.js +5 -4
- package/dist/init-templates.generated.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +6 -2
- package/dist/init.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/ask-options.d.ts +44 -0
- package/dist/modes/interactive/components/ask-options.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-options.js +202 -0
- package/dist/modes/interactive/components/ask-options.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/task-panel.d.ts +15 -4
- package/dist/modes/interactive/components/task-panel.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-panel.js +178 -63
- package/dist/modes/interactive/components/task-panel.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +10 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +51 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +26 -0
- package/dist/modes/rpc/rpc-mode.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/examples/sdk/12-full-control.ts +2 -0
- package/package.json +4 -4
- package/templates/agents/doc.md +1 -1
- package/templates/agents/edit.md +1 -0
- package/templates/agents/explore.md +3 -3
- package/templates/agents/general-purpose.md +36 -0
- package/templates/agents/review.md +2 -2
|
@@ -18,6 +18,7 @@ import { clampThinkingLevel, cleanupSessionResources, getSupportedThinkingLevels
|
|
|
18
18
|
import { theme } from "../modes/interactive/theme/theme.js";
|
|
19
19
|
import { stripFrontmatter } from "../utils/frontmatter.js";
|
|
20
20
|
import { sleep } from "../utils/sleep.js";
|
|
21
|
+
import { loadAgentRegistry } from "./agent-registry.js";
|
|
21
22
|
import { formatNoApiKeyFoundMessage, formatNoModelSelectedMessage } from "./auth-guidance.js";
|
|
22
23
|
import { executeBashWithOperations } from "./bash-executor.js";
|
|
23
24
|
import { calculateContextTokens, collectEntriesForBranchSummary, compact, estimateContextTokens, generateBranchSummary, prepareCompaction, shouldCompact, } from "./compaction/index.js";
|
|
@@ -29,6 +30,7 @@ import { emitSessionShutdownEvent } from "./extensions/runner.js";
|
|
|
29
30
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
30
31
|
import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
|
|
31
32
|
import { createSyntheticSourceInfo } from "./source-info.js";
|
|
33
|
+
import { updateSubagentSkillPaths } from "./subagent-pool-instance.js";
|
|
32
34
|
import { buildSystemPrompt } from "./system-prompt.js";
|
|
33
35
|
import { createLocalBashOperations } from "./tools/bash.js";
|
|
34
36
|
import { createAllToolDefinitions } from "./tools/index.js";
|
|
@@ -118,6 +120,7 @@ export class AgentSession {
|
|
|
118
120
|
this.settingsManager = config.settingsManager;
|
|
119
121
|
this._scopedModels = config.scopedModels ?? [];
|
|
120
122
|
this._resourceLoader = config.resourceLoader;
|
|
123
|
+
updateSubagentSkillPaths(this._resourceLoader.getSkillPaths());
|
|
121
124
|
this._customTools = config.customTools ?? [];
|
|
122
125
|
this._cwd = config.cwd;
|
|
123
126
|
this._modelRegistry = config.modelRegistry;
|
|
@@ -663,9 +666,13 @@ export class AgentSession {
|
|
|
663
666
|
const appendSystemPrompt = loaderAppendSystemPrompt.length > 0 ? loaderAppendSystemPrompt.join("\n\n") : undefined;
|
|
664
667
|
const loadedSkills = this._resourceLoader.getSkills().skills;
|
|
665
668
|
const loadedContextFiles = this._resourceLoader.getAgentsFiles().agentsFiles;
|
|
669
|
+
// Include agents in the system prompt only when the Task tool is active.
|
|
670
|
+
const hasTaskTool = validToolNames.includes("Task");
|
|
671
|
+
const loadedAgents = hasTaskTool ? loadAgentRegistry({ cwd: this._cwd }).list() : [];
|
|
666
672
|
this._baseSystemPromptOptions = {
|
|
667
673
|
cwd: this._cwd,
|
|
668
674
|
skills: loadedSkills,
|
|
675
|
+
agents: loadedAgents,
|
|
669
676
|
contextFiles: loadedContextFiles,
|
|
670
677
|
customPrompt: loaderSystemPrompt,
|
|
671
678
|
appendSystemPrompt,
|
|
@@ -1588,6 +1595,7 @@ export class AgentSession {
|
|
|
1588
1595
|
themePaths: this.buildExtensionResourcePaths(themePaths),
|
|
1589
1596
|
};
|
|
1590
1597
|
this._resourceLoader.extendResources(extensionPaths);
|
|
1598
|
+
updateSubagentSkillPaths(this._resourceLoader.getSkillPaths());
|
|
1591
1599
|
this._baseSystemPrompt = this._rebuildSystemPrompt(this.getActiveToolNames());
|
|
1592
1600
|
this.agent.state.systemPrompt = this._baseSystemPrompt;
|
|
1593
1601
|
}
|
|
@@ -1850,6 +1858,7 @@ export class AgentSession {
|
|
|
1850
1858
|
await this.settingsManager.reload();
|
|
1851
1859
|
resetApiProviders();
|
|
1852
1860
|
await this._resourceLoader.reload();
|
|
1861
|
+
updateSubagentSkillPaths(this._resourceLoader.getSkillPaths());
|
|
1853
1862
|
this._buildRuntime({
|
|
1854
1863
|
activeToolNames: this.getActiveToolNames(),
|
|
1855
1864
|
flagValues: previousFlagValues,
|