Removed unwanted files marked in .gitignore
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export { COLUMNS, COLUMN_LABELS, COLUMN_DESCRIPTIONS, VALID_TRANSITIONS, DEFAULT_SETTINGS, DEFAULT_GLOBAL_SETTINGS, DEFAULT_PROJECT_SETTINGS, GLOBAL_SETTINGS_KEYS, PROJECT_SETTINGS_KEYS, THINKING_LEVELS, THEME_MODES, COLOR_THEMES, WORKFLOW_STEP_TEMPLATES } from "./types.js";
|
||||
export type { Column, IssueInfo, IssueState, PrInfo, PrStatus, Task, TaskAttachment, TaskComment, TaskCommentInput, TaskCreateInput, TaskDetail, AgentLogEntry, AgentLogType, AgentRole, BoardConfig, MergeDetails, MergeResult, Settings, GlobalSettings, ProjectSettings, SettingsScope, TaskStep, StepStatus, TaskLogEntry, ActivityLogEntry, ActivityEventType, ThinkingLevel, ThemeMode, ColorTheme, PlanningQuestion, PlanningSummary, PlanningResponse, PlanningQuestionType, ArchivedTaskEntry, BatchStatusRequest, BatchStatusResponse, BatchStatusEntry, BatchStatusResult, ModelPreset, WorkflowStep, WorkflowStepInput, WorkflowStepResult, WorkflowStepTemplate, Agent, AgentState, AgentDetail, AgentCreateInput, AgentUpdateInput, AgentCapability, AgentHeartbeatEvent } from "./types.js";
|
||||
export type { Column, IssueInfo, IssueState, PrInfo, PrStatus, Task, TaskAttachment, TaskComment, TaskCommentInput, TaskCreateInput, TaskDetail, AgentLogEntry, AgentLogType, AgentRole, BoardConfig, MergeDetails, MergeResult, Settings, GlobalSettings, ProjectSettings, SettingsScope, TaskStep, StepStatus, TaskLogEntry, ActivityLogEntry, ActivityEventType, ThinkingLevel, ThemeMode, ColorTheme, PlanningQuestion, PlanningSummary, PlanningResponse, PlanningQuestionType, ArchivedTaskEntry, BatchStatusRequest, BatchStatusResponse, BatchStatusEntry, BatchStatusResult, ModelPreset, WorkflowStep, WorkflowStepInput, WorkflowStepResult, WorkflowStepTemplate, Agent, AgentState, AgentDetail, AgentCreateInput, AgentUpdateInput, AgentCapability, AgentHeartbeatEvent, AgentHeartbeatRun } from "./types.js";
|
||||
export { AgentStore } from "./agent-store.js";
|
||||
export type { AgentStoreEvents } from "./agent-store.js";
|
||||
export { TaskStore } from "./store.js";
|
||||
|
||||
@@ -139,7 +139,7 @@ describe("MissionStore integration with TaskStore", () => {
|
||||
expect(linkedFeature.status).toBe("triaged");
|
||||
expect(storedTask.sliceId).toBe(milestones[0].slices[0].id);
|
||||
expect(taskRow?.sliceId).toBe(milestones[0].slices[0].id);
|
||||
expect(taskRow?.missionId).toBeNull();
|
||||
expect(taskRow?.missionId).toBe(mission.id);
|
||||
|
||||
const linkedHierarchy = missionStore.getMissionWithHierarchy(mission.id);
|
||||
expect(linkedHierarchy?.milestones[0].slices[0].features[0].taskId).toBe(linkedTask.id);
|
||||
|
||||
@@ -1698,7 +1698,7 @@ Task with acceptance criteria
|
||||
const task = await createTestTask();
|
||||
const updated = await store.addComment(task.id, "Comment with log");
|
||||
|
||||
expect(updated.log.some((l) => l.action === "Comment added" && l.outcome === "by user")).toBe(true);
|
||||
expect(updated.log.some((l) => l.action === "Comment added by user")).toBe(true);
|
||||
});
|
||||
|
||||
it("updates updatedAt timestamp", async () => {
|
||||
|
||||
@@ -2011,6 +2011,48 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
return this.addComment(id, text, author);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a steering comment to a task (legacy support).
|
||||
* Steering comments are injected into the AI execution context.
|
||||
* @deprecated Use addComment instead - comments are now unified
|
||||
*/
|
||||
async addSteeringComment(id: string, text: string, author: "user" | "agent" = "user"): Promise<Task> {
|
||||
return this.withTaskLock(id, async () => {
|
||||
const dir = this.taskDir(id);
|
||||
const task = await this.readTaskJson(dir);
|
||||
|
||||
// Initialize steeringComments array if missing
|
||||
if (!task.steeringComments) {
|
||||
task.steeringComments = [];
|
||||
}
|
||||
|
||||
const comment: import("./types.js").SteeringComment = {
|
||||
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
||||
text,
|
||||
createdAt: new Date().toISOString(),
|
||||
author,
|
||||
};
|
||||
|
||||
task.steeringComments.push(comment);
|
||||
task.updatedAt = new Date().toISOString();
|
||||
|
||||
// Initialize log array if missing (for legacy tasks)
|
||||
if (!task.log) {
|
||||
task.log = [];
|
||||
}
|
||||
task.log.push({
|
||||
timestamp: task.updatedAt,
|
||||
action: `Steering comment added by ${author}`,
|
||||
});
|
||||
|
||||
await this.atomicWriteTaskJson(dir, task);
|
||||
if (this.watcher) this.taskCache.set(id, { ...task });
|
||||
|
||||
this.emit("task:updated", task);
|
||||
return task;
|
||||
});
|
||||
}
|
||||
|
||||
async updateTaskComment(id: string, commentId: string, text: string): Promise<Task> {
|
||||
return this.withTaskLock(id, async () => {
|
||||
const dir = this.taskDir(id);
|
||||
|
||||
@@ -387,6 +387,15 @@ export interface Task {
|
||||
* unmerged branch. The executor reads this to branch from the
|
||||
* dependency's branch instead of HEAD. Cleared after worktree creation. */
|
||||
baseBranch?: string;
|
||||
/** Base commit SHA for creating this task's worktree. Used with baseBranch
|
||||
* to establish the exact starting point for the worktree. */
|
||||
baseCommitSha?: string;
|
||||
/** List of files modified by this task (populated during execution) */
|
||||
modifiedFiles?: string[];
|
||||
/** Mission ID this task is linked to (for mission hierarchy) */
|
||||
missionId?: string;
|
||||
/** Slice ID this task is linked to (for mission hierarchy) */
|
||||
sliceId?: string;
|
||||
attachments?: TaskAttachment[];
|
||||
steeringComments?: SteeringComment[];
|
||||
comments?: TaskComment[];
|
||||
@@ -469,6 +478,10 @@ export interface TaskCreateInput {
|
||||
thinkingLevel?: ThinkingLevel;
|
||||
/** When true, trigger AI title summarization if description is long and no title provided */
|
||||
summarize?: boolean;
|
||||
/** Mission ID to link this task to (for mission hierarchy) */
|
||||
missionId?: string;
|
||||
/** Slice ID to link this task to (for mission hierarchy) */
|
||||
sliceId?: string;
|
||||
}
|
||||
|
||||
// ── Settings Scope Types ────────────────────────────────────────────────
|
||||
@@ -527,6 +540,13 @@ export interface GlobalSettings {
|
||||
* Used to determine which project to operate on when not in a project directory.
|
||||
* Set via `kb project set-default <name>`. */
|
||||
defaultProjectId?: string;
|
||||
/** Whether the first-run setup wizard has been completed.
|
||||
* Set to true when the user completes the multi-project setup process.
|
||||
* Default: false (undefined until setup is completed). */
|
||||
setupComplete?: boolean;
|
||||
/** List of favorite provider names. Favorite providers appear at the top of
|
||||
* model selection dropdowns. Order is preserved - earlier entries appear higher. */
|
||||
favoriteProviders?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -660,6 +680,15 @@ export interface ProjectSettings {
|
||||
* Must be set together with `titleSummarizerProvider`. Falls back to planningModelId,
|
||||
* then defaultModelId if not specified. */
|
||||
titleSummarizerModelId?: string;
|
||||
/** Named scripts that can be referenced by setupScript or other automation.
|
||||
* A map of script name to shell command. */
|
||||
scripts?: Record<string, string>;
|
||||
/** Reference to a named script in the scripts map that runs before task execution.
|
||||
* Used for pre-task setup like environment preparation. */
|
||||
setupScript?: string;
|
||||
/** Dashboard host URL for ntfy notifications (e.g., "http://localhost:3000").
|
||||
* When set, notifications include links to the dashboard. */
|
||||
ntfyDashboardHost?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -866,6 +895,14 @@ export interface ArchivedTaskEntry {
|
||||
breakIntoSubtasks?: boolean;
|
||||
paused?: boolean;
|
||||
baseBranch?: string;
|
||||
/** Base commit SHA for the task's worktree */
|
||||
baseCommitSha?: string;
|
||||
/** List of files modified by this task */
|
||||
modifiedFiles?: string[];
|
||||
/** Mission ID this task is linked to */
|
||||
missionId?: string;
|
||||
/** Slice ID this task is linked to */
|
||||
sliceId?: string;
|
||||
mergeRetries?: number;
|
||||
error?: string;
|
||||
}
|
||||
@@ -901,6 +938,9 @@ export interface RegisteredProject {
|
||||
settings?: ProjectSettings;
|
||||
}
|
||||
|
||||
/** @deprecated Use RegisteredProject instead */
|
||||
export type ProjectInfo = RegisteredProject;
|
||||
|
||||
/** Health metrics for a registered project */
|
||||
export interface ProjectHealth {
|
||||
/** Project ID reference */
|
||||
@@ -1082,3 +1122,75 @@ export interface AgentUpdateInput {
|
||||
role?: AgentCapability;
|
||||
metadata?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
// ── Multi-Project First-Run & Migration Types ───────────────────────────────
|
||||
|
||||
/** Detected project for migration consideration */
|
||||
export interface DetectedProject {
|
||||
/** Absolute path to project directory */
|
||||
path: string;
|
||||
/** Auto-generated or derived project name */
|
||||
name: string;
|
||||
/** Whether the project has a valid kb.db */
|
||||
hasDb: boolean;
|
||||
}
|
||||
|
||||
/** Setup state for the first-run wizard UI */
|
||||
export interface SetupState {
|
||||
/** Whether this is a first-run scenario (no projects registered) */
|
||||
isFirstRun: boolean;
|
||||
/** Whether any projects were detected on the filesystem */
|
||||
hasDetectedProjects: boolean;
|
||||
/** Projects detected on filesystem for potential registration */
|
||||
detectedProjects: DetectedProject[];
|
||||
/** Projects already registered in the central database */
|
||||
registeredProjects: RegisteredProject[];
|
||||
/** Recommended action based on current state */
|
||||
recommendedAction: "auto-detect" | "create-new" | "manual-setup";
|
||||
}
|
||||
|
||||
/** Input for setting up a project via the wizard */
|
||||
export interface ProjectSetupInput {
|
||||
/** Project path */
|
||||
path: string;
|
||||
/** Display name */
|
||||
name: string;
|
||||
/** Isolation mode preference */
|
||||
isolationMode?: "in-process" | "child-process";
|
||||
}
|
||||
|
||||
/** Result of completing the first-run setup */
|
||||
export interface SetupCompletionResult {
|
||||
/** Whether the setup completed successfully */
|
||||
success: boolean;
|
||||
/** Projects that were registered */
|
||||
projects: RegisteredProject[];
|
||||
/** Recommended next steps for the user */
|
||||
nextSteps: string[];
|
||||
}
|
||||
|
||||
/** Options for running a migration */
|
||||
export interface MigrationOptions {
|
||||
/** Path to start scanning for projects (default: process.cwd()) */
|
||||
startPath?: string;
|
||||
/** Maximum recursion depth for scanning (default: 5) */
|
||||
maxDepth?: number;
|
||||
/** Whether to simulate without making changes */
|
||||
dryRun?: boolean;
|
||||
/** Whether to auto-register detected projects */
|
||||
autoRegister?: boolean;
|
||||
/** Progress callback for long-running operations */
|
||||
onProgress?: (current: number, total: number, path: string) => void;
|
||||
}
|
||||
|
||||
/** Result of a migration operation (from MigrationOrchestrator) */
|
||||
export interface MigrationResult {
|
||||
/** Projects detected during scanning */
|
||||
projectsDetected: DetectedProject[];
|
||||
/** Projects that were registered */
|
||||
projectsRegistered: RegisteredProject[];
|
||||
/** Projects that were skipped with reasons */
|
||||
projectsSkipped: Array<{ path: string; reason: string }>;
|
||||
/** Errors encountered during migration */
|
||||
errors: Array<{ path: string; error: string }>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user