优化角色注册,发现,nuwa 角色的提示词等

This commit is contained in:
sean
2025-06-11 18:03:55 +08:00
parent 821df44104
commit 283374bf09
32 changed files with 3582 additions and 2643 deletions

View File

@ -144,15 +144,17 @@ describe('ResourceManager - 用户资源发现', () => {
describe('loadUnifiedRegistry', () => {
it('应该合并系统资源和用户资源', async () => {
// 模拟系统资源
// 模拟系统资源使用正确的registry格式
const mockSystemResources = {
role: {
'assistant': {
file: '@package://prompt/domain/assistant/assistant.role.md',
name: '🙋 智能助手',
source: 'system',
format: 'dpml',
type: 'role'
protocols: {
role: {
registry: {
'assistant': {
file: '@package://prompt/domain/assistant/assistant.role.md',
name: '🙋 智能助手',
description: '通用助理角色,提供基础的助理服务和记忆支持'
}
}
}
}
}
@ -181,15 +183,17 @@ describe('ResourceManager - 用户资源发现', () => {
})
it('应该让用户资源覆盖同名系统资源', async () => {
// 模拟系统资源
// 模拟系统资源使用正确的registry格式
const mockSystemResources = {
role: {
'assistant': {
file: '@package://prompt/domain/assistant/assistant.role.md',
name: '🙋 智能助手',
source: 'system',
format: 'dpml',
type: 'role'
protocols: {
role: {
registry: {
'assistant': {
file: '@package://prompt/domain/assistant/assistant.role.md',
name: '🙋 智能助手',
description: '通用助理角色,提供基础的助理服务和记忆支持'
}
}
}
}
}