@oisincoveney/pipeline 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ export declare const COMMAND_HOSTS: readonly ["claude", "opencode", "codex", "pi"];
2
+ export type CommandHost = (typeof COMMAND_HOSTS)[number];
3
+ export type CommandHostSelection = CommandHost | "all";
4
+ export type InstallAction = "conflict" | "create" | "unchanged" | "update";
5
+ export interface CommandInstallPlanItem {
6
+ action: InstallAction;
7
+ host: CommandHost;
8
+ invocation: string;
9
+ path: string;
10
+ }
11
+ export interface InstallCommandsOptions {
12
+ check?: boolean;
13
+ cwd?: string;
14
+ dryRun?: boolean;
15
+ force?: boolean;
16
+ host?: CommandHostSelection;
17
+ }
18
+ export interface InstallCommandsResult {
19
+ items: CommandInstallPlanItem[];
20
+ }
21
+ export declare function installCommands(options?: InstallCommandsOptions): Promise<InstallCommandsResult>;
22
+ export declare function parseCommandHost(value: string | undefined): CommandHostSelection;
23
+ export declare function formatInstallCommandsResult(result: InstallCommandsResult): string;
@@ -0,0 +1,50 @@
1
+ declare const PHASES: readonly [{
2
+ readonly suffix: "R";
3
+ readonly label: "research";
4
+ readonly deps: string[];
5
+ }, {
6
+ readonly suffix: "TW";
7
+ readonly label: "test-write";
8
+ readonly deps: readonly ["R"];
9
+ }, {
10
+ readonly suffix: "CW";
11
+ readonly label: "implement";
12
+ readonly deps: readonly ["TW"];
13
+ }, {
14
+ readonly suffix: "V";
15
+ readonly label: "verify";
16
+ readonly deps: readonly ["CW"];
17
+ }, {
18
+ readonly suffix: "L";
19
+ readonly label: "learn";
20
+ readonly deps: readonly ["V"];
21
+ }];
22
+ export type BacklogStatus = "To Do" | "In Progress" | "Done";
23
+ export type PhaseSuffix = (typeof PHASES)[number]["suffix"];
24
+ export interface GateFailure {
25
+ evidence: string[];
26
+ gate: "RED" | "GREEN" | "VERIFY";
27
+ reason: string;
28
+ }
29
+ export interface PipelineLifecycleResult {
30
+ failureDetails: GateFailure[];
31
+ outcome: "PASS" | "FAIL";
32
+ }
33
+ export interface PhaseStatusUpdate {
34
+ status: BacklogStatus;
35
+ taskId: string;
36
+ }
37
+ export interface PhaseLifecyclePlan {
38
+ failureNote?: {
39
+ note: string;
40
+ taskId: string;
41
+ };
42
+ statusUpdates: PhaseStatusUpdate[];
43
+ }
44
+ export declare function createSwarmTasks(parentId: string, _worktreePath: string): Promise<void>;
45
+ export declare function markPhase(taskId: string, status: BacklogStatus): Promise<void>;
46
+ export declare function planPhaseLifecycle(parentId: string, result: PipelineLifecycleResult): PhaseLifecyclePlan;
47
+ export declare function applyPhaseLifecycle(parentId: string, result: PipelineLifecycleResult, opts?: {
48
+ alreadyStarted?: PhaseSuffix[];
49
+ }): Promise<void>;
50
+ export {};
@@ -0,0 +1,22 @@
1
+ export interface TestResult {
2
+ exitCode: number;
3
+ failingTests: string[];
4
+ output: string;
5
+ }
6
+ export interface GateViolation {
7
+ file: string;
8
+ line?: number;
9
+ message: string;
10
+ }
11
+ export declare function runTests(worktreePath: string): Promise<TestResult>;
12
+ export declare function runTypecheck(worktreePath: string): Promise<{
13
+ exitCode: number;
14
+ output: string;
15
+ }>;
16
+ export declare function artifactExists(worktreePath: string, filename: string): boolean;
17
+ export declare function runStyleGates(worktreePath: string): {
18
+ violations: GateViolation[];
19
+ };
20
+ export declare function runJscpd(worktreePath: string): Promise<{
21
+ violations: GateViolation[];
22
+ }>;
@@ -0,0 +1,22 @@
1
+ import { Mastra } from "@mastra/core/mastra";
2
+ export declare const mastra: Mastra<Record<string, import("@mastra/core/agent").Agent<any, import("@mastra/core/agent").ToolsInput, undefined, unknown>>, {
3
+ pipelineWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core/workflows").DefaultEngineType, import("@mastra/core/workflows").Step<string, unknown, unknown, unknown, unknown, unknown, any, unknown>[], "ralph-loop", unknown, {
4
+ task: string;
5
+ harness: "claude" | "opencode" | "codex" | "pi";
6
+ worktreePath: string;
7
+ }, {
8
+ outcome: "PASS" | "FAIL";
9
+ failureDetails: {
10
+ gate: "RED" | "GREEN" | "VERIFY";
11
+ reason: string;
12
+ evidence: string[];
13
+ }[];
14
+ }, {
15
+ outcome: "PASS" | "FAIL";
16
+ failureDetails: {
17
+ gate: "RED" | "GREEN" | "VERIFY";
18
+ reason: string;
19
+ evidence: string[];
20
+ }[];
21
+ }, unknown>;
22
+ }, Record<string, import("@mastra/core/vector").MastraVector<any>>, Record<string, import("@mastra/core/tts").MastraTTS>, import("@mastra/core/logger").IMastraLogger, Record<string, import("@mastra/core/mcp").MCPServerBase<any>>, Record<string, import("@mastra/core/evals").MastraScorer<any, any, any, any>>, Record<string, import("@mastra/core/tools").ToolAction<any, any, any, any, any, any, unknown>>, Record<string, import("@mastra/core/processors").Processor<any, unknown>>, Record<string, import("@mastra/core/memory").MastraMemory>, Record<string, import("@mastra/core/channels").ChannelProvider>>;
@@ -0,0 +1,17 @@
1
+ import type { PipelineLifecycleResult } from "./backlog.js";
2
+ import { type AgentAdapter, type Harness } from "./runner.js";
3
+ export type PipelinePhase = "research" | "red" | "green" | "verify" | "learn";
4
+ export interface PipelinePhaseReporter {
5
+ completed?(phase: PipelinePhase): Promise<void> | void;
6
+ started?(phase: PipelinePhase): Promise<void> | void;
7
+ }
8
+ export interface PipelinePrimitiveInput {
9
+ harness: Harness;
10
+ task: string;
11
+ worktreePath: string;
12
+ }
13
+ export interface PipelinePrimitiveAdapters {
14
+ agentAdapter?: AgentAdapter;
15
+ phaseReporter?: PipelinePhaseReporter;
16
+ }
17
+ export declare function runPipelinePrimitive(input: PipelinePrimitiveInput, adapters?: PipelinePrimitiveAdapters): Promise<PipelineLifecycleResult>;