@alejandroroman/agent-kit 0.1.1 → 0.1.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/dist/cli/config-writer.js +5 -0
- package/dist/cli/start.js +3 -1
- package/dist/index.js +3 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.js +6 -7
- package/package.json +1 -1
|
@@ -35,6 +35,11 @@ export function createFreshConfig(opts) {
|
|
|
35
35
|
maxIterations: 20,
|
|
36
36
|
compactionThreshold: 100_000,
|
|
37
37
|
commandTimeout: 30,
|
|
38
|
+
memory: {
|
|
39
|
+
dbPath: "./data/memory.db",
|
|
40
|
+
ollamaEndpoint: "http://localhost:11434",
|
|
41
|
+
ollamaModel: "all-minilm:l6-v2",
|
|
42
|
+
},
|
|
38
43
|
},
|
|
39
44
|
agents: {},
|
|
40
45
|
cron: [],
|
package/dist/cli/start.js
CHANGED
|
@@ -46,7 +46,9 @@ export async function start() {
|
|
|
46
46
|
skillsDir: SKILLS_DIR,
|
|
47
47
|
usageStore,
|
|
48
48
|
});
|
|
49
|
-
runtime.toolRegistry.validateAgents(config.agents);
|
|
49
|
+
const warnings = runtime.toolRegistry.validateAgents(config.agents);
|
|
50
|
+
for (const w of warnings)
|
|
51
|
+
log.warn(w);
|
|
50
52
|
const { resolved, toolRegistry, agentRegistry, promptFragments, skillsIndex, soul, session } = runtime;
|
|
51
53
|
// Cron scheduler
|
|
52
54
|
const scheduler = new CronScheduler(config, toolRegistry, agentRegistry, DATA_DIR, SKILLS_DIR, usageStore);
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,9 @@ async function main() {
|
|
|
30
30
|
skillsDir: SKILLS_DIR,
|
|
31
31
|
usageStore,
|
|
32
32
|
});
|
|
33
|
-
runtime.toolRegistry.validateAgents(config.agents);
|
|
33
|
+
const toolWarnings = runtime.toolRegistry.validateAgents(config.agents);
|
|
34
|
+
for (const w of toolWarnings)
|
|
35
|
+
console.warn(` ⚠ ${w}`);
|
|
34
36
|
const { resolved, toolRegistry, agentRegistry, promptFragments, skillsIndex, soul, session } = runtime;
|
|
35
37
|
const sandbox = config.agents[agentName]?.sandbox ?? config.defaults.sandbox;
|
|
36
38
|
console.log("Agent Kit");
|
package/dist/tools/registry.d.ts
CHANGED
package/dist/tools/registry.js
CHANGED
|
@@ -4,23 +4,22 @@ export class ToolRegistry {
|
|
|
4
4
|
this.tools.set(tool.name, tool);
|
|
5
5
|
}
|
|
6
6
|
resolve(names) {
|
|
7
|
-
return names
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
throw new Error(`Unknown tool "${name}"`);
|
|
11
|
-
return tool;
|
|
12
|
-
});
|
|
7
|
+
return names
|
|
8
|
+
.map((name) => this.tools.get(name))
|
|
9
|
+
.filter((tool) => !!tool);
|
|
13
10
|
}
|
|
14
11
|
list() {
|
|
15
12
|
return [...this.tools.keys()];
|
|
16
13
|
}
|
|
17
14
|
validateAgents(agents) {
|
|
15
|
+
const warnings = [];
|
|
18
16
|
for (const [agentName, agent] of Object.entries(agents)) {
|
|
19
17
|
for (const toolName of agent.tools) {
|
|
20
18
|
if (!this.tools.has(toolName)) {
|
|
21
|
-
|
|
19
|
+
warnings.push(`Unknown tool "${toolName}" for agent "${agentName}" — skipping`);
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
}
|
|
23
|
+
return warnings;
|
|
25
24
|
}
|
|
26
25
|
}
|