Commit Graph

8 Commits

Author SHA1 Message Date
root f6e553dcc3 feat(monitoring): add DeepSeek monitoring end-to-end
- desktop: new DeepSeek page adapter and monitor registry
- desktop: extract generic AI auth helpers into shared module and
  skip binding when challenge signals are present
- admin-web: render DeepSeek HTML answers with inline citation anchors
  and surface reference-number badges on source cards
- server: fall back to inline_links/source_panel_links and read
  text/siteName fields when extracting DeepSeek citations

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 22:54:56 +08:00
root a617d39a4a feat(desktop): drop parked review flow, add publish management
SaaS 侧人工审核后才创建 publish job,desktop 不再做二次审核:移除
manual/waiting_user/parked/from_parked 状态机与 LeaseFromParked 查询,
desktop client 只执行发布并新增"发布管理"页(待发布队列 / 历史 / 再次
发送)。同时抽离 @geo/publisher-platforms 共享适配器包、新增 Redis-based
desktop_presence 与 publish_record_support,刷新 admin-web 发布弹窗与
媒体库;plan A / spec 文档同步口径。
2026-04-20 09:52:48 +08:00
root 98f9e95875 docs(plans): add Plan 0 (workspace foundation) and Plan A (desktop skeleton)
Plan 0 · Workspace 底座一等化 (2-3 weeks, blocks Plan A):
  - Phase 0.1 workspaces + workspace_memberships tables with default
    seed; backfill workspace_id onto existing platform_accounts and
    tenant_monitoring_quotas.
  - Phase 0.2 Actor/Claims/JWT add PrimaryWorkspaceID; Login/Refresh
    inject via GetPrimaryWorkspaceForUser query.
  - Phase 0.3 WorkspaceScope middleware driven from Actor only (query
    params rejected); wired to /api/tenant/events / accounts /
    publish-jobs / tasks / monitoring whitelist.
  - Phase 0.4 sqlc queries for platform_accounts and
    tenant_monitoring_quotas filter by workspace_id; ≥10
    cross-workspace penetration test cases.
  - Phase 0.5 workspace-sensitive cache keys.
  - Phase 0.6 monitoring domain migration: rename
    primary_installation_id → primary_client_id; service / handler /
    projection / recovery / cleanup / seed all consume workspace_id;
    regression tests.
  - Phase 0.7 /api/auth/me returns primary_workspace; admin-web memo.
  - Phase 0.8 CI lint guard enforces workspace_id injection on
    desktop lines.
  - Phase 0.9 server-derived SSE topic library + exit-bar smoke +
    code review checklist.

Plan A · 桌面客户端骨架穿透 (5-6 weeks):
  - Phase A.0 CDP spike matrix for Doubao (0.5w, blocks A.4).
  - Phase A.1 server protocol + DB: desktop_clients /
    platform_accounts / desktop_tasks / publish_jobs / attempts /
    traces; lease / LeaseFromParked (strict CAS) / Park / Extend /
    Complete / ReconcileTask / WebCancel queries; RabbitMQ fanout +
    Redis presence + offline→online reclaim; 11-case lease protocol
    integration suite.
  - Phase A.2 Electron desktop-client runtime with modules:
    session-registry, view-pool (hot/cold), vault + vault-export,
    lease-manager, rate-limiter, keep-alive, circuit-breaker,
    crash-recovery, api-client, sse-client, tracing (Alpha scope).
  - Phase A.3 packages/ui-shared H1: design tokens (CSS vars +
    AntD theme light/dark); useAccountSelection composable;
    MarkdownPreview / AccountCard / TagMultiSelect / HealthBadge /
    useSseSubscription components; admin-web no-regress integration.
  - Phase A.4 Doubao monitor adapter based on A.0 matrix.
  - Phase A.5 Toutiao publish adapter with manual parked recovery.
  - Phase A.6 PublishArticleModal H2 rewrite (account-level
    multi-select on useAccountSelection; SSE progress panel; deep
    link for manual review).
  - Phase A.7 fake server + fake platforms + Playwright _electron
    E2E + Mac notarization CI + autoUpdater unit tests.
  - Phase A.8 exit-bar: real-account smoke playbook + chaos test
    (multi-instance SSE routing / parked survival across restarts)
    + plan-a-complete tag.

Plan 0 must complete and tag `plan-0-complete` before Plan A starts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 23:47:13 +08:00
root 79c65c1da7 feat(kol): expand variable schema and polish KOL UI
- Add length/range limits to KOL variable definitions: max_length and
  default_value for input/textarea, min_value/max_value/default_number
  for number. Backend validates and normalizes; frontend renders limit
  inputs in KolVariableConfig and applies limits at runtime in
  KolDynamicForm.
- Sort workspace cards by most recent prompt/package update, falling
  back to granted_at. Adds updated_at to KolWorkspaceCard.
- Polish TemplatesView, WorkspaceView, and KOL package management UI;
  route create/update/publish/archive/delete toasts through i18n and
  expand package form copy and status labels.
- Remove stale KnowledgeView.vue.patch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 15:01:40 +08:00
root 8c531054b3 docs: add KOL profile page implementation plan
9 TDD tasks, each with bite-sized steps and commit points:
validators → service → avatar upload → handlers/routes →
API client → i18n → persona card → view/route/nav → verify.
2026-04-18 14:01:54 +08:00
root 3ef0807456 fix: Enhance Kol Variable Rendering and Management
- Updated the regex for placeholder matching to support more flexible key formats.
- Refactored variable storage to allow both ID and key lookups in rendering.
- Improved schema validation to check for duplicate keys and enforce non-empty keys.
- Added new utility functions for variable value lookup and display name generation.
- Enhanced tests to cover new key-based variable scenarios.
- Refactored KolPrompt repository to simplify prompt storage and management, including the removal of obsolete revision handling.
- Introduced new API endpoints for saving, activating, and archiving prompts.
- Added new utility functions for handling Kol placeholders and platform options in the admin web.
- Implemented database migrations to simplify prompt storage structure and ensure data integrity.
2026-04-18 00:47:57 +08:00
root 3e1b68f771 docs: add KOL feature implementation plan
8-phase plan covering data foundation, profile lifecycle, workspace
backend/frontend, marketplace+subscription, generation pipeline, dashboard,
and workspace integration. Each phase is a shippable milestone.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 07:46:29 +08:00
root 27389164b0 feat: add image management functionality
- Implemented image folder repository with CRUD operations.
- Added image reference repository for managing image references to articles.
- Created image repository for handling image assets, including listing, inserting, updating, and deleting images.
- Introduced image usage repository to track storage usage and quotas for tenants.
- Added SQL queries for image assets, folders, references, and usage.
- Developed image handler for HTTP endpoints to manage images and folders.
- Created database migration scripts for image-related tables and structures.
2026-04-16 20:40:41 +08:00