@kolisachint/hoocode-agent 0.5.28 → 0.5.30
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 +71 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/core/light.d.ts +9 -0
- package/dist/core/light.d.ts.map +1 -1
- package/dist/core/light.js +12 -4
- package/dist/core/light.js.map +1 -1
- package/dist/core/settings-manager.d.ts +8 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +12 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -5
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +31 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +245 -51
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +43 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/plugins.md +3 -2
- package/docs/settings.md +64 -0
- package/docs/usage.md +3 -3
- 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
|
@@ -17,10 +17,12 @@ import { sumAssistantUsage } from "../../core/agent-session-stats.js";
|
|
|
17
17
|
import { canvasSearchRoots, discoverCanvasExtensions } from "../../core/canvas/discovery.js";
|
|
18
18
|
import { pluginCanvasExtensions } from "../../core/canvas/plugin-canvases.js";
|
|
19
19
|
import { gateCanvasExtensions } from "../../core/canvas/trust.js";
|
|
20
|
+
import { getWorkspacePlatforms, setPlatforms } from "../../core/extensions/plugins/formats/platform-targets.js";
|
|
20
21
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
21
22
|
import { formatDurationSecs } from "../../core/format-duration.js";
|
|
22
23
|
import { formatTokens } from "../../core/format-tokens.js";
|
|
23
24
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
25
|
+
import { measurePromptSurface, measureToolSchemaTokens } from "../../core/light.js";
|
|
24
26
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
25
27
|
import { SessionManager } from "../../core/session-manager.js";
|
|
26
28
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
@@ -2704,7 +2706,16 @@ export class InteractiveMode {
|
|
|
2704
2706
|
// Union so tools disabled at startup (absent from the live registry) still
|
|
2705
2707
|
// appear and can be re-enabled for the next session.
|
|
2706
2708
|
const toolToggleNames = [...new Set([...builtinToolNames, ...disabledToolNames])].sort();
|
|
2707
|
-
|
|
2709
|
+
// Price every tool the pane lists, including the ones that are off: what
|
|
2710
|
+
// the row needs to show is what turning it back on will cost per turn. A
|
|
2711
|
+
// tool disabled before launch has no schema in this session, so it has no
|
|
2712
|
+
// price to show either.
|
|
2713
|
+
const schemaTokens = new Map(this.session.getAllTools().map((tool) => [tool.name, measureToolSchemaTokens(tool)]));
|
|
2714
|
+
const toolToggles = toolToggleNames.map((name) => ({
|
|
2715
|
+
name,
|
|
2716
|
+
enabled: !disabledToolNames.has(name),
|
|
2717
|
+
tokens: schemaTokens.get(name),
|
|
2718
|
+
}));
|
|
2708
2719
|
const toolGroups = [
|
|
2709
2720
|
{
|
|
2710
2721
|
id: "web",
|
|
@@ -2741,7 +2752,15 @@ export class InteractiveMode {
|
|
|
2741
2752
|
autoResizeImages: this.settingsManager.getImageAutoResize(),
|
|
2742
2753
|
blockImages: this.settingsManager.getBlockImages(),
|
|
2743
2754
|
enableSkillCommands: this.settingsManager.getEnableSkillCommands(),
|
|
2755
|
+
light: this.settingsManager.getLight(),
|
|
2744
2756
|
pluginInstallScope: this.settingsManager.getPluginInstallScope(),
|
|
2757
|
+
enablePluginTools: this.settingsManager.getEnablePluginTools(),
|
|
2758
|
+
// Rows write the user settings file, so a key the project file also
|
|
2759
|
+
// sets is merged back over it next session. The pane says which.
|
|
2760
|
+
projectPinnedSettings: Object.keys(this.settingsManager.getProjectSettings()),
|
|
2761
|
+
// The targets actually in force, so a session launched with --platform
|
|
2762
|
+
// shows what it is writing rather than the (possibly unset) setting.
|
|
2763
|
+
platform: getWorkspacePlatforms() ?? [],
|
|
2745
2764
|
steeringMode: this.session.steeringMode,
|
|
2746
2765
|
followUpMode: this.session.followUpMode,
|
|
2747
2766
|
transport: this.settingsManager.getTransport(),
|
|
@@ -2768,6 +2787,10 @@ export class InteractiveMode {
|
|
|
2768
2787
|
webtoolsTimeoutSecs: this.settingsManager.getWebtoolsTimeoutSecs(),
|
|
2769
2788
|
// The effective window, so a project settings.json narrowing it for
|
|
2770
2789
|
// this repo shows up here rather than the user-scope value alone.
|
|
2790
|
+
// Re-measured on every change so the pane can price what a toggle did:
|
|
2791
|
+
// the session rebuilds its system prompt as tools come and go, and
|
|
2792
|
+
// this reads that live state rather than a snapshot.
|
|
2793
|
+
measureTokenSurface: () => measurePromptSurface(this.session),
|
|
2771
2794
|
learn: (() => {
|
|
2772
2795
|
const learn = this.settingsManager.getLearnSettings();
|
|
2773
2796
|
return {
|
|
@@ -2871,11 +2894,30 @@ export class InteractiveMode {
|
|
|
2871
2894
|
this.settingsManager.setEnableSkillCommands(enabled);
|
|
2872
2895
|
this.setupAutocompleteProvider();
|
|
2873
2896
|
},
|
|
2897
|
+
onLightChange: (enabled) => {
|
|
2898
|
+
// Picks the tool set and the system prompt at startup, so it binds
|
|
2899
|
+
// on the next session rather than this one.
|
|
2900
|
+
this.settingsManager.setLight(enabled);
|
|
2901
|
+
},
|
|
2874
2902
|
onPluginInstallScopeChange: (scope) => {
|
|
2875
2903
|
// Read per install by InstallPlugin, so it applies immediately with
|
|
2876
2904
|
// nothing to reload.
|
|
2877
2905
|
this.settingsManager.setPluginInstallScope(scope);
|
|
2878
2906
|
},
|
|
2907
|
+
onEnablePluginToolsChange: (enabled) => {
|
|
2908
|
+
// Master switch for the autonomous plugin system. The lifecycle
|
|
2909
|
+
// tools are attached when the session is built, so they arrive on
|
|
2910
|
+
// the next session; the reuse nudge re-reads settings.json per
|
|
2911
|
+
// check and follows immediately.
|
|
2912
|
+
this.settingsManager.setEnablePluginTools(enabled);
|
|
2913
|
+
},
|
|
2914
|
+
onPlatformChange: (platforms) => {
|
|
2915
|
+
// Persist for later sessions, then update the process-wide session
|
|
2916
|
+
// state so plugin authoring and the /new-* scaffolds pick the new
|
|
2917
|
+
// layout up in this session too.
|
|
2918
|
+
this.settingsManager.setPlatform(platforms);
|
|
2919
|
+
setPlatforms(platforms);
|
|
2920
|
+
},
|
|
2879
2921
|
onSteeringModeChange: (mode) => {
|
|
2880
2922
|
this.session.setSteeringMode(mode);
|
|
2881
2923
|
},
|