feat(departments): register department tools in the memory entry
This commit is contained in:
parent
736adb4903
commit
8161fae848
|
|
@ -1,5 +1,6 @@
|
|||
import { brainKernel } from "../kernel.js";
|
||||
import { createMemoryTools } from "../memory/tools.js";
|
||||
import { createDepartmentTools } from "../memory/departments-tools.js";
|
||||
import { conversationIdOf, redactSecrets, textOf, turnOf } from "../reporter.js";
|
||||
export const name = 'dsh-brain-memory';
|
||||
/** Services required before `apply` runs. */
|
||||
|
|
@ -17,6 +18,9 @@ export function apply(ctx, config) {
|
|||
for (const tool of createMemoryTools(kernel.toolDeps())) {
|
||||
toolsCtx.effect(() => tools.register(tool), `dsh-brain-memory: tool ${tool.name}`);
|
||||
}
|
||||
for (const tool of createDepartmentTools(kernel.departmentToolDeps())) {
|
||||
toolsCtx.effect(() => tools.register(tool), `dsh-brain-memory: tool ${tool.name}`);
|
||||
}
|
||||
});
|
||||
// Project the compact USER.md/MEMORY.md state into the system prompt each turn.
|
||||
// The files are generated from explicit profile/rule records only.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
import type { CloudMemoryContext, SessionEventLike, SessionLike } from '../context-types.ts'
|
||||
import { brainKernel } from '../kernel.ts'
|
||||
import { createMemoryTools } from '../memory/tools.ts'
|
||||
import { createDepartmentTools } from '../memory/departments-tools.ts'
|
||||
import { conversationIdOf, redactSecrets, textOf, turnOf } from '../reporter.ts'
|
||||
|
||||
export const name = 'dsh-brain-memory'
|
||||
|
|
@ -31,6 +32,9 @@ export function apply(ctx: CloudMemoryContext, config: unknown): void {
|
|||
for (const tool of createMemoryTools(kernel.toolDeps())) {
|
||||
toolsCtx.effect(() => tools.register(tool), `dsh-brain-memory: tool ${tool.name}`)
|
||||
}
|
||||
for (const tool of createDepartmentTools(kernel.departmentToolDeps())) {
|
||||
toolsCtx.effect(() => tools.register(tool), `dsh-brain-memory: tool ${tool.name}`)
|
||||
}
|
||||
})
|
||||
|
||||
// Project the compact USER.md/MEMORY.md state into the system prompt each turn.
|
||||
|
|
|
|||
Loading…
Reference in New Issue