shipwright-cli 2.3.1 → 3.0.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 +95 -28
- package/completions/_shipwright +1 -1
- package/completions/shipwright.bash +3 -8
- package/completions/shipwright.fish +1 -1
- package/config/defaults.json +111 -0
- package/config/event-schema.json +81 -0
- package/config/policy.json +155 -2
- package/config/policy.schema.json +162 -1
- 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 +15 -5
- 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 +126 -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 +39 -16
- package/scripts/lib/daemon-health.sh +1 -1
- package/scripts/lib/daemon-patrol.sh +24 -12
- package/scripts/lib/daemon-poll.sh +37 -25
- package/scripts/lib/daemon-state.sh +115 -23
- package/scripts/lib/daemon-triage.sh +30 -8
- package/scripts/lib/fleet-failover.sh +63 -0
- package/scripts/lib/helpers.sh +30 -6
- package/scripts/lib/pipeline-detection.sh +2 -2
- package/scripts/lib/pipeline-github.sh +9 -9
- package/scripts/lib/pipeline-intelligence.sh +85 -35
- package/scripts/lib/pipeline-quality-checks.sh +16 -16
- package/scripts/lib/pipeline-quality.sh +1 -1
- package/scripts/lib/pipeline-stages.sh +242 -28
- package/scripts/lib/pipeline-state.sh +40 -4
- package/scripts/lib/test-helpers.sh +247 -0
- package/scripts/postinstall.mjs +3 -11
- package/scripts/sw +10 -4
- 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 +6 -16
- package/scripts/sw-daemon.sh +75 -70
- package/scripts/sw-dashboard.sh +57 -17
- package/scripts/sw-db.sh +506 -15
- 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 +112 -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 +748 -0
- 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 +284 -67
- package/scripts/sw-init.sh +35 -37
- package/scripts/sw-instrument.sh +1 -11
- package/scripts/sw-intelligence.sh +362 -51
- 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 +641 -90
- package/scripts/sw-memory.sh +243 -17
- package/scripts/sw-mission-control.sh +2 -12
- package/scripts/sw-model-router.sh +73 -34
- package/scripts/sw-otel.sh +11 -21
- 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 +478 -122
- package/scripts/sw-pm.sh +2 -12
- package/scripts/sw-pr-lifecycle.sh +203 -29
- 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 +77 -10
- 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 +220 -0
- package/scripts/sw-scale.sh +109 -32
- package/scripts/sw-security-audit.sh +12 -22
- package/scripts/sw-self-optimize.sh +239 -23
- package/scripts/sw-session.sh +3 -13
- 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 +24 -34
- 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 +67 -0
- package/templates/pipelines/tdd.json +72 -0
- package/scripts/sw-pipeline.sh.mock +0 -7
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ╔═══════════════════════════════════════════════════════════════════════════╗
|
|
3
|
+
# ║ shipwright test-helpers — Shared test harness for all unit tests ║
|
|
4
|
+
# ║ Source this from any *-test.sh file to get assert_*, setup, teardown ║
|
|
5
|
+
# ╚═══════════════════════════════════════════════════════════════════════════╝
|
|
6
|
+
#
|
|
7
|
+
# Usage:
|
|
8
|
+
# SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
# source "$SCRIPT_DIR/lib/test-helpers.sh"
|
|
10
|
+
#
|
|
11
|
+
# Provides:
|
|
12
|
+
# Colors, counters, assert_pass/fail/eq/contains/contains_regex/gt/json_key
|
|
13
|
+
# setup_test_env / cleanup_test_env (temp dir, mock PATH, mock HOME)
|
|
14
|
+
# print_test_header / print_test_results
|
|
15
|
+
# Mock helpers: mock_binary, mock_jq, mock_git, mock_gh, mock_claude
|
|
16
|
+
|
|
17
|
+
[[ -n "${_TEST_HELPERS_LOADED:-}" ]] && return 0
|
|
18
|
+
_TEST_HELPERS_LOADED=1
|
|
19
|
+
|
|
20
|
+
# ─── Colors ──────────────────────────────────────────────────────────────────
|
|
21
|
+
CYAN='\033[38;2;0;212;255m'
|
|
22
|
+
GREEN='\033[38;2;74;222;128m'
|
|
23
|
+
RED='\033[38;2;248;113;113m'
|
|
24
|
+
YELLOW='\033[38;2;250;204;21m'
|
|
25
|
+
DIM='\033[2m'
|
|
26
|
+
BOLD='\033[1m'
|
|
27
|
+
RESET='\033[0m'
|
|
28
|
+
|
|
29
|
+
# ─── Counters ────────────────────────────────────────────────────────────────
|
|
30
|
+
PASS=0
|
|
31
|
+
FAIL=0
|
|
32
|
+
TOTAL=0
|
|
33
|
+
FAILURES=()
|
|
34
|
+
TEST_TEMP_DIR=""
|
|
35
|
+
|
|
36
|
+
# ─── Assertions ──────────────────────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
assert_pass() {
|
|
39
|
+
local desc="$1"
|
|
40
|
+
TOTAL=$((TOTAL + 1))
|
|
41
|
+
PASS=$((PASS + 1))
|
|
42
|
+
echo -e " ${GREEN}✓${RESET} ${desc}"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
assert_fail() {
|
|
46
|
+
local desc="$1"
|
|
47
|
+
local detail="${2:-}"
|
|
48
|
+
TOTAL=$((TOTAL + 1))
|
|
49
|
+
FAIL=$((FAIL + 1))
|
|
50
|
+
FAILURES+=("$desc")
|
|
51
|
+
echo -e " ${RED}✗${RESET} ${desc}"
|
|
52
|
+
[[ -n "$detail" ]] && echo -e " ${DIM}${detail}${RESET}"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
assert_eq() {
|
|
56
|
+
local desc="$1"
|
|
57
|
+
local expected="$2"
|
|
58
|
+
local actual="$3"
|
|
59
|
+
if [[ "$expected" == "$actual" ]]; then
|
|
60
|
+
assert_pass "$desc"
|
|
61
|
+
else
|
|
62
|
+
assert_fail "$desc" "expected: $expected, got: $actual"
|
|
63
|
+
fi
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
assert_contains() {
|
|
67
|
+
local desc="$1"
|
|
68
|
+
local haystack="$2"
|
|
69
|
+
local needle="$3"
|
|
70
|
+
if echo "$haystack" | grep -qF "$needle" 2>/dev/null; then
|
|
71
|
+
assert_pass "$desc"
|
|
72
|
+
else
|
|
73
|
+
assert_fail "$desc" "output missing: $needle"
|
|
74
|
+
fi
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
assert_contains_regex() {
|
|
78
|
+
local desc="$1"
|
|
79
|
+
local haystack="$2"
|
|
80
|
+
local pattern="$3"
|
|
81
|
+
if echo "$haystack" | grep -qE "$pattern" 2>/dev/null; then
|
|
82
|
+
assert_pass "$desc"
|
|
83
|
+
else
|
|
84
|
+
assert_fail "$desc" "output missing pattern: $pattern"
|
|
85
|
+
fi
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
assert_gt() {
|
|
89
|
+
local desc="$1"
|
|
90
|
+
local actual="$2"
|
|
91
|
+
local threshold="$3"
|
|
92
|
+
if [[ "$actual" -gt "$threshold" ]] 2>/dev/null; then
|
|
93
|
+
assert_pass "$desc"
|
|
94
|
+
else
|
|
95
|
+
assert_fail "$desc" "expected >$threshold, got: $actual"
|
|
96
|
+
fi
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
assert_json_key() {
|
|
100
|
+
local desc="$1"
|
|
101
|
+
local json="$2"
|
|
102
|
+
local key="$3"
|
|
103
|
+
local expected="$4"
|
|
104
|
+
local actual
|
|
105
|
+
actual=$(echo "$json" | jq -r "$key" 2>/dev/null)
|
|
106
|
+
if [[ "$actual" == "$expected" ]]; then
|
|
107
|
+
assert_pass "$desc"
|
|
108
|
+
else
|
|
109
|
+
assert_fail "$desc" "key $key: expected $expected, got: $actual"
|
|
110
|
+
fi
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
assert_exit_code() {
|
|
114
|
+
local desc="$1"
|
|
115
|
+
local expected="$2"
|
|
116
|
+
local actual="$3"
|
|
117
|
+
if [[ "$expected" == "$actual" ]]; then
|
|
118
|
+
assert_pass "$desc (exit $actual)"
|
|
119
|
+
else
|
|
120
|
+
assert_fail "$desc" "expected exit code: $expected, got: $actual"
|
|
121
|
+
fi
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
assert_file_exists() {
|
|
125
|
+
local desc="$1"
|
|
126
|
+
local filepath="$2"
|
|
127
|
+
if [[ -f "$filepath" ]]; then
|
|
128
|
+
assert_pass "$desc"
|
|
129
|
+
else
|
|
130
|
+
assert_fail "$desc" "file not found: $filepath"
|
|
131
|
+
fi
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
assert_file_not_exists() {
|
|
135
|
+
local desc="$1"
|
|
136
|
+
local filepath="$2"
|
|
137
|
+
if [[ ! -f "$filepath" ]]; then
|
|
138
|
+
assert_pass "$desc"
|
|
139
|
+
else
|
|
140
|
+
assert_fail "$desc" "file should not exist: $filepath"
|
|
141
|
+
fi
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
# ─── Test Environment ────────────────────────────────────────────────────────
|
|
145
|
+
|
|
146
|
+
setup_test_env() {
|
|
147
|
+
local test_name="${1:-sw-test}"
|
|
148
|
+
TEST_TEMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/${test_name}.XXXXXX")
|
|
149
|
+
mkdir -p "$TEST_TEMP_DIR/home/.shipwright"
|
|
150
|
+
mkdir -p "$TEST_TEMP_DIR/bin"
|
|
151
|
+
mkdir -p "$TEST_TEMP_DIR/project"
|
|
152
|
+
mkdir -p "$TEST_TEMP_DIR/logs"
|
|
153
|
+
|
|
154
|
+
ORIG_HOME="${HOME}"
|
|
155
|
+
ORIG_PATH="${PATH}"
|
|
156
|
+
export HOME="$TEST_TEMP_DIR/home"
|
|
157
|
+
export PATH="$TEST_TEMP_DIR/bin:$PATH"
|
|
158
|
+
export NO_GITHUB=true
|
|
159
|
+
|
|
160
|
+
# Link real jq if available
|
|
161
|
+
if command -v jq >/dev/null 2>&1; then
|
|
162
|
+
ln -sf "$(command -v jq)" "$TEST_TEMP_DIR/bin/jq"
|
|
163
|
+
fi
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
cleanup_test_env() {
|
|
167
|
+
if [[ -n "$TEST_TEMP_DIR" && -d "$TEST_TEMP_DIR" ]]; then
|
|
168
|
+
rm -rf "$TEST_TEMP_DIR"
|
|
169
|
+
fi
|
|
170
|
+
[[ -n "${ORIG_HOME:-}" ]] && export HOME="$ORIG_HOME"
|
|
171
|
+
[[ -n "${ORIG_PATH:-}" ]] && export PATH="$ORIG_PATH"
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
# ─── Mock Helpers ────────────────────────────────────────────────────────────
|
|
175
|
+
|
|
176
|
+
mock_binary() {
|
|
177
|
+
local name="$1"
|
|
178
|
+
local script="${2:-exit 0}"
|
|
179
|
+
cat > "$TEST_TEMP_DIR/bin/$name" <<MOCK
|
|
180
|
+
#!/usr/bin/env bash
|
|
181
|
+
$script
|
|
182
|
+
MOCK
|
|
183
|
+
chmod +x "$TEST_TEMP_DIR/bin/$name"
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
mock_git() {
|
|
187
|
+
mock_binary "git" 'case "${1:-}" in
|
|
188
|
+
rev-parse)
|
|
189
|
+
if [[ "${2:-}" == "--show-toplevel" ]]; then echo "/tmp/mock-repo"
|
|
190
|
+
elif [[ "${2:-}" == "--abbrev-ref" ]]; then echo "main"
|
|
191
|
+
else echo "/tmp/mock-repo"
|
|
192
|
+
fi ;;
|
|
193
|
+
remote) echo "https://github.com/testuser/testrepo.git" ;;
|
|
194
|
+
branch) echo "" ;;
|
|
195
|
+
log) echo "" ;;
|
|
196
|
+
*) echo "" ;;
|
|
197
|
+
esac
|
|
198
|
+
exit 0'
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
mock_gh() {
|
|
202
|
+
mock_binary "gh" 'case "${1:-}" in
|
|
203
|
+
api) echo "{}" ;;
|
|
204
|
+
issue) echo "[]" ;;
|
|
205
|
+
pr) echo "[]" ;;
|
|
206
|
+
*) echo "" ;;
|
|
207
|
+
esac
|
|
208
|
+
exit 0'
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
mock_claude() {
|
|
212
|
+
mock_binary "claude" 'echo "Mock claude response"
|
|
213
|
+
exit 0'
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
# ─── Output Helpers ──────────────────────────────────────────────────────────
|
|
217
|
+
|
|
218
|
+
print_test_header() {
|
|
219
|
+
local title="$1"
|
|
220
|
+
echo ""
|
|
221
|
+
echo -e "${CYAN}${BOLD} ${title}${RESET}"
|
|
222
|
+
echo -e "${DIM} ══════════════════════════════════════════${RESET}"
|
|
223
|
+
echo ""
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
print_test_section() {
|
|
227
|
+
local title="$1"
|
|
228
|
+
echo ""
|
|
229
|
+
echo -e " ${CYAN}${title}${RESET}"
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
print_test_results() {
|
|
233
|
+
echo ""
|
|
234
|
+
echo -e "${DIM} ──────────────────────────────────────────${RESET}"
|
|
235
|
+
echo ""
|
|
236
|
+
if [[ $FAIL -eq 0 ]]; then
|
|
237
|
+
echo -e " ${GREEN}${BOLD}All $TOTAL tests passed${RESET}"
|
|
238
|
+
else
|
|
239
|
+
echo -e " ${RED}${BOLD}$FAIL of $TOTAL tests failed${RESET}"
|
|
240
|
+
echo ""
|
|
241
|
+
for f in "${FAILURES[@]}"; do
|
|
242
|
+
echo -e " ${RED}✗${RESET} $f"
|
|
243
|
+
done
|
|
244
|
+
fi
|
|
245
|
+
echo ""
|
|
246
|
+
exit "$FAIL"
|
|
247
|
+
}
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -131,21 +131,13 @@ try {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
// Print success banner
|
|
134
|
-
const version = JSON.parse(
|
|
135
|
-
readFileSync(join(PKG_DIR, "package.json"), "utf8"),
|
|
136
|
-
).version;
|
|
137
134
|
console.log();
|
|
138
|
-
console.log(`${
|
|
139
|
-
console.log();
|
|
140
|
-
console.log(` Next steps:`);
|
|
141
|
-
console.log(
|
|
142
|
-
` ${DIM}$${RESET} shipwright doctor ${DIM}# Verify your setup${RESET}`,
|
|
143
|
-
);
|
|
135
|
+
console.log(`${GREEN}${BOLD}Shipwright CLI installed!${RESET} Next steps:`);
|
|
144
136
|
console.log(
|
|
145
|
-
` ${DIM}
|
|
137
|
+
` ${DIM}shipwright init${RESET} ${DIM}# Set up tmux, hooks, and templates${RESET}`,
|
|
146
138
|
);
|
|
147
139
|
console.log(
|
|
148
|
-
` ${DIM}
|
|
140
|
+
` ${DIM}shipwright doctor${RESET} ${DIM}# Verify your setup${RESET}`,
|
|
149
141
|
);
|
|
150
142
|
console.log();
|
|
151
143
|
} catch (err) {
|
package/scripts/sw
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ╚═══════════════════════════════════════════════════════════════════════════╝
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
|
|
8
|
-
VERSION="
|
|
8
|
+
VERSION="3.0.0"
|
|
9
9
|
|
|
10
10
|
# Resolve symlinks (required for npm global install where bin/ symlinks to node_modules/)
|
|
11
11
|
SOURCE="${BASH_SOURCE[0]}"
|
|
@@ -51,7 +51,7 @@ warn() { echo -e "${YELLOW}${BOLD}⚠${RESET} $*"; }
|
|
|
51
51
|
error() { echo -e "${RED}${BOLD}✗${RESET} $*" >&2; }
|
|
52
52
|
|
|
53
53
|
check_tmux() {
|
|
54
|
-
if ! command -v tmux
|
|
54
|
+
if ! command -v tmux >/dev/null 2>&1; then
|
|
55
55
|
error "tmux is not installed. Install it first:"
|
|
56
56
|
echo -e " ${DIM}brew install tmux${RESET} (macOS)"
|
|
57
57
|
echo -e " ${DIM}sudo apt install tmux${RESET} (Ubuntu/Debian)"
|
|
@@ -81,14 +81,14 @@ ensure_repo_setup() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
show_version() {
|
|
84
|
-
echo -e "${CYAN}${BOLD}shipwright${RESET} ${DIM}v${VERSION}${RESET} — Orchestrate AI Coding Teams ${DIM}(
|
|
84
|
+
echo -e "${CYAN}${BOLD}shipwright${RESET} ${DIM}v${VERSION}${RESET} — Orchestrate AI Coding Teams ${DIM}(alias: sw)${RESET}"
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
show_help() {
|
|
88
88
|
show_version
|
|
89
89
|
echo ""
|
|
90
90
|
echo -e "${BOLD}USAGE${RESET}"
|
|
91
|
-
echo -e " ${CYAN}shipwright${RESET} <command> [options] ${DIM}(
|
|
91
|
+
echo -e " ${CYAN}shipwright${RESET} <command> [options] ${DIM}(alias: sw)${RESET}"
|
|
92
92
|
echo ""
|
|
93
93
|
echo -e "${BOLD}GETTING STARTED${RESET}"
|
|
94
94
|
echo -e " ${CYAN}init${RESET} One-command setup — tmux, CLI, templates, hooks"
|
|
@@ -467,6 +467,9 @@ main() {
|
|
|
467
467
|
replay)
|
|
468
468
|
exec "$SCRIPT_DIR/sw-replay.sh" "$@"
|
|
469
469
|
;;
|
|
470
|
+
review-rerun|rr)
|
|
471
|
+
exec "$SCRIPT_DIR/sw-review-rerun.sh" "$@"
|
|
472
|
+
;;
|
|
470
473
|
scale)
|
|
471
474
|
exec "$SCRIPT_DIR/sw-scale.sh" "$@"
|
|
472
475
|
;;
|
|
@@ -524,6 +527,9 @@ main() {
|
|
|
524
527
|
eventbus)
|
|
525
528
|
exec "$SCRIPT_DIR/sw-eventbus.sh" "$@"
|
|
526
529
|
;;
|
|
530
|
+
evidence|ev)
|
|
531
|
+
exec "$SCRIPT_DIR/sw-evidence.sh" "$@"
|
|
532
|
+
;;
|
|
527
533
|
otel)
|
|
528
534
|
exec "$SCRIPT_DIR/sw-otel.sh" "$@"
|
|
529
535
|
;;
|
package/scripts/sw-activity.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.0.0"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
|
|
12
12
|
# ─── Cross-platform compatibility ──────────────────────────────────────────
|
|
@@ -33,16 +33,6 @@ if [[ "$(type -t emit_event 2>/dev/null)" != "function" ]]; then
|
|
|
33
33
|
echo "${payload}}" >> "${HOME}/.shipwright/events.jsonl"
|
|
34
34
|
}
|
|
35
35
|
fi
|
|
36
|
-
CYAN="${CYAN:-\033[38;2;0;212;255m}"
|
|
37
|
-
PURPLE="${PURPLE:-\033[38;2;124;58;237m}"
|
|
38
|
-
BLUE="${BLUE:-\033[38;2;0;102;255m}"
|
|
39
|
-
GREEN="${GREEN:-\033[38;2;74;222;128m}"
|
|
40
|
-
YELLOW="${YELLOW:-\033[38;2;250;204;21m}"
|
|
41
|
-
RED="${RED:-\033[38;2;248;113;113m}"
|
|
42
|
-
DIM="${DIM:-\033[2m}"
|
|
43
|
-
BOLD="${BOLD:-\033[1m}"
|
|
44
|
-
RESET="${RESET:-\033[0m}"
|
|
45
|
-
|
|
46
36
|
# ─── Event File & Filters ─────────────────────────────────────────────────────
|
|
47
37
|
EVENTS_FILE="${HOME}/.shipwright/events.jsonl"
|
|
48
38
|
FILTER_TYPE=""
|