import type { WorkspaceRebaseSurface, WorkspaceRuntimeSurface } from './session-types.js'; export type KanbanPriority = 'critical' | 'high' | 'medium' | 'low'; export type KanbanCollaboratorRole = 'owner' | 'maintainer' | 'contributor' | 'viewer'; export type KanbanEntityVisibility = 'private' | 'team' | 'workspace-shared'; export type KanbanActivityEntityType = 'project' | 'issue' | 'board' | 'workspace'; export type KanbanActivityActorKind = 'human' | 'agent' | 'system'; export type KanbanPermissionAction = 'manage-project-settings' | 'manage-team-members' | 'edit-board' | 'assign-issues' | 'review-work' | 'manage-workspaces'; export type KanbanIssueStatus = 'backlog' | 'ready' | 'in-progress' | 'blocked' | 'review' | 'done'; export type KanbanWorkflowState = 'todo' | 'in-progress' | 'review' | 'done'; export type KanbanSwimlaneId = 'expedite' | 'standard' | 'blocked'; export type KanbanDispatchReadiness = 'needs-decomposition' | 'ready' | 'blocked' | 'dispatched' | 'completed'; export type KanbanDependencyType = 'blocks' | 'blocked-by' | 'related'; export type KanbanDecompositionStatus = 'todo' | 'ready' | 'done'; export type KanbanDecompositionKind = 'research' | 'implementation' | 'validation' | 'coordination'; export type KanbanIntegrationProvider = 'github' | 'azure-repos'; export type KanbanIntegrationStatus = 'connected' | 'disconnected' | 'partial-setup' | 'expired-auth' | 'missing-scopes' | 'failing'; export type KanbanPullRequestLinkState = 'unlinked' | 'linked' | 'partially-linked'; export type KanbanRepositoryProvider = KanbanIntegrationProvider | 'gitlab' | 'bitbucket' | 'local'; export type KanbanPullRequestStatus = 'draft' | 'open' | 'in-review' | 'approved' | 'changes-requested' | 'merged'; export type KanbanReviewStatus = 'unlinked' | 'pending' | 'approved' | 'changes-requested'; export type KanbanMergeStatus = 'not-ready' | 'blocked' | 'ready' | 'merged'; export type KanbanCiGateStatus = 'pending' | 'passing' | 'failing' | 'skipped'; export type KanbanPublishStatus = 'not-ready' | 'pending' | 'ready' | 'published' | 'failed'; export type KanbanReviewTargetType = 'issue' | 'workspace'; export type KanbanReviewDecision = 'pending' | 'changes-requested' | 'approved'; export type KanbanReviewQueueState = 'queued' | 'in-review' | 'completed'; export type KanbanDiffLineKind = 'context' | 'add' | 'delete'; export type KanbanDiffPresentation = 'unified' | 'split'; export type KanbanReviewCommentStatus = 'open' | 'resolved'; export type KanbanReviewCommentSide = 'base' | 'head'; export type KanbanReviewExecutionTargetKind = 'workspace' | 'session' | 'run'; export type KanbanTaskTagScopeKind = 'global' | 'project' | 'workspace'; export interface KanbanDispatchContextLabelDefinition { readonly id: string; readonly key: string; readonly label: string; readonly instruction: string; readonly description?: string; readonly order: number; readonly createdAt: string; readonly updatedAt: string; } export interface KanbanDispatchContextLabelRef { readonly labelId: string; } export interface KanbanDispatchContextLabelProjection { readonly labelId: string; readonly key: string; readonly label: string; readonly instruction: string; } export interface KanbanExecutionContextEnvelope { readonly kind: 'dispatch-context-labels'; readonly project: { readonly id: string; readonly key?: string; readonly name?: string; }; readonly issue: { readonly id: string; readonly key: string; readonly title: string; }; readonly dispatch: { readonly runIds: readonly string[]; readonly sessionIds: readonly string[]; readonly labelIds: readonly string[]; readonly labels: readonly KanbanDispatchContextLabelProjection[]; readonly renderedContext?: string; readonly lastDispatchedAt?: string; }; readonly block: string; } export interface KanbanDispatchContextExecutionEnvelope { readonly source: 'dispatch-context-labels'; readonly appliedLabels: readonly KanbanDispatchContextLabelProjection[]; readonly renderedBlock: string; readonly metadata: { readonly labelIds: readonly string[]; readonly labelKeys: readonly string[]; readonly labelCount: number; }; } export interface KanbanLabel { readonly id: string; readonly name: string; readonly color?: string; readonly description?: string; } export interface KanbanTaskTagScope { readonly kind: KanbanTaskTagScopeKind; readonly refId?: string; } export interface KanbanTaskTag { readonly id: string; readonly key: string; readonly label: string; readonly content: string; readonly description?: string; readonly order: number; readonly createdAt: string; readonly updatedAt: string; readonly scope?: KanbanTaskTagScope; } export interface KanbanAssignee { readonly id: string; readonly displayName: string; readonly email?: string; readonly avatarUrl?: string; } export interface KanbanCollaborator extends KanbanAssignee { readonly role: KanbanCollaboratorRole; } export interface KanbanPermissionGrant { readonly action: KanbanPermissionAction; readonly roles: readonly KanbanCollaboratorRole[]; readonly description?: string; } export interface KanbanTeamSettings { readonly visibility: KanbanEntityVisibility; readonly defaultRole: KanbanCollaboratorRole; readonly allowSelfAssign: boolean; } export interface KanbanProjectSettings { readonly reviewRequiredForDone: boolean; readonly activityScope: 'project-and-issues' | 'all-board-entities'; readonly workspaceProvisioning: 'owners-maintainers' | 'contributors-and-up'; } export interface KanbanActivityActor { readonly kind: KanbanActivityActorKind; readonly id: string; readonly displayName: string; readonly role?: KanbanCollaboratorRole; } export interface KanbanActivityEntry { readonly id: string; readonly entityType: KanbanActivityEntityType; readonly entityId: string; readonly action: string; readonly summary: string; readonly actor: KanbanActivityActor; readonly createdAt: string; } export interface KanbanTeam { readonly id: string; readonly name: string; readonly members: readonly KanbanCollaborator[]; readonly settings: KanbanTeamSettings; } export interface KanbanAcceptanceCriterion { readonly id: string; readonly title: string; readonly satisfied: boolean; readonly notes?: string; } export interface KanbanIssueDependency { readonly issueId: string; readonly type: KanbanDependencyType; } export interface KanbanDecompositionItem { readonly id: string; readonly title: string; readonly status: KanbanDecompositionStatus; readonly kind: KanbanDecompositionKind; readonly issueId?: string; } export interface KanbanIssueDispatchState { readonly readiness: KanbanDispatchReadiness; readonly blockedReasons: readonly string[]; readonly runIds: readonly string[]; readonly sessionIds: readonly string[]; readonly contextLabels: readonly KanbanDispatchContextLabelRef[]; readonly contextLabelProjections: readonly KanbanDispatchContextLabelProjection[]; readonly executionContext?: KanbanDispatchContextExecutionEnvelope; readonly renderedContext?: string; readonly lastDispatchedAt?: string; } export interface KanbanIssueSource { readonly kind: 'seed' | 'file' | 'run-derived'; readonly path?: string; readonly externalId?: string; readonly metadata?: Readonly>; } export interface KanbanIssueWorkspaceLink { readonly workspacePath: string; readonly workspaceName: string; readonly branchName?: string; readonly linkedAt: string; readonly source: 'created-from-issue' | 'linked-existing-workspace'; } export interface KanbanPullRequestReviewLink { readonly id: string; readonly label: string; readonly reviewer?: string; readonly status: Exclude; readonly url?: string; } export interface KanbanCiGate { readonly id: string; readonly name: string; readonly provider?: string; readonly required: boolean; readonly status: KanbanCiGateStatus; readonly summary?: string; readonly url?: string; } export interface KanbanRepositorySettings { readonly baseBranch: string; readonly autoMerge: boolean; readonly requiredApprovals: number; readonly ciProvider?: string; readonly publishTarget?: string; } export interface KanbanIntegrationPrerequisite { readonly key: string; readonly label: string; readonly satisfied: boolean; readonly guidance?: string; } export interface KanbanIntegrationActionState { readonly canCreatePullRequest: boolean; readonly canManagePullRequest: boolean; readonly canApproveFromReview: boolean; readonly reason?: string; } export interface KanbanIntegrationConnection { readonly provider: KanbanIntegrationProvider; readonly label: string; readonly status: KanbanIntegrationStatus; readonly accountLabel?: string; readonly connectedAt?: string; readonly failureMessage?: string; readonly missingScopes?: readonly string[]; readonly prerequisites: readonly KanbanIntegrationPrerequisite[]; readonly guidance: string; readonly actions: KanbanIntegrationActionState; } export interface KanbanRepositoryIntegrationState { readonly provider: KanbanIntegrationProvider; readonly status: KanbanIntegrationStatus; readonly linkState: KanbanPullRequestLinkState; readonly failureMessage?: string; readonly guidance: string; readonly missingScopes?: readonly string[]; readonly prerequisites: readonly KanbanIntegrationPrerequisite[]; readonly actions: KanbanIntegrationActionState; } export interface KanbanRepositoryContext { readonly id: string; readonly name: string; readonly owner: string; readonly fullName: string; readonly provider: KanbanRepositoryProvider; readonly url?: string; readonly defaultBranch: string; readonly linkedAt: string; readonly settings: KanbanRepositorySettings; } export interface KanbanPullRequest { readonly id: string; readonly number: number; readonly title: string; readonly status: KanbanPullRequestStatus; readonly branchName: string; readonly baseBranch: string; readonly mergeStatus: KanbanMergeStatus; readonly reviewLinks: readonly KanbanPullRequestReviewLink[]; readonly url?: string; readonly linkState?: KanbanPullRequestLinkState; readonly createdAt: string; readonly updatedAt: string; } export interface KanbanIssueRepositoryLifecycle { readonly repositoryId: string; readonly branchName: string; readonly reviewStatus: KanbanReviewStatus; readonly mergeStatus: KanbanMergeStatus; readonly publishStatus: KanbanPublishStatus; readonly ciGates: readonly KanbanCiGate[]; readonly pullRequest?: KanbanPullRequest; readonly integration?: KanbanRepositoryIntegrationState; readonly publishUrl?: string; readonly lastPublishedAt?: string; } export interface KanbanLinkedPullRequestSummary { readonly provider: KanbanIntegrationProvider; readonly status: KanbanPullRequestStatus; readonly linkState: KanbanPullRequestLinkState; readonly title: string; readonly number?: number; readonly url?: string; readonly branchName?: string; readonly baseBranch?: string; readonly reviewStatus?: KanbanReviewStatus; readonly mergeStatus?: KanbanMergeStatus; readonly publishStatus?: KanbanPublishStatus; readonly ciGates?: readonly KanbanCiGate[]; readonly integrationStatus: KanbanIntegrationStatus; readonly guidance?: string; } export interface KanbanReviewFeedbackSource { readonly kind: 'agent-feedback'; readonly label: string; readonly sessionId?: string; readonly runId?: string; readonly effectId?: string; readonly messageId?: string; } export interface KanbanDiffLine { readonly kind: KanbanDiffLineKind; readonly content: string; readonly oldLineNumber?: number; readonly newLineNumber?: number; } export interface KanbanDiffHunk { readonly id: string; readonly header: string; readonly lines: readonly KanbanDiffLine[]; } export interface KanbanDiffFile { readonly id: string; readonly path: string; readonly additions: number; readonly deletions: number; readonly hunks: readonly KanbanDiffHunk[]; } export interface KanbanReviewCommentAnchor { readonly fileId: string; readonly filePath: string; readonly hunkId: string; readonly side: KanbanReviewCommentSide; readonly line: number; } export interface KanbanReviewComment { readonly id: string; readonly author: { readonly kind: 'agent' | 'human'; readonly name: string; }; readonly body: string; readonly createdAt: string; readonly status: KanbanReviewCommentStatus; readonly anchor: KanbanReviewCommentAnchor; readonly feedbackSource?: KanbanReviewFeedbackSource; } export interface KanbanReviewExecutionTarget { readonly id: string; readonly kind: KanbanReviewExecutionTargetKind; readonly label: string; readonly href: string; readonly description?: string; readonly actionLabel?: string; } export interface KanbanReviewSubmission { readonly decision: KanbanReviewDecision; readonly summary?: string; readonly submittedAt: string; readonly executionTargetId?: string; readonly executionTargetLabel?: string; } export interface KanbanReviewSummary { readonly decision: KanbanReviewDecision; readonly queueState: KanbanReviewQueueState; readonly commentCount: number; readonly openCommentCount: number; readonly latestActivityAt: string; } export interface KanbanReviewArtifact { readonly id: string; readonly targetType: KanbanReviewTargetType; readonly targetId: string; readonly targetLabel: string; readonly title: string; readonly summary?: string; readonly branch?: string; readonly decision: KanbanReviewDecision; readonly queueState: KanbanReviewQueueState; readonly diff: readonly KanbanDiffFile[]; readonly comments: readonly KanbanReviewComment[]; readonly preferredPresentation?: KanbanDiffPresentation; readonly executionTargets?: readonly KanbanReviewExecutionTarget[]; readonly latestSubmission?: KanbanReviewSubmission; readonly integration?: KanbanRepositoryIntegrationState; readonly linkedPullRequest?: KanbanLinkedPullRequestSummary; readonly updatedAt: string; } export interface KanbanReviewQueueItem { readonly artifactId: string; readonly targetType: KanbanReviewTargetType; readonly targetId: string; readonly targetLabel: string; readonly title: string; readonly decision: KanbanReviewDecision; readonly queueState: KanbanReviewQueueState; readonly commentCount: number; readonly openCommentCount: number; readonly updatedAt: string; } export interface KanbanReviewSnapshot { readonly generatedAt: string; readonly artifacts: readonly KanbanReviewArtifact[]; readonly queue: readonly KanbanReviewQueueItem[]; readonly summary: { readonly total: number; readonly issueCount: number; readonly workspaceCount: number; readonly pendingCount: number; readonly changesRequestedCount: number; readonly approvedCount: number; readonly openCommentCount: number; }; } export interface KanbanIssue { readonly id: string; readonly projectId: string; readonly key: string; readonly title: string; readonly summary?: string; readonly description?: string; readonly status: KanbanIssueStatus; readonly priority: KanbanPriority; readonly labels: readonly KanbanLabel[]; readonly assignees: readonly KanbanAssignee[]; readonly collaborators: readonly KanbanCollaborator[]; readonly dependencies: readonly KanbanIssueDependency[]; readonly acceptanceCriteria: readonly KanbanAcceptanceCriterion[]; readonly decomposition: readonly KanbanDecompositionItem[]; readonly childIssueIds: readonly string[]; readonly parentIssueId?: string; readonly createdAt: string; readonly updatedAt: string; readonly dispatch: KanbanIssueDispatchState; readonly repositoryLifecycle?: KanbanIssueRepositoryLifecycle; readonly workspaceLinks?: readonly KanbanIssueWorkspaceLink[]; readonly activity: readonly KanbanActivityEntry[]; readonly source?: KanbanIssueSource; readonly metadata?: Readonly>; readonly review?: KanbanReviewSummary; } export interface KanbanStatusDefinition { readonly id: string; readonly name: string; readonly kind: 'backlog' | 'active' | 'done'; readonly wipLimit?: number; } export interface KanbanProjectMetrics { readonly totalIssues: number; readonly readyIssues: number; readonly blockedIssues: number; readonly dispatchedIssues: number; readonly completedIssues: number; readonly needsDecompositionIssues: number; readonly inProgressIssues: number; } export interface LinkedRunSummary { readonly projectName: string; readonly totalRuns: number; readonly activeRuns: number; readonly completedRuns: number; readonly failedRuns: number; readonly staleRuns?: number; readonly latestUpdate: string; } export interface KanbanProject { readonly id: string; readonly key: string; readonly name: string; readonly description?: string; readonly issueIds: readonly string[]; readonly labels: readonly KanbanLabel[]; readonly assignees: readonly KanbanAssignee[]; readonly team: KanbanTeam; readonly settings: KanbanProjectSettings; readonly permissions: readonly KanbanPermissionGrant[]; readonly activity: readonly KanbanActivityEntry[]; readonly statuses: readonly KanbanStatusDefinition[]; readonly repositories: readonly KanbanRepositoryContext[]; readonly integrations: readonly KanbanIntegrationConnection[]; readonly linkedRunProjectName?: string; readonly linkedRunSummary?: LinkedRunSummary; readonly metrics: KanbanProjectMetrics; } export interface KanbanBacklogSnapshot { readonly generatedAt: string; readonly projects: readonly KanbanProject[]; readonly issues: readonly KanbanIssue[]; readonly dispatchContextLabels: readonly KanbanDispatchContextLabelDefinition[]; } export interface KanbanBoardPolicyHook { readonly id: string; readonly name: string; readonly description: string; readonly scope: 'board' | 'column' | 'card'; readonly blocking: boolean; readonly columnIds?: readonly KanbanWorkflowState[]; } export interface KanbanBoardPolicySignal { readonly hookId: string; readonly severity: 'info' | 'warning' | 'error'; readonly message: string; readonly blocking: boolean; } export interface KanbanBoardMoveTarget { readonly state: KanbanWorkflowState; readonly allowed: boolean; readonly signals: readonly KanbanBoardPolicySignal[]; } export interface KanbanBoardCard { readonly issueId: string; readonly issueKey: string; readonly projectId: string; readonly title: string; readonly summary?: string; readonly workflowState: KanbanWorkflowState; readonly swimlaneId: KanbanSwimlaneId; readonly priority: KanbanPriority; readonly readiness: KanbanDispatchReadiness; readonly blocked: boolean; readonly blockedReasons: readonly string[]; readonly labelNames: readonly string[]; readonly assigneeNames: readonly string[]; readonly collaboratorNames: readonly string[]; readonly dependencyCount: number; readonly childCount: number; readonly activityCount: number; readonly latestActivityAt?: string; readonly acceptanceProgress: { readonly satisfied: number; readonly total: number; }; readonly repository?: KanbanRepositoryContext; readonly repositoryLifecycle?: KanbanIssueRepositoryLifecycle; readonly moveTargets: readonly KanbanBoardMoveTarget[]; readonly policySignals: readonly KanbanBoardPolicySignal[]; readonly review?: KanbanReviewSummary; } export interface KanbanBoardColumn { readonly id: KanbanWorkflowState; readonly name: string; readonly issueIds: readonly string[]; readonly issueCount: number; readonly wipLimit?: number; readonly isOverLimit: boolean; } export interface KanbanBoardSwimlane { readonly id: KanbanSwimlaneId; readonly name: string; readonly issueIds: readonly string[]; } export interface KanbanProjectBoard { readonly projectId: string; readonly projectKey: string; readonly projectName: string; readonly generatedAt: string; readonly columns: readonly KanbanBoardColumn[]; readonly swimlanes: readonly KanbanBoardSwimlane[]; readonly cards: readonly KanbanBoardCard[]; readonly policyHooks: readonly KanbanBoardPolicyHook[]; } export interface KanbanBoardSnapshot { readonly generatedAt: string; readonly projects: readonly KanbanProjectBoard[]; } export interface KanbanIssueMoveEvaluation { readonly issueId: string; readonly fromState: KanbanWorkflowState; readonly toState: KanbanWorkflowState; readonly allowed: boolean; readonly nextStatus?: KanbanIssueStatus; readonly signals: readonly KanbanBoardPolicySignal[]; } export interface KanbanBacklogSummary { readonly projectCount: number; readonly issueCount: number; readonly readyCount: number; readonly blockedCount: number; readonly dispatchedCount: number; readonly completedCount: number; readonly needsDecompositionCount: number; readonly inProgressCount: number; } export interface KanbanBacklogOverview { readonly snapshot: KanbanBacklogSnapshot; readonly board: KanbanBoardSnapshot; readonly summary: KanbanBacklogSummary; } export interface KanbanIssueCreateInput { readonly projectId?: string; readonly parentIssueId?: string; readonly title: string; readonly summary?: string; readonly description?: string; readonly status?: KanbanIssue['status']; readonly priority?: KanbanIssue['priority']; readonly labelIds?: readonly string[]; readonly assigneeIds?: readonly string[]; readonly acceptanceCriteria?: readonly string[]; readonly decomposition?: readonly Pick[]; readonly source?: KanbanIssue['source']; readonly metadata?: Readonly>; } export interface KanbanIssueCreateResult { readonly overview: KanbanBacklogOverview; readonly issue: KanbanIssue; } export interface KanbanIssueMoveInput { readonly issueId: string; readonly toState: KanbanWorkflowState; } export interface KanbanIssueUpdateInput { readonly issueId: string; readonly expectedUpdatedAt?: string; readonly description?: string; readonly priority?: KanbanIssue['priority']; readonly assigneeIds?: readonly string[]; readonly labelIds?: readonly string[]; } export interface KanbanIssueWorkspaceRef { readonly path: string; readonly name: string; readonly branchName: string; } export interface KanbanIssueWorkspaceCreateResult { readonly workspace: KanbanIssueWorkspaceRef; readonly overview: KanbanBacklogOverview; } export interface KanbanIssueWorkspaceLinkInput { readonly issueId: string; readonly workspacePath: string; readonly workspaceName?: string; readonly branchName?: string; readonly source: 'created-from-issue' | 'linked-existing-workspace'; } export type KanbanWorkspaceStatus = 'active' | 'idle' | 'archived' | 'missing'; export type KanbanWorkspaceAction = 'pin' | 'unpin' | 'archive' | 'cleanup' | 'recover' | 'notes-save' | 'rebase-start' | 'rebase-auto-resolve' | 'rebase-open-in-editor' | 'rebase-mark-resolved' | 'rebase-abort'; export interface KanbanWorkspaceSessionSummary { readonly sessionId: string; readonly agent: string; readonly status: 'active' | 'inactive'; readonly cwd?: string; readonly title?: string; readonly updatedAt?: number; readonly activeRunId?: string | null; readonly latestRunId?: string | null; readonly runtime?: WorkspaceRuntimeSurface; } export interface KanbanWorkspaceIssueSummary { readonly issueId: string; readonly issueKey: string; readonly issueTitle: string; readonly projectId: string; readonly projectKey: string; readonly projectName: string; readonly linkedAt: string; readonly source: 'created-from-issue' | 'linked-existing-workspace'; } export interface KanbanWorkspaceOwnershipProjectSummary { readonly projectId: string; readonly projectKey: string; readonly projectName: string; } export interface KanbanWorkspaceOwnershipIssueSummary { readonly issueId: string; readonly issueKey: string; readonly issueTitle: string; } export interface KanbanWorkspaceOwnershipHostSummary { readonly provider: KanbanIntegrationProvider; readonly label: string; readonly accountLabel?: string; } export interface KanbanWorkspaceOwnershipSummary { readonly source: 'created-from-issue' | 'linked-existing-workspace' | 'created-from-project' | 'created-from-host'; readonly project?: KanbanWorkspaceOwnershipProjectSummary; readonly issue?: KanbanWorkspaceOwnershipIssueSummary; readonly host?: KanbanWorkspaceOwnershipHostSummary; } export interface KanbanWorkspaceRunSummary { readonly runId: string; readonly status: string; readonly projectName?: string; } export interface KanbanWorkspaceGitSummary { readonly root: string | null; readonly commonDir: string | null; readonly trackingBranch: string | null; readonly branch: string | null; readonly head: string | null; readonly ahead: number | null; readonly behind: number | null; readonly dirty: boolean | null; readonly uncommittedCount: number | null; readonly isWorktree: boolean; readonly isPrimary: boolean; } export interface KanbanWorkspaceNotesSummary { readonly value: string; readonly updatedAt: string | null; } export interface KanbanWorkspaceLinks { readonly editorHref: string | null; } export interface KanbanWorkspaceSessionCollection { readonly total: number; readonly active: number; readonly items: readonly KanbanWorkspaceSessionSummary[]; } export interface KanbanWorkspaceRunCollection { readonly total: number; readonly active: number; readonly items: readonly KanbanWorkspaceRunSummary[]; } export interface KanbanWorkspaceActionAvailability { readonly canPin?: boolean; readonly canUnpin?: boolean; readonly canArchive: boolean; readonly canCleanup: boolean; readonly canRecover: boolean; readonly canRebaseStart: boolean; readonly canRebaseAutoResolve: boolean; readonly canRebaseOpenInEditor: boolean; readonly canRebaseMarkResolved: boolean; readonly canRebaseAbort: boolean; } export interface KanbanWorkspaceSummary { readonly path: string; readonly name: string; readonly status: KanbanWorkspaceStatus; readonly pinnedAt?: string | null; readonly missing: boolean; readonly archivedAt: string | null; readonly cleanedAt: string | null; readonly lastActivityAt: string | null; readonly git: KanbanWorkspaceGitSummary; readonly notes: KanbanWorkspaceNotesSummary; readonly links: KanbanWorkspaceLinks; readonly sessions: KanbanWorkspaceSessionCollection; readonly runs: KanbanWorkspaceRunCollection; readonly rebase?: WorkspaceRebaseSurface; readonly actions: KanbanWorkspaceActionAvailability; readonly review?: KanbanReviewSummary; readonly issues?: readonly KanbanWorkspaceIssueSummary[]; readonly ownership?: KanbanWorkspaceOwnershipSummary; } export interface KanbanWorkspaceInventory { readonly workspaces: readonly KanbanWorkspaceSummary[]; readonly summary: { readonly total: number; readonly active: number; readonly idle: number; readonly archived: number; readonly missing: number; }; } export interface KanbanWorkspaceActionResult { readonly ok: boolean; readonly workspacePath: string; readonly action: KanbanWorkspaceAction; readonly message: string; } export interface KanbanWorkspaceActionResponse { readonly result: KanbanWorkspaceActionResult; readonly inventory: KanbanWorkspaceInventory; } export interface KanbanWorkspaceInventoryQuery { readonly sessions?: readonly KanbanWorkspaceSessionSummary[]; } export interface KanbanWorkspaceActionInput { readonly action: KanbanWorkspaceAction; readonly workspacePath: string; readonly note?: string; readonly sessions?: readonly KanbanWorkspaceSessionSummary[]; } export declare function normalizeKanbanTaskTagKey(value: string): string; export declare function normalizeKanbanDispatchContextLabelKey(value: string): string; export declare function normalizeKanbanDispatchContextLabel(label: Omit & { readonly key?: string; readonly instruction: string; readonly order?: number; }): KanbanDispatchContextLabelDefinition; export declare function normalizeKanbanDispatchContextLabels(labels: readonly (Omit & { readonly key?: string; readonly instruction: string; readonly order?: number; })[]): KanbanDispatchContextLabelDefinition[]; export declare function normalizeKanbanDispatchContextLabelRefs(refs: readonly (KanbanDispatchContextLabelRef | { readonly labelId?: string; })[]): KanbanDispatchContextLabelRef[]; export declare function projectDispatchContextLabels(definitions: readonly KanbanDispatchContextLabelDefinition[], refs: readonly KanbanDispatchContextLabelRef[]): KanbanDispatchContextLabelProjection[]; export declare function renderDispatchContextLabels(definitions: readonly KanbanDispatchContextLabelDefinition[], refs: readonly KanbanDispatchContextLabelRef[]): string; export declare function renderKanbanExecutionContextBlock(input: { readonly projectId: string; readonly projectKey?: string; readonly projectName?: string; readonly issueId: string; readonly issueKey: string; readonly issueTitle: string; readonly runIds?: readonly string[]; readonly sessionIds?: readonly string[]; readonly labelIds?: readonly string[]; readonly labels?: readonly KanbanDispatchContextLabelProjection[]; readonly renderedContext?: string; readonly lastDispatchedAt?: string; }): string; export declare function buildKanbanExecutionContextEnvelope(input: { readonly issue: Pick; readonly project?: Pick; }): KanbanExecutionContextEnvelope | undefined; export declare function buildDispatchContextExecutionEnvelope(definitions: readonly KanbanDispatchContextLabelDefinition[], refs: readonly KanbanDispatchContextLabelRef[]): KanbanDispatchContextExecutionEnvelope | undefined; export declare function findKanbanExecutionContextEnvelopesForRun(snapshot: Pick, runId: string): KanbanExecutionContextEnvelope[]; export declare function findKanbanExecutionContextEnvelopesForSession(snapshot: Pick, sessionId: string): KanbanExecutionContextEnvelope[]; export declare function normalizeKanbanTaskTag(taskTag: Omit & { readonly key?: string; readonly content: string; readonly order?: number; readonly scope?: Partial; }): KanbanTaskTag; export declare function normalizeKanbanTaskTags(taskTags: readonly (Omit & { readonly key?: string; readonly content: string; readonly order?: number; readonly scope?: Partial; })[]): KanbanTaskTag[]; export declare function summarizeKanbanReviewArtifact(artifact: Pick): KanbanReviewSummary; export declare function normalizeKanbanIssue(issue: Omit & { readonly collaborators?: readonly KanbanCollaborator[]; readonly activity?: readonly KanbanActivityEntry[]; readonly dispatch?: Partial; }, issuesById: ReadonlyMap, repositoryMap?: ReadonlyMap, dispatchContextLabels?: readonly KanbanDispatchContextLabelDefinition[]): KanbanIssue; export declare function resolveKanbanWorkflowState(issue: Pick): KanbanWorkflowState; export declare function resolveKanbanSwimlane(issue: Pick): KanbanSwimlaneId; export declare function resolveKanbanStatusForWorkflowState(issue: Pick, state: KanbanWorkflowState): KanbanIssueStatus; export declare function evaluateKanbanIssueMove(input: { readonly project: KanbanProject; readonly issues: readonly KanbanIssue[]; readonly issueId: string; readonly toState: KanbanWorkflowState; }): KanbanIssueMoveEvaluation; export declare function computeKanbanProjectMetrics(issues: readonly KanbanIssue[]): KanbanProjectMetrics; export declare function buildKanbanBacklogSnapshot(input: { readonly generatedAt?: string; readonly projects: readonly (Omit & { readonly team?: Partial; readonly settings?: Partial; readonly permissions?: readonly KanbanPermissionGrant[]; readonly activity?: readonly KanbanActivityEntry[]; readonly repositories?: readonly KanbanRepositoryContext[]; readonly integrations?: readonly KanbanIntegrationConnection[]; })[]; readonly issues: readonly (Omit & { readonly collaborators?: readonly KanbanCollaborator[]; readonly activity?: readonly KanbanActivityEntry[]; readonly dispatch?: Partial; })[]; readonly dispatchContextLabels?: readonly (Omit & { readonly key?: string; readonly instruction: string; readonly order?: number; })[]; }): KanbanBacklogSnapshot; export declare function buildKanbanProjectBoard(input: { readonly generatedAt?: string; readonly project: KanbanProject; readonly issues: readonly KanbanIssue[]; }): KanbanProjectBoard; export declare function buildKanbanBoardSnapshot(snapshot: KanbanBacklogSnapshot): KanbanBoardSnapshot; export declare function upsertKanbanProjectRepository(project: TProject, repository: KanbanRepositoryContext): TProject; export declare function updateKanbanProjectRepositorySettings(project: TProject, input: { readonly repositoryId: string; readonly settings: Partial; }): TProject; export declare function linkKanbanIssueRepository(issue: TIssue, input: { readonly repositoryId: string; readonly branchName: string; readonly integration?: KanbanRepositoryIntegrationState; }): TIssue; export declare function createKanbanIssuePullRequest(issue: TIssue, input: { readonly title: string; readonly number: number; readonly now: string; readonly baseBranch: string; readonly branchName: string; readonly reviewLinks?: readonly Omit[]; readonly url?: string; readonly linkState?: KanbanPullRequestLinkState; }): TIssue;