Commit Graph
100 Commits
Author SHA1 Message Date
Aska 24d5924cee feat(model): Top5#1 结构化流事件 + WS 事件体系(对齐 OpenClaw AssistantMessageEvent)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
- 新增 model/stream.go:StreamKind(text/thinking/tool_call 各 start/delta/end + tool_execution)
  + StreamEvent{Kind,Delta,Index,ID}。
- ChatStream 签名 onChunk func(delta string)→onEvent func(StreamEvent);loop OnStream 同改;
  streamStep 转发结构化事件。
- openai:text_delta + text_start/text_end(正文三段式);anthropic:文本块 text_*/tool_call_*
  按块 Index(content_block_stop 分支)真分段;fallback:有事件即交付。
- ws_hub:wsEvent 壳补 turnId/seq;新增 broadcastStream;streamChat 每帧打 turnId+seq;
  stream.go 把事件 publish 到 bus ws.stream。
- ws_bridge:streamEventData 映射 text_*→message.start/delta/end、thinking_*→thinking.*、
  tool_call_*→tool_call.*、tool_execution_update→tool_execution.update,未知回退 stream_chunk。
- 前端 ws.ts:解析 message.start/delta/end、thinking.start/delta/end(pendingThinking)、
  tool_call.start/end→addTool、tool_execution.update;保留旧 stream_chunk/thinking/tool_used 兼容;
  types.ts 补 turnId/seq。Docs/api-client.md 增 §3.1 v0.4。

已知限制(注释/文档标注):turnId 在 OnStream→bus→relay 路径暂为空(StreamEvent 无 turnId 字段,
bus ws.stream 载荷不带 turn);OpenAI adapter 未解析 tool_call 段;thinking 段两 adapter 暂不发;
tool_execution.update 是保留项(随工具循环钩子后置)。go build/vet/test + 前端 tsc 全绿。
2026-09-06 16:31:28 +08:00
Aska 54f0b75646 docs(AGENTS): 新增 §9.5 学习成熟开源实现/禁止闭门造车铁律
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
已成熟能力/模块必须优先学习并复用现有开源项目业务逻辑(OpenClaw/Claude Code/MCP SDK/
Swarm/CrewAI/OneBot/Miuix 等),严禁凭空推演。每个 design 主题实现前先查开源对照清单
(DevDocs/开源对照清单.md),未对照不得开工。上下文压缩后本铁律强制生效。
2026-09-06 16:07:11 +08:00
Aska eddb9b9891 feat(wire): 地基④ wire.go 接 vision/voice/mcp/skill/exec 五个子系统,从死代码变可用
- vision:model.Router 绑 WithVisionModel(LLM_VISION_MODEL);vision.RegisterTools(VisualTool/OCRTool)
  用同一 OpenAICompatibleAdapter(LLM_BASE_URL 为空则跳过并 Warn)。
- voice:voice.New(cfg.Voice) Chain(cloud→local→edge-tts/espeak→silent)存 a.voice。
- mcp:读 cfg.MCP.ServersJSON → 逐 Enabled server mcp.NewRegistry(...).Register(ctx)(Connect+
  DiscoverTools+RegisterTool),注册 KindMCP 能力 mcp:<name> 供 adminListPlugins 枚举;
  close() 中 Unregister 防 stdio 子进程孤儿;每 server 15s connect 超时,失败 Warn 跳过。
- skills:LoadDir(configs/skills) → skills.Register 为 KindSkill(Runner.Run 仍 ErrRunPending,
  执行留后续)。
- exec/terminal:新 terminalTool(sdk.Tool) 内部调 execProv.Execute,注册进 dispatcher;
  ExecSandbox.Enabled=false 默认拦截(授权默认关)。
- config:LLMConfig 增 VisionModel(LLM_VISION_MODEL);新增 MCPConfig/ServersJSON(MCPSERVERS_JSON)。
- 拆 5 个辅助文件(vision.go/voice.go/mcp.go/skills.go/terminal_tool.go)避免 wire.go 膨胀;
  wire.go 最终 535 行。

默认配置下各子系统干净跳过不阻断启动(LLM_BASE_URL 已配则 vision 用主模型降级)。
go build/vet/test 全绿(46 包),gofmt 干净。
2026-09-06 16:07:04 +08:00
Aska 9b207a31e8 feat(gateway): 地基③ 打通实时信号 producer→前端WS + loop 真流式 + 上行路由补全
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
打通前端 ws.ts 里那批死消费者事件(thinking/mood/tool_used/subagent_event/
task_output/device_update/reminder/backthink),并给 loop 接真 token 流式。

- wire.go:loop 建时传 OnStream(streamChunk 闭包把 delta 发 bus ws.stream_chunk);
  gateway.Deps 注入 Scheduler/Tasks/Streaming;iot 接共享总线 iot.WithBus(a.bus)。
- ws_bridge.go:hub 额外订阅 iot.>/task.>/automation.>/reminder.>/cyrene.agent.*.event,
  normalizeEvent 归一为 ws.*(device_update/task_output/task_done/automation_result/
  reminder/subagent_event);不订阅 cyrene.agent.> 以免 ask/reply 内部事件进 relay。
- ws_route.go:voice_input→ws.voice_input;subagent_ask→Scheduler.AuditContext(真实
  上下文审计,替换 pending stub);task_output_query→Manager.TaskOutput(真实输出,
  替换空 {})。
- server.go:新增 SubagentAuditor/TaskOutputStore 接口 + Deps.Scheduler/Tasks/Streaming。
- orchestration/auditcontext.go:Scheduler.AuditContext(full/tail/keyword)。
- task/manager.go:Manager.TaskOutput(id)。
- backthink:record() 补发 ws.backthink 事件。
- json tag 修正(device_update/reminder/task output 结构体加小写 tag + DeviceUpdate
  补 message),使前端分支能真正渲染。

实机验证:WS 握手 101、task manager ready、iot manager initialized(WithBus 生效)。
go build/vet/test 全绿;TestHubBridgeDeviceUpdate/TestHubBridgeSubagentProgress 覆盖
映射。dev 推至后续版本。
2026-09-06 15:53:48 +08:00
Aska 04bfa2c7a7 feat(gateway): admin 列表端点接真实数据——persona/session/memory 补 List() 并注入 gateway.Deps
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
根因:gateway.Server 定义 SessionStore/PersonaStore/MemoryStore 接口但生产从未满足:
- 底层 manager 无 List() 方法;
- wireFrontend 的 gateway.Deps{} 未传 Session/Personas/Memories。
→ /api/v1/sessions|personas 与 /api/v1/admin/{sessions,personas,memories} 恒返回 []。

改动:
- persona/registry:Registry.List() []Character(并发安全、值拷贝)。
- channel/session:SessionManager.List(ctx)(查 channel_sessions 表+按 actor_role 重建)。
- runtime/memory:Store.List(ctx)(全表,复用 scanItems)。
- gateway 三 Store 接口改为返回域类型(Character/MemoryItem),映射统一放 collect* 侧。
- cmd/cyrene/wire.go:Deps 补传 Session/Personas/Memories。
- .gitignore:cyrene→/cyrene(锚定根,不再误伤 cmd/cyrene 目录)。

实机验证:/api/v1/admin/personas 返回 {id:cyrene,name:昔涟,isDefault:true}。
2026-09-06 14:05:34 +08:00
Aska 5dae2b9741 fix(gateway): 收敛 sdk.Channel 与 adapter.PlatformAdapter 接口漂移,/admin/channels 恢复枚举
根因:sdk.Channel.Connect 为 2 参 (ctx, config any),adapter.PlatformAdapter.Connect 为
1 参 (ctx),Go 无重载 → 4 个渠道(qq-obv11/weixin-ilink/telegram/webhook)只实现 1 参
Connect,类型断言 cap.Value.(sdk.Channel) 恒失败 → /api/v1/admin/channels 恒返回 []。

收敛方向:sdk.Channel.Connect 改 1 参 (ctx),与 PlatformAdapter 生命周期子集一致;
4 个真实适配器自动满足新接口,adminListChannels 枚举成功。最小改动(不改渠道实现、
不引依赖)。同步修正 sdk_test/registry_test/extra_test 的 mock。
2026-09-06 14:04:52 +08:00
Aska 77f75b0d99 refactor(web): 前端单页收敛修正——导航式侧边栏 + 去输入模式 chip,mode 由后端自切
按设计/01 §3 + 主人要求:行为模式切换由后端/agent 自切(热切换),前端不再提供
手动切换的行为模式按钮列表。
- 侧边栏改为导航式(连接状态 / 设置 / 管理面板 / 主题),不再列行为模式按钮;
  App.tsx 还原 <Sidebar/> 布局。
- ChatInput 去掉行为模式 chip 切换条(模式不由用户手选)。
- useChat.send/chatStream 不再传 mode;消息 mode 由后端在回复时决定,
  MessageBubble 仍按 message.mode 渲染。
- ChatShell onVoice 为占位(语音处理在 agent)。
2026-09-06 14:04:46 +08:00
Aska 4aab0f501a feat(web): 前端收敛为「共享消息流 + 按消息 mode 渲染」,并补全 emoji→MD3 图标
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
架构变更(主人要求,design/07 §1/§2 已改定稿):把「9 个行为模式 = 9 个独立页面」改为
「一个共享页面 + 每条消息绑 mode,消息框按对应 mode 渲染」。
- ChatMessage 增 mode?(types.ts);useAppStore addUserMessage/beginAssistant 带 mode;
  useSendChat.send(text, mode) / chatStream body 带 mode(通知后端按 mode 回复)。
- MessageBubble 按 message.mode 分发到 components/messages/ 各形态渲染器
  (chat 气泡 / code 等宽代码块 / home 设备卡 / docs 文档卡 / work 任务卡 / vision 视觉卡)。
- ChatInput 顶部加「行为模式」chip 切换下一条消息的 mode(默认 chat);输入框上方显示当前模式。
- ModeRouter 收敛为只渲染 ChatShell;删除 9 个旧独立 mode 页面;Nav/TopBar 的 mode 改为
  「输入模式」语义;settings 归管理面板(design/10)。

同时补全上一轮 emoji→MD3 图标(约 23 文件):新增 Icon.tsx(MD3 SVG、IconName、零依赖、
离线优先),全部界面 emoji 替换为 <Icon name=... />;正文说明箭头保留。

npm run build 绿(tsc 0 错,79→71 模块,JS 284KB/gzip 86KB)。
2026-09-06 13:32:44 +08:00
Aska 265b207699 chore(deploy): dev-up.sh 的 gateway 端口优先读 .env PORT,支持自定义端口
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 13:12:22 +08:00
Aska a482bc2ea7 feat(web): MD3 矢量图标组件 + 全量 emoji 替换为新图标
新增 src/components/Icon.tsx(Material Symbols Rounded 风格,24 viewBox / currentColor /
零运行时依赖 / 可 tree-shake / 离线优先),导出 <Icon name size /> 与 IconName 类型,
覆盖全部现有界面图标的语义映射(chart/dna/chat/memory/docs/plugin/channel/device/robot/
clock/agent/night/trend/users/settings/light/ac/mic/micOff/sun/moon/lock/block/check/close/
gear/file/package/folder/shield/storage/refresh/vision/home/arrow/terminal)。

将用户端(Nav/TopBar/ChatInput/chat + 各 modes)与管理面板(sidebar 15 模块/Dashboard
卡片/System SectionTitle/Observability StatCard/Agents/Backthink/Automations/AdminTable
empty)中的 emoji 图标全部替换为 <Icon name=... />,icon 字段由 string 改为 IconName /
ReactNode。保留正文说明性箭头(如“设置→连接”)与流程方向箭头。

npm run build(tsc --noEmit + vite build)通过:79 模块,JS 300KB/gzip 90KB。
2026-09-06 13:12:22 +08:00
Aska 20305631c5 fix(gateway): WebSocket 同源/loopback 等价放行,修复生产同源跨源 403
后端 go:embed 自服务前端时,页面 origin 与网关 Host 一致(production 模式),
但不在 dev 阶段 ALLOWED_ORIGINS(5173/3000)白名单内,originChecker 记 403
导致 WS /ws/chat 握手失败。

改为:同源(origin host == request host)及 loopback 别名(localhost<->127.0.0.1)
自动放行;跨源(不同主机名)仍走白名单。安全不降级:跨源非白名单依旧拒绝。
新增 TestOriginCheckerSameHost 覆盖同源/loopback等效/跨源拒绝/同主机异端口。
2026-09-06 13:12:22 +08:00
Aska 13c7c52860 chore(deploy): dev-up.sh 兼容无 compose 插件的 Docker,回退 docker run 拉起 cyrene-pg
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
本机 Docker 29.1.3 无 compose 插件(docker compose unknown command / docker-compose 未装),
原脚本每次启动都因 docker compose up 报错而被忽略继续掩盖。改为:
  - PG 已在跑 -> 跳过
  - 有 compose 插件 -> compose
  - 否则回退 docker run 拉起 cyrene-pg
README §3 同步补注该回退行为。脚本幂等,bash -n 通过。
2026-09-06 12:15:53 +08:00
Aska 0c93bb4497 docs(deploy): README 全流程本地部署方案 + scripts/dev-up.sh 一键启动(PG→llama.cpp embedding→cyrene),路径固定 ~/apps 与 ~/.models,勿用 /tmp
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 11:39:59 +08:00
Aska 7c662511ba docs(embedding): EMBEDDING_API_URL 为完整 /v1/embeddings 端点(非 base);示例改 Qwen3-Embedding-0.6B
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 11:34:41 +08:00
Aska 6ea5affc8a test(vector): mock 对 dim<=0 不再除零(保持 dim0→ErrInvalidDim 意图) 2026-09-06 11:31:17 +08:00
Aska 111ad598be fix(vector): New 在 embedder 维度未知(API 首请求前为0)时先 probe 一次学真实维度,避免 PG 向量索引 fallback 2026-09-06 11:30:26 +08:00
Aska 74f8eada47 docs(README): Embedding 推荐更新为 Qwen3-Embedding-0.6B(Q8_0 639MB 首选,ModelScope 国内可下/GGUF,dim 1024 注意清向量表)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 11:19:17 +08:00
Aska 2d256264ec docs(README): 去除用户侧文档中的本机开发环境细节,改用通用/资源分级表述
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 10:47:48 +08:00
Aska 3ed7fbbc69 docs(README): 用户侧本地部署指南 + Embedding 模型推荐列表(bge-m3 首选,dev 环境用 bge-small-zh-v1.5)+ llama.cpp 替代说明
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 10:45:38 +08:00
Aska efc1b115c9 fix(gitignore): 修正行尾注释导致 data/cyrene 未忽略(改为纯 pattern + 独立注释行)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 10:41:32 +08:00
Aska 16ae72f24e chore(gitignore): 追加开发/运行本地产出(data/ SQLite 目录、cyrene 根构建产物;internal/webui/dist 由 dist/ 覆盖) 2026-09-06 10:41:13 +08:00
Aska cb6fac587b test(db): Open 自动建父目录改为断言成功(行为改进)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 10:40:06 +08:00
Aska 1d9c14300d fix(db): Open 自动创建父目录(自定义 DATA_DIR 首启不报错);add docker-compose.dev.yml(PG+pgvector 必需 + Ollama embedding 可选) 2026-09-06 10:39:27 +08:00
Aska cee2d26205 fix(wire): resolveDataDir 改用 cfg.DataDir(.env 的 DATA_DIR 真正生效,不再落平台默认目录)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 10:32:20 +08:00
Aska 3632e04733 feat(model): 双协议 LLM Provider(AnthropicChNativeAdapter /v1/messages + tool_use.input→Args 直接映射 + 流式重组)+ Provider 感知工厂/路由 + LLM_PROVIDER/anthropic 配置(OpenAI 兼容保留)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 09:41:06 +08:00
Aska f9650185f1 test(gateway): 补 handler/WS/admin/static/middleware 测试至覆盖率 95.9%(≥70% 达标)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
2026-09-06 08:19:31 +08:00
Aska 3146b515f3 chore(ci): 新增 CI(前端 build→go build/vet/test→cross-compile 矩阵 + 覆盖率上报);README 同步 M0-M11 状态/快速开始/技术栈/文档索引 2026-09-06 08:13:12 +08:00
Aska a7feaeb2cb feat(deploy): M11 单二进制装配(cmd/cyrene 全链路 wire + go:embed 前端 + 外置 dist 覆盖 + 优雅关闭 + SPA 静态服务);前端 build 拷到 internal/webui/dist 2026-09-06 08:10:35 +08:00
Aska f43eb17030 feat(frontend/admin): M10 后台管理面板(/admin hash 路由 + 15 大模块 + RBAC(owner/admin/viewer) + 审计 + Miuix);Docs/api-client.md v0.3 契约补全;tsc+vite build 通过 2026-09-06 07:55:04 +08:00
Aska 4c48e94659 feat(frontend): M9 模态 UI(mode 系统+共享 store+WS 客户端 + chat(思维链/工具回显/情绪徽标)/code/Agent 监控/后台思考页 + Miuix 设计 token + PWA);tsc+vite build 通过 2026-09-06 07:44:40 +08:00
Aska b3ffd51736 docs(api): M8 gateway 端点落地——login/health/chat/sessions/personas + admin 只读 + plugins/policy + WS /ws/chat 契约补全 2026-09-06 07:34:04 +08:00
Aska df70313d6d chore(deps): 添加 gorilla/websocket(WS Hub)+ robfig/cron(自动化调度) 2026-09-06 07:33:11 +08:00
Aska 6f97fded3a feat(backthink): 后台自主思考(heartbeat+事件触发 + 打扰决策 fail-closed + 主动推送活跃→IM 兜底 + 限制 + 思考记录) 2026-09-06 07:33:06 +08:00
Aska 05e23ea590 feat(gateway): 网关(REST /api/v1 + WS Hub /ws/chat + admin /api/v1/admin/* + JWT/RBAC + 审计,单端口 :8080) 2026-09-06 07:32:40 +08:00
Aska ff34b62079 feat(automations): 自动化引擎(cron 调度 + 事件触发 + AI 管线动作 + 提醒调度,bus automation.result/reminder.trigger) 2026-09-06 07:32:29 +08:00
Aska a3f6f4f687 feat(auth): JWT(HS256 stdlib) + RBAC(owner/admin/viewer) + API key + 密码 hash;config 校验 2026-09-06 07:19:28 +08:00
Aska 7f7cb8fbf7 feat(errors): 统一 AppError(Code/Message/Cause/HTTPCode + Wrap %w + HTTPStatus + ToJSON {error:{code,message}}) 2026-09-06 07:15:34 +08:00
Aska ebeecc7a32 feat(task): 任务执行模型(后台声明/前台2s转后台/bus task.done 回输出/实时输出读取/Abort 防失控) 2026-09-06 07:11:03 +08:00
Aska 430fc4666b feat(exec): 本地执行 Provider + 放权终端沙箱(白名单/工作目录/超时/输出截断/默认关)+ 文件沙箱;config 增 ExecSandbox(默认关) 2026-09-06 06:59:23 +08:00
Aska 88dc12466d feat(channels/weixin_ilink): 微信 iLink 渠道插件(扫码登录+长轮询+游标+context_token+AES-128-ECB 媒体+24h 主动推送窗口) 2026-09-06 06:49:35 +08:00
Aska 7831b0ea1b feat(channels/qq_obv11): OneBot v11 渠道插件(正/反 WS 双模式 + CQ 媒体 + 限频,stdlib 自研 WS) 2026-09-06 06:46:43 +08:00
Aska f9f5a78a02 feat(channels/telegram): Telegram 渠道插件(Bot API 长轮询/Webhook + file_id 媒体 + 主动推送强) 2026-09-06 06:38:13 +08:00
Aska 0b036645bb feat(channels/webhook): 入站回调渠道插件(JSON/Form 解析 + HMAC 签名 + InboundHandler 供 gateway 挂载,主动推送不支持) 2026-09-06 06:37:16 +08:00
Aska 7adaf490c7 feat(channel/session): 渠道↔会话映射 + 主人识别(actor元数据+白名单,不读消息内容) + 群聊隔离 + 主动推送策略(iLink24h/OneBot限频) 2026-09-06 06:36:27 +08:00
Aska 3ce9489f8e feat(tools/io): 内置 IO/网络工具(file(路径安全)/http(SSRF防护)/web-search/web-fetch/knowledge)+ 大小截断 2026-09-06 06:29:03 +08:00
Aska 488cf9c79c feat(capability/mcp): MCP 客户端(stdlib JSON-RPC over stdio/SSE)+ Registry 自动注册/Unregister(registry 增 Remove) 2026-09-06 06:28:38 +08:00
Aska 08223c06a5 feat(tools/basic): 内置基础工具(calculator(注入安全)/datetime/random/text/json/markdown)+ 批量注册 2026-09-06 06:26:59 +08:00
Aska b3c61aa1ff feat(iot): IoT 插件化(Provider/Manager/mock 8设备/能力约束/bus 事件);feat(capability/restrict): 工具级布尔标记(群聊/陌生人可用,默认关,策略引擎雏形)+ registry ToolPolicy 2026-09-06 06:26:21 +08:00
Aska 915aa8a100 feat(capability/skills): 可复用工作流技能(Skill 模型 + Store + YAML Loader + Runner 展开 + 注册) 2026-09-06 06:25:42 +08:00
Aska d947ec41a9 feat(memory): M4 记忆完善(三类作用域访问规则+项目索引分层+LLM异步提取+衰减溯源+向量接入,兼容既有57用例) 2026-09-06 06:15:18 +08:00
Aska 5b37f5a551 chore(deps): 添加 pgx/v5 驱动(memory/vector 的 PG pgvector 真生效路径) 2026-09-06 06:15:18 +08:00
Aska fb880572a4 feat(memory/vector): 向量检索引擎(SQLite BLOB 内积默认 + PG pgvector 真语义增强,配置后真生效) 2026-09-06 06:04:44 +08:00
Aska ef79edd96a feat(memory/projectindex): 项目索引分层(索引+描述+章节,Search 定位行+上下文,级联删除) 2026-09-06 06:01:20 +08:00
Aska d90ec7bd4f feat(orchestration): 子代理编排调度器(创建/生命周期/并行上限4/超时/防失控/结果合并/进度事件/隔离上下文+独立工作记忆) 2026-09-06 05:53:54 +08:00
Aska 20f4a91d02 feat(orchestration/comm): agent-to-agent 通信(bus ask/reply/event,私密 reply 主题 + 超时) 2026-09-06 05:41:54 +08:00
Aska 8b723009f9 feat(orchestration/audit): 子代理上下文可审计查询(全量/尾部/关键词定位)+ 主代理代审授权(审计日志+小字) 2026-09-06 05:39:06 +08:00
Aska 71697ca4f8 feat(loop): agent loop(8 轮 + checkpoint + 流式 + 记忆注入/提取 + trace + 工具超时回喂) 2026-09-06 05:33:38 +08:00
Aska 01a4e29f84 docs(api): 新增用户侧跨平台客户端 API 文档(契约+端点登记表);AGENTS 立「随实现更新 API 文档」铁律 2026-09-06 05:32:57 +08:00
Aska 10c0069fa7 feat(logger): WithSource/Scoped 日志来源标注;AGENTS 追加日志标来源+客户端API契约红线 2026-09-06 05:22:00 +08:00
Aska be67d74822 feat(agent): Agent 实体(指令/工具/guardrail/handoff + 单步 RunStep,含多模态路由/调用记录) 2026-09-06 05:20:32 +08:00
Aska b798e129c1 feat(tool): Dispatcher.ToolSchemas() 暴露工具 schema(供 agent 组装请求) 2026-09-06 05:20:32 +08:00
Aska 3da189e856 docs(AGENTS): 追加 §9 全球红线 + §10 代码/流程硬性规范(模块拆多文件/每阶段 push/遇设计冲突阻塞询问) 2026-09-06 05:14:17 +08:00
Aska aa697c385f feat(memory): 长记忆 store(SQLite+persona 隔离)/工作记忆滑动窗口/检索注入/手工提取钩子 2026-09-06 05:12:42 +08:00
Aska 285e1e9911 feat(db): 新增 0002_memory 迁移;迁移测试改用嵌入式迁移集合(数量无关,避免卡死后续迁移) 2026-09-06 05:12:42 +08:00
Aska 0a936a3202 feat(multimodal): 视觉分层路由(多模态检测→主/视觉/OCR 工具)+ 语音 STT→TTS 降级链(异步) 2026-09-06 05:12:36 +08:00
Aska 02aae2bbb4 feat(guardrail): 输入/输出护栏(关键词/敏感信息/长度,pipeline fail-fast) 2026-09-06 05:07:13 +08:00
Aska e33b005612 feat(trace): 深追踪(Span 生命周期/父子链/JSONL recorder,支持 llm/tool/state 等类别) 2026-09-06 05:06:41 +08:00
Aska 011d25a53d feat(persist): durable checkpoint(SQLite upsert/LoadLatest/List/Delete,ErrNotFound) 2026-09-06 05:05:24 +08:00
Aska ecd3cdf28c docs(persona): 游戏身份(昔涟/翁法罗斯/开拓者设定)与亲昵称呼(小女友/亲爱的)统一共存,清除残留「姐姐」 2026-09-06 04:58:09 +08:00
Aska 95e058094a docs(persona): 默认人格表述对齐「全能小女友」、称呼用户「亲爱的」 2026-09-06 04:55:18 +08:00
Aska b9253a4980 feat(user): 主人档案/白名单(OwnerProfile+loader)+ 给 LLM 的身份说明书(owner_identity.md) 2026-09-06 04:55:18 +08:00
Aska c647d33a00 feat(persona): 迁移默认人格「昔涟」并适配新 schema(configs/personas/cyrene.yaml) 2026-09-06 04:41:04 +08:00
Aska 8317f370cd chore(deps): go mod tidy 整理依赖图(yaml.v3 转正为直接依赖) 2026-09-06 04:38:21 +08:00
Aska d09ccc7570 feat(model): LLM 多供应商适配(Adapter/OpenAI 非流式+SSE 流式/per-role 路由/主备降级/多模态检测/调用记录) 2026-09-06 04:37:27 +08:00
Aska 51b2bdfba2 feat(embedding): 嵌入(n-gram 哈希向量 + 关键词 FTS + OpenAI 兼容 API 钩子 + Manager 选择) 2026-09-06 04:37:10 +08:00
Aska 70fd915242 feat(persona): 人格系统(YAML loader / 角色人格注册+记忆隔离 / 情绪状态机+好感度) 2026-09-06 04:36:31 +08:00
Aska 653c2489bf feat(capability): 能力注册中心(类型化注册/按类查询/并发安全) 2026-09-06 04:35:31 +08:00
Aska 7b8cfc664a feat(sdk): 插件 SDK(Tool/Skill/Channel 接口 + 注册辅助 + 配置 hook) 2026-09-06 04:35:31 +08:00
Aska c52ddfd9c7 feat(channel): 跨平台 IM 接入抽象契约(UnifiedMessage/PlatformAdapter/Capabilities/Actor 身份) 2026-09-06 04:33:59 +08:00
Aska a21176ec0a chore(deps): 添加 gopkg.in/yaml.v3(人格 YAML 加载) 2026-09-06 04:33:59 +08:00
Aska c730b05621 chore(deps): 添加 modernc.org/sqlite 纯 Go SQLite 驱动(无 CGO、跨平台) 2026-09-06 04:27:45 +08:00
Aska 34cac241c1 feat(db): SQLite 连接与迁移框架(embed 迁移/事务校验/PG 预留 M4) 2026-09-06 04:26:02 +08:00
Aska dd16176bb7 feat(bus): 进程内事件总线(通配订阅/非阻塞扇出/Close 幂等) 2026-09-06 04:26:02 +08:00
Aska c1fb20bd6b docs(config): 更新 .env.example 对齐新架构 schema 2026-09-06 04:19:20 +08:00
Aska 1defd46d14 docs(AGENTS): 补充「可并行项交后台子代理、主会话当监工」的上下文保护铁律 2026-09-06 04:17:54 +08:00
Aska 1d4bed415f feat(platform): 多平台检测/路径/信号/系统信息(含跨平台构建验证) 2026-09-06 04:17:20 +08:00
Aska efed5f05b1 feat(config): 配置加载与 schema 校验(.env/env 注入 + 反射解码 + 校验) 2026-09-06 04:15:31 +08:00
Aska 0236010136 feat(logger): slog 结构化日志封装(text/json + 级别解析) 2026-09-06 04:13:19 +08:00
Aska 62c7a2aa12 docs: 新增项目级开发铁律 AGENTS.md 2026-09-06 04:12:37 +08:00
Aska 4506f639dd chore: 清理 v2 过时残留(旧 API 文档/人格配置/部署目录/compose/启动脚本/密钥备份/旧CI),更新 gitignore 2026-09-06 03:52:27 +08:00
Aska 8b310feceb docs: 更新 README 为新架构(人格化通用 Agent 运行时) 2026-09-05 23:13:27 +08:00
Aska 4be3826af7 chore: 清空 v2 实现,重建新架构骨架(人格化通用 Agent 运行时) 2026-09-05 23:09:26 +08:00
Aska 9c8d5a9e8d feat(rag): pgvector knowledge base with API and LLM tools
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- services/rag: knowledge_docs store — vector search via the shared
  embedder (HNSW index, graceful ILIKE fallback), list/delete scoped to
  the user, search intentionally global for the single-user deployment
- gateway: GET/POST /knowledge/docs, DELETE /knowledge/docs/:id,
  POST /knowledge/search
- plugins/knowledge: knowledge_search and knowledge_ingest tools so the
  persona can save and recall information mid-conversation
- main: migrations, store wiring, plugin registration
2026-08-21 18:40:01 +08:00
Aska ac0c2b2c73 feat(ai-core): real vision image analysis
- llm: Adapter.Vision sends multimodal chat requests (text + image_url,
  data URLs supported) and logs the call as purpose 'vision'
- gateway /images/analyze now accepts image_url or image_base64 and
  returns real analysis instead of a placeholder message
- main wires the default LLM adapter as the vision analyzer
- httptest coverage for the vision request/response shape
2026-08-21 18:33:44 +08:00
Aska 2104fc0c6c feat(frontend): voice input and read-aloud UI
- assistant messages get a 🔊 button that fetches TTS audio and plays
  it, toggling to stop
- ChatInput gains a mic button: MediaRecorder capture, base64 upload to
  /voice/stt, recognized text fills the input
- api client: voice.tts (blob) and voice.stt helpers
2026-08-21 18:31:24 +08:00
Aska a0357a7bbd feat(voice): real TTS fallback chain and whisper-compatible STT
- TTS providers: cloud (OpenAI-compatible /audio/speech, e.g. Bailian
  compatible mode with cosyvoice), local self-hosted HTTP server,
  edge-tts CLI, espeak CLI, silent — ordered by TTS_PROVIDER list,
  skipping providers whose binary/config is missing
- STT: whisper-compatible /audio/transcriptions endpoint (cloud or
  self-hosted faster-whisper), replacing the empty dashscope stub
- config: TTS_CLOUD_URL/KEY/MODEL/VOICE, TTS_LOCAL_URL, STT_API_URL/
  KEY/MODEL; cloud keys fall back to DASHSCOPE_API_KEY
- gateway /voice/tts now returns real audio/mpeg bytes instead of a
  byte count
- tests: cloud/local/whisper round-trips via httptest, chain skip
  behavior, fallback order; kept and adapted prior service tests
2026-08-21 18:28:39 +08:00
Aska b8fb7feb86 feat(ai-core): mood state machine and affection level
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- new emotion package: rule-based sentiment (positive/negative lexicon)
  drives mood transitions (开心/平静/难过) with 30min inactivity decay;
  affection 0-100 grows with positive interaction, with 初识→熟悉→信赖→
  羁绊 tiers
- pipeline records each user message and injects a mood line into the
  system prompt so the persona's tone follows her mood
- mood changes broadcast over WS; frontend shows a mood badge with
  affection tooltip; also handles the 'reminder' message type from the
  reminder scheduler
- tests: sentiment scoring, mood shift, affection bounds, prompt line,
  onChange callback
2026-08-21 18:13:23 +08:00
Aska 26d65dd6bb feat(frontend): message search and session export entry points
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- SearchModal queries GET /messages/search and jumps to the matching
  session; opened from the sidebar button or Ctrl+K
- session items in the sidebar gain a hover export button that
  downloads the markdown export via an authenticated fetch + blob
  (plain links cannot send the JWT)
2026-08-21 12:59:30 +08:00
Aska 9d040fde0b feat(plugins): implement web-search, web-fetch, http and file tools
- web-search: real SearXNG /search?format=json query, top-5 formatted
  results (was a 'not configured' stub)
- web-fetch: fetch page, strip scripts/styles/tags, truncate to 4000
  runes for the LLM context
- http: generic request tool (GET/POST/PUT/DELETE/PATCH) with scheme
  and method validation, status + truncated body
- file: sandboxed read/write/list inside the data directory with path
  escape rejection; split into file_read/file_write/file_list
- all tool schemas converted to proper JSON Schema; httptest/tempdir
  tests for each plugin
2026-08-21 12:57:19 +08:00
Aska d80710d85a feat(gateway): automation rule engine and reminder scheduler
- engine: 5-field cron parser (*/n, ranges, lists) firing at most once
  per minute; device-state triggers with edge detection; manual trigger
  via POST /automation/rules/:id/trigger; actions run through the AI
  pipeline so rules can call any tool (IoT control, search, ...)
- reminders: due-scan scheduler delivering via WebSocket broadcast,
  optional LLM-polished reminder text with plain-title fallback;
  Reminder gains Done flag with ListDue/MarkDone
- tests: cron matching and validation, once-per-minute dedup, device
  edge triggering, manual trigger, reminder delivery
2026-08-21 12:54:11 +08:00