shipwright-cli 1.7.1 → 1.9.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/.claude/agents/code-reviewer.md +90 -0
- package/.claude/agents/devops-engineer.md +142 -0
- package/.claude/agents/pipeline-agent.md +80 -0
- package/.claude/agents/shell-script-specialist.md +150 -0
- package/.claude/agents/test-specialist.md +196 -0
- package/.claude/hooks/post-tool-use.sh +38 -0
- package/.claude/hooks/pre-tool-use.sh +25 -0
- package/.claude/hooks/session-started.sh +37 -0
- package/README.md +212 -814
- package/claude-code/CLAUDE.md.shipwright +54 -0
- package/claude-code/hooks/notify-idle.sh +2 -2
- package/claude-code/hooks/session-start.sh +24 -0
- package/claude-code/hooks/task-completed.sh +6 -2
- package/claude-code/settings.json.template +12 -0
- package/dashboard/public/app.js +4422 -0
- package/dashboard/public/index.html +816 -0
- package/dashboard/public/styles.css +4755 -0
- package/dashboard/server.ts +4315 -0
- package/docs/KNOWN-ISSUES.md +18 -10
- package/docs/TIPS.md +38 -26
- package/docs/patterns/README.md +33 -23
- package/package.json +9 -5
- package/scripts/adapters/iterm2-adapter.sh +1 -1
- package/scripts/adapters/tmux-adapter.sh +52 -23
- package/scripts/adapters/wezterm-adapter.sh +26 -14
- package/scripts/lib/compat.sh +200 -0
- package/scripts/lib/helpers.sh +72 -0
- package/scripts/postinstall.mjs +72 -13
- package/scripts/{cct → sw} +109 -21
- package/scripts/sw-adversarial.sh +274 -0
- package/scripts/sw-architecture-enforcer.sh +330 -0
- package/scripts/sw-checkpoint.sh +390 -0
- package/scripts/{cct-cleanup.sh → sw-cleanup.sh} +3 -1
- package/scripts/sw-connect.sh +619 -0
- package/scripts/{cct-cost.sh → sw-cost.sh} +368 -34
- package/scripts/{cct-daemon.sh → sw-daemon.sh} +2217 -204
- package/scripts/sw-dashboard.sh +477 -0
- package/scripts/sw-developer-simulation.sh +252 -0
- package/scripts/sw-docs.sh +635 -0
- package/scripts/sw-doctor.sh +907 -0
- package/scripts/{cct-fix.sh → sw-fix.sh} +10 -6
- package/scripts/{cct-fleet.sh → sw-fleet.sh} +498 -22
- package/scripts/sw-github-checks.sh +521 -0
- package/scripts/sw-github-deploy.sh +533 -0
- package/scripts/sw-github-graphql.sh +972 -0
- package/scripts/sw-heartbeat.sh +293 -0
- package/scripts/{cct-init.sh → sw-init.sh} +144 -11
- package/scripts/sw-intelligence.sh +1196 -0
- package/scripts/sw-jira.sh +643 -0
- package/scripts/sw-launchd.sh +364 -0
- package/scripts/sw-linear.sh +648 -0
- package/scripts/{cct-logs.sh → sw-logs.sh} +72 -2
- package/scripts/{cct-loop.sh → sw-loop.sh} +534 -44
- package/scripts/{cct-memory.sh → sw-memory.sh} +321 -38
- package/scripts/sw-patrol-meta.sh +417 -0
- package/scripts/sw-pipeline-composer.sh +455 -0
- package/scripts/{cct-pipeline.sh → sw-pipeline.sh} +2319 -178
- package/scripts/sw-predictive.sh +820 -0
- package/scripts/{cct-prep.sh → sw-prep.sh} +339 -49
- package/scripts/{cct-ps.sh → sw-ps.sh} +6 -4
- package/scripts/{cct-reaper.sh → sw-reaper.sh} +6 -4
- package/scripts/sw-remote.sh +687 -0
- package/scripts/sw-self-optimize.sh +947 -0
- package/scripts/sw-session.sh +519 -0
- package/scripts/sw-setup.sh +234 -0
- package/scripts/sw-status.sh +605 -0
- package/scripts/{cct-templates.sh → sw-templates.sh} +9 -4
- package/scripts/sw-tmux.sh +591 -0
- package/scripts/sw-tracker-jira.sh +277 -0
- package/scripts/sw-tracker-linear.sh +292 -0
- package/scripts/sw-tracker.sh +409 -0
- package/scripts/{cct-upgrade.sh → sw-upgrade.sh} +103 -46
- package/scripts/{cct-worktree.sh → sw-worktree.sh} +3 -0
- package/templates/pipelines/autonomous.json +27 -5
- package/templates/pipelines/full.json +12 -0
- package/templates/pipelines/standard.json +12 -0
- package/tmux/{claude-teams-overlay.conf → shipwright-overlay.conf} +27 -9
- package/tmux/templates/accessibility.json +34 -0
- package/tmux/templates/api-design.json +35 -0
- package/tmux/templates/architecture.json +1 -0
- package/tmux/templates/bug-fix.json +9 -0
- package/tmux/templates/code-review.json +1 -0
- package/tmux/templates/compliance.json +36 -0
- package/tmux/templates/data-pipeline.json +36 -0
- package/tmux/templates/debt-paydown.json +34 -0
- package/tmux/templates/devops.json +1 -0
- package/tmux/templates/documentation.json +1 -0
- package/tmux/templates/exploration.json +1 -0
- package/tmux/templates/feature-dev.json +1 -0
- package/tmux/templates/full-stack.json +8 -0
- package/tmux/templates/i18n.json +34 -0
- package/tmux/templates/incident-response.json +36 -0
- package/tmux/templates/migration.json +1 -0
- package/tmux/templates/observability.json +35 -0
- package/tmux/templates/onboarding.json +33 -0
- package/tmux/templates/performance.json +35 -0
- package/tmux/templates/refactor.json +1 -0
- package/tmux/templates/release.json +35 -0
- package/tmux/templates/security-audit.json +8 -0
- package/tmux/templates/spike.json +34 -0
- package/tmux/templates/testing.json +1 -0
- package/tmux/tmux.conf +98 -9
- package/scripts/cct-doctor.sh +0 -414
- package/scripts/cct-session.sh +0 -284
- package/scripts/cct-status.sh +0 -169
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# ╔═══════════════════════════════════════════════════════════════════════════╗
|
|
3
|
-
# ║
|
|
3
|
+
# ║ sw-logs.sh — View and search agent pane logs ║
|
|
4
4
|
# ║ ║
|
|
5
5
|
# ║ Captures tmux pane scrollback and provides log browsing/search. ║
|
|
6
6
|
# ╚═══════════════════════════════════════════════════════════════════════════╝
|
|
7
|
+
VERSION="1.9.0"
|
|
7
8
|
set -euo pipefail
|
|
9
|
+
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
8
10
|
|
|
9
11
|
# ─── Colors ──────────────────────────────────────────────────────────────────
|
|
10
12
|
CYAN='\033[38;2;0;212;255m'
|
|
@@ -23,7 +25,59 @@ success() { echo -e "${GREEN}${BOLD}✓${RESET} $*"; }
|
|
|
23
25
|
warn() { echo -e "${YELLOW}${BOLD}⚠${RESET} $*"; }
|
|
24
26
|
error() { echo -e "${RED}${BOLD}✗${RESET} $*" >&2; }
|
|
25
27
|
|
|
26
|
-
LOGS_DIR="$HOME/.
|
|
28
|
+
LOGS_DIR="$HOME/.shipwright/logs"
|
|
29
|
+
|
|
30
|
+
# ─── Intelligence Check ──────────────────────────────────────────────────
|
|
31
|
+
intelligence_available() {
|
|
32
|
+
command -v claude &>/dev/null || return 1
|
|
33
|
+
local config
|
|
34
|
+
for config in "$(git rev-parse --show-toplevel 2>/dev/null)/.claude/daemon-config.json" \
|
|
35
|
+
"${HOME}/.shipwright/config.json"; do
|
|
36
|
+
if [[ -f "$config" ]]; then
|
|
37
|
+
local enabled
|
|
38
|
+
enabled=$(jq -r '.intelligence.enabled // false' "$config" 2>/dev/null || echo "false")
|
|
39
|
+
[[ "$enabled" == "true" ]] && return 0
|
|
40
|
+
fi
|
|
41
|
+
done
|
|
42
|
+
return 1
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
# ─── Semantic Log Ranking ────────────────────────────────────────────────
|
|
46
|
+
# After grep results are collected, use Claude to rank by relevance,
|
|
47
|
+
# group by error type/stage, and highlight actionable entries.
|
|
48
|
+
semantic_rank_results() {
|
|
49
|
+
local query="$1"
|
|
50
|
+
local raw_results="$2"
|
|
51
|
+
|
|
52
|
+
[[ -z "$raw_results" ]] && return 0
|
|
53
|
+
|
|
54
|
+
# Truncate if too long to avoid overflowing Claude context
|
|
55
|
+
local truncated
|
|
56
|
+
truncated=$(echo "$raw_results" | head -200)
|
|
57
|
+
|
|
58
|
+
local analysis
|
|
59
|
+
analysis=$(claude --print "You are analyzing agent log search results. The user searched for: \"${query}\"
|
|
60
|
+
|
|
61
|
+
Here are the grep results:
|
|
62
|
+
${truncated}
|
|
63
|
+
|
|
64
|
+
Respond with:
|
|
65
|
+
1. MOST ACTIONABLE entries first (errors that need attention, failures with clear root causes)
|
|
66
|
+
2. Group by error type or pipeline stage
|
|
67
|
+
3. For each group, provide a one-line summary
|
|
68
|
+
|
|
69
|
+
Format your response as plain text suitable for terminal display. Use --- to separate groups. Be concise." 2>/dev/null || true)
|
|
70
|
+
|
|
71
|
+
if [[ -n "$analysis" ]]; then
|
|
72
|
+
echo ""
|
|
73
|
+
echo -e " ${PURPLE}${BOLD}Semantic Analysis${RESET} ${DIM}(intelligence-enhanced)${RESET}"
|
|
74
|
+
echo -e "${DIM} ──────────────────────────────────────────${RESET}"
|
|
75
|
+
echo "$analysis" | while IFS= read -r line; do
|
|
76
|
+
echo -e " $line"
|
|
77
|
+
done
|
|
78
|
+
echo ""
|
|
79
|
+
fi
|
|
80
|
+
}
|
|
27
81
|
|
|
28
82
|
show_usage() {
|
|
29
83
|
echo -e "${CYAN}${BOLD}shipwright logs${RESET} — View agent pane logs"
|
|
@@ -187,6 +241,7 @@ show_team_logs() {
|
|
|
187
241
|
info "Searching for '${grep_pattern}' in ${#log_files[@]} log file(s)..."
|
|
188
242
|
echo ""
|
|
189
243
|
local found=false
|
|
244
|
+
local all_raw_matches=""
|
|
190
245
|
for f in "${log_files[@]}"; do
|
|
191
246
|
local matches
|
|
192
247
|
matches="$(grep -n --color=always "$grep_pattern" "$f" 2>/dev/null || true)"
|
|
@@ -197,11 +252,26 @@ show_team_logs() {
|
|
|
197
252
|
echo -e " ${line}"
|
|
198
253
|
done
|
|
199
254
|
echo ""
|
|
255
|
+
# Collect plain matches for semantic analysis
|
|
256
|
+
local plain_matches
|
|
257
|
+
plain_matches="$(grep -n "$grep_pattern" "$f" 2>/dev/null || true)"
|
|
258
|
+
if [[ -n "$plain_matches" ]]; then
|
|
259
|
+
all_raw_matches+="=== $(basename "$f") ===
|
|
260
|
+
${plain_matches}
|
|
261
|
+
|
|
262
|
+
"
|
|
263
|
+
fi
|
|
200
264
|
fi
|
|
201
265
|
done
|
|
202
266
|
if ! $found; then
|
|
203
267
|
warn "No matches for '${grep_pattern}'"
|
|
204
268
|
fi
|
|
269
|
+
|
|
270
|
+
# Semantic enhancement (intelligence-gated)
|
|
271
|
+
if $found && intelligence_available; then
|
|
272
|
+
semantic_rank_results "$grep_pattern" "$all_raw_matches"
|
|
273
|
+
fi
|
|
274
|
+
|
|
205
275
|
return
|
|
206
276
|
fi
|
|
207
277
|
|