/** TAPD 扩展共享类型。 */ import type { SubagentPresentation } from "../shared/subagent/config.js"; export interface GitLabConfig { token?: string; baseUrl?: string; } export interface TapdReviewConfig { /** Review 子 Agent 模型,例如 anthropic/claude-sonnet-4-5。 */ model?: string; /** Review 思考等级;off / minimal / low / medium / high / xhigh / max;默认继承主会话。 */ thinkingLevel?: string; /** 子 Agent 展示方式;默认由 ~/.pi/agent/ming-core.json 的 subagents 决定。 */ presentation?: SubagentPresentation; } export interface TapdRootCauseConfig { /** 根因总结子 Agent 模型,例如 cursor/composer-2.5。 */ model?: string; /** 根因总结思考等级;off / minimal / low / medium / high / xhigh / max;默认继承主会话。 */ thinkingLevel?: string; } export interface TapdConfig { token: string; baseUrl?: string; gitlab?: GitLabConfig; review?: TapdReviewConfig; rootCause?: TapdRootCauseConfig; } export interface TapdResponse { status: number; data: T[]; } export type TapdItemKind = "story" | "bug"; export interface TapdItem { id: string; kind: TapdItemKind; name: string; status: string; priority: string; owner: string; severity?: string; workspaceId: string; workspaceName: string; begin?: string; due?: string; iterationId?: string; iterationName?: string; parentId?: string; workitemTypeName?: string; children: TapdItem[]; depth: number; hasChildren: boolean; } export interface TapdWorkspace { id: string; name: string; } export type SubtaskKind = "design" | "development"; export interface DevelopmentTaskSuggestion { id?: string; title: string; scope: string[]; acceptanceCriteria: string[]; dependencies: string[]; suggestedEffort?: number; } export interface SubtaskPlanItem extends DevelopmentTaskSuggestion { localId: string; kind: SubtaskKind; effort: number; } export interface SubtaskPlan { designFile: string; designContentHash: string; collaborationContentHash?: string; confirmedAt: string; items: SubtaskPlanItem[]; } export interface CreatedSubtask { localId: string; kind: SubtaskKind; title: string; effort: number; tapdId: string; tapdUrl: string; createdAt: string; updatedAt?: string; } export type CreateDraft = { title: string; projectPaths: string[]; /** 新会话工作目录;未指定时使用当前会话 cwd。 */ workingDirectory?: string; }; export type PickerAction = | { type: "create"; draft: CreateDraft } | { type: "switch"; sessionFile: string }; export type TableOutcome = | { kind: "done"; saveState: boolean } | { kind: "session_action"; action: PickerAction; itemKey: string; itemName: string; }; export interface ItemKey { kind: TapdItemKind; wsId: string; itemId: string; }