@oisincoveney/pipeline 1.27.6 → 1.27.8

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.
@@ -27,6 +27,7 @@ async function prepareRunnerGitWorkspace(payload, options = {}) {
27
27
  return worktreePath;
28
28
  }
29
29
  async function mergeDependencyRefs(input) {
30
+ await configureGitCommitter(input.worktreePath, input.committer);
30
31
  for (const nodeId of input.dependencyNodeIds) {
31
32
  const ref = runnerGitRefs(input.payload, nodeId).nodeRef;
32
33
  await runGit(input.worktreePath, [
@@ -54,6 +55,7 @@ async function commitAndPushNodeRef(input) {
54
55
  }
55
56
  async function promoteFinalRef(input) {
56
57
  await mergeDependencyRefs({
58
+ committer: input.committer,
57
59
  dependencyNodeIds: input.sourceNodeIds,
58
60
  payload: input.payload,
59
61
  worktreePath: input.worktreePath
@@ -74,6 +76,14 @@ async function commitChangesIfNeeded(worktreePath, nodeId, committer) {
74
76
  "--untracked-files=all"
75
77
  ])).trim().length === 0) return;
76
78
  await runGit(worktreePath, ["add", "--all"]);
79
+ await configureGitCommitter(worktreePath, committer);
80
+ await runGit(worktreePath, [
81
+ "commit",
82
+ "-m",
83
+ `pipeline: ${nodeId}`
84
+ ]);
85
+ }
86
+ async function configureGitCommitter(worktreePath, committer) {
77
87
  await runGit(worktreePath, [
78
88
  "config",
79
89
  "--local",
@@ -86,11 +96,6 @@ async function commitChangesIfNeeded(worktreePath, nodeId, committer) {
86
96
  "user.email",
87
97
  committer.email
88
98
  ]);
89
- await runGit(worktreePath, [
90
- "commit",
91
- "-m",
92
- `pipeline: ${nodeId}`
93
- ]);
94
99
  }
95
100
  async function runGit(cwd, args) {
96
101
  const { stdout } = await execGit("git", args, {
@@ -49,6 +49,7 @@ async function runRunnerCommand(rawOptions = {}) {
49
49
  const node = findPlannedNode(compiled.plan.topologicalOrder, descriptor.nodeId);
50
50
  if (!node) throw new Error(`Argo task '${descriptor.nodeId}' is not declared in workflow '${compiled.workflowId}'`);
51
51
  await mergeDependencyRefs({
52
+ committer: compiled.config.runner_command.git.committer,
52
53
  dependencyNodeIds: node.needs,
53
54
  payload,
54
55
  worktreePath
@@ -12,6 +12,7 @@ import matter from "gray-matter";
12
12
  //#region src/schedule-planner.ts
13
13
  const SCHEDULE_KIND = "pipeline-schedule";
14
14
  const ID_RE = /^[a-z][a-z0-9-]*$/;
15
+ const SCHEDULE_ID_RE = /^[A-Za-z0-9][A-Za-z0-9_.-]*$/;
15
16
  const DESCRIPTION_SECTION_RE = /## Description\s+([\s\S]*?)(?=\n## |\s*$)/;
16
17
  const ACCEPTANCE_SECTION_RE = /## Acceptance Criteria\s+([\s\S]*?)(?=\n## |\s*$)/;
17
18
  const ACCEPTANCE_ITEM_RE = /^\s*-\s*\[[ xX]\]\s*#?([\w.-]+)\s+(.+)$/;
@@ -19,7 +20,7 @@ const GENERATED_ID_INVALID_CHARS_RE = /[^a-z0-9]+/g;
19
20
  const GENERATED_ID_TRIM_HYPHENS_RE = /^-+|-+$/g;
20
21
  const STARTS_WITH_ALPHA_RE = /^[a-z]/;
21
22
  const LINE_RE = /\r?\n/;
22
- const MARKDOWN_YAML_FENCE_RE = /^\s*```(?:ya?ml)?\s*\r?\n([\s\S]*?)\r?\n```\s*$/i;
23
+ const MARKDOWN_YAML_FENCE_RE = /```(?:ya?ml)?\s*\r?\n([\s\S]*?)\r?\n```/i;
23
24
  const SCHEDULE_PLANNER_REPAIR_ATTEMPTS = 1;
24
25
  const SCHEDULE_BUILTINS = [
25
26
  "drain-merge",
@@ -39,7 +40,7 @@ const scheduleArtifactSchema = z.object({
39
40
  generated_at: z.string().datetime(),
40
41
  kind: z.literal(SCHEDULE_KIND),
41
42
  root_workflow: z.string().regex(ID_RE),
42
- schedule_id: z.string().regex(ID_RE),
43
+ schedule_id: z.string().regex(SCHEDULE_ID_RE),
43
44
  source_entrypoint: z.string().regex(ID_RE),
44
45
  task: z.string().min(1),
45
46
  version: z.literal(1),
package/package.json CHANGED
@@ -120,7 +120,7 @@
120
120
  "prepack": "bun run build:cli"
121
121
  },
122
122
  "type": "module",
123
- "version": "1.27.6",
123
+ "version": "1.27.8",
124
124
  "description": "Config-driven multi-agent pipeline runner for repository work",
125
125
  "main": "./dist/index.js",
126
126
  "types": "./dist/index.d.ts",