@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.
Files changed (96) hide show
  1. package/agents/ai-platforms/ai-deepseek-specialist.md +83 -0
  2. package/agents/ai-platforms/ai-elevenlabs-specialist.md +75 -0
  3. package/agents/ai-platforms/ai-grok-specialist.md +71 -0
  4. package/agents/ai-platforms/ai-local-llm-specialist.md +95 -0
  5. package/agents/ai-platforms/ai-video-ai-specialist.md +103 -0
  6. package/agents/engineering/cto-advisory.md +44 -0
  7. package/agents/engineering/qa-engineer-automation.md +77 -0
  8. package/agents/engineering/qa-engineer-manual.md +48 -0
  9. package/agents/engineering/qa-lead.md +124 -0
  10. package/agents/engineering/security-engineer-appsec.md +47 -0
  11. package/agents/engineering/security-engineer-compliance.md +47 -0
  12. package/dist/cli/commands/catalyze/gap-detector.d.ts +6 -0
  13. package/dist/cli/commands/catalyze/gap-detector.d.ts.map +1 -0
  14. package/dist/cli/commands/catalyze/gap-detector.js +359 -0
  15. package/dist/cli/commands/catalyze/gap-detector.js.map +1 -0
  16. package/dist/cli/commands/catalyze/index.d.ts +15 -0
  17. package/dist/cli/commands/catalyze/index.d.ts.map +1 -0
  18. package/dist/cli/commands/catalyze/index.js +149 -0
  19. package/dist/cli/commands/catalyze/index.js.map +1 -0
  20. package/dist/cli/commands/catalyze/report-generator.d.ts +17 -0
  21. package/dist/cli/commands/catalyze/report-generator.d.ts.map +1 -0
  22. package/dist/cli/commands/catalyze/report-generator.js +290 -0
  23. package/dist/cli/commands/catalyze/report-generator.js.map +1 -0
  24. package/dist/cli/commands/catalyze/stack-analyzer.d.ts +6 -0
  25. package/dist/cli/commands/catalyze/stack-analyzer.d.ts.map +1 -0
  26. package/dist/cli/commands/catalyze/stack-analyzer.js +267 -0
  27. package/dist/cli/commands/catalyze/stack-analyzer.js.map +1 -0
  28. package/dist/cli/commands/catalyze/types.d.ts +40 -0
  29. package/dist/cli/commands/catalyze/types.d.ts.map +1 -0
  30. package/dist/cli/commands/catalyze/types.js +2 -0
  31. package/dist/cli/commands/catalyze/types.js.map +1 -0
  32. package/dist/cli/commands/init/agents.d.ts.map +1 -1
  33. package/dist/cli/commands/init/agents.js +9 -0
  34. package/dist/cli/commands/init/agents.js.map +1 -1
  35. package/dist/cli/commands/init/claude-hooks.d.ts.map +1 -1
  36. package/dist/cli/commands/init/claude-hooks.js +27 -0
  37. package/dist/cli/commands/init/claude-hooks.js.map +1 -1
  38. package/dist/cli/commands/init/commands.d.ts.map +1 -1
  39. package/dist/cli/commands/init/commands.js +9 -0
  40. package/dist/cli/commands/init/commands.js.map +1 -1
  41. package/dist/cli/commands/init/discord.d.ts +21 -0
  42. package/dist/cli/commands/init/discord.d.ts.map +1 -0
  43. package/dist/cli/commands/init/discord.js +87 -0
  44. package/dist/cli/commands/init/discord.js.map +1 -0
  45. package/dist/cli/commands/init/github.d.ts +13 -0
  46. package/dist/cli/commands/init/github.d.ts.map +1 -0
  47. package/dist/cli/commands/init/github.js +81 -0
  48. package/dist/cli/commands/init/github.js.map +1 -0
  49. package/dist/cli/commands/init/index.d.ts.map +1 -1
  50. package/dist/cli/commands/init/index.js +72 -17
  51. package/dist/cli/commands/init/index.js.map +1 -1
  52. package/dist/cli/commands/init/profiles.d.ts +39 -0
  53. package/dist/cli/commands/init/profiles.d.ts.map +1 -0
  54. package/dist/cli/commands/init/profiles.js +132 -0
  55. package/dist/cli/commands/init/profiles.js.map +1 -0
  56. package/dist/cli/index.js +27 -1
  57. package/dist/cli/index.js.map +1 -1
  58. package/dist/gateway/native-tools.d.ts.map +1 -1
  59. package/dist/gateway/native-tools.js +63 -0
  60. package/dist/gateway/native-tools.js.map +1 -1
  61. package/dist/pm/discord-notifier.d.ts +52 -0
  62. package/dist/pm/discord-notifier.d.ts.map +1 -0
  63. package/dist/pm/discord-notifier.js +122 -0
  64. package/dist/pm/discord-notifier.js.map +1 -0
  65. package/dist/pm/github-bridge.d.ts +35 -0
  66. package/dist/pm/github-bridge.d.ts.map +1 -1
  67. package/dist/pm/github-bridge.js +185 -0
  68. package/dist/pm/github-bridge.js.map +1 -1
  69. package/dist/pm/types.d.ts +7 -7
  70. package/hooks/ci-config-protection.sh +84 -0
  71. package/hooks/file-size-guard.sh +64 -0
  72. package/hooks/git-config-guard.sh +81 -0
  73. package/hooks/import-guard.sh +99 -0
  74. package/hooks/network-exfil-guard.sh +118 -0
  75. package/hooks/output-validation.sh +101 -0
  76. package/hooks/rate-limit-guard.sh +75 -0
  77. package/hooks/symlink-guard.sh +96 -0
  78. package/package.json +1 -1
  79. package/profiles/astro/README.md +44 -0
  80. package/profiles/astro/agents.txt +3 -0
  81. package/profiles/astro/gates.yaml +15 -0
  82. package/profiles/astro/hooks/astro-ssr-guard.sh +73 -0
  83. package/profiles/drupal/README.md +53 -0
  84. package/profiles/drupal/agents.txt +4 -0
  85. package/profiles/drupal/gates.yaml +15 -0
  86. package/profiles/drupal/hooks/drupal-coding-standards.sh +70 -0
  87. package/profiles/drupal/hooks/hook-update-guard.sh +65 -0
  88. package/profiles/lit-wc/README.md +48 -0
  89. package/profiles/lit-wc/agents.txt +4 -0
  90. package/profiles/lit-wc/gates.yaml +15 -0
  91. package/profiles/lit-wc/hooks/cem-integrity-gate.sh +48 -0
  92. package/profiles/lit-wc/hooks/shadow-dom-guard.sh +76 -0
  93. package/profiles/nextjs/README.md +44 -0
  94. package/profiles/nextjs/agents.txt +4 -0
  95. package/profiles/nextjs/gates.yaml +15 -0
  96. 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