mirror of
https://github.com/Hestia-Homes/agentic-toolkit.git
synced 2026-06-08 11:37:26 +00:00
Initial implementation of Domna's agentic toolkit per PRD #1: - Runner CLI (src/cli.ts) wrapping sandcastle.run() with Docker provider - Pure modules: PhaseScheduler, PromptBuilder, FailureHandler with tests - Project Status v2 GraphQL client + parsers with tests - BranchManager (git/gh wrapper) and LoopOrchestrator (per-tick algorithm) - Variant-aware: per-ticket (one PR per issue, phase-gated, exit between phases) vs single-pr (one PR for the whole DAG, halt on failure) - /to-project skill that creates a repo-level project, configures the Status schema the runner expects, and sets initial issue statuses - setup.sh that installs Matt Pocock skills + Domna skills via npx skills Out of scope at v1: remote runners, Slack notifications, stacked PRs, cross-repo projects, SHA-pinning of upstream skills (tracks HEAD until the skills CLI supports repo#sha). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
74 lines
1.4 KiB
TypeScript
74 lines
1.4 KiB
TypeScript
export type Variant = "per-ticket" | "single-pr";
|
|
|
|
export type IssueKind = "AFK" | "HITL";
|
|
|
|
export type IssueStatus =
|
|
| "Backlog"
|
|
| "Ready"
|
|
| "In progress"
|
|
| "In review"
|
|
| "Needs human"
|
|
| "Done";
|
|
|
|
export interface ProjectIssue {
|
|
number: number;
|
|
nodeId: string;
|
|
/** ProjectV2Item id (the Project's row for this issue), distinct from `nodeId` (the Issue itself). */
|
|
itemId: string;
|
|
title: string;
|
|
body: string;
|
|
kind: IssueKind;
|
|
status: IssueStatus;
|
|
blockedBy: number[];
|
|
assignee?: string;
|
|
}
|
|
|
|
export interface ProjectState {
|
|
projectId: string;
|
|
projectNumber: number;
|
|
ownerLogin: string;
|
|
repo: string;
|
|
issues: ProjectIssue[];
|
|
}
|
|
|
|
export interface Phase {
|
|
index: number;
|
|
issues: ProjectIssue[];
|
|
}
|
|
|
|
export type FailureKind =
|
|
| "agent-error"
|
|
| "tests-failed"
|
|
| "build-failed"
|
|
| "sandbox-timeout"
|
|
| "unknown";
|
|
|
|
export interface FailureContext {
|
|
variant: Variant;
|
|
retryCount: number;
|
|
}
|
|
|
|
export type FailureAction =
|
|
| { kind: "retry" }
|
|
| { kind: "skip"; reason: string }
|
|
| { kind: "halt"; reason: string };
|
|
|
|
export interface RepoContext {
|
|
contextMdPath?: string;
|
|
adrDirPath?: string;
|
|
}
|
|
|
|
export interface AgentResult {
|
|
success: boolean;
|
|
failure?: { kind: FailureKind; logs: string };
|
|
}
|
|
|
|
export interface RunnerOptions {
|
|
projectNumber: number;
|
|
variant: Variant;
|
|
targetRepoPath: string;
|
|
baseBranch?: string;
|
|
githubToken: string;
|
|
ownerLogin: string;
|
|
repo: string;
|
|
}
|