feat(assist): 支持协助身份与角色权限穿透呈现及高管防误用警示

- 实测澄清协助平台时长限制: 服务端 POST /api/assistPlatform/create 硬性单次上限为 24 小时 (1 天),超过直接报错 400,支持 --days/--hours 并在超限时清晰提示
- 协助直通会话生成及落盘时实时穿透解析组织架构: 提取人员姓名、工号、手机、所属部门、所配角色清单及核心系统权限
- 建立高管身份与特权角色风控评级体系 (analyzeStaffRoleRisk): 自动识别总监、主管理员、财务负责人、总经理等高危身份并输出安全风控警示框
- 将完整人员身份画像与风控元数据注入持久化企业配置 (enterprises/<corpId>.json)
- 在 SKILL.md 追加 Rule 13 及更新 assist-platform.md 说明文档
This commit is contained in:
gitea committed 2026-10-21 11:39:00 +08:00
1 parent 60d0b8ffc1
commit 2ace4e2378
12 files changed
+957 -466

No files matched your search

+13 -2
View File
@@ -23,11 +23,22 @@ export async function handleApply(
};
}
const hours = numberOption(parsed.options, ["hours", "hour", "duration"]) ?? 24;
const days = numberOption(parsed.options, ["days", "day"]);
let hours = numberOption(parsed.options, ["hours", "hour", "duration"]);
if (days !== undefined) {
hours = days * 24;
}
if (hours === undefined) {
hours = 24;
}
if (hours < 1 || hours > 24) {
return {
stdout: "",
stderr: `[ERROR] 申请协助时长必须介于 1 到 24 小时之间,当前传入: ${hours}\n`,
stderr:
`[ERROR] 申请协助时长不能超过 24 小时 (1 天),当前传入: ${days !== undefined ? `${days} 天 (${hours} 小时)` : `${hours} 小时`}。\n` +
`提示: 合思协助平台服务端(POST /api/assistPlatform/create)实施了硬性安全限制:单次协助工单最长有效期限为 24 小时 (1天),超过 24 小时服务端将直接拒绝受理。\n` +
`如需持续协助支持,可在工单到期后再次快速发起或在端内续签。\n`,
exitCode: 1,
};
}