@kolisachint/hoocode-agent 0.5.29 → 0.5.31

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 (74) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/dist/core/agent-selection-eval.d.ts +91 -0
  3. package/dist/core/agent-selection-eval.d.ts.map +1 -0
  4. package/dist/core/agent-selection-eval.js +186 -0
  5. package/dist/core/agent-selection-eval.js.map +1 -0
  6. package/dist/core/builtin-skills.d.ts +61 -0
  7. package/dist/core/builtin-skills.d.ts.map +1 -0
  8. package/dist/core/builtin-skills.js +106 -0
  9. package/dist/core/builtin-skills.js.map +1 -0
  10. package/dist/core/extensions/plugins/default-marketplace/.agents-plugin/marketplace.json +5 -1
  11. package/dist/core/extensions/plugins/trigger-judge.d.ts +42 -0
  12. package/dist/core/extensions/plugins/trigger-judge.d.ts.map +1 -0
  13. package/dist/core/extensions/plugins/trigger-judge.js +121 -0
  14. package/dist/core/extensions/plugins/trigger-judge.js.map +1 -0
  15. package/dist/core/external-tools.d.ts +67 -0
  16. package/dist/core/external-tools.d.ts.map +1 -0
  17. package/dist/core/external-tools.js +120 -0
  18. package/dist/core/external-tools.js.map +1 -0
  19. package/dist/core/light.d.ts +9 -0
  20. package/dist/core/light.d.ts.map +1 -1
  21. package/dist/core/light.js +12 -4
  22. package/dist/core/light.js.map +1 -1
  23. package/dist/core/mode-prompts.d.ts +15 -3
  24. package/dist/core/mode-prompts.d.ts.map +1 -1
  25. package/dist/core/mode-prompts.js +17 -29
  26. package/dist/core/mode-prompts.js.map +1 -1
  27. package/dist/core/tools/propose-plugin.d.ts.map +1 -1
  28. package/dist/core/tools/propose-plugin.js +7 -7
  29. package/dist/core/tools/propose-plugin.js.map +1 -1
  30. package/dist/core/tools/subagent.d.ts +7 -1
  31. package/dist/core/tools/subagent.d.ts.map +1 -1
  32. package/dist/core/tools/subagent.js +12 -24
  33. package/dist/core/tools/subagent.js.map +1 -1
  34. package/dist/extensions/core/modes.d.ts.map +1 -1
  35. package/dist/extensions/core/modes.js +21 -23
  36. package/dist/extensions/core/modes.js.map +1 -1
  37. package/dist/extensions/core/scaffold.d.ts.map +1 -1
  38. package/dist/extensions/core/scaffold.js +28 -24
  39. package/dist/extensions/core/scaffold.js.map +1 -1
  40. package/dist/init-templates.generated.d.ts +3 -0
  41. package/dist/init-templates.generated.d.ts.map +1 -1
  42. package/dist/init-templates.generated.js +12 -0
  43. package/dist/init-templates.generated.js.map +1 -1
  44. package/dist/main.d.ts.map +1 -1
  45. package/dist/main.js +14 -1
  46. package/dist/main.js.map +1 -1
  47. package/dist/modes/interactive/components/settings-selector.d.ts +27 -0
  48. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  49. package/dist/modes/interactive/components/settings-selector.js +256 -45
  50. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  51. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  52. package/dist/modes/interactive/interactive-mode.js +26 -1
  53. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  54. package/dist/utils/tools-manager.d.ts +30 -0
  55. package/dist/utils/tools-manager.d.ts.map +1 -1
  56. package/dist/utils/tools-manager.js +35 -0
  57. package/dist/utils/tools-manager.js.map +1 -1
  58. package/docs/modes.md +4 -0
  59. package/docs/plugins.md +10 -0
  60. package/docs/settings.md +63 -0
  61. package/docs/skills.md +30 -0
  62. package/docs/usage.md +3 -3
  63. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  64. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  65. package/examples/extensions/sandbox/package.json +1 -1
  66. package/examples/extensions/with-deps/package.json +1 -1
  67. package/package.json +5 -4
  68. package/templates/prompts/grill-bridge.md +1 -0
  69. package/templates/prompts/grill-me.md +7 -0
  70. package/templates/prompts/grill-plan.md +9 -0
  71. package/templates/prompts/task-background-agents.md +2 -0
  72. package/templates/prompts/task-background-none.md +1 -0
  73. package/templates/prompts/task-main.md +19 -0
  74. package/templates/skills/plugin-authoring/SKILL.md +81 -0
@@ -18,10 +18,12 @@ import { canvasSearchRoots, discoverCanvasExtensions } from "../../core/canvas/d
18
18
  import { pluginCanvasExtensions } from "../../core/canvas/plugin-canvases.js";
19
19
  import { gateCanvasExtensions } from "../../core/canvas/trust.js";
20
20
  import { getWorkspacePlatforms, setPlatforms } from "../../core/extensions/plugins/formats/platform-targets.js";
21
+ import { describeExternalTools } from "../../core/external-tools.js";
21
22
  import { FooterDataProvider } from "../../core/footer-data-provider.js";
22
23
  import { formatDurationSecs } from "../../core/format-duration.js";
23
24
  import { formatTokens } from "../../core/format-tokens.js";
24
25
  import { KeybindingsManager } from "../../core/keybindings.js";
26
+ import { measurePromptSurface, measureToolSchemaTokens } from "../../core/light.js";
25
27
  import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
26
28
  import { SessionManager } from "../../core/session-manager.js";
27
29
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
@@ -2705,7 +2707,16 @@ export class InteractiveMode {
2705
2707
  // Union so tools disabled at startup (absent from the live registry) still
2706
2708
  // appear and can be re-enabled for the next session.
2707
2709
  const toolToggleNames = [...new Set([...builtinToolNames, ...disabledToolNames])].sort();
2708
- const toolToggles = toolToggleNames.map((name) => ({ name, enabled: !disabledToolNames.has(name) }));
2710
+ // Price every tool the pane lists, including the ones that are off: what
2711
+ // the row needs to show is what turning it back on will cost per turn. A
2712
+ // tool disabled before launch has no schema in this session, so it has no
2713
+ // price to show either.
2714
+ const schemaTokens = new Map(this.session.getAllTools().map((tool) => [tool.name, measureToolSchemaTokens(tool)]));
2715
+ const toolToggles = toolToggleNames.map((name) => ({
2716
+ name,
2717
+ enabled: !disabledToolNames.has(name),
2718
+ tokens: schemaTokens.get(name),
2719
+ }));
2709
2720
  const toolGroups = [
2710
2721
  {
2711
2722
  id: "web",
@@ -2732,6 +2743,10 @@ export class InteractiveMode {
2732
2743
  autoCompact: this.session.autoCompactionEnabled,
2733
2744
  tools: toolToggles,
2734
2745
  toolGroups,
2746
+ // Resolved fresh on every open, never downloaded: a binary that
2747
+ // arrived since the last open (a startup fetch, a `brew install`)
2748
+ // shows as present without a restart.
2749
+ externalTools: describeExternalTools(),
2735
2750
  flags,
2736
2751
  toolOutputDisplay: this.toolOutputDisplay,
2737
2752
  toolOutputMaxBytes: this.settingsManager.getToolOutputMaxBytes(),
@@ -2742,6 +2757,7 @@ export class InteractiveMode {
2742
2757
  autoResizeImages: this.settingsManager.getImageAutoResize(),
2743
2758
  blockImages: this.settingsManager.getBlockImages(),
2744
2759
  enableSkillCommands: this.settingsManager.getEnableSkillCommands(),
2760
+ light: this.settingsManager.getLight(),
2745
2761
  pluginInstallScope: this.settingsManager.getPluginInstallScope(),
2746
2762
  enablePluginTools: this.settingsManager.getEnablePluginTools(),
2747
2763
  // Rows write the user settings file, so a key the project file also
@@ -2776,6 +2792,10 @@ export class InteractiveMode {
2776
2792
  webtoolsTimeoutSecs: this.settingsManager.getWebtoolsTimeoutSecs(),
2777
2793
  // The effective window, so a project settings.json narrowing it for
2778
2794
  // this repo shows up here rather than the user-scope value alone.
2795
+ // Re-measured on every change so the pane can price what a toggle did:
2796
+ // the session rebuilds its system prompt as tools come and go, and
2797
+ // this reads that live state rather than a snapshot.
2798
+ measureTokenSurface: () => measurePromptSurface(this.session),
2779
2799
  learn: (() => {
2780
2800
  const learn = this.settingsManager.getLearnSettings();
2781
2801
  return {
@@ -2879,6 +2899,11 @@ export class InteractiveMode {
2879
2899
  this.settingsManager.setEnableSkillCommands(enabled);
2880
2900
  this.setupAutocompleteProvider();
2881
2901
  },
2902
+ onLightChange: (enabled) => {
2903
+ // Picks the tool set and the system prompt at startup, so it binds
2904
+ // on the next session rather than this one.
2905
+ this.settingsManager.setLight(enabled);
2906
+ },
2882
2907
  onPluginInstallScopeChange: (scope) => {
2883
2908
  // Read per install by InstallPlugin, so it applies immediately with
2884
2909
  // nothing to reload.