@soleur/opencode 3.393.3 → 3.394.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/package.json +1 -1
- package/skills/agent-browser/test/playwright-mcp-redact-proxy.test.sh +3 -3
- package/skills/compound/scripts/token-efficiency-report.sh +1 -1
- package/skills/constraint-scaffold/scripts/constraint-scaffold.sh +1 -1
- package/skills/drain-prs/SKILL.md +1 -1
- package/skills/linear-fetch/scripts/assert-no-linear-telemetry.sh +2 -2
- package/skills/linear-fetch/scripts/redact-linear-urls.sh +1 -1
- package/skills/model-launch-review/scripts/audit-models.sh +1 -1
- package/skills/operator-bootstrap/template.sh +2 -1
- package/skills/product-roadmap/scripts/roadmap-reconcile.sh +1 -1
- package/skills/provision-cloudflare/scripts/provision-cloudflare.sh +1 -1
- package/skills/provision-doppler/scripts/provision-doppler.sh +1 -1
- package/skills/provision-github/scripts/provision-github.sh +3 -3
- package/skills/seo-aeo/scripts/validate-seo.sh +1 -1
- package/skills/skill-security-scan/scripts/check-telemetry-surface.sh +2 -2
package/package.json
CHANGED
|
@@ -116,14 +116,14 @@ session() {
|
|
|
116
116
|
}
|
|
117
117
|
fact() { python3 "$FACTS" "$@" 2>/dev/null || printf 'ERR'; }
|
|
118
118
|
rcof() { cat "$1/rc" 2>/dev/null || printf 'none'; }
|
|
119
|
-
stderr_has() { [[ -f "$1/stderr.txt" ]]
|
|
120
|
-
stdout_has() { [[ -f "$1/stdout.bin" ]]
|
|
119
|
+
stderr_has() { [[ -f "$1/stderr.txt" ]] || return 1; grep -qF -- "$2" "$1/stderr.txt"; } # file, never a pipe
|
|
120
|
+
stdout_has() { [[ -f "$1/stdout.bin" ]] || return 1; grep -qaF -- "$2" "$1/stdout.bin"; }
|
|
121
121
|
# leaks <out> <id> — a response for <id> was DELIVERED and carries the sentinel
|
|
122
122
|
leaks() { [[ "$(fact "$1" "$2" found)" == "1" && "$(fact "$1" "$2" sentinel)" != "0" ]]; }
|
|
123
123
|
# delivered_ok <out> <id> — a RESULT for <id> was delivered: not a JSON-RPC error, not an isError result
|
|
124
124
|
delivered_ok() { [[ "$(fact "$1" "$2" found)" == "1" && "$(fact "$1" "$2" jsonrpc_error)" == "0" && "$(fact "$1" "$2" isError)" != "true" ]]; }
|
|
125
125
|
# started <out> — the proxy got past startup: not a refusal, and it logged the child
|
|
126
|
-
started() { [[ "$(rcof "$1")" != "2" && "$(rcof "$1")" != "none" ]]
|
|
126
|
+
started() { [[ "$(rcof "$1")" != "2" && "$(rcof "$1")" != "none" ]] || return 1; stderr_has "$1" 'child pgid'; }
|
|
127
127
|
text_has() { [[ "$(fact "$1" "$2" text)" == *"$3"* ]]; }
|
|
128
128
|
# `A && B` as a function's last list trips `set -e` when B fails, and pkill on an already-empty group fails
|
|
129
129
|
reap_group() { local pg; pg="$(cat "$1/child_pgid" 2>/dev/null || true)"; if [[ -n "$pg" ]]; then pkill -KILL -g "$pg" 2>/dev/null || true; fi; }
|
|
@@ -98,7 +98,7 @@ LINES=0
|
|
|
98
98
|
|
|
99
99
|
if [[ -s "$SHORTSTAT_TMP" ]]; then
|
|
100
100
|
LINES=$(grep -oE '[0-9]+ (insertion|deletion)' "$SHORTSTAT_TMP" \
|
|
101
|
-
| grep -oE '[0-9]+' | awk '{s+=$1} END {print s+0}')
|
|
101
|
+
| grep -oE '[0-9]+' | awk '{s+=$1} END {print s+0}') || true
|
|
102
102
|
fi
|
|
103
103
|
|
|
104
104
|
if (( LINES < SKIP_LINES_THRESHOLD )); then
|
|
@@ -100,7 +100,7 @@ esac
|
|
|
100
100
|
# on founder hosts where `realpath -m` does not exist (BSD/macOS). Prints nothing on a missing dir.
|
|
101
101
|
physdir() { ( cd -- "$1" 2>/dev/null && pwd -P ); }
|
|
102
102
|
# physpath <path>: physical path of a file that may not exist yet, via its (existing) parent.
|
|
103
|
-
physpath() { local d; d="$(physdir "$(dirname -- "$1")")" || return 1; [[ -n "$d" ]]
|
|
103
|
+
physpath() { local d; d="$(physdir "$(dirname -- "$1")")" || return 1; [[ -n "$d" ]] || return 1; printf '%s/%s' "$d" "$(basename -- "$1")"; }
|
|
104
104
|
# assert_fixture_dir: the CANONICAL copy (byte-for-byte; fixture-dir-operand-assert.test.sh pins every copy). It refuses an
|
|
105
105
|
# empty, relative, `..`-bearing or filesystem-root operand; the stage-a refresh calls it before each write.
|
|
106
106
|
assert_fixture_dir() {
|
|
@@ -67,7 +67,7 @@ The helper runs `gh pr list --state open --json number,title,headRefName,isDraft
|
|
|
67
67
|
| `needs-review` | `bot-fix/review-required` label, or a feature PR with no review | review (delegate or inline) → merge |
|
|
68
68
|
| `ready-unarmed` | ready PR whose head verdict (`ci-head-verdict.sh`) is `no-run` or `stalled`: no full CI run exists, the red `test` row is the draft run's. `awaiting-approval` is not here: it lands in `needs-review` (the line shows `ci=awaiting-approval`; a maintainer must approve the fork run) | **recover, never arm**, unless another session is still inside `wait-ready-run` for it: `gh pr ready --undo <N>`, then the whole ready block ([ready-run-wait.md](${CLAUDE_PLUGIN_ROOT}/skills/ship/references/ready-run-wait.md)), then re-triage |
|
|
69
69
|
| `drafts` | `isDraft=true` | **skip** — author-owned WIP, never merged. A draft that also carries `parked` stays here, flagged `parked: true` in the JSON and `PARKED label (held for the operator)` on its text line, and is never readied even when the operator names it |
|
|
70
|
-
| `parked` | has the `parked` label ("Reviewed draft held until an approved window; do not merge or arm auto-merge") | **skip** — reviewed and held for the operator; never merged, never armed, never fixed here. The operator removes the label. A parked **draft** is classified under `drafts` (drafts are classified first). `.claude/hooks/ship-operator-step-gate.sh`
|
|
70
|
+
| `parked` | has the `parked` label ("Reviewed draft held until an approved window; do not merge or arm auto-merge") | **skip** — reviewed and held for the operator; never merged, never armed, never fixed here. The operator removes the label. A parked **draft** is classified under `drafts` (drafts are classified first). The `parked-hold` member step of the required `secret-guards` check ([scripts/ci-parked-hold.sh](../../../../scripts/ci-parked-hold.sh), #12396) fails while the PR carries the label, which binds auto-merge, the merge queue and every non-bypass identity, and `admin-merge-ready.sh` reads it as a red required context; it does not stop an admin-credentialed `gh pr merge --admin`, and anyone with triage access can remove the label. `.claude/hooks/ship-operator-step-gate.sh` stays as local defence in depth on a branch that carries it; a draft PR remains the first hold. The tier prints a `recovery:` line saying to do nothing (no other tier carries one except `ready-unarmed`). The label match is case-insensitive, like the hook's |
|
|
71
71
|
| `broken` | `CONFLICTING` **and** many failing checks | surface; fix only if in explicit scope |
|
|
72
72
|
|
|
73
73
|
Pass `--dry-run` to stop here and print the table.
|
|
@@ -45,7 +45,7 @@ fi
|
|
|
45
45
|
|
|
46
46
|
# Pattern 1: Linear issue identifier shape.
|
|
47
47
|
if grep -qE '\b[A-Z]{2,}-[0-9]+\b' <<<"$input"; then
|
|
48
|
-
match=$(printf '%s' "$input" | grep -oE '\b[A-Z]{2,}-[0-9]+\b' | head -n 1)
|
|
48
|
+
match=$(printf '%s' "$input" | grep -oE '\b[A-Z]{2,}-[0-9]+\b' | head -n 1) || true
|
|
49
49
|
echo "FAIL: telemetry payload contains Linear identifier shape: $match" >&2
|
|
50
50
|
exit 1
|
|
51
51
|
fi
|
|
@@ -58,7 +58,7 @@ fi
|
|
|
58
58
|
|
|
59
59
|
# Pattern 3: UUID-style ID (Linear's internal issue UUIDs).
|
|
60
60
|
if grep -qE '\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b' <<<"$input"; then
|
|
61
|
-
match=$(printf '%s' "$input" | grep -oE '\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b' | head -n 1)
|
|
61
|
+
match=$(printf '%s' "$input" | grep -oE '\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b' | head -n 1) || true
|
|
62
62
|
echo "FAIL: telemetry payload contains UUID-style identifier: $match" >&2
|
|
63
63
|
exit 1
|
|
64
64
|
fi
|
|
@@ -43,7 +43,7 @@ input=$(cat -)
|
|
|
43
43
|
count=0
|
|
44
44
|
output="$input"
|
|
45
45
|
for pattern in "${LINEAR_CDN_PATTERNS[@]}"; do
|
|
46
|
-
matches=$(printf '%s' "$output" | grep -oE "$pattern" | wc -l | tr -d '[:space:]')
|
|
46
|
+
matches=$(printf '%s' "$output" | grep -oE "$pattern" | wc -l | tr -d '[:space:]') || true
|
|
47
47
|
count=$((count + matches))
|
|
48
48
|
output=$(printf '%s' "$output" | sed -E "s#$pattern#[linear-image: REDACTED]#g")
|
|
49
49
|
done
|
|
@@ -341,7 +341,7 @@ if [[ ${#pins[@]} -gt 0 ]]; then
|
|
|
341
341
|
# UNKNOWN — never as "the pin is fresh".
|
|
342
342
|
if command -v gh >/dev/null 2>&1; then
|
|
343
343
|
_tip="$(gh api repos/anthropics/claude-code-action/releases --jq '.[0].tag_name' 2>/dev/null || true)"
|
|
344
|
-
_pin_sha="$(grep -ohE 'claude-code-action@[a-f0-9]{40}' "${pins[@]}" 2>/dev/null | head -1 | cut -d@ -f2)"
|
|
344
|
+
_pin_sha="$(grep -ohE 'claude-code-action@[a-f0-9]{40}' "${pins[@]}" 2>/dev/null | head -1 | cut -d@ -f2)" || true
|
|
345
345
|
# These pins are annotated TAG objects, so git/tags resolves them. A pin
|
|
346
346
|
# produced by pin-github-action/Dependabot is a plain COMMIT sha, where
|
|
347
347
|
# git/tags 404s and commits/<sha> is the correct call — try both.
|
|
@@ -354,7 +354,8 @@ read_account() {
|
|
|
354
354
|
example_resource_exists() {
|
|
355
355
|
# REPLACE with the vendor read. The stand-in consults the local record only
|
|
356
356
|
# because this template has no vendor to ask.
|
|
357
|
-
[[ -f "$ENV_FILE" ]]
|
|
357
|
+
[[ -f "$ENV_FILE" ]] || return 1
|
|
358
|
+
grep -aq '^EXAMPLE_PROVISIONED=' "$ENV_FILE"
|
|
358
359
|
}
|
|
359
360
|
|
|
360
361
|
plan_provision() {
|
|
@@ -58,7 +58,7 @@ extract_phase_counts() {
|
|
|
58
58
|
| while IFS= read -r line; do
|
|
59
59
|
grep -qE '[0-9]+ open, [0-9]+ closed' <<<"$line" || continue
|
|
60
60
|
num="$(printf '%s\n' "$line" | sed -E 's/^\| Phase ([0-9]+).*/\1/')"
|
|
61
|
-
counts="$(printf '%s\n' "$line" | grep -oE '[0-9]+ open, [0-9]+ closed' | head -1)"
|
|
61
|
+
counts="$(printf '%s\n' "$line" | grep -oE '[0-9]+ open, [0-9]+ closed' | head -1)" || true
|
|
62
62
|
open="$(printf '%s\n' "$counts" | sed -E 's/^([0-9]+) open.*/\1/')"
|
|
63
63
|
closed="$(printf '%s\n' "$counts" | sed -E 's/^[0-9]+ open, ([0-9]+) closed/\1/')"
|
|
64
64
|
printf '%s|%s|%s\n' "$num" "$open" "$closed"
|
|
@@ -259,7 +259,7 @@ VERIFY_RESULT=$(
|
|
|
259
259
|
|
|
260
260
|
CREATED_RESOURCES+=("cd ${PROVISIONING_DIR} && terraform destroy")
|
|
261
261
|
|
|
262
|
-
TOKEN_STATUS=$(echo "$VERIFY_RESULT" | grep -o '"status":"[^"]*"' | cut -d'"' -f4)
|
|
262
|
+
TOKEN_STATUS=$(echo "$VERIFY_RESULT" | grep -o '"status":"[^"]*"' | cut -d'"' -f4) || true
|
|
263
263
|
if [[ "$TOKEN_STATUS" == "active" ]]; then
|
|
264
264
|
echo "Smoke-test passed: scoped token is active."
|
|
265
265
|
else
|
|
@@ -279,7 +279,7 @@ echo ""
|
|
|
279
279
|
-d "$SA_PAYLOAD"
|
|
280
280
|
)
|
|
281
281
|
|
|
282
|
-
SA_SLUG=$(echo "$SA_RESPONSE" | grep -o '"slug":"[^"]*"' | head -1 | cut -d'"' -f4)
|
|
282
|
+
SA_SLUG=$(echo "$SA_RESPONSE" | grep -o '"slug":"[^"]*"' | head -1 | cut -d'"' -f4) || true
|
|
283
283
|
if [[ -z "$SA_SLUG" ]]; then
|
|
284
284
|
echo "Error: Failed to create service account. Response:" >&2
|
|
285
285
|
echo "$SA_RESPONSE" >&2
|
|
@@ -277,8 +277,8 @@ read -p "App installed? Type 'yes': " ACK
|
|
|
277
277
|
# --- Verify App install ---
|
|
278
278
|
|
|
279
279
|
INSTALL_JSON=$(gh api "/repos/${TENANT_ORG}/${SLUG}/installation" 2>/dev/null) || true
|
|
280
|
-
INSTALL_CHECK=$(echo "$INSTALL_JSON" | grep -o '"actions":"[^"]*"' | head -1 | cut -d'"' -f4)
|
|
281
|
-
REPO_SELECTION=$(echo "$INSTALL_JSON" | grep -o '"repository_selection":"[^"]*"' | head -1 | cut -d'"' -f4)
|
|
280
|
+
INSTALL_CHECK=$(echo "$INSTALL_JSON" | grep -o '"actions":"[^"]*"' | head -1 | cut -d'"' -f4) || true
|
|
281
|
+
REPO_SELECTION=$(echo "$INSTALL_JSON" | grep -o '"repository_selection":"[^"]*"' | head -1 | cut -d'"' -f4) || true
|
|
282
282
|
|
|
283
283
|
if [[ "$REPO_SELECTION" == "all" ]]; then
|
|
284
284
|
echo "ERROR: App installed org-wide (repository_selection=all). Must be 'selected' (single repo)." >&2
|
|
@@ -287,7 +287,7 @@ if [[ "$REPO_SELECTION" == "all" ]]; then
|
|
|
287
287
|
fi
|
|
288
288
|
|
|
289
289
|
if [[ "$INSTALL_CHECK" == "write" ]]; then
|
|
290
|
-
INSTALL_ID=$(echo "$INSTALL_JSON" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
|
290
|
+
INSTALL_ID=$(echo "$INSTALL_JSON" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) || true
|
|
291
291
|
CREATED_RESOURCES+=("gh api -X DELETE /app/installations/${INSTALL_ID}")
|
|
292
292
|
echo "Verified: Soleur App installed with actions:write permission (repository_selection=${REPO_SELECTION:-selected})."
|
|
293
293
|
else
|
|
@@ -112,7 +112,7 @@ if [[ -f "$SITE_DIR/sitemap.xml" ]]; then
|
|
|
112
112
|
# check above; production robots.txt always has the line.
|
|
113
113
|
if [[ -f "$SITE_DIR/robots.txt" ]] && grep -qiE '^Sitemap:' "$SITE_DIR/robots.txt"; then
|
|
114
114
|
ROBOTS_HOST=$(grep -iE '^Sitemap:' "$SITE_DIR/robots.txt" \
|
|
115
|
-
| sed -E 's|^[Ss]itemap:[[:space:]]*(https?://[^/]+).*|\1|' | head -1)
|
|
115
|
+
| sed -E 's|^[Ss]itemap:[[:space:]]*(https?://[^/]+).*|\1|' | head -1) || true
|
|
116
116
|
if [[ "$SITEMAP_HOSTS" != "$ROBOTS_HOST" ]]; then
|
|
117
117
|
fail "sitemap host ($SITEMAP_HOSTS) does not match robots.txt Sitemap line ($ROBOTS_HOST)"
|
|
118
118
|
else
|
|
@@ -73,7 +73,7 @@ while IFS=':' read -r line rest; do
|
|
|
73
73
|
host="${host,,}" # lowercase
|
|
74
74
|
# Detect utm tag
|
|
75
75
|
if grep -qE 'utm_(source|medium|campaign|term|content)=' <<<"$url"; then
|
|
76
|
-
camp="$(echo "$url" | grep -oE 'utm_campaign=[^&[:space:]]+' | head -1 | cut -d'=' -f2)"
|
|
76
|
+
camp="$(echo "$url" | grep -oE 'utm_campaign=[^&[:space:]]+' | head -1 | cut -d'=' -f2)" || true
|
|
77
77
|
if is_allowlisted_host "$host"; then
|
|
78
78
|
# First-party + allowlisted campaign → LOW-RISK; non-allowlisted campaign on first-party host still REVIEW
|
|
79
79
|
if [ -n "$camp" ] && ! is_allowed_campaign "$camp"; then
|
|
@@ -112,7 +112,7 @@ done < <(grep -niE -- "$brand_re" "$tmp" 2>/dev/null || true)
|
|
|
112
112
|
# Simplified: any `fetch(...)` or `axios.post(...)` whose URL host is not allowlisted → HIGH-RISK.
|
|
113
113
|
fetch_re='\b(fetch|axios\.post|axios\.put|http\.post)[[:space:]]*\([[:space:]]*["'"'"'`](https?://[^"'"'"'`)[:space:]]+)'
|
|
114
114
|
while IFS= read -r match; do
|
|
115
|
-
url="$(echo "$match" | grep -oE "$url_re" | head -1)"
|
|
115
|
+
url="$(echo "$match" | grep -oE "$url_re" | head -1)" || true
|
|
116
116
|
[ -z "$url" ] && continue
|
|
117
117
|
nh="${url#http://}"; nh="${nh#https://}"; host="${nh%%[/?#]*}"; host="${host,,}"
|
|
118
118
|
if ! is_allowlisted_host "$host"; then
|