@oisincoveney/pipeline 3.3.0 → 3.3.1

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.
@@ -481,8 +481,8 @@ declare const configSchema: z.ZodObject<{
481
481
  schedules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
482
482
  description: z.ZodOptional<z.ZodString>;
483
483
  baseline: z.ZodEnum<{
484
- execute: "execute";
485
484
  quick: "quick";
485
+ execute: "execute";
486
486
  }>;
487
487
  max_parallel_nodes: z.ZodOptional<z.ZodNumber>;
488
488
  node_catalog: z.ZodOptional<z.ZodString>;
package/dist/hooks.d.ts CHANGED
@@ -13,8 +13,8 @@ declare const hookResultSchema: z.ZodObject<{
13
13
  taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
14
14
  }, z.core.$strict>>;
15
15
  status: z.ZodEnum<{
16
- fail: "fail";
17
16
  pass: "pass";
17
+ fail: "fail";
18
18
  skip: "skip";
19
19
  }>;
20
20
  summary: z.ZodOptional<z.ZodString>;
@@ -160,8 +160,8 @@ declare const mokaSubmitOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
160
160
  }, z.core.$strict>>;
161
161
  serviceAccountName: z.ZodOptional<z.ZodString>;
162
162
  mode: z.ZodEnum<{
163
- quick: "quick";
164
163
  full: "full";
164
+ quick: "quick";
165
165
  }>;
166
166
  schedulePath: z.ZodOptional<z.ZodString>;
167
167
  scheduleYaml: z.ZodOptional<z.ZodString>;
@@ -5,6 +5,7 @@ import { dependentsByNeed, flattenNodes, hasReachableDependent } from "./graph.j
5
5
  import { createRunnerLaunchPlan, runLaunchPlan } from "../runner.js";
6
6
  import { normalizeRunnerOutput } from "../runner-output.js";
7
7
  import { compileWorkflowPlan } from "./compile.js";
8
+ import { ensurePipelineWorkspaceIgnore } from "../run-control/workspace.js";
8
9
  import { loadBacklogPlanningContext } from "../schedule/backlog-context.js";
9
10
  import { baselineScheduleArtifact } from "../schedule/baseline.js";
10
11
  import { isCoverageNode, isImplementationNode, isWriteCapableParallelChild } from "../schedule/scheduling-roles.js";
@@ -111,6 +112,7 @@ function assertSchedulePassOrder() {
111
112
  ].join("\0")) throw new ScheduleArtifactError("Schedule pass order is misconfigured");
112
113
  }
113
114
  function persistScheduleArtifact(worktreePath, artifact) {
115
+ ensurePipelineWorkspaceIgnore(worktreePath);
114
116
  const relativePath = join(".pipeline", "runs", artifact.schedule_id, "schedule.yaml");
115
117
  const fullPath = join(worktreePath, relativePath);
116
118
  mkdirSync(join(worktreePath, ".pipeline", "runs", artifact.schedule_id), { recursive: true });
@@ -1,3 +1,4 @@
1
+ import { ensurePipelineWorkspaceIgnore } from "./workspace.js";
1
2
  import { DEFAULT_RUN_CONTROL_STALE_DETECTION, parseMokaNodeStatus, parseMokaRunController, parseMokaRunEvent, parseMokaRunManifest, parseMokaRunStatus, parseRunControlStaleDetection, parseRunEffort, parseRunMode, parseRunTarget } from "./contracts.js";
2
3
  import { Effect } from "effect";
3
4
  import { isAbsolute, join } from "node:path";
@@ -15,6 +16,7 @@ function createRunEffect(input) {
15
16
  return Effect.gen(function* () {
16
17
  const { manifest, nodeIds, runId } = yield* Effect.sync(() => createRunManifest(input));
17
18
  const paths = runPaths(input.workspaceRoot, runId);
19
+ yield* Effect.sync(() => ensurePipelineWorkspaceIgnore(input.workspaceRoot));
18
20
  yield* mkdirEffect(paths.runsRoot, { recursive: true });
19
21
  yield* mkdirEffect(paths.runRoot, { recursive: true });
20
22
  yield* mkdirEffect(paths.nodesRoot, { recursive: true });
@@ -0,0 +1,23 @@
1
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ //#region src/run-control/workspace.ts
4
+ const PIPELINE_DIR = ".pipeline";
5
+ const GITIGNORE_PATH = join(PIPELINE_DIR, ".gitignore");
6
+ const GITIGNORE_CONTENT = "*\n";
7
+ /**
8
+ * Ensures `.pipeline/.gitignore` exists in `worktreePath` so that moka's
9
+ * runtime artifacts are self-ignored and never picked up by lint/format tools
10
+ * running inside the target repo.
11
+ *
12
+ * Idempotent: creates the file only if it does not already exist; never
13
+ * overwrites an existing `.pipeline/.gitignore`.
14
+ */
15
+ function ensurePipelineWorkspaceIgnore(worktreePath) {
16
+ const pipelineDir = join(worktreePath, PIPELINE_DIR);
17
+ const gitignorePath = join(worktreePath, GITIGNORE_PATH);
18
+ if (existsSync(gitignorePath)) return;
19
+ mkdirSync(pipelineDir, { recursive: true });
20
+ writeFileSync(gitignorePath, GITIGNORE_CONTENT);
21
+ }
22
+ //#endregion
23
+ export { ensurePipelineWorkspaceIgnore };
@@ -43,8 +43,8 @@ declare const runnerDeliverySchema: z.ZodObject<{
43
43
  declare const mokaSubmissionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
44
44
  kind: z.ZodLiteral<"graph">;
45
45
  mode: z.ZodEnum<{
46
- quick: "quick";
47
46
  full: "full";
47
+ quick: "quick";
48
48
  }>;
49
49
  }, z.core.$strict>, z.ZodObject<{
50
50
  argv: z.ZodArray<z.ZodString>;
@@ -104,8 +104,8 @@ declare const runnerCommandPayloadSchema: z.ZodObject<{
104
104
  submission: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
105
105
  kind: z.ZodLiteral<"graph">;
106
106
  mode: z.ZodEnum<{
107
- quick: "quick";
108
107
  full: "full";
108
+ quick: "quick";
109
109
  }>;
110
110
  }, z.core.$strict>, z.ZodObject<{
111
111
  argv: z.ZodArray<z.ZodString>;
@@ -103,8 +103,8 @@ declare const runnerEventRecordSchema: z.ZodUnion<readonly [z.ZodObject<{
103
103
  nodeId: z.ZodOptional<z.ZodString>;
104
104
  outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
105
  status: z.ZodEnum<{
106
- fail: "fail";
107
106
  pass: "pass";
107
+ fail: "fail";
108
108
  skip: "skip";
109
109
  }>;
110
110
  summary: z.ZodOptional<z.ZodString>;
@@ -273,8 +273,8 @@ declare const runnerEventBatchSchema: z.ZodObject<{
273
273
  nodeId: z.ZodOptional<z.ZodString>;
274
274
  outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
275
275
  status: z.ZodEnum<{
276
- fail: "fail";
277
276
  pass: "pass";
277
+ fail: "fail";
278
278
  skip: "skip";
279
279
  }>;
280
280
  summary: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -126,7 +126,7 @@
126
126
  "prepack": "bun run build:cli"
127
127
  },
128
128
  "type": "module",
129
- "version": "3.3.0",
129
+ "version": "3.3.1",
130
130
  "description": "Config-driven multi-agent pipeline runner for repository work",
131
131
  "main": "./dist/index.js",
132
132
  "types": "./dist/index.d.ts",