Commit Graph
10 Commits
Author SHA1 Message Date
Ubuntu b42e5b2dd0 feat(heicode): SK workflow UI, Agnet contract docs, usage-log schema
Manager web: Git sources workflow steps and copy; typecheck fixes for auth
and home sections; UsageLog type in usage-log-schema.ts (outside ignored data/).

docs: Agnet platform contract adds runtime_execution and sk_access_policy,
orchestration-plan and acceptance matrix aligned.

Made-with: Cursor
2026-05-01 07:38:17 +00:00
Ubuntu a8f64bce68 feat(ui): reframe SK area as Git-backed sources and snapshot anchors
SK 正文以 Git 为准:侧栏/首页/登录支柱改为「Git 来源」叙事;
/sk-sources 页增加 Git 绑定说明 +「已解析快照锚点」列表标题;
驾驶舱快捷入口与 i18n(中英及同步 locale)对齐。

Made-with: Cursor
2026-05-01 07:21:02 +00:00
Ubuntu a0e69bf076 i18n(zh): complete localization of cockpit/agnet-console/sign-in
- 补齐 109 个 t() key 的中英对照(涵盖 Code 交付驾驶舱、agnet-console
  四张面板、登录页、侧栏/顶部导航/页脚、usage-logs/about/lib/api 等)
- BRAND_TAGLINE 在 auth-layout 改走 t(),新增「智能体研发控制面」
- password-input 的眼睛按钮 aria-label 走 t(),新增「切换密码可见性」
- fr/ja/ru/vi 同步 key(暂用英文兜底,等后续按 i18n 报告补译)

Made-with: Cursor
2026-05-01 06:37:25 +00:00
Ubuntu 8cd82caf72 feat(ui): hide developer console for management backend users
平台定位为管理后台,登录后不再向普通用户暴露 Playground / API Keys / Models
等开发者控制台入口;Usage logs 作为交付链路一环并入 Code delivery 分组。
路由本身保留,仅侧栏不再展示。

Made-with: Cursor
2026-05-01 04:33:15 +00:00
Ubuntu a668e1fca1 feat(auth,ui): hardened Agnet auth, admin workspace and role whitelist
Backend (controller/heicode_agnet_session.go):
- Add HEICODE_ROOT_EMAILS / HEICODE_ADMIN_EMAILS whitelists for JIT role
  assignment. Manager no longer trusts Agnet's role claim — admin / root
  is granted only by local config.
- Default JIT-synced users to RoleCommonUser.
- Promote-only role sync on every login (never demote).

Frontend auth fixes:
- login() no longer hard-codes id=1; preserves the real manager user id
  returned by /api/user/session/from-agnet so the New-Api-User header
  matches the cookie session.
- After login, prefer local /api/user/self over Agnet /me so role /
  status reflect actual manager state (e.g. whitelist promotion).
- lib/api.ts: scope 401 -> "Session expired" handling to identity
  endpoints only; admin-only 401 no longer resets the session.

UI restructuring:
- Default sidebar shows only Code delivery + Console + Personal, plus a
  single "System settings" entry for ROLE.ADMIN+.
- system-settings workspace now hosts the full Tenant administration
  tree (Channels / Models / Subscriptions / Redemption codes / Tenants /
  Templates / Agents / Vendors / All usage logs) for ROLE.ADMIN+, with
  System Administration sub-tree gated to ROLE.SUPER_ADMIN.
- Workspace switch triggers on admin paths (channels, users, templates,
  agents, subscriptions, models, redemption-codes) — not only
  /system-settings.
- system-settings route now allows ROLE.ADMIN+ instead of root-only.

Branding cleanup:
- Drop orphan "NewAPI" i18n keys from web/default locales.
- Rename web/default workspace package newapi-web -> heicode-web.

Config:
- docker-compose.azure-vm.yml exposes HEICODE_ROOT_EMAILS /
  HEICODE_ADMIN_EMAILS.

VERSION: 1.1.0-default-user-role
Made-with: Cursor
2026-04-30 21:03:08 +00:00
Ubuntu aae8dd329a chore(release): bump VERSION to 1.0.2-agnet-jit after Agnet JIT session bridge
Made-with: Cursor
2026-04-30 18:39:10 +00:00
Ubuntu c2633bb1ae fix(auth): use model.UserNameMaxLength for JIT username length
Made-with: Cursor
2026-04-30 18:29:24 +00:00
Ubuntu 6f8ed68422 chore(config): document canonical Agnet base URL from integration doc
Made-with: Cursor
2026-04-30 18:26:33 +00:00
Ubuntu 4cdd06f352 feat(auth): Manager session from Agnet tokens with JIT local user
Replace password-based /api/user/login bridge after external auth with POST /api/user/session/from-agnet: verify access (and optional refresh) against Agnet /api/auth/me, upsert local user by email, then issue the Manager session cookie. Frontend sends bearer tokens only.

Includes HEICODE_AUTH_BASE_URL in compose defaults and .env.example.

Made-with: Cursor
2026-04-30 18:23:39 +00:00
Ubuntu 4f5521a6cf refactor(auth): replace 2FA string sentinel with typed error
Use a dedicated TwoFactorRequiredError and shared type guard to keep login flow checks type-safe and less brittle than matching magic strings.

Made-with: Cursor
2026-04-30 18:07:12 +00:00