Skip to content

Feat/docker deploy#25

Open
khamkhamini94-bit wants to merge 142 commits into
developfrom
feat/docker-deploy
Open

Feat/docker deploy#25
khamkhamini94-bit wants to merge 142 commits into
developfrom
feat/docker-deploy

Conversation

@khamkhamini94-bit

Copy link
Copy Markdown
Collaborator

变更内容

  • 新增 Docker 部署配置文件(Dockerfile.backend、Dockerfile.frontend、docker-compose.prod.yml、nginx.conf)
  • 新增 deploy.sh 一键部署脚本
  • 新增 .dockerignore
  • 修复 Select 组件下拉菜单被父容器裁剪的问题(改为向上弹出)

注意事项

  • .env.production 已加入 .gitignore,部署时需手动配置

AperturePlus and others added 30 commits March 20, 2026 22:08
add: sql schema design draft
feat: 重构 Web 端交互与 Mock 后端
前端史诗级加强+后端bugfixes
…VideoPreviewDialog component

- Remove video/HLS/Plyr logic from FileDetailPanel
- FilePreviewDialog dispatches video files to VideoPreviewDialog
- Add useVideoPlayer composable
- Update FilePreviewDialog.spec for video routing
- PlanInspector, SessionItem, SessionList, SkillCard, SkillEditorPanel,
  SkillImportPanel, TaskInputDock, TaskTimeline, TurnEntry
- Update specs (SessionList.spec, SkillCard.spec, TurnEntry.spec) for i18n assertions
将 Dashboard.vue 重构为多页式 Console,并补齐 7 个后端 admin 路由
(users/storage/files/moderation/logs/notifications/system)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… plans

Plan A:7 个 /admin/* 路由全量实现,含 schemas/services/routers/测试,
基于现有 RegistrationEmailDomainRule 模式 + agents.md 五件套约束。

Plan B:pages/dashboard/ -> pages/console/ 多页化,9 子页 + 7 共享组件,
路由 + i18n + 主框架导航整合,删除旧 Dashboard.vue。

两份 plan 相互独立:B 可先靠 mock 自洽完成,A 落地后切换 setupMocks() 即可对真实后端。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add getAdminStorageSummary, getAdminLogs, getAdminNotifications,
  archiveAdminNotification; rewire broadcastNotification to
  /admin/notifications/broadcast.
- Add GetAdminLogsRequest; normalize LogsList to {logs, pagination}
  to match standard PaginatedData shape; surface optional userId on
  LogItem.
- Add /admin/storage/summary, /admin/logs, /admin/notifications,
  /admin/notifications/broadcast, /admin/notifications/{id} mocks
  so Plan B can land independently of Plan A.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds ConsoleLayout (sidebar + router-view nested inside MainLayout's
content area) and 9 placeholder subpages. Old /dashboard route is now
a redirect to /console/overview so existing bookmarks keep working.

i18n: add console.title + console.nav.* (zh/en). The header.menu
rename to 'console' is intentionally deferred to Task 12 so the
sidebar dispatcher and the old menu entry can coexist mid-refactor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds KpiCard, StatusBadge, FilterBar, AdminTable, TrendChart,
BroadcastComposer, QuotaEditor + barrel export. All components are
view-only (no data fetching) and consume the Industrial Dashboard
token system (--ac/--ac-fg, --status-*, --surface-raised, --font-mono,
tabular-nums).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 KPI cards (storage used/limit/files/users/violations/active uploads),
7-day storage trend, and the 5 most recent admin log lines. Fans out
to /admin/storage/summary, /storage/usage-trend, /admin/violations,
/admin/logs, /admin/system/health concurrently on mount.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filtered admin user list with suspend/activate toggle. Extend
getAdminUsers signature to accept search/status/role filters, and
teach the /admin/users mock to honor them (plus emit lastLoginAt so
the row footer renders).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 KPI cards (used/limit/users), a 7/14/30-day trend switcher, and a
per-user quota table. Inline QuotaEditor replaces the Adjust button
when activated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filtered table of admin files (search + virusStatus) with inline
rescan action. Hash and mime are surfaced inline so flagged uploads
can be triaged without leaving the table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Violation queue with status filter (pending/under_review/resolved),
level + status badges, and a one-click Resolve action. Resolve is
disabled once a case is closed so it can't be re-triggered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Health grid surfaces feature flags (virus scan, thumbnails, mail,
hashing), active vs. max uploads, and configured platform targets;
rate-limit table lists each scoped rule with current/limit/blocked
counters in tabular-nums.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AperturePlus and others added 30 commits May 25, 2026 23:14
…el, and execution answer

- Test drive.countFiles dispatches recursive video counting with mime-type sampling
- Test ExecuteRunner returns natural-language answer for countFiles actions
- Test AnthropicPlannerClient retries without reasoning on empty output
- Test PlanRunner falls back to safe read-only plan when LLM returns invalid output
- Test PlanRunner fallback detects movie-count questions and uses drive.countFiles
- Test cancel route marks running jobs as canceled
…afety

- Replace setInterval-based polling with generation-gated async loop to prevent race conditions
- Add canceledTurns set for immediate local cancellation before API response arrives
- Guard all async boundaries (poll tick, execute dispatch) against stale generations and canceled turns
- Auto-execute read-only low-risk plans even under confirm policy via isReadOnlyAutoExecutable
- Replace window.confirm with ui.confirm dialog for high-risk action confirmation
- Clean up polling timers and cancel state on session delete/reset
… and answer rendering

- Test cancel before planJobId arrives keeps turn canceled and does not start polling
- Test in-flight poll response after cancel cannot overwrite canceled status
- Test auto-execute of read-only low-risk plans in confirm policy
- Test write plans are not auto-executed in confirm policy
- Test read-only plans are not auto-executed in planOnly policy
- Test TurnEntry renders execution answer before plan summary
- Test StorageStatus normalizes ratio-like storagePercentage in (0,1]
…ountFiles mock

- Add optional answer field to AgentExecutionResult type
- Add i18n keys for high-risk confirm and delete-session confirm (zh/en)
- Update mock handler to return countFiles actions and execution answer
- Render execution answer as primary result text in TurnEntry, hiding plan summary
- Add ui.confirm-based delete session dialog in AgentWorkspace
…raphy tokens

- Normalize storagePercentage in (0,1] range by multiplying by 100; fall back to used/limit ratio when percentage is missing
- Add border-radius inheritance to progress-bar-fill; move margin to wrapper
- Update typography scale: body 13.5px→14px, small 12px→12.5px, label 10px→10.5px, data 12px→12.5px
- Add fallback CJK font to mono stack for better Chinese character rendering
- Replace hardcoded font-size values (9px, 11px, 10px) with CSS custom property references across agent components
- Guard planHash display behind isAdmin check in PlanInspector
- Extract search terms from user count questions and pass as filename filter
- Include search qualifier in execution answer text
- Add deterministic count plan bypass that extracts search from input
- Update mock to extract and reflect search terms
- Add GET /agent/jobs/{jobId}/events SSE endpoint that streams job status, plan ready, and tool execution events
- Add AgentJobEvent schema with event types for job and tool lifecycle
- Implement frontend SSE parser and streamAgentJobEvents API helper
- Integrate streaming into useAgentSession with polling fallback
- Stream events update ChatMessage events array, status, planResult, and executeResult in real-time
- Display lightweight agent activity events (e.g. tool calls) above the answer
- Filter out terminal job.succeeded events, show last 4 events
- Update dev Library page turns with sample event data
- Add AdminUserUsageStats schema with trafficBytes and agentTokens
- Extend AdminUserItem with usageStats, storage usage percentage
- Implement backend collection of upload traffic and agent token usage within a configurable time window (default 7 days, max 90)
- Add usageFrom/usageTo query params with validation
- Update frontend UsersPage with date range filters and usage display
- Add mock usage events and stats generation
- Add DownloadRateLimitService that enforces per-user and per-IP download byte quotas via Redis weighted rate limiter
- Add configurable DOWNLOAD_RATE_WINDOW_SECONDS, DOWNLOAD_RATE_LIMIT_REQUESTS, DOWNLOAD_RATE_LIMIT_BYTES settings
- Inject rate limiter into files and shares download/preview/batch-download routes
- Refactor batch download into create_batch_download_plan + create_batch_download_archive_from_plan for pre-check
- Admins bypass user-level download rate limits
- Add allow_weighted method to RedisRateLimiter for byte-count tracking
…ion deletion, tool registry)

Captures the three-subproject design covering A) bi-directional interaction
via Redis pub/sub + inbox table + new event types, B) ChatSession entity on
the backend with soft delete + cascaded cancellation, and C) ToolRegistry
replacing if/elif dispatch plus five new read-only query tools.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… backend)

Sixteen TDD tasks covering settings + enums + Flyway V14 migration, ORM
model + repository for AgentInboxMessage, AgentEventBus (in-memory + Redis),
AgentInbox service, AskProtocol, POST /agent/jobs/{id}/messages route,
SSE replacement, removal of legacy POST /agent/cancel, ExecuteRunner inbox
integration, PlanRunner/ExecuteRunner ask wiring, worker assembly, and an
end-to-end pause+cancel test. Frontend changes excluded - see the
forthcoming frontend plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… frontend)

Twelve TDD tasks: extend types/agent.d.ts with 14 event types + inbox
schemas; rewire api/agent.ts to sendAgentMessage + 6 control helpers
(drop cancelAgentJob); extend useAgentSession with waiting_for_user/
paused states, pendingAsk/progress/thinking caches, replyToAsk +
pause/resume/skip/approve/deny methods, cancel via control.cancel;
add AskPrompt + ControlBar components and useAskTimeout composable;
integrate into TurnEntry; lock TaskInputDock during waiting/paused;
13 new i18n keys (zh/en); end-to-end specs reusing project vi.mock
factory style; manual verification checklist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Relax login/register rate limits and account lockout parameters
based on production traffic patterns.
Record exploratory tool calls as planning evidence for transparency.
Rewrite planner summaries with concrete file/folder names for write operations.
Render exploratory tool calls from planning phase beneath the summary,
with collapsible overflow for 3+ evidence items.
…ully degrade and drop client

- Catch RuntimeError with loop-related message in allow_weighted
- Close and drop the cached client on loop mismatch
- Make close() and _drop_cached_client() tolerate loop RuntimeError
…and validation

- Remove le=100 constraint from AgentHints.max_steps schema
- Skip server-side max_steps ceiling check when is_development_env is true
- Pass None as max_steps to _normalize_actions in dev mode (skip limit check)
- Add tests for dev mode plan enqueue and plan runner step acceptance
… structured error response

Instead of raising ApiError when planner calls a disallowed or write tool,
return a structured _plannerBlocked error payload with _toolError flag so the
LLM can self-correct. Only expose read-only tools (explorationTools) to the
planner's tool_use definition; write tools must appear only in final
proposedActions. Update prompt guidance and record blocked attempts as
planning evidence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants