Commit Graph

298 Commits

Author SHA1 Message Date
augushong
f478ae0e4e feat(timer): runLoop 热加载并发实例与运行时配置参数
TimerBase 实现 shouldExecuteTask 手动触发原子消费、reloadRequestList 合并式扩缩容、runLoop 脏标记检测+定时兜底+有效域钳制+drain 优雅缩容+checkTriggerTtl 超时复位。config/timer.php 新增 trigger_ttl/force_reload_interval/drain_max_lifetime 三参数。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 21:57:25 +08:00
augushong
236a343fa9 feat(timer): 新增并发数/触发节点/触发时间三字段及幂等分发
Scheme 定义 concurrency(nullable)/trigger_node_id/last_trigger_time 三字段,Model 声明属性,v2.3.0 分发代码幂等 ALTER 保证升级自动同步。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 21:57:14 +08:00
augushong
387d89c596 breaking(stack): 彻底移除 stack:mode 命令(含 app/extend/base/注册) 2026-07-22 00:50:56 +08:00
augushong
600ee5b085 refactor(agents): 删除 tools:agent:publish 命令,补全 helper.php 函数覆盖机制,修正多处文档 bug
- 删除 tools:agent:publish 整套(不再兼容多套 IDE,只保留 .agents 目录)
- helper.php 全部 27 个全局函数加 if (!function_exists()) 包裹,项目侧可在 app/common.php 定义同名函数覆盖
- ulthon-file-override-mechanism.md 新增全局函数覆盖章节
- AGENTS.md 删除智能体指导章节,PHP 8+ 改为 8.0+,MySQL 8+ 改为 5.7+
- AGENTS.md 项目结构树补全 tests/、extend/think/、source/ 子项
- README.md PHP 版本统一为 8.0+
- ulthon-base-app-architecture SKILL 路径补 admin/service/ 段
- ulthon-tools-http-call SKILL 补 --page-data 参数
- ulthon-naming-convention 补元数据头
- ulthon-update-workflow 统一 extend/think/ 归类
2026-07-21 19:35:28 +08:00
augushong
e40d497515 fix(curd): 修正关联表 onlyFields 键名拼写错误
- CurdBase 注释解析只识别 onlyFields(正确拼写),不再支持历史错误拼写 onlyFileds
- BuildCurdServiceBase 内部局部变量 onlyShowFileds 改为 onlyShowFields(按位置传参,外部 API 不变)
- 同步文档(ulthon-database-design 已删除,ulthon-scheme-definition 技能已使用正确拼写)
2026-07-19 09:07:49 +08:00
augushong
51d0ed7331 fix(auth): 修复角色分配用户列表layui filter传参导致参数绑定错误
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-18 21:33:33 +08:00
augushong
3f7050bf65 feat(test): 框架测试基建基类TestCaseBase+app层入口+冒烟测试
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-18 00:12:41 +08:00
augushong
1ca1f86150 feat(auth): 角色分配用户页面视图与列表入口按钮
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-17 23:44:33 +08:00
augushong
50cb069677 feat(auth): 角色管理新增分配用户后端方法(assignUsers+toggleUser)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-17 23:44:23 +08:00
augushong
e4965e05b6 fix(timer): call 任务执行加异常捕获防止单任务崩溃定时器
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-17 23:33:41 +08:00
augushong
ccb7540356 fix(host): 心跳更新失败仅记日志不再重复抛异常
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-17 23:33:25 +08:00
augushong
17ef7af860 fix(role): 修复角色删除按 auth_ids 查用户的子串混淆(like→FIND_IN_SET)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-17 23:33:11 +08:00
augushong
76b23d4c70 refactor(timer): 使用 CurlMultiHandler 替代 Workerman,统一为非阻塞模式
- 删除 runParallel() 方法和所有 Workerman 引用(死代码)
- 重写 runLoop() 为 Guzzle CurlMultiHandler 非阻塞事件循环
- 新增 pending 数组追踪进行中的请求,handler.tick() 非阻塞推进
- 自适应 sleep 策略(有任务 50ms,空闲 200ms)
- 简化 config/timer.php:移除 mode,适配 Guzzle 参数
- 更新 SKILL.md:移除 parallel 描述,修正 --quit 文档 bug
- 验证发现:--quiet 是 ThinkPHP 全局选项,不需要在 configure() 注册
- 验证发现:方法名不能用 run(),与 ThinkPHP Command::run() 签名冲突
2026-06-02 21:19:53 +08:00
augushong
c4fbd60bbc fix(timer): 修正定时器参数拼写 quit -> quiet(静默模式) 2026-06-02 20:09:37 +08:00
augushong
288724efc8 chore: 发布 v2.2.8 2026-06-01 23:15:18 +08:00
augushong
f5db5abb17 chore: bump version to v2.2.7 2026-06-01 22:46:18 +08:00
augushong
4e3de27c51 chore: bump version to v2.2.6 2026-06-01 21:52:57 +08:00
augushong
afd614e563 feat(timer): ClearLog 清理天数改为从配置读取,支持 env 覆盖
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-01 20:28:25 +08:00
augushong
8c766d7e07 chore: bump version to v2.2.5 2026-05-27 21:54:50 +08:00
augushong
ceed8d3e71 feat(stack): CLI handleUse() 增加 skipped_files 和 deleted_files 展示 2026-05-27 21:42:52 +08:00
augushong
c7cfa40539 chore: bump version to v2.2.4 2026-05-27 20:52:13 +08:00
augushong
7ecbd03730 chore: bump version to v2.2.3
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 20:24:23 +08:00
augushong
c16964679d feat(menu): 补充定时器和主机列表的默认菜单初始化数据
在 SystemMenu 初始化数据中新增定时器配置(id=256)、定时器日志(id=257)、主机列表(id=258)三条菜单,确保 seed:run 后菜单自动可用

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 20:22:23 +08:00
augushong
a2916d7505 refactor(ulthon-admin): 重写入口文件并更新模板引用
将 ulthon-admin.js 简化为入口文件(8行),仅负责组装 admin 对象并清理临时变量。更新 _require.html 按依赖顺序加载 6 个拆分文件。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 07:51:42 +08:00
augushong
a9810516c1 chore(release): 发布 v2.2.2 2026-05-26 21:40:45 +08:00
augushong
3f8f79b445 feat(update): 新增 --keep-repo 参数,dry-run 模式下保留上游克隆目录便于对比 2026-05-26 21:38:16 +08:00
augushong
58d87d9980 docs(VersionBase): update usage comment of version command
fix the outdated description of the version command usage steps
2026-05-26 21:01:49 +08:00
augushong
fce0b1cf0a chore: bump version to v2.2.1 2026-05-26 20:48:53 +08:00
augushong
8e8c56ab53 chore: bump version to v2.2.0 and update full changelog
更新了版本号到v2.2.0,补充完整的版本更新说明,包含新功能、修复项、文档更新、重构、性能优化和其他变更内容
2026-05-26 20:34:57 +08:00
augushong
e005c9a3a2 docs(version): 补充 admin:version 命令的发布流程注释与帮助说明 2026-05-26 20:11:06 +08:00
augushong
b7094eee8a fix(host): 主机列表页设为只读
Remove add/edit/delete buttons and auth attributes from host list page. Hosts are auto-registered via heartbeat, manual CRUD is meaningless. Keep only setMaster operation.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-26 18:33:47 +08:00
augushong
e558a97e91 fix(host): 防止主节点重复并修复 setMaster 权限
Clear all is_master flags before electing new master to prevent multiple master records. Fix setMaster annotation from @auth true to proper @NodeAnotation format so permission node is generated correctly.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-26 18:33:46 +08:00
augushong
a47bbb2c6a fix(timer): 自动记录执行日志并捕获结果
Add execute() wrapper in TimerControllerBase that wraps do() with logStart/logEnd, captures return value to result field. Change site URL routing from /do to /execute with task_name injection. Add result field to system_timer_log scheme.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-26 18:33:45 +08:00
augushong
e1bf94a55e feat(timer): 新增日志每日自动清理定时任务
- New LogClean timer controller (site type, frequency 86400s)
- run_type defaults to auto, only one node cleans per day
- Cleans system_timer_log records older than 30 days
2026-05-26 18:33:45 +08:00
augushong
fd89a60425 fix(timer): 修复 F2 代码质量问题
- HostServiceBase: move Log::error before throw so it actually executes
- TimerBase: remove empty comment block
2026-05-26 18:33:44 +08:00
augushong
90e584f5a1 feat(timer): 新增定时器配置、日志和主机的后台管理界面
T10: TimerConfig CURD - task management with run_type/status editing,
     manual trigger button, task_name read-only, no add/delete
T11: TimerLog CURD - read-only log viewer with filters and color badges
T12: Host list enhanced - is_master column, setMaster button
2026-05-26 18:33:43 +08:00
augushong
25fab093fa feat(timer): 新增 run_type 调度、host_id 投递和日志清理
T7: TimerBase shouldExecuteTask() - main/auto/all/manual/disabled modes
    with two-phase DB row lock for auto mode
T8: TimerControllerBase - host_id param, logStart/logEnd methods
    TimerServiceBase - inject host_id into site URLs
T9: TimerLogClean command - php think admin:timer:log:clean --days=30
2026-05-26 18:33:42 +08:00
augushong
abeac2c3cb feat(timer): 新增配置同步到数据库及主节点选举
T5: TimerServiceBase.syncConfigToDatabase() - syncs task config to DB
T6: HostServiceBase - auto master election, stale node detection,
    getMasterNode/setMasterNode methods
2026-05-26 18:33:41 +08:00
augushong
ca094c9116 feat(update): 输出增强 -- 按目录分组、风险摘要、策略标注、--show 过滤 2026-05-25 22:47:46 +08:00
augushong
67c613788f feat(update): 冲突策略参数替代交互确认 2026-05-25 22:44:34 +08:00
augushong
2e3fac93f0 feat(update): 注册冲突策略和输出范围选项 2026-05-25 22:41:08 +08:00
augushong
07d5823c81 feat(update): 后更新引导提示 2026-05-25 21:41:55 +08:00
augushong
65b196e768 feat(update): composer.json 智能对比输出具体命令 2026-05-25 21:38:58 +08:00
augushong
a17ba88068 feat(update): 新增 --dry-run 预览模式 2026-05-25 21:35:47 +08:00
augushong
fb3f807877 refactor(update): extend/think 归入可选更新范围 2026-05-25 21:30:27 +08:00
augushong
76fe865274 perf(update): clone 一次仓库并本地复制替代第二次网络 clone; 排除 public/storage 和 public/build 2026-05-25 21:28:21 +08:00
augushong
577ee6b974 feat(debug): 报错页面增加手机端适配,工具栏可折叠,修复原生布局溢出问题 2026-05-24 10:09:27 +08:00
augushong
7312db717c fix(debug): 修复预览不实时更新、出错位置不生效、中文Unicode转义等问题,预览改为右侧弹出面板,增加字数统计 2026-05-24 09:32:32 +08:00
augushong
4668865b4f fix(debug): 复选框变更时自动保存状态到localStorage 2026-05-24 09:03:02 +08:00
augushong
e263d172cd fix(debug): 修复Markdown中文输出为Unicode转义的问题 2026-05-24 08:59:16 +08:00