|
|
c76431a8f1
|
feat(tools): 网页提取白名单直提 + recall 记忆纳入已读文件
- extract_webpage/save_webpage 命中白名单域名时本机直提:GitHub 代码页走
jsDelivr CDN 直链(备 GitHub API),其余白名单页用 trafilatura 正文识别,
失败自动回退 Tavily;内置白名单 github.com,个人空间可关闭/追加域名
- trafilatura 进 requirements(可选依赖,缺失时静默降级全走 Tavily)
- recall_project_memory 返回记忆全文后标记为已读,可直接 edit_file
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-12 11:30:38 +08:00 |
|
|
|
5459d82637
|
feat(cli): 面板与状态栏接真实数据,/new 对齐草稿语义;host 设置面双通道化
CLI(bun 跑源码即生效):
- boot:loadBootData 一次性加载模型清单(含 context_window)/个性化默认
(含压缩设置)/path 授权/会话列表;新会话 unshift 标 current
- /session:Enter 真实加载(timeline.reset + getSessionHistory 渲染历史文本)
- /new:对齐 web /new 页面语义——空对话草稿不立即建会话,首条消息
createTask 不带 cid 由服务端惰性创建,响应回 id 后插入列表标 current
- /context + 状态栏:token_update 事件(运行期事件流)+ 打开面板时查询
新端点 GET /api/runtime/sessions/<cid>/token-stats;百分比算法对齐 web
InputComposer(自动压缩阈值优先于模型窗口)
- /model:Enter = 本地生效 + createTask 带 model_key/run_mode/thinking_mode
覆盖(会话级即时)+ savePersonalization patch 存默认(effort default 存 null)
- /path:增删后 savePathAuths 全量提交两组(服务端 deny 校验保留)
- /agents /tasks /workflow /rewind:打开时拉真实列表(sub_agents/
background_commands/workflows/versioning-checkpoints)
- 发送链路统一 sendWithSettings 携带 /model 生效值(含排队队列)
后端:
- 8 端点装饰器 api_login_required → api_login_or_host_token_required
(personalization×2 / path-authorization×2 / sub_agents / background_commands
/ workflows / versioning-checkpoints),web session 行为不变
- headless_app 用 add_url_rule 共享上述视图函数(URL 与 full 一致);
sub_agents/background_commands 支持 query 显式传 conversation_id
(Bearer 装配的 terminal 无当前对话概念)
- RuntimeService 新增 get_session_token_stats;gateway_api 挂 token-stats 路由
- headless 404 兜底:非 /api/ 的 GET 路径回落告知页(对齐 SPA fallback)
验证:tsc ✅ py_compile ✅ 冒烟 6/6 ✅ headless 装配 54 路由 ✅
localconfig 无头实测读到真实配置 ✅;真实服务端到端待用户重启 8091 实机验收
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-11 21:20:58 +08:00 |
|
|
|
66fa90d6cc
|
feat(server): headless 启动入口(Gateway 专用路由面)+ approval 拆独立蓝图
- 新增 server/headless_app.py:仅挂 gateway/tasks/status/approval/usage 五件蓝图,
无 web 站点路由面(/login、会话管理、静态页全砍),根路径返回 HTML 告知页;
供 CLI 探测无服务时 spawn(同 RuntimeService 单例/数据目录/端口 8091,
与 full 形态互斥不并存)
- server/chat/approval.py 拆出 approval_bp(tool/plan/question 6 条路由 URL 不变),
解除对 chat_bp 的 import 循环,full/headless 双形态共用
- cli/src/gateway.ts:spawn 切 server.headless_app;python 解释器改 pickPython
依赖探测(import yaml/flask 逐个试 .venv → homebrew 3.12/3.11 → python3),
修本机 .venv 缺 pyyaml 导致的自启动即崩
- 修复 socket 移除残留雷:make_terminal_callback 定义随 broadcast.py 被删,
workflow_runtime_api 模块级 import 即炸;resources.py 补兼容空操作(恒返 None)
- AGENTS.md §2 补 headless 启动命令、§12.5 补兼容空操作与 headless 形态说明
验证:tsc ✅ py_compile ✅ 冒烟 6/6 ✅ headless 装配 47 路由 ✅
8093 真实冒烟(health/Bearer/404 面/告知页)✅
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-11 19:00:22 +08:00 |
|
|
|
e5808ea5be
|
refactor(server,web): remove Socket.IO entirely, unify on REST polling
- task event stream (_append_event) is now the sole realtime channel for web and CLI
- status snapshots: idle 5s polling of /api/status (was status_update push); operation initiator gets state from REST responses
- terminal panel: REST polling (list 5s, output 1.5s, prefix-matched incremental xterm writes)
- multi-tab passive sync deliberately degrades to polling-based perception
- delete socket_handlers/broadcast/useLegacySocket (2103-line dead file); extensions.py keeps only run_background
- remove socket token chain (/api/socket-token, prune/consume_socket_token, pending_socket_tokens)
- app.run(threaded=True) replaces socketio.run; reapers switched to plain threading
- drop flask-socketio/socket.io-client/websockets dependencies
- docs: AGENTS.md section 12.5 (replacement map + hard constraints), plus CLI rewrite companion doc updates
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-11 17:28:47 +08:00 |
|
|
|
70e16fccfb
|
feat(tools): 工具动态加载——低频工具按需注入,对话文件快照为准
- 新增 core/tool_loading.py:可延迟注册表(8 类目 18 工具:工作流/子智能体/
对话回顾/记忆写入/个性化/技能/MCP/彩蛋)、快照与状态迁移、目录渲染、守门判定
- 常驻 load_tools 工具:按名在 tool result 返回完整 JSON 定义后直接调用;
执行守门拦截未加载的延迟工具并引导先加载;只读/计划模式放行
- 对话创建时快照 metadata.tool_loading(enabled/deferred_set/initial_exposed/
loaded/pending),创建即钉死,个人空间设置只影响新建对话;老对话无字段
不生效(全量工具,零迁移);多智能体对话 v1 不启用
- prompt 目录走现有冻结机制(frozen_tool_loading_prompt,skills 段之后),
创建即冻结终身不变,不破坏前缀缓存;tools 数组恒为「构建集−deferred_set」
- 压缩三钩子(深度/浅度/手动)重置 loaded→空、pending→deferred_set,
frozen_tool_loading_prompt 纳入 REBUILD_FROZEN_KEYS
- 个人空间新增「按需加载的工具」设置区(总开关默认开+类目分组勾选,
双语 i18n),GET /api/personalization 下发注册表
- load_tools 上下文 formatter 保留完整 JSON 定义(定义靠 tool result 存续);
前端渲染名称+状态徽章;新增 19 个单元测试
- AGENTS.md 新增 §13(硬约束与新增可延迟工具 checklist)
|
2026-09-10 17:07:15 +08:00 |
|
|
|
1135afd654
|
docs(AGENTS): 构建/lint 等命令沙箱失败时须申请权限,禁止绕过
|
2026-09-09 18:56:49 +08:00 |
|
|
|
b4deee0f43
|
fix(sandbox): 修复 macOS 白名单沙箱致 /usr/bin xcselect 垫片全灭
8-30 白名单读模型改革后,/usr/bin 下的 python3/git/clang 等 xcselect 垫片
在沙箱内全部报错退出:垫片启动即拉起 xcodebuild 读
/Library/Preferences/com.apple.dt.Xcode.plist 校验 license(被白名单拒绝),
且经 mach 服务 com.apple.bsd.dirhelper 解析 DARWIN_USER_TEMP_DIR
(profile 无 mach-lookup 放行,confstr 失败回退 /tmp)。
- MACOS_MINIMAL_READABLE_PATHS 增加 /Library/Preferences
- 新增 MACOS_BASE_MACH_RULES 放行 dirhelper,只读/可写 profile 共用注入
- 可写 profile 额外放行 $TMPDIR 父目录,容纳垫片 xcrun_db 缓存写入
(只读 profile 不放行,缓存写失败仅噪音、非致命)
AGENTS.md §10.8 同步补充垫片兼容说明
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-07 19:17:12 +08:00 |
|
|
|
652c160640
|
feat(runtime): 抽出 RuntimeService 公共任务入口,任务线程拆除 Flask 隐式上下文
Gateway 化阶段一/二实施(公共任务入口),计划与验收记录见 cache_research/gateway/phase12_implementation_plan.md;契约文档 docs/runtime_contract.md 为本地文档按仓库惯例不入库
- 新增 server/runtime/:RuntimeContext 三层模型(TrustedPrincipal/TaskParams/InternalDirectives)+ RuntimeService(create_task/cancel/guidance/queue/get_task_events)
- create_chat_task 强制显式 session_data(缺失 ValueError,i18n key tasks.missing_session_data);6 处调用点迁移至 runtime_service.create_task()(tasks/api、api_v1、workflow_runtime_api x2、chat_flow_task_main x2),门闸 token 移交与 notice 互斥豁免语义保留
- _run_chat_task 拆除 test_request_context 桥,任务线程全程 RuntimeIdentity 驱动
- 审批超时经 terminal._approval_timeout_seconds 透传至工具循环 4 个 _wait_* 调用点(默认 3600s 语义不变)
- 附带:config/_load_dotenv 容忍沙箱禁读 .env;AGENTS.md 同步结构
测试:改造相关 24/24 全绿(冒烟 6 + runtime_service 10 + model_persistence 4 + identity 路由 4);真实环境验证已由用户人工完成
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
Co-authored-by: Codex powered by ChatGPT-6-Astra <codex@example.com>
|
2026-09-07 16:16:12 +08:00 |
|
|
|
e4f8f91ff9
|
docs: 沙箱平台口径更新——macOS/Windows 已实测,Linux 未测试未适配暂不可用
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-04 10:57:04 +08:00 |
|
|
|
84c40e505e
|
feat(android): 恢复 app 源码追踪——域名构建期注入脱敏 + 应用更名 Astrion
- HOME_URL 改为构建期注入(BuildConfig):-P 参数 > local.properties > 环境变量 > 占位符
- network_security_config.xml 删除冗余 domain-config(base-config 已全局禁明文)
- README 重写:移除真实域名,补充注入方式说明
- app_name 更名为 Astrion;链接外跳系统浏览器(1.0.42)+ 1.0.43 版本
- AGENTS.md §8 补充版本检测链路说明;.gitignore 解除 android-webview-app 排除
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-02 07:48:36 +08:00 |
|
|
|
a3fa5e59c6
|
feat(sandbox): Docker 只读执行叠加 Landlock 进程级只读域,封死 world-writable 绕 DAC 漏洞
Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
|
2026-09-01 15:17:23 +08:00 |
|
|
|
b55f4a811d
|
feat(security): 终端读写身份创建时钉死,权限跨界切换销毁重建
- 宿主机持久终端支持只读身份:build_host_sandbox_shell_plan 三平台(macOS Seatbelt 只读 profile / Linux ro-bind / Windows WSL 只读挂载)统一 readonly 参数;macOS 只读 profile 抽为 _macos_readonly_profile_for_workspace 与只读 run_command 共用
- docker_terminal_readonly_enabled 泛化为 terminal_readonly_enabled(docker uid 与宿主机沙箱同一判定:非 unrestricted 即只读身份)
- 权限跨界切换(受限档⇄unrestricted)销毁现有终端会话(close_all),受限档内部互切不销毁;与执行环境切换销毁策略一致
- terminal_input 工具层全面放开:只读白名单加入、审批集合移除、approval/auto_approval 命令文本分流删除;受限档终端内写入由系统 EPERM 兜底,审批写入走 run_command 两段式
|
2026-08-30 23:06:33 +08:00 |
|
|
|
8257e4d34d
|
feat(security): 沙箱只读真强制与权限模式边界收敛
- docker:只读/审批档 run_command、后台命令与持久终端改用非特权 uid(10001) 执行角色,内核 DAC 强制只读,取代文本特征识别;Dockerfile 加固(agent 用户 / git safe.directory / 去 setuid)
- macOS:只读与可写沙箱 profile 统一为白名单读模型(deny default + 系统目录/工作区/路径授权),修复 deny 顺序导致的工作区 .env 实际可读漏洞;可写 profile 白名单化后审批不再放大读取,越界读取唯一途径为路径授权
- 权限模式:受限档(readonly/approval/auto_approval)与 direct 执行环境硬互斥——进入受限档压回沙箱并记录,切回 unrestricted 恢复,存量受限+direct 对话加载自愈矫正
- 配置:路径授权来源收敛为 host_sandbox_policy.json + 环境变量两个通道(移除 settings.json 映射)
- 修复:新建对话权限模式被个性化默认值覆盖、/new 切只读后回落无限制的继承 bug
- 原生文件工具读边界与沙箱白名单同源对齐
|
2026-08-30 22:07:14 +08:00 |
|
|
|
7c7201a574
|
feat(i18n): 前端多语言基建(vue-i18n 文案 token 体系 + 审计栏杆)与第一波迁移
- 基建:static/src/locales/ 11 个命名空间×中英双语,zh 为源语言;
en-US 聚合器 DeepString 强校验 key 奇偶;installI18n/useLocale 复刻 theme.ts 模式
- 语言切换:个人空间→外观→界面语言(默认 zh-CN,localStorage 持久化)
- 防回退栏杆:scripts/i18n_audit.mjs(字符级注释剥离状态机)+ baseline 豁免清单,
挂入 npm run lint 链首与独立 lint:text;规范见 doc/frontend/i18n_spec.md(本地)
- 第一波迁移 13 文件约 1400 条:PersonalizationDrawer/toolRenderers/chatDisplay/
InputComposer/admin 全部 6 应用/tutorial/MonitorDirector/WorkflowEditorView
- common 公共词归并:刷新中/保存中/暂无数据/未运行 单一来源
- AGENTS.md 新增 §5.8 文案规范
|
2026-08-28 12:07:03 +08:00 |
|
|
|
16aaea6b1e
|
refactor(multi-agent): 子智能体统一显示名寻址并增强可靠性
- 全局 agent_id 转为内部实现细节:由 next_free_agent_id 自动分配对话级
最小空闲正整数,不再接受模型指定、不出现在工具参数/结果文案中
- 角色内编号改为 peek + commit 两步:创建成功才消耗编号,失败不跳号
- 所有寻址类工具改用显示名:send_message/stop/terminate 传 display_name,
get_sub_agent_status 传 display_names,sleep 的 wait_sub_agent_output,
子侧 ask_other_agent 传 target_display_name,answer_other_agent 去掉
source_agent_id
- _run_loop 对 _call_model 增加重试:最多 5 次、间隔 10s、仅零接收时重试,
输出中断直接失败;多智能体模式下 5 次全失败转 idle 并向 Team Leader 报错
- 新增工具「正在调用」进度事件(calling),与 running/completed 共用
tool_call id,前端支持同 id 原地更新
|
2026-08-27 09:21:30 +08:00 |
|
|
|
da176ba4c7
|
chore: 记忆审计修正 —— AGENTS.md APIClient 引用 + 删除保存调试 trace 代码
- AGENTS.md §11.2: DeepSeekClient → APIClient(2026-07-28 改名的遗留引用)
- crud_mixin.py: 删除已过观察期的 _debug_conversation_save_trace(含 shrink/wipe_suspect 判定、调用栈捕获、conversation_save_debug.log 落盘)及配套 _CONV_SAVE_LOG_DIR / threading 导入
- 保留 ConvSaveGuard 断言与 ConvSaveMerge 矫正打印(机制级长期日志)
- 验证:模块加载成功 + test_server_refactor_smoke 6/6 通过
|
2026-08-22 19:12:08 +08:00 |
|
|
|
10654c407d
|
release: sync from main @0f9fd1b2 (2026-08-22)
|
2026-08-22 12:27:19 +08:00 |
|