qing
d1357ae483
fix(aibox): Batch M 波次4 命令面输入规整(W1~W8/W11/W12+W5)
...
- W1: WS 三入口 action/command/content 非 str 规整;task title/content 类型拦截
- W2: task add delay float 转换+[0,10年]钳制+友好 error
- W3: task complete 缺 task_id 回 error(新增 i18n 键)
- W4: /search 空关键词回用法提示,不再 LIKE %% 全表刷屏
- W5: main() 暂存 _cli_overrides,/reload 重放并回包注明,不再静默丢 CLI 覆盖
- W6: 启动失败 sys.exit(1);--port argparse 1~65535 校验
- W7: --scheduler-interval 统一 max(0.1,v) 钳制
- W8: --temperature main() 入口 [0.0,2.0] 钳制
- W11: config system/scheduler 节非 dict 回退默认节
- W12: --memo-add title strip/空串→None;db.add_memo 标题非空 ValueError
冒烟 12/12 通过;测试 493 passed/4 failed(既有平台项)/1 skipped 零回归
2026-08-20 13:54:36 +08:00
qing
457bb900fb
fix(aibox): round-5 audit batch K - max_turns clamp, task input validation, XSS hardening, atomic writes, broadcast timeout
...
第五轮审计(J1~J16)全量修复 + 子代理 max_turns 钳制:
- 子代理 max_turns 钳制(0/None 回退默认 10,负数钳制 1)+ 14 项回归测试
- J1 任务系统投毒:add_memo 入库校验(时间/间隔/类型)、调度器预检与触发事务
防御、展示路径兜底、register 移入 try、add_user_task 补 repeat_end_time 透传
- J2/J13 前端 XSS:三页面 marked 输出经 DOMPurify 净化、entry1 系统消息/任务
分隔条改 textContent、CDN 脚本补 SRI
- J3 FTS 删除换序(先 fts 后内容表,索引不再残留)
- J5 原子写推广:新增 common/atomic.py(mkstemp+fsync+os.replace),config/prompt/
history 全部接入;损坏配置备份后回退
- J6 单例初始化加锁(PromptManager/ConfigManager 并发首例不双重加载)
- J7 broadcast 并发发送 + wait_for 超时回收僵死连接
- J4/J8/J9~J12/J14~J16:验证异常脱敏、交互输入容错、MemoDatabase WAL+busy_timeout、
memo 批量删除、/new 竞态、skills 引号转义、voice_client 清理、死代码移除、
skill_manager 同名键/help 截断
2026-08-19 07:01:13 +08:00
qing
d3acccd146
fix(aibox): batch H audit fixes - subagent cancel propagation, scheduler timeout, exec process-group reaping
...
Fourth audit round (see docs/reports/aibox_audit_20260817.md §11):
- H1: shared parent cancel event no longer cleared on subagent first think
(N5 regression); parent-already-cancelled skips subagent start
- M1: /reload_prompts moved off event loop (run_in_executor, N3 sibling)
- M2: skill --help scan prewarmed before serving connections
- M3: scheduler task-level timeout (scheduler.task_timeout, default 600s)
- M4: get_recent_memories(None) capped instead of full-table load
- M5: memo delete now physically removes rows (was complete-only)
- M6: PromptManager.reload builds new list then atomically swaps
- L1-L12: read_file arg coercion, proxy save failure reported, SSE
utf-8 tolerance, persona realpath check, truncation char boundary,
compressor div0, skill path quoting, ask_user required, POSIX
process-group kill (pgid captured at Popen), web scheme whitelist,
registry redact substring match, Bearer redaction in failover logs
2026-08-18 02:33:17 +00:00
qing
eb88a77238
fix(aibox): never persist SOCKS5 proxy password to disk (F1/N1, +N11)
...
- config.set_proxy gains password_env (aligned with api_key_env
convention): config file persists only the env var name; plaintext
password lives in memory for the current session only
- _save_config deep-copies and nulls proxy.socks5.password before
json.dump, so every save path is sanitized (defense in depth)
- get_proxy resolves password as in-memory plaintext first, then via
password_env from os.environ; downstream consumers (llm_client,
web tool curl args) unchanged
- legacy migration on load: plaintext found on disk is kept in memory
for the session, file is immediately rewritten sanitized
- SetProxyTool exposes password_env and reports password source
- registry debug logs mask password/api_key/token/secret/authorization
kwargs (N11)
Tests: new tests/test_config.py (3 cases: no plaintext on save,
password_env resolution, legacy migration); full suite 267 passed.
Audit report updated with Batch F progress.
2026-08-17 22:37:30 +08:00
qing
d03dbc7f91
feat(aibox): batch D multi-model profiles + docs
...
- models 配置节:多 OpenAI Chat Completions 兼容端点按档案名切换,默认空 dict 零破坏回退旧 api 节
- --model 双语义:档案名(命中 models 节完整采用)/ 裸模型名(同端点换模型)
- resolve_api_key 档案级 env 三级语义:未配置回退 api.api_key_env / 显式名称 / 空串免密(Ollama/vLLM)
- 档案级 reasoning_enabled 附加 client 属性,DeepSeekChat._reasoning_enabled 优先读取
- llm_client 增加 openai_compatible/openai provider 别名
- README 更新:aibox/README 六处(特性/配置/多模型档案专节/CLI 参数/更新日志 v3.2/测试计数 264)+ 根 README aibox 小节
- 单测 17 项新增(test_models_profile.py),全套 264 项全过
2026-08-17 16:58:33 +08:00
qing
45bc019bfc
feat(aibox): 子代理输出转发开关 subagent_stream_output(默认开启)
...
将上一轮的「子代理实时输出可见化」固化为可配置开关,避免在生产环境刷屏或泄露中间过程。
- common/config.py: 默认配置新增 subagent_stream_output: true
- aibox.py run_full_subagent: 读取该开关;关闭时 _effective_output_callback 置 None,
子代理在后台静默执行(主对话侧栏不显示其思考/工具调用/回答),开启时按原逻辑
转发 line/chunk/reasoning。
- 仅影响主对话侧栏可见性,不影响子代理执行与最终返回摘要;老用户配置缺该键默认 True(兼容)。
2026-08-13 03:38:20 +08:00
qing
6db0cf017e
fix(aibox): 补全 common/logger 缺失的 logging 导入并固化 common 包抽取
...
- common/logger.py 漏导 logging / RotatingFileHandler,导致 main() 在
Logger.init_file_logging() 处抛 NameError;现已补回(抽取自 aibox.py 时
未携带该 import)
- 固化 aibox 模块化重构成果:common/ 包(i18n/config/constants/logger
+ __init__ 重导出)已落地,aibox.py 删除内联 I18n 改从 common 导入
- requirements.txt 新增 PySocks 依赖
2026-08-12 09:41:33 +08:00