Repository navigation
新增管理命令:在服务器上执行管理后台常用操作 - #120
Merged
Merged
Conversation
- coreman bots / skills / approvals / systems / teams / users 覆盖 AI 员工、技能管理、 技能审批、业务系统、团队与用户的常用操作;coreman api 直接调其余管理接口。 - 进程内启动同一个 API 应用,以 --as(或 COREMAN_CLI_USER)指定的成员建短期管理台 会话(auth_method=cli),请求走同一套管理接口,结束时吊销:权限、校验、乐观锁、 变更通知与审计日志都和管理后台一致,不另写业务逻辑。 - 名称自动解析成 id;set 类命令取回现值只改给出的字段;敏感值只回传脱敏值,明文 不经过终端;删除和对所有人放开要 --yes;--json 输出原始数据。 - deploy/coreman 转发这些命令并带上宿主机的 COREMAN_CLI_USER;镜像内新增 coreman 入口(project.scripts),k8s 可直接 exec。 - 文档 docs/admin-cli.md,无数据库迁移。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
管理后台里最常用的调整(AI 员工、技能管理、技能审批、业务系统、团队与用户)现在可以在服务器上用命令完成,不必每次登录后台手工操作。
做法
coreman bots / skills / approvals / systems / teams / users,以及覆盖其余管理接口的coreman api <get|post|put|patch|delete> PATH。--as(或COREMAN_CLI_USER)指定的成员建一个短期管理台会话(auth_method = cli),请求走同一套管理接口,结束时吊销。权限、校验、乐观锁、变更通知和审计日志都与管理后台一致,没有另写业务逻辑。set类命令取回现值、只改给出的字段;环境变量和环境组变量只回传脱敏值,明文不经过终端;删除和「对所有人放开」需要--yes;--json输出原始数据。deploy/coreman转发这些命令,并把宿主机上的COREMAN_CLI_USER带进容器;镜像里新增coreman入口(project.scripts),k8s 可以直接exec。docs/admin-cli.md。无数据库迁移。注意
bots member-add把自己加为协作者,或以创建者身份执行。coreman api。验证
tests/api/test_admin_cli.py:操作人校验与会话吊销、stdout 不混日志、权限拒绝、审计记录、脱敏值保留原密钥、白名单移空保护、内部技能「申请 → 审批 → 排队安装」、技能目录与环境组、业务系统开放范围与授权、团队规则与用户归属、api命令。tests/unit/test_coreman_script.py:部署脚本转发与COREMAN_CLI_USER透传。pytest -n 4:3032 passed, 2 skipped;ruff check、mypy coreman通过。🤖 Generated with Claude Code