hoomanjs 1.29.2 → 1.30.0
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/README.md +216 -69
- package/dist/acp/acp-agent.d.ts +5 -5
- package/dist/acp/acp-agent.js +55 -54
- package/dist/acp/acp-agent.js.map +1 -1
- package/dist/acp/approvals.d.ts +3 -3
- package/dist/acp/approvals.js +73 -115
- package/dist/acp/approvals.js.map +1 -1
- package/dist/acp/sessions/options.js +11 -25
- package/dist/acp/sessions/options.js.map +1 -1
- package/dist/acp/utils/tool-kind.js +1 -5
- package/dist/acp/utils/tool-kind.js.map +1 -1
- package/dist/chat/app.d.ts +5 -1
- package/dist/chat/app.js +322 -202
- package/dist/chat/app.js.map +1 -1
- package/dist/chat/approvals.d.ts +4 -3
- package/dist/chat/approvals.js +11 -45
- package/dist/chat/approvals.js.map +1 -1
- package/dist/chat/components/ChatMessage.d.ts +1 -2
- package/dist/chat/components/ChatMessage.js +4 -5
- package/dist/chat/components/ChatMessage.js.map +1 -1
- package/dist/chat/components/EmptyChatBanner.js +2 -3
- package/dist/chat/components/EmptyChatBanner.js.map +1 -1
- package/dist/chat/components/StatusBar.js +6 -2
- package/dist/chat/components/StatusBar.js.map +1 -1
- package/dist/chat/components/ThoughtEvent.d.ts +6 -0
- package/dist/chat/components/ThoughtEvent.js +30 -0
- package/dist/chat/components/ThoughtEvent.js.map +1 -0
- package/dist/chat/components/ToolEvent.js +1 -1
- package/dist/chat/components/ToolEvent.js.map +1 -1
- package/dist/chat/components/Transcript.d.ts +7 -2
- package/dist/chat/components/Transcript.js +6 -2
- package/dist/chat/components/Transcript.js.map +1 -1
- package/dist/chat/components/markdown/BlockRenderer.js +7 -7
- package/dist/chat/components/markdown/BlockRenderer.js.map +1 -1
- package/dist/chat/components/markdown/MarkdownMessage.js +1 -1
- package/dist/chat/components/markdown/MarkdownMessage.js.map +1 -1
- package/dist/chat/components/shared.js +2 -0
- package/dist/chat/components/shared.js.map +1 -1
- package/dist/chat/index.d.ts +4 -0
- package/dist/chat/index.js +17 -3
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/steering.d.ts +20 -0
- package/dist/chat/steering.js +67 -0
- package/dist/chat/steering.js.map +1 -0
- package/dist/chat/types.d.ts +5 -1
- package/dist/cli.js +91 -13
- package/dist/cli.js.map +1 -1
- package/dist/configure/app.d.ts +1 -1
- package/dist/configure/app.js +581 -303
- package/dist/configure/app.js.map +1 -1
- package/dist/configure/components/MenuScreen.d.ts +4 -2
- package/dist/configure/components/MenuScreen.js +33 -6
- package/dist/configure/components/MenuScreen.js.map +1 -1
- package/dist/configure/components/SelectMenuItem.d.ts +1 -0
- package/dist/configure/components/SelectMenuItem.js +19 -10
- package/dist/configure/components/SelectMenuItem.js.map +1 -1
- package/dist/configure/index.js +4 -2
- package/dist/configure/index.js.map +1 -1
- package/dist/configure/types.d.ts +14 -12
- package/dist/configure/utils.d.ts +2 -0
- package/dist/configure/utils.js +21 -2
- package/dist/configure/utils.js.map +1 -1
- package/dist/core/agent/index.d.ts +3 -3
- package/dist/core/agent/index.js +20 -25
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/agent/mode-aware-tool-registry.js +2 -1
- package/dist/core/agent/mode-aware-tool-registry.js.map +1 -1
- package/dist/core/approvals/intervention.d.ts +34 -0
- package/dist/core/approvals/intervention.js +94 -0
- package/dist/core/approvals/intervention.js.map +1 -0
- package/dist/core/config.d.ts +49 -28
- package/dist/core/config.js +85 -26
- package/dist/core/config.js.map +1 -1
- package/dist/core/context/index.d.ts +11 -2
- package/dist/core/context/index.js +54 -4
- package/dist/core/context/index.js.map +1 -1
- package/dist/core/context/model-extractor.d.ts +13 -0
- package/dist/core/context/model-extractor.js +98 -0
- package/dist/core/context/model-extractor.js.map +1 -0
- package/dist/core/index.d.ts +6 -2
- package/dist/core/index.js +6 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/mcp/config.d.ts +28 -0
- package/dist/core/mcp/index.d.ts +5 -3
- package/dist/core/mcp/index.js +4 -2
- package/dist/core/mcp/index.js.map +1 -1
- package/dist/core/mcp/manager.d.ts +14 -1
- package/dist/core/mcp/manager.js +76 -4
- package/dist/core/mcp/manager.js.map +1 -1
- package/dist/core/mcp/oauth/callback-server.d.ts +16 -0
- package/dist/core/mcp/oauth/callback-server.js +134 -0
- package/dist/core/mcp/oauth/callback-server.js.map +1 -0
- package/dist/core/mcp/oauth/identity.d.ts +9 -0
- package/dist/core/mcp/oauth/identity.js +31 -0
- package/dist/core/mcp/oauth/identity.js.map +1 -0
- package/dist/core/mcp/oauth/index.d.ts +11 -0
- package/dist/core/mcp/oauth/index.js +15 -0
- package/dist/core/mcp/oauth/index.js.map +1 -0
- package/dist/core/mcp/oauth/provider.d.ts +43 -0
- package/dist/core/mcp/oauth/provider.js +203 -0
- package/dist/core/mcp/oauth/provider.js.map +1 -0
- package/dist/core/mcp/oauth/service.d.ts +29 -0
- package/dist/core/mcp/oauth/service.js +139 -0
- package/dist/core/mcp/oauth/service.js.map +1 -0
- package/dist/core/mcp/oauth/store.d.ts +14 -0
- package/dist/core/mcp/oauth/store.js +86 -0
- package/dist/core/mcp/oauth/store.js.map +1 -0
- package/dist/core/mcp/oauth/types.d.ts +87 -0
- package/dist/core/mcp/oauth/types.js +45 -0
- package/dist/core/mcp/oauth/types.js.map +1 -0
- package/dist/core/mcp/types.d.ts +56 -0
- package/dist/core/mcp/types.js +3 -0
- package/dist/core/mcp/types.js.map +1 -1
- package/dist/core/memory/file-store.d.ts +24 -0
- package/dist/core/memory/file-store.js +151 -0
- package/dist/core/memory/file-store.js.map +1 -0
- package/dist/core/memory/index.d.ts +2 -5
- package/dist/core/memory/index.js +2 -3
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/memory/runtime.d.ts +4 -0
- package/dist/core/memory/runtime.js +37 -0
- package/dist/core/memory/runtime.js.map +1 -0
- package/dist/core/models/anthropic.js +24 -1
- package/dist/core/models/anthropic.js.map +1 -1
- package/dist/core/models/moonshot.js +33 -1
- package/dist/core/models/moonshot.js.map +1 -1
- package/dist/core/modes/definitions.d.ts +19 -0
- package/dist/core/modes/definitions.js +99 -0
- package/dist/core/modes/definitions.js.map +1 -0
- package/dist/core/modes/index.d.ts +3 -0
- package/dist/core/modes/index.js +4 -0
- package/dist/core/modes/index.js.map +1 -0
- package/dist/core/modes/registry.d.ts +9 -0
- package/dist/core/modes/registry.js +57 -0
- package/dist/core/modes/registry.js.map +1 -0
- package/dist/core/modes/schema.d.ts +5 -0
- package/dist/core/modes/schema.js +6 -0
- package/dist/core/modes/schema.js.map +1 -0
- package/dist/core/prompts/agents/research.md +8 -8
- package/dist/core/prompts/bundled.d.ts +3 -0
- package/dist/core/prompts/bundled.js +14 -0
- package/dist/core/prompts/bundled.js.map +1 -0
- package/dist/core/prompts/environment.d.ts +0 -1
- package/dist/core/prompts/environment.js +0 -2
- package/dist/core/prompts/environment.js.map +1 -1
- package/dist/core/prompts/index.d.ts +1 -4
- package/dist/core/prompts/index.js +1 -7
- package/dist/core/prompts/index.js.map +1 -1
- package/dist/core/prompts/modes/agent.md +3 -0
- package/dist/core/prompts/modes/ask.md +5 -3
- package/dist/core/prompts/modes/plan.md +2 -2
- package/dist/core/prompts/session-mode-appendix.d.ts +3 -9
- package/dist/core/prompts/session-mode-appendix.js +32 -69
- package/dist/core/prompts/session-mode-appendix.js.map +1 -1
- package/dist/core/prompts/static/environment.md +2 -2
- package/dist/core/prompts/static/init.md +25 -0
- package/dist/core/prompts/static/memory.md +9 -123
- package/dist/core/prompts/static/planning.md +1 -1
- package/dist/core/prompts/static/skills.md +6 -5
- package/dist/core/prompts/static/subagents.md +2 -2
- package/dist/core/prompts/static/web-search.md +2 -1
- package/dist/core/prompts/system.js +8 -22
- package/dist/core/prompts/system.js.map +1 -1
- package/dist/core/skills/built-in/hooman-config/SKILL.md +105 -32
- package/dist/core/skills/built-in/hooman-skills/SKILL.md +1 -1
- package/dist/core/skills/index.d.ts +1 -0
- package/dist/core/skills/index.js +1 -0
- package/dist/core/skills/index.js.map +1 -1
- package/dist/core/skills/plugin.d.ts +7 -0
- package/dist/core/skills/plugin.js +40 -0
- package/dist/core/skills/plugin.js.map +1 -0
- package/dist/core/state/agent-app-state.d.ts +1 -1
- package/dist/core/state/agent-app-state.js +1 -1
- package/dist/core/state/session-mode.d.ts +2 -9
- package/dist/core/state/session-mode.js +4 -12
- package/dist/core/state/session-mode.js.map +1 -1
- package/dist/core/state/tool-approvals.d.ts +4 -8
- package/dist/core/state/tool-approvals.js +14 -76
- package/dist/core/state/tool-approvals.js.map +1 -1
- package/dist/core/subagents/index.d.ts +3 -0
- package/dist/core/subagents/index.js +4 -0
- package/dist/core/subagents/index.js.map +1 -0
- package/dist/core/subagents/research.d.ts +16 -0
- package/dist/core/subagents/research.js +58 -0
- package/dist/core/subagents/research.js.map +1 -0
- package/dist/core/{agents → subagents}/runner.d.ts +6 -5
- package/dist/core/{agents → subagents}/runner.js +8 -10
- package/dist/core/subagents/runner.js.map +1 -0
- package/dist/core/{agents/tools.d.ts → subagents/tool.d.ts} +6 -6
- package/dist/core/{agents/tools.js → subagents/tool.js} +14 -16
- package/dist/core/subagents/tool.js.map +1 -0
- package/dist/core/tools/plan.js +2 -6
- package/dist/core/tools/plan.js.map +1 -1
- package/dist/core/tools/time.js +1 -1
- package/dist/core/tools/time.js.map +1 -1
- package/dist/core/utils/browser.d.ts +1 -0
- package/dist/core/utils/browser.js +25 -0
- package/dist/core/utils/browser.js.map +1 -0
- package/dist/core/utils/paths.d.ts +2 -4
- package/dist/core/utils/paths.js +2 -4
- package/dist/core/utils/paths.js.map +1 -1
- package/dist/daemon/approvals.d.ts +2 -2
- package/dist/daemon/approvals.js +51 -56
- package/dist/daemon/approvals.js.map +1 -1
- package/dist/daemon/index.js +9 -6
- package/dist/daemon/index.js.map +1 -1
- package/dist/exec/approvals.d.ts +2 -4
- package/dist/exec/approvals.js +16 -48
- package/dist/exec/approvals.js.map +1 -1
- package/dist/index.d.ts +13 -18
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/package.json +5 -18
- package/dist/chat/components/ScrollView.d.ts +0 -106
- package/dist/chat/components/ScrollView.js +0 -80
- package/dist/chat/components/ScrollView.js.map +0 -1
- package/dist/chat/components/TranscriptViewport.d.ts +0 -9
- package/dist/chat/components/TranscriptViewport.js +0 -124
- package/dist/chat/components/TranscriptViewport.js.map +0 -1
- package/dist/core/agents/definitions.d.ts +0 -12
- package/dist/core/agents/definitions.js +0 -20
- package/dist/core/agents/definitions.js.map +0 -1
- package/dist/core/agents/index.d.ts +0 -4
- package/dist/core/agents/index.js +0 -5
- package/dist/core/agents/index.js.map +0 -1
- package/dist/core/agents/registry.d.ts +0 -5
- package/dist/core/agents/registry.js +0 -84
- package/dist/core/agents/registry.js.map +0 -1
- package/dist/core/agents/runner.js.map +0 -1
- package/dist/core/agents/tools.js.map +0 -1
- package/dist/core/inference/embedder.d.ts +0 -26
- package/dist/core/inference/embedder.js +0 -85
- package/dist/core/inference/embedder.js.map +0 -1
- package/dist/core/inference/index.d.ts +0 -9
- package/dist/core/inference/index.js +0 -13
- package/dist/core/inference/index.js.map +0 -1
- package/dist/core/inference/loader.d.ts +0 -16
- package/dist/core/inference/loader.js +0 -129
- package/dist/core/inference/loader.js.map +0 -1
- package/dist/core/inference/reranker.d.ts +0 -28
- package/dist/core/inference/reranker.js +0 -66
- package/dist/core/inference/reranker.js.map +0 -1
- package/dist/core/memory/brain.d.ts +0 -25
- package/dist/core/memory/brain.js +0 -137
- package/dist/core/memory/brain.js.map +0 -1
- package/dist/core/memory/database.d.ts +0 -4
- package/dist/core/memory/database.js +0 -87
- package/dist/core/memory/database.js.map +0 -1
- package/dist/core/memory/tools.d.ts +0 -16
- package/dist/core/memory/tools.js +0 -110
- package/dist/core/memory/tools.js.map +0 -1
- package/dist/core/memory/types.d.ts +0 -11
- package/dist/core/memory/types.js +0 -2
- package/dist/core/memory/types.js.map +0 -1
- package/dist/core/prompts/skills.d.ts +0 -15
- package/dist/core/prompts/skills.js +0 -92
- package/dist/core/prompts/skills.js.map +0 -1
- package/dist/core/prompts/static/wiki.md +0 -25
- package/dist/core/wiki/converters.d.ts +0 -12
- package/dist/core/wiki/converters.js +0 -73
- package/dist/core/wiki/converters.js.map +0 -1
- package/dist/core/wiki/database.d.ts +0 -39
- package/dist/core/wiki/database.js +0 -177
- package/dist/core/wiki/database.js.map +0 -1
- package/dist/core/wiki/index.d.ts +0 -7
- package/dist/core/wiki/index.js +0 -5
- package/dist/core/wiki/index.js.map +0 -1
- package/dist/core/wiki/storage.d.ts +0 -38
- package/dist/core/wiki/storage.js +0 -206
- package/dist/core/wiki/storage.js.map +0 -1
- package/dist/core/wiki/tools.d.ts +0 -5
- package/dist/core/wiki/tools.js +0 -32
- package/dist/core/wiki/tools.js.map +0 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
2
|
-
import {
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { join } from "node:path";
|
|
4
3
|
import handlebars from "handlebars";
|
|
4
|
+
import { bundledPromptPath, hasBundledPrompt, readBundledPrompt, } from "./bundled.js";
|
|
5
5
|
import { getEnvironmentPromptContext } from "./environment.js";
|
|
6
6
|
const { compile } = handlebars;
|
|
7
7
|
/** Bundled markdown next to this module (`prompts/static/`). */
|
|
8
8
|
const STATIC_PROMPT_FILES = [
|
|
9
9
|
"identity.md",
|
|
10
10
|
"environment.md",
|
|
11
|
-
"memory.md",
|
|
12
11
|
"todo.md",
|
|
13
12
|
"thinking.md",
|
|
14
13
|
"filesystem.md",
|
|
@@ -18,7 +17,6 @@ const STATIC_PROMPT_FILES = [
|
|
|
18
17
|
"sleep.md",
|
|
19
18
|
"bye.md",
|
|
20
19
|
"daemon.md",
|
|
21
|
-
"wiki.md",
|
|
22
20
|
"skills.md",
|
|
23
21
|
"subagents.md",
|
|
24
22
|
"planning.md",
|
|
@@ -50,8 +48,6 @@ export class System {
|
|
|
50
48
|
staticPromptFiles() {
|
|
51
49
|
return STATIC_PROMPT_FILES.filter((file) => {
|
|
52
50
|
switch (file) {
|
|
53
|
-
case "memory.md":
|
|
54
|
-
return this.config.tools.memory.enabled;
|
|
55
51
|
case "fetch.md":
|
|
56
52
|
return this.config.tools.fetch.enabled;
|
|
57
53
|
case "web-search.md":
|
|
@@ -64,8 +60,6 @@ export class System {
|
|
|
64
60
|
return this.config.tools.shell.enabled;
|
|
65
61
|
case "sleep.md":
|
|
66
62
|
return this.config.tools.sleep.enabled;
|
|
67
|
-
case "wiki.md":
|
|
68
|
-
return this.config.tools.wiki.enabled;
|
|
69
63
|
case "subagents.md":
|
|
70
64
|
return this.config.tools.agents.enabled;
|
|
71
65
|
case "daemon.md":
|
|
@@ -76,14 +70,12 @@ export class System {
|
|
|
76
70
|
});
|
|
77
71
|
}
|
|
78
72
|
readBundledStaticPrompts() {
|
|
79
|
-
const dir = join(dirname(fileURLToPath(import.meta.url)), "static");
|
|
80
73
|
const parts = [];
|
|
81
74
|
for (const file of this.staticPromptFiles()) {
|
|
82
|
-
|
|
83
|
-
if (!existsSync(full)) {
|
|
75
|
+
if (!hasBundledPrompt("static", file)) {
|
|
84
76
|
continue;
|
|
85
77
|
}
|
|
86
|
-
const text =
|
|
78
|
+
const text = readBundledPrompt("static", file);
|
|
87
79
|
if (text.length > 0) {
|
|
88
80
|
parts.push(text);
|
|
89
81
|
}
|
|
@@ -91,17 +83,15 @@ export class System {
|
|
|
91
83
|
return parts.join("\n\n");
|
|
92
84
|
}
|
|
93
85
|
readBundledHarnessPrompts() {
|
|
94
|
-
const dir = join(dirname(fileURLToPath(import.meta.url)), "harness");
|
|
95
86
|
const parts = [];
|
|
96
87
|
for (const { key, file } of HARNESS_PROMPT_FILES) {
|
|
97
88
|
if (!this.config.prompts[key]) {
|
|
98
89
|
continue;
|
|
99
90
|
}
|
|
100
|
-
|
|
101
|
-
if (!existsSync(full)) {
|
|
91
|
+
if (!hasBundledPrompt("harness", file)) {
|
|
102
92
|
continue;
|
|
103
93
|
}
|
|
104
|
-
const text =
|
|
94
|
+
const text = readBundledPrompt("harness", file);
|
|
105
95
|
if (text.length > 0) {
|
|
106
96
|
parts.push(text);
|
|
107
97
|
}
|
|
@@ -127,16 +117,14 @@ export class System {
|
|
|
127
117
|
parts.push(`${label}:${st.mtimeMs}:${st.size}`);
|
|
128
118
|
};
|
|
129
119
|
pushPath("instructions", this.path);
|
|
130
|
-
const staticDir = join(dirname(fileURLToPath(import.meta.url)), "static");
|
|
131
120
|
for (const file of this.staticPromptFiles()) {
|
|
132
|
-
pushPath(`static:${file}`,
|
|
121
|
+
pushPath(`static:${file}`, bundledPromptPath("static", file));
|
|
133
122
|
}
|
|
134
|
-
const harnessDir = join(dirname(fileURLToPath(import.meta.url)), "harness");
|
|
135
123
|
for (const { key, file } of HARNESS_PROMPT_FILES) {
|
|
136
124
|
if (!this.config.prompts[key]) {
|
|
137
125
|
continue;
|
|
138
126
|
}
|
|
139
|
-
pushPath(`harness:${file}`,
|
|
127
|
+
pushPath(`harness:${file}`, bundledPromptPath("harness", file));
|
|
140
128
|
}
|
|
141
129
|
pushPath("agents-md", join(process.cwd(), EXTRA_CWD_INSTRUCTIONS));
|
|
142
130
|
return parts.join("|");
|
|
@@ -175,8 +163,6 @@ export class System {
|
|
|
175
163
|
name: this.config.name,
|
|
176
164
|
llm: this.config.llm,
|
|
177
165
|
environment: getEnvironmentPromptContext(),
|
|
178
|
-
memory: this.config.tools.memory,
|
|
179
|
-
wiki: this.config.tools.wiki,
|
|
180
166
|
compaction: this.config.compaction,
|
|
181
167
|
mode: this.mode,
|
|
182
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/core/prompts/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file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CAAC,iBAAiB,IAAI,IAAI,CAAC,gBAAgB,KAAK,IAAI,EAAE,CAAC;YACpE,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/B,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YACrC,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hooman-config
|
|
3
|
-
description: Read and update Hooman's own config.json and instructions.md safely. Use when the user asks about Hooman config, custom instructions, model providers, LLM params, tool toggles, prompts, search,
|
|
3
|
+
description: Read and update Hooman's own config.json and instructions.md safely. Use when the user asks about Hooman config, custom instructions, model providers, LLM params, tool toggles, prompts, search, agents, compaction, or ~/.hooman config settings.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hooman Config
|
|
@@ -18,9 +18,9 @@ Use this skill when the user asks you to inspect, explain, or change Hooman's ow
|
|
|
18
18
|
|
|
19
19
|
1. Read the existing JSON first. Preserve user values, comments are not supported, and secrets such as API keys may be present.
|
|
20
20
|
2. Make the smallest JSON edit that satisfies the request. Do not rewrite unrelated sections or normalize formatting beyond valid pretty JSON.
|
|
21
|
-
3. `name` and `llms` are required. `llms` must be a **non-empty array** of entries (see below). `search`, `prompts`, `tools`, and `compaction` are optional in input, but Hooman expands them with defaults when loading.
|
|
21
|
+
3. `name`, `providers`, and `llms` are required. `providers` stores shared credentials/config, and `llms` must be a **non-empty array** of entries that reference provider names (see below). `search`, `prompts`, `tools`, and `compaction` are optional in input, but Hooman expands them with defaults when loading.
|
|
22
22
|
4. Unknown keys are unsupported and may be dropped when Hooman parses and persists the config.
|
|
23
|
-
5. `tools
|
|
23
|
+
5. `tools` only manages built-in runtime toggles exposed in `config.json`.
|
|
24
24
|
6. Any change to `config.json` or `instructions.md` requires restarting the running Hooman agent/session before it takes effect.
|
|
25
25
|
|
|
26
26
|
## Full Config Shape
|
|
@@ -30,11 +30,20 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
32
32
|
"name": "Hooman",
|
|
33
|
+
"providers": [
|
|
34
|
+
{
|
|
35
|
+
"name": "ollama-local",
|
|
36
|
+
"options": {
|
|
37
|
+
"provider": "ollama",
|
|
38
|
+
"params": {}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
33
42
|
"llms": [
|
|
34
43
|
{
|
|
35
44
|
"name": "Default",
|
|
36
45
|
"options": {
|
|
37
|
-
"provider": "ollama",
|
|
46
|
+
"provider": "ollama-local",
|
|
38
47
|
"model": "gemma4:e4b",
|
|
39
48
|
"params": {}
|
|
40
49
|
},
|
|
@@ -82,12 +91,6 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
82
91
|
"sleep": {
|
|
83
92
|
"enabled": true
|
|
84
93
|
},
|
|
85
|
-
"memory": {
|
|
86
|
-
"enabled": false
|
|
87
|
-
},
|
|
88
|
-
"wiki": {
|
|
89
|
-
"enabled": false
|
|
90
|
-
},
|
|
91
94
|
"agents": {
|
|
92
95
|
"enabled": true,
|
|
93
96
|
"concurrency": 2
|
|
@@ -103,6 +106,7 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
103
106
|
## Top-Level Options
|
|
104
107
|
|
|
105
108
|
- `name`: non-empty display name for the agent.
|
|
109
|
+
- `providers`: required reusable provider definitions. Configure shared credentials or transport params once, then reference the provider from one or more LLM entries.
|
|
106
110
|
- `llms`: required non-empty list of named LLM configs (see **LLMs array**).
|
|
107
111
|
- `search`: optional web search config; defaults to disabled Brave.
|
|
108
112
|
- `prompts`: optional built-in static prompt toggles; omitted fields default to `true`. Custom user instructions live in `~/.hooman/instructions.md`.
|
|
@@ -114,14 +118,24 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
114
118
|
Each element of `llms` has:
|
|
115
119
|
|
|
116
120
|
- `name`: non-empty label for this entry (for display and editing).
|
|
117
|
-
- `options`:
|
|
121
|
+
- `options.provider`: provider reference name. It must match one of the entries in top-level `providers`.
|
|
122
|
+
- `options.model`: model id passed to the resolved runtime provider.
|
|
123
|
+
- `options.params`: model-specific params. When `options.provider` references a named provider, these params override the provider's shared params on key conflict.
|
|
118
124
|
- `default`: boolean; mark **one** entry `"default": true` for the active model. If several have `true`, the **first** in the array wins; if none have `true`, Hooman uses the **first** entry—so keep a single default when possible.
|
|
119
125
|
|
|
120
126
|
Runtime APIs may still expose a single active profile as `llm` (derived from the default entry); on disk the source of truth is always `llms`.
|
|
121
127
|
|
|
128
|
+
## Providers array
|
|
129
|
+
|
|
130
|
+
Each element of `providers` has:
|
|
131
|
+
|
|
132
|
+
- `name`: non-empty reference name used by `llms[].options.provider`.
|
|
133
|
+
- `options.provider`: runtime provider id such as `"openai"`, `"bedrock"`, or `"ollama"`.
|
|
134
|
+
- `options.params`: shared provider params such as API keys, host/base URL, region, headers, or client config.
|
|
135
|
+
|
|
122
136
|
### LLM Providers
|
|
123
137
|
|
|
124
|
-
`options.provider` must be one of the values Hooman registers at runtime (the config schema may list additional legacy enum values; stick to this set):
|
|
138
|
+
`providers[].options.provider` must be one of the values Hooman registers at runtime (the config schema may list additional legacy enum values; stick to this set):
|
|
125
139
|
|
|
126
140
|
```json
|
|
127
141
|
[
|
|
@@ -140,6 +154,17 @@ Common shape (single default model):
|
|
|
140
154
|
|
|
141
155
|
```json
|
|
142
156
|
{
|
|
157
|
+
"providers": [
|
|
158
|
+
{
|
|
159
|
+
"name": "anthropic",
|
|
160
|
+
"options": {
|
|
161
|
+
"provider": "anthropic",
|
|
162
|
+
"params": {
|
|
163
|
+
"apiKey": "..."
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
],
|
|
143
168
|
"llms": [
|
|
144
169
|
{
|
|
145
170
|
"name": "Default",
|
|
@@ -147,7 +172,6 @@ Common shape (single default model):
|
|
|
147
172
|
"provider": "anthropic",
|
|
148
173
|
"model": "claude-sonnet-4-20250514",
|
|
149
174
|
"params": {
|
|
150
|
-
"apiKey": "...",
|
|
151
175
|
"temperature": 0.2,
|
|
152
176
|
"maxTokens": 4096
|
|
153
177
|
}
|
|
@@ -158,9 +182,9 @@ Common shape (single default model):
|
|
|
158
182
|
}
|
|
159
183
|
```
|
|
160
184
|
|
|
161
|
-
Provider notes (these refer to fields inside `options.params` unless noted):
|
|
185
|
+
Provider notes (these refer to fields inside `providers[].options.params` unless noted; `llms[].options.params` can override them per model):
|
|
162
186
|
|
|
163
|
-
- `anthropic`: Strands **AnthropicModel** (Anthropic Messages API via `@anthropic-ai/sdk`). `params.apiKey` or `params.authToken`, optional `baseURL` and `headers` (merged into `clientConfig`), optional `clientConfig`, plus model fields such as `temperature`, `maxTokens`, `topP`, `stopSequences
|
|
187
|
+
- `anthropic`: Strands **AnthropicModel** (Anthropic Messages API via `@anthropic-ai/sdk`). `params.apiKey` or `params.authToken`, optional `baseURL` and `headers` (merged into `clientConfig`), optional `clientConfig`, `betas`, and `useNativeTokenCount`, plus model fields such as `temperature`, `maxTokens`, `topP`, and `stopSequences`. Any unknown keys are forwarded into the underlying Anthropic Messages request body, so Anthropic-compatible providers can use fields like `thinking` or `service_tier` directly. A custom `client` instance is not supported from config. If no key is set, `ANTHROPIC_API_KEY` is used.
|
|
164
188
|
- `google`: `params.apiKey`, `client`, `clientConfig`, and `builtInTools` are top-level Google model options. Other keys become Gemini generation params, such as `temperature`, `maxOutputTokens`, `topP`, and `topK`.
|
|
165
189
|
- `groq`: `params.apiKey`, `baseURL`, and `headers` configure the provider. Other keys are forwarded as Vercel model config.
|
|
166
190
|
- `moonshot`: `params.apiKey`, `baseURL`, `headers`, and `fetch` configure the provider. Other keys are forwarded as Vercel model config.
|
|
@@ -173,15 +197,25 @@ Examples:
|
|
|
173
197
|
|
|
174
198
|
```json
|
|
175
199
|
{
|
|
200
|
+
"providers": [
|
|
201
|
+
{
|
|
202
|
+
"name": "ollama-local",
|
|
203
|
+
"options": {
|
|
204
|
+
"provider": "ollama",
|
|
205
|
+
"params": {
|
|
206
|
+
"host": "http://127.0.0.1:11434",
|
|
207
|
+
"think": "medium"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
],
|
|
176
212
|
"llms": [
|
|
177
213
|
{
|
|
178
214
|
"name": "Local",
|
|
179
215
|
"options": {
|
|
180
|
-
"provider": "ollama",
|
|
216
|
+
"provider": "ollama-local",
|
|
181
217
|
"model": "qwen3:8b",
|
|
182
218
|
"params": {
|
|
183
|
-
"host": "http://127.0.0.1:11434",
|
|
184
|
-
"think": "medium",
|
|
185
219
|
"options": {
|
|
186
220
|
"num_ctx": 32768,
|
|
187
221
|
"temperature": 0.2
|
|
@@ -196,6 +230,17 @@ Examples:
|
|
|
196
230
|
|
|
197
231
|
```json
|
|
198
232
|
{
|
|
233
|
+
"providers": [
|
|
234
|
+
{
|
|
235
|
+
"name": "google",
|
|
236
|
+
"options": {
|
|
237
|
+
"provider": "google",
|
|
238
|
+
"params": {
|
|
239
|
+
"apiKey": "..."
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
],
|
|
199
244
|
"llms": [
|
|
200
245
|
{
|
|
201
246
|
"name": "Gemini",
|
|
@@ -203,7 +248,6 @@ Examples:
|
|
|
203
248
|
"provider": "google",
|
|
204
249
|
"model": "gemini-2.5-flash",
|
|
205
250
|
"params": {
|
|
206
|
-
"apiKey": "...",
|
|
207
251
|
"temperature": 0.2,
|
|
208
252
|
"maxOutputTokens": 8192
|
|
209
253
|
}
|
|
@@ -216,12 +260,11 @@ Examples:
|
|
|
216
260
|
|
|
217
261
|
```json
|
|
218
262
|
{
|
|
219
|
-
"
|
|
263
|
+
"providers": [
|
|
220
264
|
{
|
|
221
|
-
"name": "
|
|
265
|
+
"name": "bedrock-dev",
|
|
222
266
|
"options": {
|
|
223
267
|
"provider": "bedrock",
|
|
224
|
-
"model": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
225
268
|
"params": {
|
|
226
269
|
"region": "us-west-2",
|
|
227
270
|
"clientConfig": {
|
|
@@ -232,7 +275,18 @@ Examples:
|
|
|
232
275
|
"secretAccessKey": "...",
|
|
233
276
|
"sessionToken": "..."
|
|
234
277
|
}
|
|
235
|
-
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"llms": [
|
|
284
|
+
{
|
|
285
|
+
"name": "Bedrock",
|
|
286
|
+
"options": {
|
|
287
|
+
"provider": "bedrock-dev",
|
|
288
|
+
"model": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
289
|
+
"params": {
|
|
236
290
|
"temperature": 0.2,
|
|
237
291
|
"maxTokens": 4096
|
|
238
292
|
}
|
|
@@ -251,13 +305,33 @@ You may list several entries and flip which one is default:
|
|
|
251
305
|
|
|
252
306
|
```json
|
|
253
307
|
{
|
|
308
|
+
"providers": [
|
|
309
|
+
{
|
|
310
|
+
"name": "openai",
|
|
311
|
+
"options": {
|
|
312
|
+
"provider": "openai",
|
|
313
|
+
"params": {
|
|
314
|
+
"apiKey": "..."
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "anthropic",
|
|
320
|
+
"options": {
|
|
321
|
+
"provider": "anthropic",
|
|
322
|
+
"params": {
|
|
323
|
+
"apiKey": "..."
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
],
|
|
254
328
|
"llms": [
|
|
255
329
|
{
|
|
256
330
|
"name": "Fast",
|
|
257
331
|
"options": {
|
|
258
332
|
"provider": "openai",
|
|
259
333
|
"model": "gpt-4.1-mini",
|
|
260
|
-
"params": {
|
|
334
|
+
"params": {}
|
|
261
335
|
},
|
|
262
336
|
"default": true
|
|
263
337
|
},
|
|
@@ -266,7 +340,7 @@ You may list several entries and flip which one is default:
|
|
|
266
340
|
"options": {
|
|
267
341
|
"provider": "anthropic",
|
|
268
342
|
"model": "claude-opus-4-20250514",
|
|
269
|
-
"params": {
|
|
343
|
+
"params": {}
|
|
270
344
|
},
|
|
271
345
|
"default": false
|
|
272
346
|
}
|
|
@@ -274,7 +348,7 @@ You may list several entries and flip which one is default:
|
|
|
274
348
|
}
|
|
275
349
|
```
|
|
276
350
|
|
|
277
|
-
When editing `llms`, preserve unrelated entries and API keys unless the user asks to remove or replace them.
|
|
351
|
+
When editing `providers` or `llms`, preserve unrelated entries and API keys unless the user asks to remove or replace them.
|
|
278
352
|
|
|
279
353
|
## Search
|
|
280
354
|
|
|
@@ -339,15 +413,12 @@ Simple toggles:
|
|
|
339
413
|
"filesystem": { "enabled": true },
|
|
340
414
|
"shell": { "enabled": true },
|
|
341
415
|
"sleep": { "enabled": true },
|
|
342
|
-
"
|
|
343
|
-
"wiki": { "enabled": true }
|
|
416
|
+
"agents": { "enabled": true, "concurrency": 3 }
|
|
344
417
|
}
|
|
345
418
|
}
|
|
346
419
|
```
|
|
347
420
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
Agents:
|
|
421
|
+
Subagents:
|
|
351
422
|
|
|
352
423
|
```json
|
|
353
424
|
{
|
|
@@ -360,10 +431,12 @@ Agents:
|
|
|
360
431
|
}
|
|
361
432
|
```
|
|
362
433
|
|
|
363
|
-
Defaults: `todo`, `fetch`, `filesystem`, `shell`, `sleep`, and `agents` enabled
|
|
434
|
+
Defaults: `todo`, `fetch`, `filesystem`, `shell`, `sleep`, and `agents` enabled. MCP servers and installed skills are not controlled by these toggles; do not inspect or edit them for this skill.
|
|
364
435
|
|
|
365
436
|
`agents`: the default file Hooman writes when `config.json` was missing includes `tools.agents.concurrency: 2`. On load, if `concurrency` is absent (for example `tools` or `tools.agents` is omitted), the merged config uses `3` until you set it explicitly.
|
|
366
437
|
|
|
438
|
+
Compatibility note: the config key remains `tools.agents`, but it controls the built-in `run_subagents` tool.
|
|
439
|
+
|
|
367
440
|
## Instructions
|
|
368
441
|
|
|
369
442
|
`~/.hooman/instructions.md` contains the user's custom instructions. Read or edit it only when the user asks about Hooman instructions, custom instructions, persistent guidance, or agent behavior that belongs outside `config.json`.
|
|
@@ -34,7 +34,7 @@ Example layout:
|
|
|
34
34
|
5. Treat files inside a skill directory as user data. Read before overwriting.
|
|
35
35
|
6. Never delete a skill folder unless the user explicitly asks to remove that skill.
|
|
36
36
|
7. For custom local authoring or edits, create/edit files directly under `~/.hooman/skills/<folder>`.
|
|
37
|
-
8. Any skill install, removal, creation, or edit requires restarting the running Hooman agent/session before the
|
|
37
|
+
8. Any skill install, removal, creation, or edit requires restarting the running Hooman agent/session before the runtime skill inventory changes.
|
|
38
38
|
|
|
39
39
|
## Exact CLI Commands
|
|
40
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/skills/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/skills/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,oCAAoC,EACpC,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LocalAgent } from "@strands-agents/sdk";
|
|
2
|
+
import { AgentSkills, type SkillSource } from "@strands-agents/sdk/vended-plugins/skills";
|
|
3
|
+
export declare const AGENT_SKILLS_STATE_KEY = "hooman.agentSkills";
|
|
4
|
+
export declare function builtInSkillsPath(): string;
|
|
5
|
+
export declare function createAgentSkillSources(): SkillSource[];
|
|
6
|
+
export declare function createAgentSkillsPlugin(): AgentSkills;
|
|
7
|
+
export declare function clearAgentSkillsPromptInjectionState(agent: LocalAgent): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { AgentSkills, } from "@strands-agents/sdk/vended-plugins/skills";
|
|
5
|
+
import { skillsPath } from "../utils/paths.js";
|
|
6
|
+
export const AGENT_SKILLS_STATE_KEY = "hooman.agentSkills";
|
|
7
|
+
export function builtInSkillsPath() {
|
|
8
|
+
return join(dirname(fileURLToPath(import.meta.url)), "./built-in");
|
|
9
|
+
}
|
|
10
|
+
export function createAgentSkillSources() {
|
|
11
|
+
const sources = [];
|
|
12
|
+
const bundled = builtInSkillsPath();
|
|
13
|
+
if (existsSync(bundled)) {
|
|
14
|
+
sources.push(bundled);
|
|
15
|
+
}
|
|
16
|
+
const installed = skillsPath();
|
|
17
|
+
if (existsSync(installed)) {
|
|
18
|
+
sources.push(installed);
|
|
19
|
+
}
|
|
20
|
+
return sources;
|
|
21
|
+
}
|
|
22
|
+
export function createAgentSkillsPlugin() {
|
|
23
|
+
return new AgentSkills({
|
|
24
|
+
skills: createAgentSkillSources(),
|
|
25
|
+
stateKey: AGENT_SKILLS_STATE_KEY,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export function clearAgentSkillsPromptInjectionState(agent) {
|
|
29
|
+
const value = agent.appState.get(AGENT_SKILLS_STATE_KEY);
|
|
30
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const next = { ...value };
|
|
34
|
+
if (!Object.prototype.hasOwnProperty.call(next, "lastInjectedXml")) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
delete next.lastInjectedXml;
|
|
38
|
+
agent.appState.set(AGENT_SKILLS_STATE_KEY, next);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/core/skills/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,WAAW,GAEZ,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAE3D,MAAM,UAAU,iBAAiB;IAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;IAC/B,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,OAAO,IAAI,WAAW,CAAC;QACrB,MAAM,EAAE,uBAAuB,EAAE;QACjC,QAAQ,EAAE,sBAAsB;KACjC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,KAAiB;IACpE,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACzD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO;IACT,CAAC;IAED,MAAM,IAAI,GAAG,EAAE,GAAG,KAAK,EAA+B,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC,EAAE,CAAC;QACnE,OAAO;IACT,CAAC;IAED,OAAO,IAAI,CAAC,eAAe,CAAC;IAC5B,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Agent } from "@strands-agents/sdk";
|
|
2
2
|
/**
|
|
3
3
|
* Copies every entry from `from.appState` onto `to.appState` (via Strands `getAll` / `set`).
|
|
4
|
-
* Use
|
|
4
|
+
* Use when appState must survive agent replacement or rehydration.
|
|
5
5
|
*/
|
|
6
6
|
export declare function copyAgentAppState(from: Agent, to: Agent): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copies every entry from `from.appState` onto `to.appState` (via Strands `getAll` / `set`).
|
|
3
|
-
* Use
|
|
3
|
+
* Use when appState must survive agent replacement or rehydration.
|
|
4
4
|
*/
|
|
5
5
|
export function copyAgentAppState(from, to) {
|
|
6
6
|
const data = from.appState.getAll();
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type SessionMode } from "../modes/schema.js";
|
|
2
2
|
export declare const MODE_STATE_KEY = "mode";
|
|
3
|
-
export
|
|
4
|
-
default: "default";
|
|
5
|
-
plan: "plan";
|
|
6
|
-
ask: "ask";
|
|
7
|
-
}>;
|
|
8
|
-
export type SessionMode = z.infer<typeof SessionModeSchema>;
|
|
3
|
+
export type { SessionMode } from "../modes/schema.js";
|
|
9
4
|
type AppStateLike = {
|
|
10
5
|
get<T = unknown>(key: string): T;
|
|
11
6
|
set(key: string, value: unknown): void;
|
|
@@ -16,8 +11,6 @@ type AgentLike = {
|
|
|
16
11
|
export type ModeState = {
|
|
17
12
|
mode: SessionMode;
|
|
18
13
|
};
|
|
19
|
-
export declare function normalizeSessionMode(value: unknown): SessionMode;
|
|
20
14
|
export declare function getModeState(agent: AgentLike): ModeState;
|
|
21
15
|
export declare function setSessionMode(agent: AgentLike, mode: SessionMode): void;
|
|
22
16
|
export declare function clearModeToDefault(agent: AgentLike): void;
|
|
23
|
-
export {};
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_SESSION_MODE } from "../modes/schema.js";
|
|
2
2
|
export const MODE_STATE_KEY = "mode";
|
|
3
|
-
export const SessionModeSchema = z.enum(["default", "plan", "ask"]);
|
|
4
|
-
export function normalizeSessionMode(value) {
|
|
5
|
-
const parsed = SessionModeSchema.safeParse(value);
|
|
6
|
-
return parsed.success ? parsed.data : "default";
|
|
7
|
-
}
|
|
8
|
-
function normalizeMode(value) {
|
|
9
|
-
return normalizeSessionMode(value);
|
|
10
|
-
}
|
|
11
3
|
export function getModeState(agent) {
|
|
12
|
-
const mode =
|
|
13
|
-
return { mode };
|
|
4
|
+
const mode = agent.appState.get(MODE_STATE_KEY) ?? DEFAULT_SESSION_MODE;
|
|
5
|
+
return { mode: mode };
|
|
14
6
|
}
|
|
15
7
|
export function setSessionMode(agent, mode) {
|
|
16
8
|
agent.appState.set(MODE_STATE_KEY, mode);
|
|
17
9
|
}
|
|
18
10
|
export function clearModeToDefault(agent) {
|
|
19
|
-
agent.appState.set(MODE_STATE_KEY,
|
|
11
|
+
agent.appState.set(MODE_STATE_KEY, DEFAULT_SESSION_MODE);
|
|
20
12
|
}
|
|
21
13
|
//# sourceMappingURL=session-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-mode.js","sourceRoot":"","sources":["../../../src/core/state/session-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"session-mode.js","sourceRoot":"","sources":["../../../src/core/state/session-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,oBAAoB,CAAC;AAE5E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAgBrC,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,oBAAoB,CAAC;IACxE,OAAO,EAAE,IAAI,EAAE,IAAc,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAgB,EAAE,IAAiB;IAChE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAgB;IACjD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SessionMode } from "./session-mode.js";
|
|
1
2
|
type AppStateLike = {
|
|
2
3
|
get<T = unknown>(key: string): T;
|
|
3
4
|
set(key: string, value: unknown): void;
|
|
@@ -8,10 +9,6 @@ type AgentLike = {
|
|
|
8
9
|
export declare const ENTER_PLAN_MODE_TOOL = "enter_plan_mode";
|
|
9
10
|
export declare const EXIT_PLAN_MODE_TOOL = "exit_plan_mode";
|
|
10
11
|
export declare const INTERNAL_ALWAYS_ALLOWED: Set<string>;
|
|
11
|
-
export declare const PLAN_MODE_ALWAYS_ALLOWED: Set<string>;
|
|
12
|
-
export declare const PLAN_MODE_VISIBLE: Set<string>;
|
|
13
|
-
/** Same narrowed surface as plan mode but without plan lifecycle tools. */
|
|
14
|
-
export declare const ASK_MODE_VISIBLE: Set<string>;
|
|
15
12
|
/**
|
|
16
13
|
* In session mode `plan`, block `write_file` / `edit_file` unless the target path resolves
|
|
17
14
|
* under the app plans directory. Runs before session-wide “always allow” so plan boundaries
|
|
@@ -21,12 +18,11 @@ export declare function planModeWriteEditRejectionMessage(agent: AgentLike, tool
|
|
|
21
18
|
export declare function getSessionAllowedTools(agent: AgentLike): string[];
|
|
22
19
|
/**
|
|
23
20
|
* Session-wide tool allowlist ("always allow" in UI), plus implicit allow for
|
|
24
|
-
* read/write/edit when paths resolve under attachments
|
|
25
|
-
*
|
|
26
|
-
* only (writes/edits).
|
|
21
|
+
* read/write/edit when paths resolve under attachments or plans (reads), or
|
|
22
|
+
* plans only (writes/edits).
|
|
27
23
|
*/
|
|
28
24
|
export declare function isToolSessionAllowed(agent: AgentLike, toolName: string, toolInput?: unknown): boolean;
|
|
29
|
-
export declare function isToolVisible(mode:
|
|
25
|
+
export declare function isToolVisible(mode: SessionMode, toolName: string, options?: {
|
|
30
26
|
mcpReadOnlyHint?: boolean;
|
|
31
27
|
}): boolean;
|
|
32
28
|
export declare function allowToolForSession(agent: AgentLike, toolName: string): void;
|