@bookedsolid/reagent 0.5.0 → 0.7.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/agents/ai-platforms/ai-deepseek-specialist.md +83 -0
- package/agents/ai-platforms/ai-elevenlabs-specialist.md +75 -0
- package/agents/ai-platforms/ai-grok-specialist.md +71 -0
- package/agents/ai-platforms/ai-local-llm-specialist.md +95 -0
- package/agents/ai-platforms/ai-video-ai-specialist.md +103 -0
- package/agents/engineering/cto-advisory.md +44 -0
- package/agents/engineering/qa-engineer-automation.md +77 -0
- package/agents/engineering/qa-engineer-manual.md +48 -0
- package/agents/engineering/qa-lead.md +124 -0
- package/agents/engineering/security-engineer-appsec.md +47 -0
- package/agents/engineering/security-engineer-compliance.md +47 -0
- package/dist/cli/commands/catalyze/gap-detector.d.ts +6 -0
- package/dist/cli/commands/catalyze/gap-detector.d.ts.map +1 -0
- package/dist/cli/commands/catalyze/gap-detector.js +359 -0
- package/dist/cli/commands/catalyze/gap-detector.js.map +1 -0
- package/dist/cli/commands/catalyze/index.d.ts +15 -0
- package/dist/cli/commands/catalyze/index.d.ts.map +1 -0
- package/dist/cli/commands/catalyze/index.js +149 -0
- package/dist/cli/commands/catalyze/index.js.map +1 -0
- package/dist/cli/commands/catalyze/report-generator.d.ts +17 -0
- package/dist/cli/commands/catalyze/report-generator.d.ts.map +1 -0
- package/dist/cli/commands/catalyze/report-generator.js +290 -0
- package/dist/cli/commands/catalyze/report-generator.js.map +1 -0
- package/dist/cli/commands/catalyze/stack-analyzer.d.ts +6 -0
- package/dist/cli/commands/catalyze/stack-analyzer.d.ts.map +1 -0
- package/dist/cli/commands/catalyze/stack-analyzer.js +267 -0
- package/dist/cli/commands/catalyze/stack-analyzer.js.map +1 -0
- package/dist/cli/commands/catalyze/types.d.ts +40 -0
- package/dist/cli/commands/catalyze/types.d.ts.map +1 -0
- package/dist/cli/commands/catalyze/types.js +2 -0
- package/dist/cli/commands/catalyze/types.js.map +1 -0
- package/dist/cli/commands/init/agents.d.ts.map +1 -1
- package/dist/cli/commands/init/agents.js +9 -0
- package/dist/cli/commands/init/agents.js.map +1 -1
- package/dist/cli/commands/init/claude-hooks.d.ts.map +1 -1
- package/dist/cli/commands/init/claude-hooks.js +27 -0
- package/dist/cli/commands/init/claude-hooks.js.map +1 -1
- package/dist/cli/commands/init/commands.d.ts.map +1 -1
- package/dist/cli/commands/init/commands.js +9 -0
- package/dist/cli/commands/init/commands.js.map +1 -1
- package/dist/cli/commands/init/discord.d.ts +21 -0
- package/dist/cli/commands/init/discord.d.ts.map +1 -0
- package/dist/cli/commands/init/discord.js +87 -0
- package/dist/cli/commands/init/discord.js.map +1 -0
- package/dist/cli/commands/init/github.d.ts +13 -0
- package/dist/cli/commands/init/github.d.ts.map +1 -0
- package/dist/cli/commands/init/github.js +81 -0
- package/dist/cli/commands/init/github.js.map +1 -0
- package/dist/cli/commands/init/index.d.ts.map +1 -1
- package/dist/cli/commands/init/index.js +72 -17
- package/dist/cli/commands/init/index.js.map +1 -1
- package/dist/cli/commands/init/profiles.d.ts +39 -0
- package/dist/cli/commands/init/profiles.d.ts.map +1 -0
- package/dist/cli/commands/init/profiles.js +132 -0
- package/dist/cli/commands/init/profiles.js.map +1 -0
- package/dist/cli/index.js +27 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/gateway/native-tools.d.ts.map +1 -1
- package/dist/gateway/native-tools.js +63 -0
- package/dist/gateway/native-tools.js.map +1 -1
- package/dist/pm/discord-notifier.d.ts +52 -0
- package/dist/pm/discord-notifier.d.ts.map +1 -0
- package/dist/pm/discord-notifier.js +122 -0
- package/dist/pm/discord-notifier.js.map +1 -0
- package/dist/pm/github-bridge.d.ts +35 -0
- package/dist/pm/github-bridge.d.ts.map +1 -1
- package/dist/pm/github-bridge.js +185 -0
- package/dist/pm/github-bridge.js.map +1 -1
- package/dist/pm/types.d.ts +7 -7
- package/hooks/ci-config-protection.sh +84 -0
- package/hooks/file-size-guard.sh +64 -0
- package/hooks/git-config-guard.sh +81 -0
- package/hooks/import-guard.sh +99 -0
- package/hooks/network-exfil-guard.sh +118 -0
- package/hooks/output-validation.sh +101 -0
- package/hooks/rate-limit-guard.sh +75 -0
- package/hooks/symlink-guard.sh +96 -0
- package/package.json +1 -1
- package/profiles/astro/README.md +44 -0
- package/profiles/astro/agents.txt +3 -0
- package/profiles/astro/gates.yaml +15 -0
- package/profiles/astro/hooks/astro-ssr-guard.sh +73 -0
- package/profiles/drupal/README.md +53 -0
- package/profiles/drupal/agents.txt +4 -0
- package/profiles/drupal/gates.yaml +15 -0
- package/profiles/drupal/hooks/drupal-coding-standards.sh +70 -0
- package/profiles/drupal/hooks/hook-update-guard.sh +65 -0
- package/profiles/lit-wc/README.md +48 -0
- package/profiles/lit-wc/agents.txt +4 -0
- package/profiles/lit-wc/gates.yaml +15 -0
- package/profiles/lit-wc/hooks/cem-integrity-gate.sh +48 -0
- package/profiles/lit-wc/hooks/shadow-dom-guard.sh +76 -0
- package/profiles/nextjs/README.md +44 -0
- package/profiles/nextjs/agents.txt +4 -0
- package/profiles/nextjs/gates.yaml +15 -0
- package/profiles/nextjs/hooks/server-component-drift.sh +73 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# profiles/nextjs/hooks/server-component-drift.sh
|
|
3
|
+
# PostToolUse hook for Write — detects server component drift in Next.js App Router.
|
|
4
|
+
# Warns on client-only hooks in server components, and dangerouslySetInnerHTML.
|
|
5
|
+
# Advisory only — exits 0 after printing warnings.
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
HOOK_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
10
|
+
LIB="$HOOK_DIR/../../../hooks/_lib/common.sh"
|
|
11
|
+
if [[ -f "$LIB" ]]; then
|
|
12
|
+
source "$LIB"
|
|
13
|
+
check_halt
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
INPUT=$(cat)
|
|
17
|
+
TOOL_NAME=$(printf '%s' "$INPUT" | grep -o '"tool_name":"[^"]*"' | head -1 | cut -d'"' -f4 2>/dev/null || echo "")
|
|
18
|
+
FILE_PATH=$(printf '%s' "$INPUT" | grep -o '"path":"[^"]*"' | head -1 | cut -d'"' -f4 2>/dev/null || echo "")
|
|
19
|
+
|
|
20
|
+
if [[ "$TOOL_NAME" != "Write" && "$TOOL_NAME" != "Edit" ]]; then
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Only target .tsx and .ts files
|
|
25
|
+
if [[ -z "$FILE_PATH" ]]; then
|
|
26
|
+
exit 0
|
|
27
|
+
fi
|
|
28
|
+
case "$FILE_PATH" in
|
|
29
|
+
*.tsx|*.ts) ;;
|
|
30
|
+
*) exit 0 ;;
|
|
31
|
+
esac
|
|
32
|
+
|
|
33
|
+
if [[ ! -f "$FILE_PATH" ]]; then
|
|
34
|
+
exit 0
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
CONTENT=$(cat "$FILE_PATH" 2>/dev/null || echo "")
|
|
38
|
+
WARNINGS=()
|
|
39
|
+
|
|
40
|
+
# Check 1: Client hooks in files without 'use client' directive
|
|
41
|
+
HAS_USE_CLIENT=0
|
|
42
|
+
if printf '%s' "$CONTENT" | head -3 | grep -qE "^['\"]use client['\"]"; then
|
|
43
|
+
HAS_USE_CLIENT=1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
if [[ $HAS_USE_CLIENT -eq 0 ]]; then
|
|
47
|
+
if printf '%s' "$CONTENT" | grep -qE '\b(useState|useEffect|useContext|useReducer|useCallback|useMemo|useRef|useTransition|useDeferredValue|useId)\s*[(<(]'; then
|
|
48
|
+
WARNINGS+=("NEXTJS SERVER COMPONENT: React hook (useState/useEffect/etc.) found in file without 'use client' directive at the top. Either add '\"use client\"' as the first line, or move client-side logic to a child component.")
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Check 2: dangerouslySetInnerHTML anywhere
|
|
53
|
+
if printf '%s' "$CONTENT" | grep -qE 'dangerouslySetInnerHTML'; then
|
|
54
|
+
WARNINGS+=("NEXTJS SECURITY: 'dangerouslySetInnerHTML' detected. This is an XSS risk unless the content is explicitly sanitized. If needed, use a sanitization library like DOMPurify and document why this is safe.")
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# Check 3: 'use client' in a file that only does data fetching (likely unnecessary)
|
|
58
|
+
if [[ $HAS_USE_CLIENT -eq 1 ]]; then
|
|
59
|
+
if printf '%s' "$CONTENT" | grep -qE '\b(fetch|prisma\.|db\.|supabase\.|sql`|pool\.query)\b' && \
|
|
60
|
+
! printf '%s' "$CONTENT" | grep -qE '\b(useState|useEffect|onClick|onChange|onSubmit)\b'; then
|
|
61
|
+
WARNINGS+=("NEXTJS SERVER COMPONENT: 'use client' is declared but this file appears to only do data fetching with no interactive UI. Consider removing 'use client' and using a Server Component — this avoids sending data-fetching code to the browser.")
|
|
62
|
+
fi
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
if [[ ${#WARNINGS[@]} -gt 0 ]]; then
|
|
66
|
+
printf '\n[server-component-drift] Next.js advisory warnings for %s:\n' "$FILE_PATH" >&2
|
|
67
|
+
for warning in "${WARNINGS[@]}"; do
|
|
68
|
+
printf ' WARN: %s\n' "$warning" >&2
|
|
69
|
+
done
|
|
70
|
+
printf '\n' >&2
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
exit 0
|