feat(teams,dsh): overview dashboard, lead task auth, and DSH launch tokens

- teams: cross-team overview read model + route/query/page; enforce member
  target visibility and restrict member task creation to the Lead
- dsh: accept 0.2.x launch tokens from the printed URL, HAPI_DSH_TOKEN, or
  HAPI_DSH_TOKEN_FILE; bundled wrapper captures the printed token securely;
  per-session agent availability and remote event/auth handling
- usage: support the 1d range and per-session totals in summaries
- cli/web: team prompt/client plumbing, availability gating, locale and
  route wiring for the overview page

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
2026-11-05 02:22:50 +08:00
co-authored by Claude Code HAPI
parent bc6b1577fa
commit 362b1fe47e
28 changed files with 1666 additions and 70 deletions
+5
View File
@@ -49,6 +49,7 @@ import type {
SessionContentSearchResponse
} from '@/types/api'
import type { TeamDetail, TeamMessage, TeamSummary, TeamTask, TeamWithMembers } from '@/types/team'
import type { TeamOverviewResponse } from '@hapi/protocol/apiTypes'
import type {
CodexGoalRequest,
CodexGoalResponse,
@@ -570,6 +571,10 @@ export class ApiClient {
return await this.request<{ teams: TeamWithMembers[] }>('/api/teams')
}
async getTeamOverview(): Promise<TeamOverviewResponse> {
return await this.request<TeamOverviewResponse>('/api/teams/overview')
}
async getTeam(teamId: string): Promise<TeamDetail> {
return await this.request<TeamDetail>(`/api/teams/${encodeURIComponent(teamId)}`)
}