@cxi-lmai/ci-agent-platform 3.2.1 → 3.2.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cxi-lmai/ci-agent-platform",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "Autonomous dev pipeline on plain GitLab CI or GitHub Actions, driven by Claude Code. A labeled issue goes in, an open merge request comes out.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -86,9 +86,12 @@ variables:
|
|
|
86
86
|
# GitLab's own CI_JOB_TIMEOUT minus the time already spent minus the reserve
|
|
87
87
|
# below, which leaves room for the post-agent steps. An overrun then takes
|
|
88
88
|
# the normal degraded path (failure-notice comment + metrics) instead of
|
|
89
|
-
# dying silently.
|
|
90
|
-
#
|
|
91
|
-
#
|
|
89
|
+
# dying silently. This parent deadline bounds the complete omp session.
|
|
90
|
+
# Each invocation also supplies a CI-only omp config overlay: task execution
|
|
91
|
+
# is blocking (no parent polling), each child is capped at 15 minutes and 60
|
|
92
|
+
# requests, and no interactive project setting is changed. Set
|
|
93
|
+
# PIPE_AGENT_MAX_TIME (e.g. "20m") to override the parent derivation for
|
|
94
|
+
# every job.
|
|
92
95
|
PIPE_AGENT_TIME_RESERVE: "180" # seconds of the job budget kept for the post-agent steps
|
|
93
96
|
|
|
94
97
|
# --- Build / verify --------------------------------------------------------
|
|
@@ -441,6 +441,24 @@ pipe_agent_max_time() {
|
|
|
441
441
|
printf '%s' "$left"
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
+
pipe_omp_ci_config() {
|
|
445
|
+
# Omp's interactive defaults run tasks asynchronously and leave their
|
|
446
|
+
# runtime unbounded. CI skills consume task results synchronously, so an
|
|
447
|
+
# async reviewer makes the parent poll through repeated model turns and an
|
|
448
|
+
# unbounded child can consume the whole parent/job deadline. Keep these
|
|
449
|
+
# semantics scoped to this invocation: --config overlays the user's normal
|
|
450
|
+
# project/profile settings without modifying either.
|
|
451
|
+
local config="$PIPE_CONTEXT_DIR/omp-ci-config.yml"
|
|
452
|
+
cat > "$config" <<'YAML'
|
|
453
|
+
async:
|
|
454
|
+
enabled: false
|
|
455
|
+
task:
|
|
456
|
+
maxRuntimeMs: 900000
|
|
457
|
+
softRequestBudget: 60
|
|
458
|
+
YAML
|
|
459
|
+
printf '%s' "$config"
|
|
460
|
+
}
|
|
461
|
+
|
|
444
462
|
pipe_run_omp() {
|
|
445
463
|
# $1 = agent label for metrics, $2 = skill invocation (e.g. "/review-mr"),
|
|
446
464
|
# $3 = allowed tools in Claude Code naming (optional, translated
|
|
@@ -452,6 +470,7 @@ pipe_run_omp() {
|
|
|
452
470
|
# real exit code in PIPE_AGENT_RC, which pipe_require_agent_ran checks.
|
|
453
471
|
local label="$1" skill="$2" tools="${3:-Agent,Read,Write,Edit,Glob,Grep,Bash}" model="${4:-}"
|
|
454
472
|
local omp_tools; omp_tools=$(pipe_translate_tools_to_omp "$tools")
|
|
473
|
+
local omp_config; omp_config=$(pipe_omp_ci_config)
|
|
455
474
|
# Bound the run below the job's own hard kill (see pipe_agent_max_time).
|
|
456
475
|
local max_time; max_time=$(pipe_agent_max_time)
|
|
457
476
|
local -a max_time_args=()
|
|
@@ -486,14 +505,15 @@ pipe_run_omp() {
|
|
|
486
505
|
printf 'cd %q\n' "$PWD"
|
|
487
506
|
printf 'source %q\n' "$SCRIPT_LIB_DIR/usage-capture-omp.sh"
|
|
488
507
|
printf 'export PIPE_CAPTURE_MODEL=%q\n' "$model"
|
|
489
|
-
# The %s after
|
|
490
|
-
# shell-quoted; it collapses to nothing when no deadline
|
|
508
|
+
# The %s after the config is the optional " --max-time <d>" fragment,
|
|
509
|
+
# already shell-quoted; it collapses to nothing when no parent deadline
|
|
510
|
+
# was derived.
|
|
491
511
|
if [ -n "$model" ]; then
|
|
492
|
-
printf 'capture_omp %q
|
|
493
|
-
"$label" "$max_time_txt" "$model" "$omp_tools" "$skill" "$stdin_file"
|
|
512
|
+
printf 'capture_omp %q -- --config %q%s --yolo --no-session --no-title --model %q --tools %q -p %q < %q\n' \
|
|
513
|
+
"$label" "$omp_config" "$max_time_txt" "$model" "$omp_tools" "$skill" "$stdin_file"
|
|
494
514
|
else
|
|
495
|
-
printf 'capture_omp %q
|
|
496
|
-
"$label" "$max_time_txt" "$omp_tools" "$skill" "$stdin_file"
|
|
515
|
+
printf 'capture_omp %q -- --config %q%s --yolo --no-session --no-title --tools %q -p %q < %q\n' \
|
|
516
|
+
"$label" "$omp_config" "$max_time_txt" "$omp_tools" "$skill" "$stdin_file"
|
|
497
517
|
fi
|
|
498
518
|
} > "$runner"
|
|
499
519
|
chmod +x "$runner"
|
|
@@ -506,9 +526,9 @@ pipe_run_omp() {
|
|
|
506
526
|
pipe_scrub_agent_secrets
|
|
507
527
|
export PIPE_CAPTURE_MODEL="$model"
|
|
508
528
|
if [ -n "$model" ]; then
|
|
509
|
-
capture_omp "$label" -- "${max_time_args[@]}" --yolo --no-session --no-title --model "$model" --tools "$omp_tools" -p "$skill" < "$stdin_file"
|
|
529
|
+
capture_omp "$label" -- --config "$omp_config" "${max_time_args[@]}" --yolo --no-session --no-title --model "$model" --tools "$omp_tools" -p "$skill" < "$stdin_file"
|
|
510
530
|
else
|
|
511
|
-
capture_omp "$label" -- "${max_time_args[@]}" --yolo --no-session --no-title --tools "$omp_tools" -p "$skill" < "$stdin_file"
|
|
531
|
+
capture_omp "$label" -- --config "$omp_config" "${max_time_args[@]}" --yolo --no-session --no-title --tools "$omp_tools" -p "$skill" < "$stdin_file"
|
|
512
532
|
fi
|
|
513
533
|
) || PIPE_AGENT_RC=$?
|
|
514
534
|
fi
|