@oisincoveney/pipeline 1.27.3 → 1.27.4

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.
package/dist/config.d.ts CHANGED
@@ -362,8 +362,8 @@ declare const configSchema: z.ZodObject<{
362
362
  policy: z.ZodOptional<z.ZodObject<{
363
363
  commands: z.ZodOptional<z.ZodEnum<{
364
364
  allow: "allow";
365
- deny: "deny";
366
365
  "trusted-only": "trusted-only";
366
+ deny: "deny";
367
367
  }>>;
368
368
  modules: z.ZodOptional<z.ZodEnum<{
369
369
  allow: "allow";
@@ -387,8 +387,8 @@ declare const configSchema: z.ZodObject<{
387
387
  }, z.core.$strict>>>;
388
388
  default_profile: z.ZodOptional<z.ZodString>;
389
389
  mode: z.ZodEnum<{
390
- local: "local";
391
390
  hosted: "hosted";
391
+ local: "local";
392
392
  }>;
393
393
  provider: z.ZodLiteral<"toolhive">;
394
394
  authorization_env: z.ZodDefault<z.ZodString>;
@@ -431,10 +431,10 @@ declare const configSchema: z.ZodObject<{
431
431
  }, z.core.$strict>>;
432
432
  output: z.ZodOptional<z.ZodObject<{
433
433
  format: z.ZodEnum<{
434
- json_schema: "json_schema";
435
434
  text: "text";
436
435
  json: "json";
437
436
  jsonl: "jsonl";
437
+ json_schema: "json_schema";
438
438
  }>;
439
439
  repair: z.ZodOptional<z.ZodObject<{
440
440
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -452,7 +452,6 @@ declare const configSchema: z.ZodObject<{
452
452
  skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
453
453
  timeout_ms: z.ZodOptional<z.ZodNumber>;
454
454
  tools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
455
- task: "task";
456
455
  read: "read";
457
456
  list: "list";
458
457
  grep: "grep";
@@ -460,6 +459,7 @@ declare const configSchema: z.ZodObject<{
460
459
  bash: "bash";
461
460
  edit: "edit";
462
461
  write: "write";
462
+ task: "task";
463
463
  }>>>;
464
464
  }, z.core.$strict>>>;
465
465
  runner_command: z.ZodDefault<z.ZodObject<{
@@ -503,15 +503,14 @@ declare const configSchema: z.ZodObject<{
503
503
  disabled: "disabled";
504
504
  }>>>;
505
505
  output_formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
506
- json_schema: "json_schema";
507
506
  text: "text";
508
507
  json: "json";
509
508
  jsonl: "jsonl";
509
+ json_schema: "json_schema";
510
510
  }>>>;
511
511
  rules: z.ZodOptional<z.ZodBoolean>;
512
512
  skills: z.ZodOptional<z.ZodBoolean>;
513
513
  tools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
514
- task: "task";
515
514
  read: "read";
516
515
  list: "list";
517
516
  grep: "grep";
@@ -519,6 +518,7 @@ declare const configSchema: z.ZodObject<{
519
518
  bash: "bash";
520
519
  edit: "edit";
521
520
  write: "write";
521
+ task: "task";
522
522
  }>>>;
523
523
  }, z.core.$strict>;
524
524
  command: z.ZodOptional<z.ZodString>;
package/dist/config.js CHANGED
@@ -70,7 +70,7 @@ const PACKAGE_DEFAULT_RUNNERS_YAML = `version: 1
70
70
  runners:
71
71
  opencode:
72
72
  type: opencode
73
- model: openai/gpt-5.5
73
+ model: zai-coding-plan/glm-5.1
74
74
  capabilities:
75
75
  native_subagents: true
76
76
  rules: true
@@ -344,54 +344,54 @@ scheduler:
344
344
  backlog-intake:
345
345
  category: intake
346
346
  profile: moka-researcher
347
- models: [zai-coding-plan/glm-5-turbo, openai/gpt-5.5-fast]
347
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5-fast]
348
348
  red-tests:
349
349
  category: red
350
350
  profile: moka-test-writer
351
- models: [openai/gpt-5.5, zai-coding-plan/glm-5.1, kimi-for-coding/kimi-k2-thinking]
351
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5, kimi-for-coding/kimi-k2-thinking]
352
352
  green-implementation:
353
353
  category: green
354
354
  profile: moka-code-writer
355
- models: [opencode-go/qwen3.7-max, kimi-for-coding/k2p6, opencode-go/deepseek-v4-pro]
355
+ models: [zai-coding-plan/glm-5.1, kimi-for-coding/k2p6, opencode-go/qwen3.7-max, opencode-go/deepseek-v4-pro]
356
356
  verification:
357
357
  category: verification
358
358
  profile: moka-verifier
359
- models: [openai/gpt-5.5, zai-coding-plan/glm-5.1]
359
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5]
360
360
  execute:
361
361
  required_categories: [intake, research, red, green, mechanical, acceptance, verification, learn]
362
362
  nodes:
363
363
  backlog-intake:
364
364
  category: intake
365
365
  profile: moka-researcher
366
- models: [zai-coding-plan/glm-5-turbo, openai/gpt-5.5-fast]
366
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5-fast]
367
367
  research:
368
368
  category: research
369
369
  profile: moka-researcher
370
- models: [openai/gpt-5.5-fast, zai-coding-plan/glm-5.1, kimi-for-coding/k2p6]
370
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5-fast, kimi-for-coding/k2p6]
371
371
  red-tests:
372
372
  category: red
373
373
  profile: moka-test-writer
374
- models: [openai/gpt-5.5, zai-coding-plan/glm-5.1, kimi-for-coding/kimi-k2-thinking]
374
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5, kimi-for-coding/kimi-k2-thinking]
375
375
  green-backend:
376
376
  category: green
377
377
  profile: moka-code-writer
378
- models: [opencode-go/qwen3.7-max, kimi-for-coding/k2p6, opencode-go/deepseek-v4-pro]
378
+ models: [zai-coding-plan/glm-5.1, kimi-for-coding/k2p6, opencode-go/qwen3.7-max, opencode-go/deepseek-v4-pro]
379
379
  green-frontend:
380
380
  category: green
381
381
  profile: moka-code-writer
382
- models: [opencode-go/qwen3.7-max, kimi-for-coding/k2p6, opencode-go/deepseek-v4-pro]
382
+ models: [zai-coding-plan/glm-5.1, kimi-for-coding/k2p6, opencode-go/qwen3.7-max, opencode-go/deepseek-v4-pro]
383
383
  acceptance-review:
384
384
  category: acceptance
385
385
  profile: moka-acceptance-reviewer
386
- models: [openai/gpt-5.5, zai-coding-plan/glm-5.1]
386
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5]
387
387
  verification:
388
388
  category: verification
389
389
  profile: moka-verifier
390
- models: [openai/gpt-5.5, zai-coding-plan/glm-5.1]
390
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5]
391
391
  learn:
392
392
  category: learn
393
393
  profile: moka-learner
394
- models: [zai-coding-plan/glm-5-turbo, openai/gpt-5.5-fast]
394
+ models: [zai-coding-plan/glm-5.1, openai/gpt-5.5-fast]
395
395
  schedules:
396
396
  quick-schedule:
397
397
  baseline: quick
@@ -1065,18 +1065,12 @@ function parseYamlAs(source, sourcePath, schema) {
1065
1065
  path: sourcePath
1066
1066
  })));
1067
1067
  const parsed = schema.safeParse(document.toJS());
1068
- if (!parsed.success) throw validationError(parsed.error.issues.map((issue) => ({
1069
- path: issue.path.join("."),
1070
- message: issue.message
1071
- })));
1068
+ if (!parsed.success) throw validationError(configIssuesFromZodError(parsed.error));
1072
1069
  return parsed.data;
1073
1070
  }
1074
1071
  function validatePipelineConfig(rawConfig, projectRoot, options = {}) {
1075
1072
  const parsed = configSchema.safeParse(rawConfig);
1076
- if (!parsed.success) throw validationError(parsed.error.issues.map((issue) => ({
1077
- path: issue.path.join("."),
1078
- message: issue.message
1079
- })));
1073
+ if (!parsed.success) throw validationError(configIssuesFromZodError(parsed.error));
1080
1074
  const config = parsed.data;
1081
1075
  const issues = [];
1082
1076
  validateRegistryIds("runners", config.runners, issues);
@@ -1287,5 +1281,11 @@ function isLintableMissingFileReferencePath(path) {
1287
1281
  function validationError(issues) {
1288
1282
  return new PipelineConfigError("PIPELINE_CONFIG_VALIDATION_ERROR", ["Invalid pipeline config:", ...issues.map((issue) => issue.path ? `- ${issue.path}: ${issue.message}` : `- ${issue.message}`)].join("\n"), issues);
1289
1283
  }
1284
+ function configIssuesFromZodError(error) {
1285
+ return error.issues.map((issue) => ({
1286
+ path: issue.path.join("."),
1287
+ message: issue.message
1288
+ }));
1289
+ }
1290
1290
  //#endregion
1291
1291
  export { DEFAULT_OPENCODE_ECOSYSTEM_MANIFEST, OPENCODE_ECOSYSTEM_MANIFEST_PATH, PIPELINE_CONFIG_PATH, PROFILES_CONFIG_PATH, PipelineConfigError, RUNNERS_CONFIG_PATH, loadPackagePipelineConfig, loadPipelineConfig, parseOpenCodeEcosystemManifest, parsePipelineConfigParts, parsePipelineConfigYaml, validatePipelineConfig, workflowSchema };
@@ -1,20 +1,38 @@
1
1
  //#region src/model-resolver.ts
2
2
  const DISABLED_MODELS_ENV = "PIPELINE_DISABLED_MODELS";
3
+ const MODEL_OVERRIDE_ENV = "PIPELINE_OPENCODE_MODEL";
3
4
  function selectNodeModel(node) {
4
5
  const models = node.models ?? [];
6
+ return forcedModelSelection(models) ?? fallbackModelSelection(models);
7
+ }
8
+ function forcedModelSelection(models) {
9
+ const override = process.env[MODEL_OVERRIDE_ENV]?.trim();
10
+ if (!override) return;
11
+ return {
12
+ model: override,
13
+ reason: `forced by ${MODEL_OVERRIDE_ENV}`,
14
+ skipped: models
15
+ };
16
+ }
17
+ function fallbackModelSelection(models) {
5
18
  if (models.length === 0) return {
6
19
  reason: "node declares no model fallback array",
7
20
  skipped: []
8
21
  };
9
- const disabled = disabledModels();
10
- const skipped = models.filter((model) => disabled.has(model));
22
+ return enabledModelSelection(models, disabledModels());
23
+ }
24
+ function enabledModelSelection(models, disabled) {
11
25
  const model = models.find((candidate) => !disabled.has(candidate));
12
26
  return {
13
27
  model,
14
- reason: model ? "selected first enabled model from node fallback array" : `all configured node models are disabled by ${DISABLED_MODELS_ENV}`,
15
- skipped
28
+ reason: selectionReason(model),
29
+ skipped: models.filter((candidate) => disabled.has(candidate))
16
30
  };
17
31
  }
32
+ function selectionReason(model) {
33
+ if (model) return "selected first enabled model from node fallback array";
34
+ return `all configured node models are disabled by ${DISABLED_MODELS_ENV}`;
35
+ }
18
36
  function disabledModels() {
19
37
  return new Set((process.env[DISABLED_MODELS_ENV] ?? "").split(",").map((value) => value.trim()).filter(Boolean));
20
38
  }
package/dist/runner.js CHANGED
@@ -17,6 +17,7 @@ const OPENCODE_EXCLUDES = [
17
17
  "coverage/"
18
18
  ];
19
19
  const LINE_RE = /\r?\n/;
20
+ const DEFAULT_OPENCODE_MODEL = "zai-coding-plan/glm-5.1";
20
21
  function ensureOpencodeGitExcludes(worktreePath) {
21
22
  const excludePath = join(worktreePath, ".git", "info", "exclude");
22
23
  if (!existsSync(excludePath)) return;
@@ -27,9 +28,26 @@ function ensureOpencodeGitExcludes(worktreePath) {
27
28
  appendFileSync(excludePath, `${existing.endsWith("\n") ? "" : "\n"}# oisin-pipeline opencode excludes\n${missing.join("\n")}\n`);
28
29
  }
29
30
  function optionalModelArgs(runner, actor, selectedModel) {
30
- const model = selectedModel ?? actor?.model ?? runner?.model ?? process.env.PIPELINE_OPENCODE_MODEL ?? "openai/gpt-5.5";
31
+ const model = resolveOpencodeModel(runner, actor, selectedModel);
31
32
  return model ? ["--model", model] : [];
32
33
  }
34
+ function resolveOpencodeModel(runner, actor, selectedModel) {
35
+ return firstDefinedModel([
36
+ process.env.PIPELINE_OPENCODE_MODEL,
37
+ selectedModel,
38
+ actorModel(actor),
39
+ runnerModel(runner)
40
+ ]) ?? DEFAULT_OPENCODE_MODEL;
41
+ }
42
+ function firstDefinedModel(values) {
43
+ return values.find((value) => value !== void 0);
44
+ }
45
+ function actorModel(actor) {
46
+ return actor?.model;
47
+ }
48
+ function runnerModel(runner) {
49
+ return runner?.model;
50
+ }
33
51
  /**
34
52
  * Per-harness argv shape, excluding the leading harness binary name.
35
53
  */
@@ -22,7 +22,7 @@ runners:
22
22
  opencode:
23
23
  type: opencode
24
24
  command: opencode
25
- model: openai/gpt-5.5
25
+ model: zai-coding-plan/glm-5.1
26
26
  capabilities:
27
27
  native_subagents: true
28
28
  rules: true
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.3",
123
+ "version": "1.27.4",
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",