hoomanjs 1.28.2 → 1.28.3
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 +8 -9
- package/dist/acp/sessions/config-options.js +1 -1
- package/dist/acp/sessions/config-options.js.map +1 -1
- package/dist/acp/utils/tool-kind.js +4 -4
- package/dist/chat/index.js +1 -1
- package/dist/chat/index.js.map +1 -1
- package/dist/configure/app.js +2 -56
- package/dist/configure/app.js.map +1 -1
- package/dist/core/agent/index.d.ts +1 -1
- package/dist/core/agent/index.js +14 -2
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/config.d.ts +10 -18
- package/dist/core/config.js +11 -31
- package/dist/core/config.js.map +1 -1
- package/dist/core/memory/index.d.ts +1 -0
- package/dist/core/memory/index.js +1 -0
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/memory/ltm/llama-embed.d.ts +28 -0
- package/dist/core/memory/ltm/llama-embed.js +204 -0
- package/dist/core/memory/ltm/llama-embed.js.map +1 -0
- package/dist/core/memory/ltm/sqlite.d.ts +12 -0
- package/dist/core/memory/ltm/sqlite.js +101 -0
- package/dist/core/memory/ltm/sqlite.js.map +1 -0
- package/dist/core/memory/ltm/store.d.ts +13 -6
- package/dist/core/memory/ltm/store.js +192 -92
- package/dist/core/memory/ltm/store.js.map +1 -1
- package/dist/core/memory/ltm/tools.js +4 -4
- package/dist/core/memory/ltm/utils.d.ts +9 -11
- package/dist/core/memory/ltm/utils.js +14 -15
- package/dist/core/memory/ltm/utils.js.map +1 -1
- package/dist/core/memory/wiki/index.d.ts +4 -0
- package/dist/core/memory/wiki/index.js +4 -0
- package/dist/core/memory/wiki/index.js.map +1 -0
- package/dist/core/memory/wiki/store.d.ts +37 -0
- package/dist/core/memory/wiki/store.js +317 -0
- package/dist/core/memory/wiki/store.js.map +1 -0
- package/dist/core/memory/wiki/tools.d.ts +11 -0
- package/dist/core/memory/wiki/tools.js +291 -0
- package/dist/core/memory/wiki/tools.js.map +1 -0
- package/dist/core/memory/wiki/types.d.ts +25 -0
- package/dist/core/memory/wiki/types.js +2 -0
- package/dist/core/memory/wiki/types.js.map +1 -0
- package/dist/core/prompts/static/ltm.md +4 -4
- package/dist/core/prompts/system.d.ts +4 -0
- package/dist/core/prompts/system.js +36 -4
- package/dist/core/prompts/system.js.map +1 -1
- package/dist/core/skills/built-in/hooman-config/SKILL.md +5 -17
- package/dist/core/state/tool-approvals.js +5 -5
- package/dist/core/tools/index.d.ts +1 -1
- package/dist/core/tools/index.js +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/plan.d.ts +2 -2
- package/dist/core/utils/paths.d.ts +6 -0
- package/dist/core/utils/paths.js +6 -0
- package/dist/core/utils/paths.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +12 -3
- package/dist/core/memory/ltm/embed.d.ts +0 -16
- package/dist/core/memory/ltm/embed.js +0 -49
- package/dist/core/memory/ltm/embed.js.map +0 -1
- package/dist/core/tools/wiki.d.ts +0 -11
- package/dist/core/tools/wiki.js +0 -560
- package/dist/core/tools/wiki.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type PageFrontmatter = {
|
|
2
|
+
title?: string;
|
|
3
|
+
summary?: string;
|
|
4
|
+
tags?: string[];
|
|
5
|
+
related?: string[];
|
|
6
|
+
type?: string;
|
|
7
|
+
created?: string;
|
|
8
|
+
updated?: string;
|
|
9
|
+
};
|
|
10
|
+
export type PageRecord = {
|
|
11
|
+
path: string;
|
|
12
|
+
absolutePath: string;
|
|
13
|
+
title: string;
|
|
14
|
+
summary: string;
|
|
15
|
+
tags: string[];
|
|
16
|
+
related: string[];
|
|
17
|
+
type: string | null;
|
|
18
|
+
created: string | null;
|
|
19
|
+
updated: string | null;
|
|
20
|
+
wordCount: number;
|
|
21
|
+
mtime: string;
|
|
22
|
+
content: string;
|
|
23
|
+
body: string;
|
|
24
|
+
frontmatter: PageFrontmatter;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/memory/wiki/types.ts"],"names":[],"mappings":""}
|
|
@@ -12,7 +12,7 @@ Use it to improve continuity, not as a replacement for the current conversation
|
|
|
12
12
|
- Track long-running goals and durable context across sessions
|
|
13
13
|
- Remember facts that reduce repetitive clarification
|
|
14
14
|
|
|
15
|
-
### When To Load (
|
|
15
|
+
### When To Load (memory_search)
|
|
16
16
|
|
|
17
17
|
- Search memory when:
|
|
18
18
|
- the user references prior work ("continue", "as before", "last time")
|
|
@@ -21,7 +21,7 @@ Use it to improve continuity, not as a replacement for the current conversation
|
|
|
21
21
|
- Do not search memory for simple self-contained requests where current context is enough
|
|
22
22
|
- Prefer targeted queries over broad fishing searches
|
|
23
23
|
|
|
24
|
-
### When To Save (
|
|
24
|
+
### When To Save (memory_store)
|
|
25
25
|
|
|
26
26
|
- Store only information that is:
|
|
27
27
|
- durable (likely useful in future sessions)
|
|
@@ -38,8 +38,8 @@ Use it to improve continuity, not as a replacement for the current conversation
|
|
|
38
38
|
|
|
39
39
|
### How To Maintain Memory
|
|
40
40
|
|
|
41
|
-
- If new info refines/corrects existing memory, use `
|
|
42
|
-
- If memory becomes obsolete/incorrect, use `
|
|
41
|
+
- If new info refines/corrects existing memory, use `memory_update` instead of creating duplicates
|
|
42
|
+
- If memory becomes obsolete/incorrect, use `memory_archive` rather than hard deletion
|
|
43
43
|
- Keep memory entries concise and normalized for retrieval quality
|
|
44
44
|
- Avoid near-duplicates; prefer one high-quality memory over many weak ones
|
|
45
45
|
|
|
@@ -9,11 +9,15 @@ export declare class System {
|
|
|
9
9
|
private readonly config;
|
|
10
10
|
private readonly mode;
|
|
11
11
|
private data;
|
|
12
|
+
private sourceFingerprint;
|
|
13
|
+
private compiledTemplate;
|
|
12
14
|
constructor(path: string, config: Config, mode?: SystemMode);
|
|
13
15
|
private staticPromptFiles;
|
|
14
16
|
private readBundledStaticPrompts;
|
|
15
17
|
private readBundledHarnessPrompts;
|
|
16
18
|
private readCwdAgentsInstructions;
|
|
19
|
+
/** Stats prompt sources so we only re-read disk + recompile Handlebars when files change. */
|
|
20
|
+
private computeSourceFingerprint;
|
|
17
21
|
private readRawText;
|
|
18
22
|
get content(): string;
|
|
19
23
|
/** Plain object for Handlebars (`{{name}}`, `{{llm.model}}`, …). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import handlebars from "handlebars";
|
|
@@ -40,6 +40,8 @@ export class System {
|
|
|
40
40
|
config;
|
|
41
41
|
mode;
|
|
42
42
|
data = "";
|
|
43
|
+
sourceFingerprint = "";
|
|
44
|
+
compiledTemplate = null;
|
|
43
45
|
constructor(path, config, mode = "default") {
|
|
44
46
|
this.path = path;
|
|
45
47
|
this.config = config;
|
|
@@ -114,6 +116,32 @@ export class System {
|
|
|
114
116
|
}
|
|
115
117
|
return readFileSync(path, "utf8").trim();
|
|
116
118
|
}
|
|
119
|
+
/** Stats prompt sources so we only re-read disk + recompile Handlebars when files change. */
|
|
120
|
+
computeSourceFingerprint() {
|
|
121
|
+
const parts = [];
|
|
122
|
+
const pushPath = (label, filePath) => {
|
|
123
|
+
if (!existsSync(filePath)) {
|
|
124
|
+
parts.push(`${label}:missing`);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const st = statSync(filePath);
|
|
128
|
+
parts.push(`${label}:${st.mtimeMs}:${st.size}`);
|
|
129
|
+
};
|
|
130
|
+
pushPath("instructions", this.path);
|
|
131
|
+
const staticDir = join(dirname(fileURLToPath(import.meta.url)), "static");
|
|
132
|
+
for (const file of this.staticPromptFiles()) {
|
|
133
|
+
pushPath(`static:${file}`, join(staticDir, file));
|
|
134
|
+
}
|
|
135
|
+
const harnessDir = join(dirname(fileURLToPath(import.meta.url)), "harness");
|
|
136
|
+
for (const { key, file } of HARNESS_PROMPT_FILES) {
|
|
137
|
+
if (!this.config.prompts[key]) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
pushPath(`harness:${file}`, join(harnessDir, file));
|
|
141
|
+
}
|
|
142
|
+
pushPath("agents-md", join(process.cwd(), EXTRA_CWD_INSTRUCTIONS));
|
|
143
|
+
return parts.join("|");
|
|
144
|
+
}
|
|
117
145
|
readRawText() {
|
|
118
146
|
const instructions = existsSync(this.path)
|
|
119
147
|
? readFileSync(this.path, "utf8").trim()
|
|
@@ -155,9 +183,13 @@ export class System {
|
|
|
155
183
|
};
|
|
156
184
|
}
|
|
157
185
|
async reload() {
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
186
|
+
const fp = this.computeSourceFingerprint();
|
|
187
|
+
if (fp !== this.sourceFingerprint || this.compiledTemplate === null) {
|
|
188
|
+
const raw = this.readRawText();
|
|
189
|
+
this.compiledTemplate = compile(raw);
|
|
190
|
+
this.sourceFingerprint = fp;
|
|
191
|
+
}
|
|
192
|
+
this.data = this.compiledTemplate(this.context()).trim();
|
|
161
193
|
}
|
|
162
194
|
}
|
|
163
195
|
//# sourceMappingURL=system.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/core/prompts/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
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,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC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;QACrB,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,oEAAoE;IAC5D,OAAO;QACb,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;YACtB,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;YACpB,WAAW,EAAE,2BAA2B,EAAE;YAC1C,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG;YAC1B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI;YAC5B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU;YAClC,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,MAAM,EAAE,GAAG,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAC3C,IAAI,EAAE,KAAK,IAAI,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"}
|
|
@@ -20,7 +20,7 @@ Use this skill when the user asks you to inspect, explain, or change Hooman's ow
|
|
|
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
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.
|
|
22
22
|
4. Unknown keys are unsupported and may be dropped when Hooman parses and persists the config.
|
|
23
|
-
5.
|
|
23
|
+
5. `tools.ltm` has only `enabled` (embed model is fixed in Hooman). `tools.wiki` has only `enabled`.
|
|
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
|
|
@@ -83,13 +83,7 @@ This is the default shape Hooman writes when `~/.hooman/config.json` is missing:
|
|
|
83
83
|
"enabled": true
|
|
84
84
|
},
|
|
85
85
|
"ltm": {
|
|
86
|
-
"enabled": false
|
|
87
|
-
"chroma": {
|
|
88
|
-
"url": "http://127.0.0.1:8000",
|
|
89
|
-
"collection": {
|
|
90
|
-
"memory": "memory"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
86
|
+
"enabled": false
|
|
93
87
|
},
|
|
94
88
|
"wiki": {
|
|
95
89
|
"enabled": false
|
|
@@ -359,13 +353,7 @@ Long-term memory:
|
|
|
359
353
|
{
|
|
360
354
|
"tools": {
|
|
361
355
|
"ltm": {
|
|
362
|
-
"enabled": true
|
|
363
|
-
"chroma": {
|
|
364
|
-
"url": "http://127.0.0.1:8000",
|
|
365
|
-
"collection": {
|
|
366
|
-
"memory": "memory"
|
|
367
|
-
}
|
|
368
|
-
}
|
|
356
|
+
"enabled": true
|
|
369
357
|
}
|
|
370
358
|
}
|
|
371
359
|
}
|
|
@@ -383,7 +371,7 @@ Wiki:
|
|
|
383
371
|
}
|
|
384
372
|
```
|
|
385
373
|
|
|
386
|
-
Semantic search uses a local QMD index at `$HOOMAN_HOME/wiki/.qmd/index.sqlite
|
|
374
|
+
Semantic search uses a local QMD index at `$HOOMAN_HOME/wiki/.qmd/index.sqlite`.
|
|
387
375
|
|
|
388
376
|
Agents:
|
|
389
377
|
|
|
@@ -398,7 +386,7 @@ Agents:
|
|
|
398
386
|
}
|
|
399
387
|
```
|
|
400
388
|
|
|
401
|
-
Defaults: `todo`, `fetch`, `filesystem`, `shell`, `sleep`, and `agents` enabled; `ltm` and `wiki` disabled; LTM
|
|
389
|
+
Defaults: `todo`, `fetch`, `filesystem`, `shell`, `sleep`, and `agents` enabled; `ltm` and `wiki` disabled; LTM embed model is fixed in Hooman as **embeddinggemma** (`hf:ggml-org/embeddinggemma-300M-GGUF/embeddinggemma-300M-Q8_0.gguf`); vectors live in `$HOOMAN_HOME/ltm.sqlite`. Wiki search is QMD-only under `$HOOMAN_HOME/wiki/.qmd/` when `tools.wiki.enabled` is true. MCP server definitions and installed skill files are not controlled by config tool toggles; do not inspect or edit them for this skill. A missing config file is created with `agents.concurrency: 2`; if `tools.agents.concurrency` is omitted while merging partial tool config, Hooman uses `3`.
|
|
402
390
|
|
|
403
391
|
## Instructions
|
|
404
392
|
|
|
@@ -37,10 +37,10 @@ export const INTERNAL_ALWAYS_ALLOWED = new Set([
|
|
|
37
37
|
"wiki_stats",
|
|
38
38
|
"wiki_write_file",
|
|
39
39
|
// Long-term memory
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
40
|
+
"memory_archive",
|
|
41
|
+
"memory_search",
|
|
42
|
+
"memory_store",
|
|
43
|
+
"memory_update",
|
|
44
44
|
// Filesystem (list / search / metadata)
|
|
45
45
|
"directory_tree",
|
|
46
46
|
"get_file_info",
|
|
@@ -83,7 +83,7 @@ export const PLAN_MODE_VISIBLE = new Set([
|
|
|
83
83
|
"wiki_stats",
|
|
84
84
|
"wiki_write_file",
|
|
85
85
|
// Long-term memory
|
|
86
|
-
"
|
|
86
|
+
"memory_search",
|
|
87
87
|
// Filesystem (list / search / metadata)
|
|
88
88
|
"directory_tree",
|
|
89
89
|
"get_file_info",
|
|
@@ -8,4 +8,4 @@ export { createThinkingTools } from "./thinking.js";
|
|
|
8
8
|
export { createTimeTools } from "./time.js";
|
|
9
9
|
export { createTodoTools } from "./todo.js";
|
|
10
10
|
export { createWebSearchTools } from "./web-search.js";
|
|
11
|
-
export { createWikiTools } from "
|
|
11
|
+
export { createWikiTools } from "../memory/wiki/index.js";
|
package/dist/core/tools/index.js
CHANGED
|
@@ -8,5 +8,5 @@ export { createThinkingTools } from "./thinking.js";
|
|
|
8
8
|
export { createTimeTools } from "./time.js";
|
|
9
9
|
export { createTodoTools } from "./todo.js";
|
|
10
10
|
export { createWebSearchTools } from "./web-search.js";
|
|
11
|
-
export { createWikiTools } from "
|
|
11
|
+
export { createWikiTools } from "../memory/wiki/index.js";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { JSONValue } from "@strands-agents/sdk";
|
|
2
|
-
export declare function createPlanTools(): (import("@strands-agents/sdk").InvokableTool<{
|
|
2
|
+
export declare function createPlanTools(): (import("@strands-agents/sdk").InvokableTool<Record<string, never>, JSONValue> | import("@strands-agents/sdk").InvokableTool<{
|
|
3
3
|
reason?: string | undefined;
|
|
4
|
-
}, JSONValue>
|
|
4
|
+
}, JSONValue>)[];
|
|
@@ -7,3 +7,9 @@ export declare const attachmentsPath: () => string;
|
|
|
7
7
|
export declare const plansPath: () => string;
|
|
8
8
|
export declare const skillsPath: () => string;
|
|
9
9
|
export declare const wikiPath: () => string;
|
|
10
|
+
/** Fixed wiki search index SQLite DB under the wiki directory (not configurable). */
|
|
11
|
+
export declare const wikiDbPath: () => string;
|
|
12
|
+
/** Fixed path for long-term memory SQLite DB (not configurable). */
|
|
13
|
+
export declare const ltmDbPath: () => string;
|
|
14
|
+
/** Shared GGUF model cache for LTM and QMD (wiki). */
|
|
15
|
+
export declare const modelsCachePath: () => string;
|
package/dist/core/utils/paths.js
CHANGED
|
@@ -33,4 +33,10 @@ export const skillsPath = () => {
|
|
|
33
33
|
export const wikiPath = () => {
|
|
34
34
|
return join(basePath(), "wiki");
|
|
35
35
|
};
|
|
36
|
+
/** Fixed wiki search index SQLite DB under the wiki directory (not configurable). */
|
|
37
|
+
export const wikiDbPath = () => join(wikiPath(), ".qmd", "index.sqlite");
|
|
38
|
+
/** Fixed path for long-term memory SQLite DB (not configurable). */
|
|
39
|
+
export const ltmDbPath = () => join(basePath(), "ltm.sqlite");
|
|
40
|
+
/** Shared GGUF model cache for LTM and QMD (wiki). */
|
|
41
|
+
export const modelsCachePath = () => join(basePath(), ".models");
|
|
36
42
|
//# sourceMappingURL=paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/core/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,eAAe,GAAG,aAAa,CAAC;AAEtC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,CAAC;IACtD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,G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CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,YAAY,CAAC,CAAC;AAE9D,sDAAsD;AACtD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { bootstrap } from "./core/index.js";
|
|
2
2
|
export type { AcpMeta, BootstrapMeta, BootstrapMode } from "./core/index.js";
|
|
3
|
-
export { Config as HoomanConfig, LlmProvider } from "./core/config.js";
|
|
3
|
+
export { Config as HoomanConfig, DEFAULT_LTM_EMBED_MODEL, DEFAULT_WIKI_EMBED_MODEL, DEFAULT_WIKI_GENERATE_MODEL, DEFAULT_WIKI_RERANK_MODEL, LlmProvider, } from "./core/config.js";
|
|
4
4
|
export type { CompactionConfig, ConfigData, LlmConfig, LtmConfig, NamedLlmConfig, PromptsConfig, SearchConfig, ToolsConfig, WikiConfig, } from "./core/config.js";
|
|
5
|
-
export { attachmentsPath, basePath, configJsonPath, instructionsMdPath, mcpJsonPath, sessionsPath, skillsPath, wikiPath, } from "./core/utils/paths.js";
|
|
5
|
+
export { attachmentsPath, basePath, configJsonPath, instructionsMdPath, ltmDbPath, modelsCachePath, mcpJsonPath, sessionsPath, skillsPath, wikiPath, } from "./core/utils/paths.js";
|
|
6
6
|
export { attachmentDiagnosticBlock, attachmentPathsToPromptBlocks, normalizeAttachmentPaths, readAttachmentAsBlocksOrBase64, } from "./core/utils/attachments.js";
|
|
7
7
|
export type { AttachmentBinaryFallback, AttachmentMediaBlocks, AttachmentReadResult, } from "./core/utils/attachments.js";
|
|
8
8
|
export { detectDocumentFormat, detectImageFormat, detectVideoFormat, } from "./core/utils/file-formats.js";
|
|
@@ -45,10 +45,9 @@ export type { ArchiveMemoryInput, LongTermMemoryOptions, LongTermMemoryScope, Me
|
|
|
45
45
|
export { LazySessionManager } from "./core/memory/stm/lazy-session-manager.js";
|
|
46
46
|
export type { LazySessionManagerConfig } from "./core/memory/stm/lazy-session-manager.js";
|
|
47
47
|
export { FlatFileStorage } from "./core/memory/stm/flat-file-storage.js";
|
|
48
|
-
export { HFEmbedding } from "./core/memory/ltm/embed.js";
|
|
49
48
|
export type { Memory, MemoryStatus, MemoryType, } from "./core/memory/ltm/types.js";
|
|
50
|
-
export { DEFAULT_DEDUPE_THRESHOLD, DEFAULT_HALF_LIFE_MS, DEFAULT_REINFORCEMENT_STEP,
|
|
51
|
-
export type {
|
|
49
|
+
export { DEFAULT_DEDUPE_THRESHOLD, DEFAULT_HALF_LIFE_MS, DEFAULT_REINFORCEMENT_STEP, buildMemorySqlFilter, clampSearchLimit, clampUnitInterval, getEffectiveStrength, similarity, toLtmMemoryRow, toMemory, } from "./core/memory/ltm/utils.js";
|
|
50
|
+
export type { LtmMemoryRow } from "./core/memory/ltm/utils.js";
|
|
52
51
|
export { BUILTIN_AGENT_CONFIGS, BUILTIN_AGENT_KINDS, RUN_AGENTS_TOOL_NAME, createRunAgentsTools, loadBuiltInAgentDefinitions, runAgentJobs, } from "./core/agents/index.js";
|
|
53
52
|
export type { AgentConfig, AgentDefinition, AgentJob, AgentJobResult, AgentKind, RunAgentJobsResult, } from "./core/agents/index.js";
|
|
54
53
|
export { EXIT_REQUESTED_CODE, EXIT_REQUESTED_STATE_KEY, consumeExitRequest, isExitRequested, requestExit, } from "./core/state/exit-request.js";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Flat public API for implementation consumers. UI and client-protocol entry
|
|
2
2
|
// points stay internal to the CLI package surface.
|
|
3
3
|
export { bootstrap } from "./core/index.js";
|
|
4
|
-
export { Config as HoomanConfig, LlmProvider } from "./core/config.js";
|
|
5
|
-
export { attachmentsPath, basePath, configJsonPath, instructionsMdPath, mcpJsonPath, sessionsPath, skillsPath, wikiPath, } from "./core/utils/paths.js";
|
|
4
|
+
export { Config as HoomanConfig, DEFAULT_LTM_EMBED_MODEL, DEFAULT_WIKI_EMBED_MODEL, DEFAULT_WIKI_GENERATE_MODEL, DEFAULT_WIKI_RERANK_MODEL, LlmProvider, } from "./core/config.js";
|
|
5
|
+
export { attachmentsPath, basePath, configJsonPath, instructionsMdPath, ltmDbPath, modelsCachePath, mcpJsonPath, sessionsPath, skillsPath, wikiPath, } from "./core/utils/paths.js";
|
|
6
6
|
export { attachmentDiagnosticBlock, attachmentPathsToPromptBlocks, normalizeAttachmentPaths, readAttachmentAsBlocksOrBase64, } from "./core/utils/attachments.js";
|
|
7
7
|
export { detectDocumentFormat, detectImageFormat, detectVideoFormat, } from "./core/utils/file-formats.js";
|
|
8
8
|
export { getCwd, runWithCwd } from "./core/utils/cwd-context.js";
|
|
@@ -35,8 +35,7 @@ export { StrandsTensorZeroModel, } from "./core/models/tensorzero/index.js";
|
|
|
35
35
|
export { LongTermMemoryStore, createLongTermMemoryStore, createLongTermMemoryTools, createShortTermMemory, } from "./core/memory/index.js";
|
|
36
36
|
export { LazySessionManager } from "./core/memory/stm/lazy-session-manager.js";
|
|
37
37
|
export { FlatFileStorage } from "./core/memory/stm/flat-file-storage.js";
|
|
38
|
-
export {
|
|
39
|
-
export { DEFAULT_DEDUPE_THRESHOLD, DEFAULT_HALF_LIFE_MS, DEFAULT_REINFORCEMENT_STEP, buildWhere, chromaClientArgsFromUrl, clampSearchLimit, clampUnitInterval, getEffectiveStrength, similarity, toChromaMetadata, toMemory, } from "./core/memory/ltm/utils.js";
|
|
38
|
+
export { DEFAULT_DEDUPE_THRESHOLD, DEFAULT_HALF_LIFE_MS, DEFAULT_REINFORCEMENT_STEP, buildMemorySqlFilter, clampSearchLimit, clampUnitInterval, getEffectiveStrength, similarity, toLtmMemoryRow, toMemory, } from "./core/memory/ltm/utils.js";
|
|
40
39
|
export { BUILTIN_AGENT_CONFIGS, BUILTIN_AGENT_KINDS, RUN_AGENTS_TOOL_NAME, createRunAgentsTools, loadBuiltInAgentDefinitions, runAgentJobs, } from "./core/agents/index.js";
|
|
41
40
|
export { EXIT_REQUESTED_CODE, EXIT_REQUESTED_STATE_KEY, consumeExitRequest, isExitRequested, requestExit, } from "./core/state/exit-request.js";
|
|
42
41
|
export { INTERNAL_ALWAYS_ALLOWED as TOOL_APPROVAL_INTERNAL_ALWAYS_ALLOWED, allowToolForSession, getSessionAllowedTools, isToolSessionAllowed, planModeWriteEditRejectionMessage, } from "./core/state/tool-approvals.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,mDAAmD;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,mDAAmD;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAa1B,OAAO,EACL,eAAe,EACf,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,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mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,iCAAiC,GAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,cAAc,GAEf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hoomanjs",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.3",
|
|
4
4
|
"description": "Hackable AI agent toolkit for building local CLI, ACP, MCP, and channel-driven workflows.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Vaibhav Pandey",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"typecheck": "tsc --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
56
57
|
"@types/jsdom": "^28.0.1",
|
|
57
58
|
"@types/lodash": "^4.17.24",
|
|
58
59
|
"@types/luxon": "^3.7.1",
|
|
@@ -76,14 +77,13 @@
|
|
|
76
77
|
"@anthropic-ai/sdk": "^0.89.0",
|
|
77
78
|
"@aws-sdk/client-bedrock-runtime": "^3.1028.0",
|
|
78
79
|
"@google/genai": "^1.40.0",
|
|
79
|
-
"@huggingface/transformers": "^4.0.1",
|
|
80
80
|
"@mendable/firecrawl-js": "^4.21.0",
|
|
81
81
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
82
82
|
"@mozilla/readability": "^0.6.0",
|
|
83
83
|
"@strands-agents/sdk": "^1.0.0",
|
|
84
84
|
"@tavily/core": "^0.7.2",
|
|
85
85
|
"@tobilu/qmd": "^2.1.0",
|
|
86
|
-
"
|
|
86
|
+
"better-sqlite3": "^12.8.0",
|
|
87
87
|
"cli-highlight": "^2.1.11",
|
|
88
88
|
"cli-spinners": "^3.4.0",
|
|
89
89
|
"commander": "^14.0.3",
|
|
@@ -101,10 +101,12 @@
|
|
|
101
101
|
"luxon": "^3.7.2",
|
|
102
102
|
"marked": "^18.0.2",
|
|
103
103
|
"millify": "^6.1.0",
|
|
104
|
+
"node-llama-cpp": "^3.18.1",
|
|
104
105
|
"ollama": "^0.6.3",
|
|
105
106
|
"openai": "^6.34.0",
|
|
106
107
|
"react": "^19.2.5",
|
|
107
108
|
"slugify": "^1.6.9",
|
|
109
|
+
"sqlite-vec": "^0.1.9",
|
|
108
110
|
"turndown": "^7.2.4",
|
|
109
111
|
"zod": "^4.3.6"
|
|
110
112
|
},
|
|
@@ -112,5 +114,12 @@
|
|
|
112
114
|
"@tobilu/qmd": {
|
|
113
115
|
"typescript": "$typescript"
|
|
114
116
|
}
|
|
117
|
+
},
|
|
118
|
+
"optionalDependencies": {
|
|
119
|
+
"sqlite-vec-darwin-arm64": "0.1.9",
|
|
120
|
+
"sqlite-vec-darwin-x64": "0.1.9",
|
|
121
|
+
"sqlite-vec-linux-arm64": "0.1.9",
|
|
122
|
+
"sqlite-vec-linux-x64": "0.1.9",
|
|
123
|
+
"sqlite-vec-windows-x64": "0.1.9"
|
|
115
124
|
}
|
|
116
125
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { EmbeddingFunction } from "chromadb";
|
|
2
|
-
/**
|
|
3
|
-
* Chroma {@link EmbeddingFunction} backed by `@huggingface/transformers`
|
|
4
|
-
* `feature-extraction` (mean-pooled, L2-normalized sentence embeddings).
|
|
5
|
-
*
|
|
6
|
-
* The pipeline is loaded lazily on first {@link HFEmbedding.generate} call so
|
|
7
|
-
* constructors stay synchronous and startup stays fast.
|
|
8
|
-
*/
|
|
9
|
-
export declare class HFEmbedding implements EmbeddingFunction {
|
|
10
|
-
private readonly modelId;
|
|
11
|
-
private pipePromise;
|
|
12
|
-
constructor(modelId?: string);
|
|
13
|
-
get name(): string;
|
|
14
|
-
private getPipeline;
|
|
15
|
-
generate(texts: string[]): Promise<number[][]>;
|
|
16
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { pipeline } from "@huggingface/transformers";
|
|
2
|
-
const DEFAULT_MODEL = process.env.HF_EMBEDDING_MODEL ?? "Xenova/bge-small-en-v1.5";
|
|
3
|
-
/**
|
|
4
|
-
* Chroma {@link EmbeddingFunction} backed by `@huggingface/transformers`
|
|
5
|
-
* `feature-extraction` (mean-pooled, L2-normalized sentence embeddings).
|
|
6
|
-
*
|
|
7
|
-
* The pipeline is loaded lazily on first {@link HFEmbedding.generate} call so
|
|
8
|
-
* constructors stay synchronous and startup stays fast.
|
|
9
|
-
*/
|
|
10
|
-
export class HFEmbedding {
|
|
11
|
-
modelId;
|
|
12
|
-
pipePromise = null;
|
|
13
|
-
constructor(modelId = DEFAULT_MODEL) {
|
|
14
|
-
this.modelId = modelId;
|
|
15
|
-
}
|
|
16
|
-
get name() {
|
|
17
|
-
return `hf-transformers:${this.modelId}`;
|
|
18
|
-
}
|
|
19
|
-
async getPipeline() {
|
|
20
|
-
if (!this.pipePromise) {
|
|
21
|
-
this.pipePromise = pipeline("feature-extraction", this.modelId);
|
|
22
|
-
}
|
|
23
|
-
return this.pipePromise;
|
|
24
|
-
}
|
|
25
|
-
async generate(texts) {
|
|
26
|
-
if (texts.length === 0) {
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
29
|
-
const pipe = await this.getPipeline();
|
|
30
|
-
const tensor = await pipe(texts, {
|
|
31
|
-
pooling: "mean",
|
|
32
|
-
normalize: true,
|
|
33
|
-
});
|
|
34
|
-
const raw = tensor.tolist();
|
|
35
|
-
if (texts.length === 1) {
|
|
36
|
-
if (Array.isArray(raw) && raw.every((x) => typeof x === "number")) {
|
|
37
|
-
return [raw];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (Array.isArray(raw) &&
|
|
41
|
-
raw.length > 0 &&
|
|
42
|
-
Array.isArray(raw[0]) &&
|
|
43
|
-
raw[0].every((x) => typeof x === "number")) {
|
|
44
|
-
return raw;
|
|
45
|
-
}
|
|
46
|
-
throw new Error("Unexpected embedding tensor shape from feature-extraction pipeline");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=embed.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/core/memory/ltm/embed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAIrD,MAAM,aAAa,GACjB,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IACL,OAAO,CAAS;IACzB,WAAW,GAA8C,IAAI,CAAC;IAEtE,YAAY,UAAkB,aAAa;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,mBAAmB,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAEO,KAAK,CAAC,WAAW;QACvB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,GAAG,QAAQ,CACzB,oBAAoB,EACpB,IAAI,CAAC,OAAO,CACyB,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,KAAe;QAC5B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;YAC/B,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAa,CAAC;QAEvC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC;gBAClE,OAAO,CAAC,GAAe,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,IACE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAClB,GAAG,CAAC,MAAM,GAAG,CAAC;YACd,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACpB,GAAG,CAAC,CAAC,CAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EACzD,CAAC;YACD,OAAO,GAAiB,CAAC;QAC3B,CAAC;QAED,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { JSONValue } from "@strands-agents/sdk";
|
|
2
|
-
import type { Config } from "../config.js";
|
|
3
|
-
export declare function createWikiTools(_config: Config): (import("@strands-agents/sdk").InvokableTool<Record<string, never>, JSONValue> | import("@strands-agents/sdk").InvokableTool<{
|
|
4
|
-
type: "page";
|
|
5
|
-
}, JSONValue> | import("@strands-agents/sdk").InvokableTool<{
|
|
6
|
-
kind: "index" | "page" | "log" | "schema";
|
|
7
|
-
path?: string | undefined;
|
|
8
|
-
}, JSONValue> | import("@strands-agents/sdk").InvokableTool<{
|
|
9
|
-
query: string;
|
|
10
|
-
k?: number | undefined;
|
|
11
|
-
}, JSONValue>)[];
|