Commit Graph

1097 Commits

Author SHA1 Message Date
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
4a4155070d docs(agents): 新增控制器响应陷阱与 sysconfig 机制规则
- ulthon-controller-response-throw 规则:揭露 success/error/result/redirect 都是 throw HttpResponseException 的陷阱,含两种正确范式(try 外 / 放行 HttpResponseException)与 grep 自查方法
- ulthon-system-config 规则:sysconfig 完整机制(存储/读取/保存/视图扩展),含新增配置项两种方式(加入已有组 / 新建独立 Tab)
- AGENTS.md 索引同步:零散规则表 +2 行,工作流列表 +2 行(含上一 commit 的技能)
2026-07-19 12:03:22 +08:00
augushong
98dd244e61 docs(agents): 新增后台表格机制与页面验证技能
- ulthon-admin-table 技能:后台表格完整指南(核心机制/init/cols/内置渲染器/按钮系统/搜索系统/后端配套/常见模式与排错/实测代码引用表),含页面分类标准 A/B/C/D 与项目2 实战经验
- ulthon-page-qa 技能:AI 自测页面验证 6 步 checklist(HTML 冒烟→API→Page Data→浏览器→搜索→分辨率),零项目依赖原则,三模式验证策略
2026-07-19 12:00:21 +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
e392db007a docs(agents): 落实按主题单一文档原则,合并规则到对应技能
- AGENTS.md 代码分层铁律精简为入口摘要,链接指向技能详情
- 合并 ulthon-timer-multi-node 规则到 ulthon-timer 技能(多节点协调章节)
- 合并 ulthon-database-design 规则到 ulthon-scheme-definition 技能(含字段约定、组件类型)
- 合并 ulthon-testing 规则到 ulthon-testing 技能(含设计哲学、决策树、测试约束)
- rules-manager 边界原则从规则/技能二分改为按主题单一文档
- AGENTS.md 通用基础规范中表结构规范链接改向技能
- 工作流索引中三个技能描述扩充(明确承载原规则内容)
2026-07-19 09:07:42 +08:00
augushong
1f91abe9d2 docs(agents): 修正规则与技能文档的索引缺漏、错误引用与表述冲突
- AGENTS.md 工作流索引:补充 ulthon-update-workflow 与 ulthon-rules-manager,移除不存在的 ulthon-tools-log
- ulthon-naming-convention.md:删除对 ulthon-source-directory.md 的错误引用,明确框架应用目录与控制器子目录命名规范
- ulthon-database-design.md / ulthon-scheme-definition:统一关联表 onlyFileds 键名说明,修正示例字段拼写
- ulthon-scheme-curd-workflow.md:CURD 表名参数表述与参数表对齐
- ulthon-permission-cli.md:章节改写为节点分配原则,去除变更痕迹叙事
- README.md:文档主页 URL 与 AGENTS.md 对齐
2026-07-19 00:44:41 +08:00
augushong
46f0d62852 docs(rules): 新增文件级覆盖机制规则并修正索引职责互斥
- 新增 ulthon-file-override-mechanism.md:阐述 app/ 覆盖 extend/base/ 的三类机制(视图模板、include 标签、app_file_path)与不支持覆盖的反例清单
- ulthon-base-app-architecture:升格原孤立描述为独立小节"5. 文件级覆盖机制"
- ulthon-timer:在 app_file_path 覆盖说明处增加规则引用
- AGENTS.md:登记新规则到框架内置规则索引
- ulthon-rules-manager:修订索引职责(AGENTS.md 仅 ulthon-、PROJECT.md 仅 project-,互斥不重复维护);索引格式从 4 列改为 3 列与项目实际一致;维护规则补充对称约束;泛化"迁移现有内容"章节
2026-07-19 00:30:05 +08:00
augushong
073172473b chore: gitignore 忽略 phpunit 测试缓存目录
tests/.phpunit.cache/ 是 phpunit 运行产生的测试结果缓存(phpunit.xml.dist cacheDirectory 指向),不应纳入版本控制。
2026-07-18 23:57:55 +08:00
augushong
37cb8291f8 feat(test): 引入测试规则文档与参数化测试库初始化脚本
对齐 wkbox 衍生项目的测试规则体系,剥离业务特定内容后移植到框架:

- 规则 .agents/rules/ulthon-testing.md(设计哲学/决策树/4层模型/安全规范/fixture原则)
- 技能 .agents/skills/ulthon-testing(运行/编写/模板/决策/回归验证)
- 参数化建库脚本 tests/setup_test_db.{php,ps1,sh} + README
- AGENTS.md 索引补充

与 wkbox 差异:测试库参数化(复用 .env 连接,database=env+'_test'),不硬编码 Docker;删去 canBind Oracle 业务约束与具体 fixture 工厂,业务工厂由衍生项目自行实现。
2026-07-18 23:56:32 +08:00
augushong
ce8a0c795b docs: 更新 agent 规则并新增项目约束文档 2026-07-18 23:35:04 +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
44621b1e9d chore(test): 引入 PHPUnit 测试基建(依赖+配置+bootstrap)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-18 00:12:30 +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
62a17647e1 docs(timer): 补充定时器技能文档 - execute 日志包裹机制说明与本地开发常见坑位 2026-06-02 23:06:27 +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 v2.2.8 2026-06-01 23:15:18 +08:00
augushong
65e2d35821 docs: 将在线文档规范落地为本地零散规则文件
- 新增 ulthon-naming-convention.md(命名规范)
- 新增 ulthon-database-design.md(表结构设计规范)
- AGENTS.md 通用基础规范章节改为引用本地规则文件
- 代码风格直接指向项目根目录 .php-cs-fixer.php
2026-06-01 23:14:41 +08:00
augushong
f5db5abb17 chore: bump version to v2.2.7 v2.2.7 2026-06-01 22:46:18 +08:00
augushong
ddaa0ca5a9 feat(stack): 新增 docker-dev-sync 模式,优化 Windows 下 Docker 开发 I/O 性能
- 新增 source/stack/docker-dev-sync/ 模式目录
- 宿主代码映射到 /var/www/source(bind mount 中转)
- 容器内 rsync 定时同步到 /var/www/html(原生文件系统)
- vendor 由 Docker build 管理,不参与同步
- rsync 使用 --no-perms 避免保留 Windows 源文件权限
- 排除 docker-dev/、runtime/、.git/ 等无关目录
- SYNC_INTERVAL 环境变量可配置轮询间隔(默认 3 秒)
- 更新 stack.json 注册模式并声明 sync.sh 为托管文件
- 调整 CI 构建流程:先安装依赖再切换 stack 模式
2026-06-01 22:32:29 +08:00
augushong
4e3de27c51 chore: bump version to v2.2.6 v2.2.6 2026-06-01 21:52:57 +08:00
augushong
c5ebf86ad9 refactor(rules): 精简 AGENTS.md,下沉模块级规则,迁移 skill 为 rule
- tp-controller-url-rules skill 迁移为 rule ulthon-controller-url.md
- AGENTS.md「其他规则」中的 source/ 约定下沉为 ulthon-source-directory.md
- AGENTS.md「其他规则」中的部署栈+命令执行环境下沉为 ulthon-deploy-environment.md
- AGENTS.md 精简:其他规则从 10 条减至 5 条,规则维护机制从 10 行减至 4 行
- ulthon-rules-manager 技能增加 rules/skills 边界判定说明
- rules 定位拓宽:约束、约定、设计决策均可作为 rule
2026-06-01 21:48:27 +08:00
augushong
6d2963a9a4 docs: AGENTS.md 开头入口区增加 .agents/skills/ 说明 2026-06-01 21:33:04 +08:00
augushong
6c6c0b771f docs: AGENTS.md 开头入口区增加 .agents/rules/ 说明 2026-06-01 21:32:19 +08:00
augushong
4d05a73949 fix(rules): 清理 PROJECT.md 中框架预填内容,恢复为使用者模板 2026-06-01 21:28:30 +08:00
augushong
f867c42a72 feat(rules): 新增零散规则管理机制
- 新增 .agents/rules/ 目录,存放模块级/场景级独立规则文件
- 新增 ulthon-rules-manager 技能,指导规则的新增/索引/格式
- 新增 ulthon-timer-multi-node 规则文件(从 PROJECT.md 迁移)
- AGENTS.md 新增「零散规则」章节,含框架级规则索引表
- PROJECT.md 新增「规则索引」章节,含全量规则索引表
- 命名约定:ulthon- 前缀为框架内置,project- 前缀为使用者业务
2026-06-01 21:26:16 +08:00
augushong
5941a61b80 重构:JS框架内部变量 admin 统一重命名为 ua,移除无用的 window.ulAdmin 2026-06-01 21:13:22 +08:00
augushong
c4bb851fbb docs: 修正运行模式检测方式,Docker 模式下不能依赖 php think 检测 2026-06-01 20:33:45 +08:00
augushong
1c4f7ac5d5 docs(timer): 技能文档补充 timer.php 配置项说明
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-01 20:28: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
5fe6e3df74 docs(timer): 定时器技能新增按时间窗口循环处理的推荐方法
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-01 20:20:58 +08:00
augushong
d95c06da28 chore: 移动 nginx 伪静态配置到 source/docs 目录 2026-06-01 20:17:38 +08:00
augushong
f5d019b260 fix(ci): 调整流水线步骤顺序,composer install 移至 php think 命令之前
checkout 后没有 vendor 目录,导致 php think admin:stack:mode 报错。
将 composer install 抽为独立步骤并提前执行,确保 php think 命令可正常运行。
2026-05-27 22:59:24 +08:00
augushong
8c766d7e07 chore: bump version to v2.2.5 v2.2.5 2026-05-27 21:54:50 +08:00
augushong
95698afa18 chore(stack): 切换到 default 模式,同步根目录状态 2026-05-27 21:53:35 +08:00
augushong
ceed8d3e71 feat(stack): CLI handleUse() 增加 skipped_files 和 deleted_files 展示 2026-05-27 21:42:52 +08:00
augushong
20dc1b944c docs(stack): 命令执行环境描述改为引导查看 stack 命令,不再硬编码模式列表 2026-05-27 21:42:43 +08:00
augushong
f49ca8d9cf fix(stack): 为 full 和 base-build 模式补充 source/docker/run.sh 2026-05-27 21:42:35 +08:00
augushong
5bb0e03e98 fix(stack): 修正流水线命令 action 为 use,加 -f 跳过确认交互 2026-05-27 20:58:50 +08:00
augushong
c7cfa40539 chore: bump version to v2.2.4 v2.2.4 2026-05-27 20:52:13 +08:00
augushong
28337c9694 refactor(stack): default 模式改为 php think run,原 Docker 部署拆分为 docker-serve 模式
- source/stack/default/ 重命名为 docker-serve,保留 Dockerfile/docker-compose/CI/run.sh
- 新 default 模式仅提供 CI 文件(流水线中自动切换 docker-serve 再构建)
- 更新 stack.json 增加 docker-serve 模式声明
- 更新 README.md 同步模式说明
2026-05-27 20:49: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>
v2.2.3
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
f2f2dcad98 feat(timer): 新增定时任务表的数据库迁移文件
补充 system_timer_config 和 system_timer_log 的数据库迁移,确保全新安装时 migrate: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:09 +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