@kolisachint/hoocode-agent 0.4.21 → 0.4.24
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 +21 -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 +23 -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/provider-health.d.ts +36 -0
- package/dist/core/provider-health.d.ts.map +1 -0
- package/dist/core/provider-health.js +54 -0
- package/dist/core/provider-health.js.map +1 -0
- 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 +16 -0
- package/dist/core/subagent-pool.d.ts.map +1 -1
- package/dist/core/subagent-pool.js +42 -2
- package/dist/core/subagent-pool.js.map +1 -1
- package/dist/core/subagent-result.d.ts.map +1 -1
- package/dist/core/subagent-result.js +32 -2
- package/dist/core/subagent-result.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/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +26 -0
- package/dist/core/tools/subagent.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 +50 -1
- 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 +37 -0
- package/templates/agents/review.md +2 -2
|
@@ -34,6 +34,7 @@ import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
|
34
34
|
import { ensureTool } from "../../utils/tools-manager.js";
|
|
35
35
|
import { checkForNewHooCodeVersion } from "../../utils/version-check.js";
|
|
36
36
|
import { ArminComponent } from "./components/armin.js";
|
|
37
|
+
import { AskOptionsComponent } from "./components/ask-options.js";
|
|
37
38
|
import { AssistantMessageComponent } from "./components/assistant-message.js";
|
|
38
39
|
import { BashExecutionComponent } from "./components/bash-execution.js";
|
|
39
40
|
import { BorderedLoader } from "./components/bordered-loader.js";
|
|
@@ -178,6 +179,7 @@ export class InteractiveMode {
|
|
|
178
179
|
// Extension UI state
|
|
179
180
|
extensionSelector = undefined;
|
|
180
181
|
extensionInput = undefined;
|
|
182
|
+
askOptions = undefined;
|
|
181
183
|
extensionEditor = undefined;
|
|
182
184
|
extensionTerminalInputUnsubscribers = new Set();
|
|
183
185
|
// Extension widgets (components rendered above/below the editor)
|
|
@@ -242,7 +244,7 @@ export class InteractiveMode {
|
|
|
242
244
|
this.footer = new FooterComponent(this.session, this.footerDataProvider);
|
|
243
245
|
this.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);
|
|
244
246
|
this.footerDataProvider.setSubagentEnabled(this.session.getActiveToolNames().includes("Task"));
|
|
245
|
-
this.taskPanel = new TaskPanelComponent();
|
|
247
|
+
this.taskPanel = new TaskPanelComponent(this.ui);
|
|
246
248
|
// Load hide thinking block setting
|
|
247
249
|
this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
|
|
248
250
|
// Register themes from resource loader and initialize
|
|
@@ -1428,6 +1430,9 @@ export class InteractiveMode {
|
|
|
1428
1430
|
if (this.extensionInput) {
|
|
1429
1431
|
this.hideExtensionInput();
|
|
1430
1432
|
}
|
|
1433
|
+
if (this.askOptions) {
|
|
1434
|
+
this.hideAskOptions();
|
|
1435
|
+
}
|
|
1431
1436
|
if (this.extensionEditor) {
|
|
1432
1437
|
this.hideExtensionEditor();
|
|
1433
1438
|
}
|
|
@@ -1568,6 +1573,7 @@ export class InteractiveMode {
|
|
|
1568
1573
|
select: (title, options, opts) => this.showExtensionSelector(title, options, opts),
|
|
1569
1574
|
confirm: (title, message, opts) => this.showExtensionConfirm(title, message, opts),
|
|
1570
1575
|
input: (title, placeholder, opts) => this.showExtensionInput(title, placeholder, opts),
|
|
1576
|
+
askOptions: (questions, opts) => this.showAskOptions(questions, opts),
|
|
1571
1577
|
notify: (message, type) => this.showExtensionNotify(message, type),
|
|
1572
1578
|
onTerminalInput: (handler) => this.addExtensionTerminalInputListener(handler),
|
|
1573
1579
|
setStatus: (key, text) => this.setExtensionStatus(key, text),
|
|
@@ -1664,6 +1670,48 @@ export class InteractiveMode {
|
|
|
1664
1670
|
this.ui.setFocus(this.editor);
|
|
1665
1671
|
this.ui.requestRender();
|
|
1666
1672
|
}
|
|
1673
|
+
/**
|
|
1674
|
+
* Show the options pane — the agent asking the user one or more questions.
|
|
1675
|
+
* Resolves with one answer per question, or undefined if skipped/aborted.
|
|
1676
|
+
*/
|
|
1677
|
+
showAskOptions(questions, opts) {
|
|
1678
|
+
return new Promise((resolve) => {
|
|
1679
|
+
if (!questions.length || opts?.signal?.aborted) {
|
|
1680
|
+
resolve(undefined);
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
const onAbort = () => {
|
|
1684
|
+
this.hideAskOptions();
|
|
1685
|
+
resolve(undefined);
|
|
1686
|
+
};
|
|
1687
|
+
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
1688
|
+
this.askOptions = new AskOptionsComponent(questions, (answers) => {
|
|
1689
|
+
opts?.signal?.removeEventListener("abort", onAbort);
|
|
1690
|
+
this.hideAskOptions();
|
|
1691
|
+
resolve(answers);
|
|
1692
|
+
}, () => {
|
|
1693
|
+
opts?.signal?.removeEventListener("abort", onAbort);
|
|
1694
|
+
this.hideAskOptions();
|
|
1695
|
+
resolve(undefined);
|
|
1696
|
+
});
|
|
1697
|
+
this.editorContainer.clear();
|
|
1698
|
+
this.editorContainer.addChild(this.askOptions);
|
|
1699
|
+
this.ui.setFocus(this.askOptions);
|
|
1700
|
+
this.ui.requestRender();
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* Hide the options pane and restore the editor.
|
|
1705
|
+
*/
|
|
1706
|
+
hideAskOptions() {
|
|
1707
|
+
if (!this.askOptions)
|
|
1708
|
+
return;
|
|
1709
|
+
this.editorContainer.clear();
|
|
1710
|
+
this.editorContainer.addChild(this.editor);
|
|
1711
|
+
this.askOptions = undefined;
|
|
1712
|
+
this.ui.setFocus(this.editor);
|
|
1713
|
+
this.ui.requestRender();
|
|
1714
|
+
}
|
|
1667
1715
|
/**
|
|
1668
1716
|
* Show a confirmation dialog for extensions.
|
|
1669
1717
|
*/
|
|
@@ -2701,6 +2749,7 @@ export class InteractiveMode {
|
|
|
2701
2749
|
// This prevents escape sequences from leaking to the parent shell over slow SSH.
|
|
2702
2750
|
await this.ui.terminal.drainInput(1000);
|
|
2703
2751
|
this.taskStoreUnsubscribe?.();
|
|
2752
|
+
this.taskPanel.dispose();
|
|
2704
2753
|
this.stop();
|
|
2705
2754
|
await this.runtimeHost.dispose();
|
|
2706
2755
|
process.exit(0);
|