feat: ship enterprise control and desktop governance

This commit is contained in:
AI Bot
2026-05-11 14:59:26 +08:00
parent 0757d07521
commit a311280238
285 changed files with 48574 additions and 2428 deletions

View File

@@ -171,7 +171,7 @@ test("master-agent 对话控制路由可读写并回显到项目详情", async (
try {
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -286,7 +286,7 @@ test("master-agent 对话控制按当前账号隔离,不会串到其他用户"
await setup();
const adminSession = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -346,7 +346,7 @@ test("master-agent 对话控制路由单字段更新不会清掉另一字段", a
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -397,7 +397,7 @@ test("全局接管默认会透传到普通线程会话详情", async () => {
await setup();
const projectId = await ensureOrdinaryProject("ordinary-takeover-project");
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -444,7 +444,7 @@ test("普通线程会话可以单独关闭主 Agent 协同接管并覆盖全局
await setup();
const projectId = await ensureOrdinaryProject("ordinary-project-override");
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -477,7 +477,7 @@ test("普通线程会话可以单独关闭主 Agent 协同接管并覆盖全局
);
assert.equal(response.status, 200);
const detail = getProjectDetailView(await readState(), projectId, "17600003315");
const detail = getProjectDetailView(await readState(), projectId, "krisolo");
assert.equal(detail?.agentControls?.effectiveTakeoverEnabled, false);
assert.equal(detail?.agentControls?.takeoverInheritedFromGlobal, false);
});
@@ -486,7 +486,7 @@ test("master-agent 对话控制 POST 清空后仍稳定回传 controls null", as
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -536,7 +536,7 @@ test("普通线程项目详情会回传接管控制占位", async () => {
const ordinaryProjectId = await ensureOrdinaryProject();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -603,7 +603,7 @@ test("master-agent 对话控制 POST 会稳定拒绝非法 modelOverride", async
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -637,7 +637,7 @@ test("master-agent 对话控制 POST 会稳定拒绝 malformed JSON 和空对象
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -843,7 +843,7 @@ test("GET /agent-controls returns 404 for missing project", async () => {
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -888,7 +888,7 @@ test(
const route = routeModule.default ?? routeModule;
const session = await data.createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -965,7 +965,7 @@ test("GET /agent-controls 在未显式设置 BOSS_STATE_FILE 时仍可正常读
});
const session = await data.createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -1011,7 +1011,7 @@ test("GET /agent-controls supports ordinary projects for takeover settings", asy
const ordinaryProjectId = await ensureOrdinaryProject();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -1035,7 +1035,7 @@ test("POST /agent-controls rejects unknown-key payload and preserves controls",
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",
@@ -1080,7 +1080,7 @@ test("master-agent 对话控制 POST 会稳定拒绝非法 backendOverride", asy
await setup();
const session = await createAuthSession({
account: "17600003315",
account: "krisolo",
role: "highest_admin",
displayName: "Boss 超级管理员",
loginMethod: "password",