Files
sundynix-agentix/sundynix-shared/contract/prompt.go
T
Blizzard 5736ad145e feat(prompts): v2 DB 控制面热切换 —— 版本留存 + 不重启即生效
在 v1(注册表+文件覆盖)上加 DB 管理层与热切换,镜像 model-config 控制面:
- store: sundynix_prompt 表(key/version/content/active) + ActivePrompts/ListPrompts/
  CreateVersion/Activate/Deactivate
- 控制面: ServePrompts/RequestActivePrompts(+Retry)/PublishPromptsUpdated/SubscribePromptsUpdated;
  prompts.ApplyOverrides 整体替换覆盖集(DB 激活集为权威)
- gateway API: GET/POST /api/v1/prompts、version/activate/deactivate;激活/撤销即广播
- dispatcher/mcp-go: 启动拉激活集 + 订阅热更新(不重启)
- live: 建版本→激活→mcp-go 图谱抽取 2→0→回滚 2(全程不重启);deactivate 回退代码默认;版本可回溯

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 14:59:52 +08:00

9 lines
480 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package contract
// Prompt 控制面:DB 存各 prompt 的多版本,激活某版 → 经控制面热下发给各服务,
// 覆盖内置默认(不重启即生效)。镜像 model-config 控制面(ConfigGetSubject/ConfigUpdatedSubject)。
const (
SubjectPromptsGet = "sundynix.prompts.get" // request-reply:取全部激活 promptmap key→content
SubjectPromptsUpdated = "sundynix.prompts.updated" // 广播:激活集变更,消费方据此热更新
)