refactor(auth): delegate access control to be-system

Remove Agent Desk users, roles, login sessions, tokens, and local permission persistence. Expose the backend as an embeddable ai-agent module with host-provided subject lookup and operation authorization callbacks, and complete the frontend/backend repository split.
This commit is contained in:
t
2026-08-21 00:41:07 +08:00
parent 3d47227fbd
commit 2bbf42b741
447 changed files with 1901 additions and 8920 deletions
+10 -21
View File
@@ -1,17 +1,16 @@
package main
import (
"agent-desk/cmd/testdata/agentteam"
"agent-desk/cmd/testdata/aiagent"
"agent-desk/cmd/testdata/aiconfig"
"agent-desk/cmd/testdata/channel"
"agent-desk/cmd/testdata/kb"
"agent-desk/cmd/testdata/quickreply"
"agent-desk/cmd/testdata/seedlang"
"agent-desk/cmd/testdata/skill"
"agent-desk/cmd/testdata/tag"
"agent-desk/internal/bootstrap"
"agent-desk/internal/pkg/config"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/aiagent"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/aiconfig"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/channel"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/kb"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/quickreply"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/seedlang"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/skill"
"code.tczkiot.com/wlw/ai-agent/cmd/testdata/tag"
"code.tczkiot.com/wlw/ai-agent/internal/bootstrap"
"code.tczkiot.com/wlw/ai-agent/internal/pkg/config"
"flag"
"fmt"
"log/slog"
@@ -94,16 +93,6 @@ func run() error {
}
slog.Info("skill init success", slog.Int("created", skillResult.Created), slog.Int("updated", skillResult.Updated))
agentTeamResult, err := agentteam.Init(lang)
if err != nil {
return fmt.Errorf("init agent team failed: %w", err)
}
slog.Info("agent team init success", slog.Bool("teamCreated", agentTeamResult.TeamCreated),
slog.Int("usersCreated", agentTeamResult.UsersCreated),
slog.Int("profilesCreated", agentTeamResult.ProfilesCreated),
slog.Int("updatesApplied", agentTeamResult.UpdatesApplied),
)
aiAgentResult, err := aiagent.Init(lang)
if err != nil {
return fmt.Errorf("init ai agent failed: %w", err)