shipwright-cli 2.4.0 → 3.1.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.
- package/README.md +16 -11
- package/completions/_shipwright +248 -94
- package/completions/shipwright.bash +68 -19
- package/completions/shipwright.fish +310 -42
- package/config/decision-tiers.json +55 -0
- package/config/defaults.json +111 -0
- package/config/event-schema.json +218 -0
- package/config/policy.json +21 -18
- package/dashboard/coverage/coverage-summary.json +14 -0
- package/dashboard/public/index.html +1 -1
- package/dashboard/server.ts +306 -17
- package/dashboard/src/components/charts/bar.test.ts +79 -0
- package/dashboard/src/components/charts/donut.test.ts +68 -0
- package/dashboard/src/components/charts/pipeline-rail.test.ts +117 -0
- package/dashboard/src/components/charts/sparkline.test.ts +125 -0
- package/dashboard/src/core/api.test.ts +309 -0
- package/dashboard/src/core/helpers.test.ts +301 -0
- package/dashboard/src/core/router.test.ts +307 -0
- package/dashboard/src/core/router.ts +7 -0
- package/dashboard/src/core/sse.test.ts +144 -0
- package/dashboard/src/views/metrics.test.ts +186 -0
- package/dashboard/src/views/overview.test.ts +173 -0
- package/dashboard/src/views/pipelines.test.ts +183 -0
- package/dashboard/src/views/team.test.ts +253 -0
- package/dashboard/vitest.config.ts +14 -5
- package/docs/TIPS.md +1 -1
- package/docs/patterns/README.md +1 -1
- package/package.json +7 -9
- package/scripts/adapters/docker-deploy.sh +1 -1
- package/scripts/adapters/tmux-adapter.sh +11 -1
- package/scripts/adapters/wezterm-adapter.sh +1 -1
- package/scripts/check-version-consistency.sh +1 -1
- package/scripts/lib/architecture.sh +127 -0
- package/scripts/lib/bootstrap.sh +75 -0
- package/scripts/lib/compat.sh +89 -6
- package/scripts/lib/config.sh +91 -0
- package/scripts/lib/daemon-adaptive.sh +3 -3
- package/scripts/lib/daemon-dispatch.sh +63 -17
- package/scripts/lib/daemon-failure.sh +0 -0
- package/scripts/lib/daemon-health.sh +1 -1
- package/scripts/lib/daemon-patrol.sh +64 -17
- package/scripts/lib/daemon-poll.sh +54 -25
- package/scripts/lib/daemon-state.sh +125 -23
- package/scripts/lib/daemon-triage.sh +31 -9
- package/scripts/lib/decide-autonomy.sh +295 -0
- package/scripts/lib/decide-scoring.sh +228 -0
- package/scripts/lib/decide-signals.sh +462 -0
- package/scripts/lib/fleet-failover.sh +63 -0
- package/scripts/lib/helpers.sh +29 -6
- package/scripts/lib/pipeline-detection.sh +2 -2
- package/scripts/lib/pipeline-github.sh +9 -9
- package/scripts/lib/pipeline-intelligence.sh +105 -38
- package/scripts/lib/pipeline-quality-checks.sh +17 -16
- package/scripts/lib/pipeline-quality.sh +1 -1
- package/scripts/lib/pipeline-stages.sh +440 -59
- package/scripts/lib/pipeline-state.sh +54 -4
- package/scripts/lib/policy.sh +0 -0
- package/scripts/lib/test-helpers.sh +247 -0
- package/scripts/postinstall.mjs +78 -12
- package/scripts/signals/example-collector.sh +36 -0
- package/scripts/sw +17 -7
- package/scripts/sw-activity.sh +1 -11
- package/scripts/sw-adaptive.sh +109 -85
- package/scripts/sw-adversarial.sh +4 -14
- package/scripts/sw-architecture-enforcer.sh +1 -11
- package/scripts/sw-auth.sh +8 -17
- package/scripts/sw-autonomous.sh +111 -49
- package/scripts/sw-changelog.sh +1 -11
- package/scripts/sw-checkpoint.sh +144 -20
- package/scripts/sw-ci.sh +2 -12
- package/scripts/sw-cleanup.sh +13 -17
- package/scripts/sw-code-review.sh +16 -36
- package/scripts/sw-connect.sh +5 -12
- package/scripts/sw-context.sh +9 -26
- package/scripts/sw-cost.sh +17 -18
- package/scripts/sw-daemon.sh +76 -71
- package/scripts/sw-dashboard.sh +57 -17
- package/scripts/sw-db.sh +524 -26
- package/scripts/sw-decide.sh +685 -0
- package/scripts/sw-decompose.sh +1 -11
- package/scripts/sw-deps.sh +15 -25
- package/scripts/sw-developer-simulation.sh +1 -11
- package/scripts/sw-discovery.sh +138 -30
- package/scripts/sw-doc-fleet.sh +7 -17
- package/scripts/sw-docs-agent.sh +6 -16
- package/scripts/sw-docs.sh +4 -12
- package/scripts/sw-doctor.sh +134 -43
- package/scripts/sw-dora.sh +11 -19
- package/scripts/sw-durable.sh +35 -52
- package/scripts/sw-e2e-orchestrator.sh +11 -27
- package/scripts/sw-eventbus.sh +115 -115
- package/scripts/sw-evidence.sh +114 -30
- package/scripts/sw-feedback.sh +3 -13
- package/scripts/sw-fix.sh +2 -20
- package/scripts/sw-fleet-discover.sh +1 -11
- package/scripts/sw-fleet-viz.sh +10 -18
- package/scripts/sw-fleet.sh +13 -17
- package/scripts/sw-github-app.sh +6 -16
- package/scripts/sw-github-checks.sh +1 -11
- package/scripts/sw-github-deploy.sh +1 -11
- package/scripts/sw-github-graphql.sh +2 -12
- package/scripts/sw-guild.sh +1 -11
- package/scripts/sw-heartbeat.sh +49 -12
- package/scripts/sw-hygiene.sh +45 -43
- package/scripts/sw-incident.sh +48 -74
- package/scripts/sw-init.sh +35 -37
- package/scripts/sw-instrument.sh +1 -11
- package/scripts/sw-intelligence.sh +368 -53
- package/scripts/sw-jira.sh +5 -14
- package/scripts/sw-launchd.sh +2 -12
- package/scripts/sw-linear.sh +8 -17
- package/scripts/sw-logs.sh +4 -12
- package/scripts/sw-loop.sh +905 -104
- package/scripts/sw-memory.sh +263 -20
- package/scripts/sw-mission-control.sh +2 -12
- package/scripts/sw-model-router.sh +73 -34
- package/scripts/sw-otel.sh +15 -23
- package/scripts/sw-oversight.sh +1 -11
- package/scripts/sw-patrol-meta.sh +5 -11
- package/scripts/sw-pipeline-composer.sh +7 -17
- package/scripts/sw-pipeline-vitals.sh +1 -11
- package/scripts/sw-pipeline.sh +550 -122
- package/scripts/sw-pm.sh +2 -12
- package/scripts/sw-pr-lifecycle.sh +33 -28
- package/scripts/sw-predictive.sh +16 -22
- package/scripts/sw-prep.sh +6 -16
- package/scripts/sw-ps.sh +1 -11
- package/scripts/sw-public-dashboard.sh +2 -12
- package/scripts/sw-quality.sh +85 -14
- package/scripts/sw-reaper.sh +1 -11
- package/scripts/sw-recruit.sh +15 -25
- package/scripts/sw-regression.sh +11 -21
- package/scripts/sw-release-manager.sh +19 -28
- package/scripts/sw-release.sh +8 -16
- package/scripts/sw-remote.sh +1 -11
- package/scripts/sw-replay.sh +48 -44
- package/scripts/sw-retro.sh +70 -92
- package/scripts/sw-review-rerun.sh +1 -1
- package/scripts/sw-scale.sh +174 -41
- package/scripts/sw-security-audit.sh +12 -22
- package/scripts/sw-self-optimize.sh +239 -23
- package/scripts/sw-session.sh +5 -15
- package/scripts/sw-setup.sh +8 -18
- package/scripts/sw-standup.sh +5 -15
- package/scripts/sw-status.sh +32 -23
- package/scripts/sw-strategic.sh +129 -13
- package/scripts/sw-stream.sh +1 -11
- package/scripts/sw-swarm.sh +76 -36
- package/scripts/sw-team-stages.sh +10 -20
- package/scripts/sw-templates.sh +4 -14
- package/scripts/sw-testgen.sh +3 -13
- package/scripts/sw-tmux-pipeline.sh +1 -19
- package/scripts/sw-tmux-role-color.sh +0 -10
- package/scripts/sw-tmux-status.sh +3 -11
- package/scripts/sw-tmux.sh +2 -20
- package/scripts/sw-trace.sh +1 -19
- package/scripts/sw-tracker-github.sh +0 -10
- package/scripts/sw-tracker-jira.sh +1 -11
- package/scripts/sw-tracker-linear.sh +1 -11
- package/scripts/sw-tracker.sh +7 -24
- package/scripts/sw-triage.sh +29 -39
- package/scripts/sw-upgrade.sh +5 -23
- package/scripts/sw-ux.sh +1 -19
- package/scripts/sw-webhook.sh +18 -32
- package/scripts/sw-widgets.sh +3 -21
- package/scripts/sw-worktree.sh +11 -27
- package/scripts/update-homebrew-sha.sh +73 -0
- package/templates/pipelines/tdd.json +72 -0
- package/scripts/sw-pipeline.sh.mock +0 -7
package/scripts/sw-otel.sh
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
8
8
|
|
|
9
|
-
VERSION="
|
|
9
|
+
VERSION="3.1.0"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
12
|
|
|
@@ -34,16 +34,6 @@ if [[ "$(type -t emit_event 2>/dev/null)" != "function" ]]; then
|
|
|
34
34
|
echo "${payload}}" >> "${HOME}/.shipwright/events.jsonl"
|
|
35
35
|
}
|
|
36
36
|
fi
|
|
37
|
-
CYAN="${CYAN:-\033[38;2;0;212;255m}"
|
|
38
|
-
PURPLE="${PURPLE:-\033[38;2;124;58;237m}"
|
|
39
|
-
BLUE="${BLUE:-\033[38;2;0;102;255m}"
|
|
40
|
-
GREEN="${GREEN:-\033[38;2;74;222;128m}"
|
|
41
|
-
YELLOW="${YELLOW:-\033[38;2;250;204;21m}"
|
|
42
|
-
RED="${RED:-\033[38;2;248;113;113m}"
|
|
43
|
-
DIM="${DIM:-\033[2m}"
|
|
44
|
-
BOLD="${BOLD:-\033[1m}"
|
|
45
|
-
RESET="${RESET:-\033[0m}"
|
|
46
|
-
|
|
47
37
|
# ─── State Directories ──────────────────────────────────────────────────────
|
|
48
38
|
OTEL_DIR="${HOME}/.shipwright/otel"
|
|
49
39
|
EVENTS_FILE="${HOME}/.shipwright/events.jsonl"
|
|
@@ -95,18 +85,18 @@ cmd_metrics() {
|
|
|
95
85
|
|
|
96
86
|
case "$event_type" in
|
|
97
87
|
pipeline_start|pipeline.started)
|
|
98
|
-
((total_pipelines
|
|
99
|
-
((active_pipelines
|
|
88
|
+
total_pipelines=$((total_pipelines + 1))
|
|
89
|
+
active_pipelines=$((active_pipelines + 1))
|
|
100
90
|
;;
|
|
101
91
|
pipeline_complete|pipeline.completed)
|
|
102
92
|
((active_pipelines--))
|
|
103
|
-
((succeeded_pipelines
|
|
104
|
-
((status_success
|
|
93
|
+
succeeded_pipelines=$((succeeded_pipelines + 1))
|
|
94
|
+
status_success=$((status_success + 1))
|
|
105
95
|
;;
|
|
106
96
|
pipeline_failed|pipeline.failed)
|
|
107
97
|
((active_pipelines--))
|
|
108
|
-
((failed_pipelines
|
|
109
|
-
((status_failed
|
|
98
|
+
failed_pipelines=$((failed_pipelines + 1))
|
|
99
|
+
status_failed=$((status_failed + 1))
|
|
110
100
|
;;
|
|
111
101
|
stage_complete)
|
|
112
102
|
local stage duration
|
|
@@ -335,7 +325,7 @@ cmd_export() {
|
|
|
335
325
|
if [[ "$format" == "trace" ]]; then
|
|
336
326
|
payload=$(cmd_trace)
|
|
337
327
|
local response
|
|
338
|
-
response=$(curl -s -X POST \
|
|
328
|
+
response=$(curl -s --connect-timeout 10 --max-time 30 -X POST \
|
|
339
329
|
"$endpoint/v1/traces" \
|
|
340
330
|
-H "Content-Type: application/json" \
|
|
341
331
|
$auth_header \
|
|
@@ -350,7 +340,7 @@ cmd_export() {
|
|
|
350
340
|
else
|
|
351
341
|
payload=$(cmd_metrics text)
|
|
352
342
|
local response
|
|
353
|
-
response=$(curl -s -X POST \
|
|
343
|
+
response=$(curl -s --connect-timeout 10 --max-time 30 -X POST \
|
|
354
344
|
"$endpoint/metrics" \
|
|
355
345
|
-H "Content-Type: text/plain" \
|
|
356
346
|
$auth_header \
|
|
@@ -394,7 +384,7 @@ cmd_webhook() {
|
|
|
394
384
|
|
|
395
385
|
while [[ $retry -lt $max_retries ]]; do
|
|
396
386
|
local response
|
|
397
|
-
response=$(curl -s -w "\n%{http_code}" -X POST \
|
|
387
|
+
response=$(curl -s --connect-timeout 10 --max-time 30 -w "\n%{http_code}" -X POST \
|
|
398
388
|
"$webhook_url" \
|
|
399
389
|
-H "Content-Type: application/json" \
|
|
400
390
|
-d "$payload" 2>&1 || echo "000")
|
|
@@ -409,7 +399,7 @@ cmd_webhook() {
|
|
|
409
399
|
return 0
|
|
410
400
|
fi
|
|
411
401
|
|
|
412
|
-
((retry
|
|
402
|
+
retry=$((retry + 1))
|
|
413
403
|
if [[ $retry -lt $max_retries ]]; then
|
|
414
404
|
warn "Webhook failed (HTTP $http_code), retrying in ${backoff}s..."
|
|
415
405
|
sleep "$backoff"
|
|
@@ -473,8 +463,10 @@ cmd_report() {
|
|
|
473
463
|
|
|
474
464
|
if [[ -f "$EVENTS_FILE" ]]; then
|
|
475
465
|
event_count=$(wc -l < "$EVENTS_FILE" || echo "0")
|
|
476
|
-
export_count=$(grep -c '"type":"otel_export"' "$EVENTS_FILE" 2>/dev/null ||
|
|
477
|
-
|
|
466
|
+
export_count=$(grep -c '"type":"otel_export"' "$EVENTS_FILE" 2>/dev/null || true)
|
|
467
|
+
export_count="${export_count:-0}"
|
|
468
|
+
webhook_count=$(grep -c '"type":"webhook_sent"' "$EVENTS_FILE" 2>/dev/null || true)
|
|
469
|
+
webhook_count="${webhook_count:-0}"
|
|
478
470
|
last_event_ts=$(tail -n1 "$EVENTS_FILE" | jq -r '.ts // "unknown"' 2>/dev/null || echo "unknown")
|
|
479
471
|
fi
|
|
480
472
|
|
package/scripts/sw-oversight.sh
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
set -euo pipefail
|
|
8
8
|
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
9
9
|
|
|
10
|
-
VERSION="
|
|
10
|
+
VERSION="3.1.0"
|
|
11
11
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
12
12
|
REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
13
13
|
|
|
@@ -34,16 +34,6 @@ if [[ "$(type -t emit_event 2>/dev/null)" != "function" ]]; then
|
|
|
34
34
|
echo "${payload}}" >> "${HOME}/.shipwright/events.jsonl"
|
|
35
35
|
}
|
|
36
36
|
fi
|
|
37
|
-
CYAN="${CYAN:-\033[38;2;0;212;255m}"
|
|
38
|
-
PURPLE="${PURPLE:-\033[38;2;124;58;237m}"
|
|
39
|
-
BLUE="${BLUE:-\033[38;2;0;102;255m}"
|
|
40
|
-
GREEN="${GREEN:-\033[38;2;74;222;128m}"
|
|
41
|
-
YELLOW="${YELLOW:-\033[38;2;250;204;21m}"
|
|
42
|
-
RED="${RED:-\033[38;2;248;113;113m}"
|
|
43
|
-
DIM="${DIM:-\033[2m}"
|
|
44
|
-
BOLD="${BOLD:-\033[1m}"
|
|
45
|
-
RESET="${RESET:-\033[0m}"
|
|
46
|
-
|
|
47
37
|
# ─── Structured Event Log ────────────────────────────────────────────────
|
|
48
38
|
EVENTS_FILE="${HOME}/.shipwright/events.jsonl"
|
|
49
39
|
|
|
@@ -27,16 +27,6 @@ if [[ "$(type -t emit_event 2>/dev/null)" != "function" ]]; then
|
|
|
27
27
|
echo "${payload}}" >> "${HOME}/.shipwright/events.jsonl"
|
|
28
28
|
}
|
|
29
29
|
fi
|
|
30
|
-
CYAN="${CYAN:-\033[38;2;0;212;255m}"
|
|
31
|
-
PURPLE="${PURPLE:-\033[38;2;124;58;237m}"
|
|
32
|
-
BLUE="${BLUE:-\033[38;2;0;102;255m}"
|
|
33
|
-
GREEN="${GREEN:-\033[38;2;74;222;128m}"
|
|
34
|
-
YELLOW="${YELLOW:-\033[38;2;250;204;21m}"
|
|
35
|
-
RED="${RED:-\033[38;2;248;113;113m}"
|
|
36
|
-
DIM="${DIM:-\033[2m}"
|
|
37
|
-
BOLD="${BOLD:-\033[1m}"
|
|
38
|
-
RESET="${RESET:-\033[0m}"
|
|
39
|
-
|
|
40
30
|
# ─── Helper: Create issue if not duplicate ─────────────────────────────────
|
|
41
31
|
patrol_meta_create_issue() {
|
|
42
32
|
local title="$1"
|
|
@@ -310,7 +300,11 @@ patrol_meta_template_effectiveness() {
|
|
|
310
300
|
worst_template=$(echo "$template_stats" | jq -r '.[-1].template' 2>/dev/null || echo "unknown")
|
|
311
301
|
worst_rate=$(echo "$template_stats" | jq -r '.[-1].rate' 2>/dev/null || echo "0")
|
|
312
302
|
|
|
313
|
-
local
|
|
303
|
+
local best_int=${best_rate%.*}
|
|
304
|
+
local worst_int=${worst_rate%.*}
|
|
305
|
+
[[ "$best_int" =~ ^[0-9]+$ ]] || best_int=0
|
|
306
|
+
[[ "$worst_int" =~ ^[0-9]+$ ]] || worst_int=0
|
|
307
|
+
local rate_diff=$(( best_int - worst_int ))
|
|
314
308
|
|
|
315
309
|
if [[ "$rate_diff" -gt 30 ]]; then
|
|
316
310
|
patrol_meta_create_issue \
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
8
8
|
|
|
9
|
-
VERSION="
|
|
9
|
+
VERSION="3.1.0"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
12
|
|
|
@@ -34,16 +34,6 @@ if [[ "$(type -t emit_event 2>/dev/null)" != "function" ]]; then
|
|
|
34
34
|
echo "${payload}}" >> "${HOME}/.shipwright/events.jsonl"
|
|
35
35
|
}
|
|
36
36
|
fi
|
|
37
|
-
CYAN="${CYAN:-\033[38;2;0;212;255m}"
|
|
38
|
-
PURPLE="${PURPLE:-\033[38;2;124;58;237m}"
|
|
39
|
-
BLUE="${BLUE:-\033[38;2;0;102;255m}"
|
|
40
|
-
GREEN="${GREEN:-\033[38;2;74;222;128m}"
|
|
41
|
-
YELLOW="${YELLOW:-\033[38;2;250;204;21m}"
|
|
42
|
-
RED="${RED:-\033[38;2;248;113;113m}"
|
|
43
|
-
DIM="${DIM:-\033[2m}"
|
|
44
|
-
BOLD="${BOLD:-\033[1m}"
|
|
45
|
-
RESET="${RESET:-\033[0m}"
|
|
46
|
-
|
|
47
37
|
# ─── Source intelligence engine ─────────────────────────────────────────────
|
|
48
38
|
INTELLIGENCE_AVAILABLE=false
|
|
49
39
|
if [[ -f "$SCRIPT_DIR/sw-intelligence.sh" ]]; then
|
|
@@ -58,13 +48,13 @@ ARTIFACTS_DIR=".claude/pipeline-artifacts"
|
|
|
58
48
|
# ─── GitHub CI History ─────────────────────────────────────────────────────
|
|
59
49
|
|
|
60
50
|
_composer_github_ci_history() {
|
|
61
|
-
type _gh_detect_repo
|
|
51
|
+
type _gh_detect_repo >/dev/null 2>&1 || { echo "{}"; return 0; }
|
|
62
52
|
_gh_detect_repo 2>/dev/null || { echo "{}"; return 0; }
|
|
63
53
|
|
|
64
54
|
local owner="${GH_OWNER:-}" repo="${GH_REPO:-}"
|
|
65
55
|
[[ -z "$owner" || -z "$repo" ]] && { echo "{}"; return 0; }
|
|
66
56
|
|
|
67
|
-
if type gh_actions_runs
|
|
57
|
+
if type gh_actions_runs >/dev/null 2>&1; then
|
|
68
58
|
local runs
|
|
69
59
|
runs=$(gh_actions_runs "$owner" "$repo" "" 20 2>/dev/null || echo "[]")
|
|
70
60
|
local avg_duration p90_duration
|
|
@@ -111,14 +101,14 @@ composer_create_pipeline() {
|
|
|
111
101
|
# Try intelligence-driven composition
|
|
112
102
|
if [[ "$INTELLIGENCE_AVAILABLE" == "true" ]] && \
|
|
113
103
|
[[ -n "$issue_analysis" ]] && \
|
|
114
|
-
type intelligence_compose_pipeline
|
|
104
|
+
type intelligence_compose_pipeline >/dev/null 2>&1; then
|
|
115
105
|
|
|
116
106
|
info "Composing pipeline with intelligence engine..." >&2
|
|
117
107
|
|
|
118
108
|
local composed=""
|
|
119
109
|
composed=$(intelligence_compose_pipeline "$issue_analysis" "$repo_context" "$budget_json" 2>/dev/null) || true
|
|
120
110
|
|
|
121
|
-
if [[ -n "$composed" ]] && echo "$composed" | jq -e '.stages'
|
|
111
|
+
if [[ -n "$composed" ]] && echo "$composed" | jq -e '.stages' >/dev/null 2>&1; then
|
|
122
112
|
# Validate the composed pipeline
|
|
123
113
|
if echo "$composed" | composer_validate_pipeline; then
|
|
124
114
|
# Atomic write
|
|
@@ -293,7 +283,7 @@ composer_estimate_iterations() {
|
|
|
293
283
|
# Try intelligence-based estimation
|
|
294
284
|
if [[ "$INTELLIGENCE_AVAILABLE" == "true" ]] && \
|
|
295
285
|
[[ -n "$issue_analysis" ]] && \
|
|
296
|
-
type intelligence_estimate_iterations
|
|
286
|
+
type intelligence_estimate_iterations >/dev/null 2>&1; then
|
|
297
287
|
|
|
298
288
|
local estimate=""
|
|
299
289
|
estimate=$(intelligence_estimate_iterations "$issue_analysis" "$historical_data" 2>/dev/null) || true
|
|
@@ -343,7 +333,7 @@ composer_validate_pipeline() {
|
|
|
343
333
|
fi
|
|
344
334
|
|
|
345
335
|
# Check: stages array exists
|
|
346
|
-
if ! echo "$pipeline_json" | jq -e '.stages'
|
|
336
|
+
if ! echo "$pipeline_json" | jq -e '.stages' >/dev/null 2>&1; then
|
|
347
337
|
error "Validation failed: missing 'stages' array"
|
|
348
338
|
return 1
|
|
349
339
|
fi
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
8
8
|
|
|
9
|
-
VERSION="
|
|
9
|
+
VERSION="3.1.0"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
12
|
|
|
@@ -34,16 +34,6 @@ if [[ "$(type -t emit_event 2>/dev/null)" != "function" ]]; then
|
|
|
34
34
|
echo "${payload}}" >> "${HOME}/.shipwright/events.jsonl"
|
|
35
35
|
}
|
|
36
36
|
fi
|
|
37
|
-
CYAN="${CYAN:-\033[38;2;0;212;255m}"
|
|
38
|
-
PURPLE="${PURPLE:-\033[38;2;124;58;237m}"
|
|
39
|
-
BLUE="${BLUE:-\033[38;2;0;102;255m}"
|
|
40
|
-
GREEN="${GREEN:-\033[38;2;74;222;128m}"
|
|
41
|
-
YELLOW="${YELLOW:-\033[38;2;250;204;21m}"
|
|
42
|
-
RED="${RED:-\033[38;2;248;113;113m}"
|
|
43
|
-
DIM="${DIM:-\033[2m}"
|
|
44
|
-
BOLD="${BOLD:-\033[1m}"
|
|
45
|
-
RESET="${RESET:-\033[0m}"
|
|
46
|
-
|
|
47
37
|
# ─── Constants ──────────────────────────────────────────────────────────────
|
|
48
38
|
PROGRESS_DIR="${HOME}/.shipwright/progress"
|
|
49
39
|
COST_DIR="${HOME}/.shipwright"
|