thevoidforge 21.0.11 → 21.0.13

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 (108) hide show
  1. package/dist/.claude/commands/ai.md +69 -0
  2. package/dist/.claude/commands/architect.md +121 -0
  3. package/dist/.claude/commands/assemble.md +201 -0
  4. package/dist/.claude/commands/assess.md +75 -0
  5. package/dist/.claude/commands/blueprint.md +135 -0
  6. package/dist/.claude/commands/build.md +116 -0
  7. package/dist/.claude/commands/campaign.md +201 -0
  8. package/dist/.claude/commands/cultivation.md +166 -0
  9. package/dist/.claude/commands/current.md +128 -0
  10. package/dist/.claude/commands/dangerroom.md +74 -0
  11. package/dist/.claude/commands/debrief.md +178 -0
  12. package/dist/.claude/commands/deploy.md +99 -0
  13. package/dist/.claude/commands/devops.md +143 -0
  14. package/dist/.claude/commands/gauntlet.md +140 -0
  15. package/dist/.claude/commands/git.md +104 -0
  16. package/dist/.claude/commands/grow.md +146 -0
  17. package/dist/.claude/commands/imagine.md +126 -0
  18. package/dist/.claude/commands/portfolio.md +50 -0
  19. package/dist/.claude/commands/prd.md +113 -0
  20. package/dist/.claude/commands/qa.md +107 -0
  21. package/dist/.claude/commands/review.md +151 -0
  22. package/dist/.claude/commands/security.md +100 -0
  23. package/dist/.claude/commands/test.md +96 -0
  24. package/dist/.claude/commands/thumper.md +116 -0
  25. package/dist/.claude/commands/treasury.md +100 -0
  26. package/dist/.claude/commands/ux.md +118 -0
  27. package/dist/.claude/commands/vault.md +189 -0
  28. package/dist/.claude/commands/void.md +108 -0
  29. package/dist/CHANGELOG.md +1918 -0
  30. package/dist/CLAUDE.md +250 -0
  31. package/dist/HOLOCRON.md +856 -0
  32. package/dist/VERSION.md +123 -0
  33. package/dist/docs/NAMING_REGISTRY.md +478 -0
  34. package/dist/docs/methods/AI_INTELLIGENCE.md +276 -0
  35. package/dist/docs/methods/ASSEMBLER.md +142 -0
  36. package/dist/docs/methods/BACKEND_ENGINEER.md +165 -0
  37. package/dist/docs/methods/BUILD_JOURNAL.md +185 -0
  38. package/dist/docs/methods/BUILD_PROTOCOL.md +426 -0
  39. package/dist/docs/methods/CAMPAIGN.md +568 -0
  40. package/dist/docs/methods/CONTEXT_MANAGEMENT.md +189 -0
  41. package/dist/docs/methods/DEEP_CURRENT.md +184 -0
  42. package/dist/docs/methods/DEVOPS_ENGINEER.md +295 -0
  43. package/dist/docs/methods/FIELD_MEDIC.md +261 -0
  44. package/dist/docs/methods/FORGE_ARTIST.md +108 -0
  45. package/dist/docs/methods/FORGE_KEEPER.md +268 -0
  46. package/dist/docs/methods/GAUNTLET.md +344 -0
  47. package/dist/docs/methods/GROWTH_STRATEGIST.md +466 -0
  48. package/dist/docs/methods/HEARTBEAT.md +168 -0
  49. package/dist/docs/methods/MCP_INTEGRATION.md +139 -0
  50. package/dist/docs/methods/MUSTER.md +148 -0
  51. package/dist/docs/methods/PRD_GENERATOR.md +186 -0
  52. package/dist/docs/methods/PRODUCT_DESIGN_FRONTEND.md +250 -0
  53. package/dist/docs/methods/QA_ENGINEER.md +337 -0
  54. package/dist/docs/methods/RELEASE_MANAGER.md +145 -0
  55. package/dist/docs/methods/SECURITY_AUDITOR.md +320 -0
  56. package/dist/docs/methods/SUB_AGENTS.md +335 -0
  57. package/dist/docs/methods/SYSTEMS_ARCHITECT.md +171 -0
  58. package/dist/docs/methods/TESTING.md +359 -0
  59. package/dist/docs/methods/THUMPER.md +175 -0
  60. package/dist/docs/methods/TIME_VAULT.md +120 -0
  61. package/dist/docs/methods/TREASURY.md +184 -0
  62. package/dist/docs/methods/TROUBLESHOOTING.md +265 -0
  63. package/dist/docs/patterns/README.md +52 -0
  64. package/dist/docs/patterns/ad-billing-adapter.ts +537 -0
  65. package/dist/docs/patterns/ad-platform-adapter.ts +421 -0
  66. package/dist/docs/patterns/ai-classifier.ts +195 -0
  67. package/dist/docs/patterns/ai-eval.ts +272 -0
  68. package/dist/docs/patterns/ai-orchestrator.ts +341 -0
  69. package/dist/docs/patterns/ai-router.ts +194 -0
  70. package/dist/docs/patterns/ai-tool-schema.ts +237 -0
  71. package/dist/docs/patterns/api-route.ts +241 -0
  72. package/dist/docs/patterns/backtest-engine.ts +499 -0
  73. package/dist/docs/patterns/browser-review.ts +292 -0
  74. package/dist/docs/patterns/combobox.tsx +300 -0
  75. package/dist/docs/patterns/component.tsx +262 -0
  76. package/dist/docs/patterns/daemon-process.ts +338 -0
  77. package/dist/docs/patterns/data-pipeline.ts +297 -0
  78. package/dist/docs/patterns/database-migration.ts +466 -0
  79. package/dist/docs/patterns/e2e-test.ts +629 -0
  80. package/dist/docs/patterns/error-handling.ts +312 -0
  81. package/dist/docs/patterns/execution-safety.ts +601 -0
  82. package/dist/docs/patterns/financial-transaction.ts +342 -0
  83. package/dist/docs/patterns/funding-plan.ts +462 -0
  84. package/dist/docs/patterns/game-entity.ts +137 -0
  85. package/dist/docs/patterns/game-loop.ts +113 -0
  86. package/dist/docs/patterns/game-state.ts +143 -0
  87. package/dist/docs/patterns/job-queue.ts +225 -0
  88. package/dist/docs/patterns/kongo-integration.ts +164 -0
  89. package/dist/docs/patterns/middleware.ts +363 -0
  90. package/dist/docs/patterns/mobile-screen.tsx +139 -0
  91. package/dist/docs/patterns/mobile-service.ts +167 -0
  92. package/dist/docs/patterns/multi-tenant.ts +382 -0
  93. package/dist/docs/patterns/oauth-token-lifecycle.ts +223 -0
  94. package/dist/docs/patterns/outbound-rate-limiter.ts +260 -0
  95. package/dist/docs/patterns/prompt-template.ts +195 -0
  96. package/dist/docs/patterns/revenue-source-adapter.ts +311 -0
  97. package/dist/docs/patterns/service.ts +224 -0
  98. package/dist/docs/patterns/sse-endpoint.ts +118 -0
  99. package/dist/docs/patterns/stablecoin-adapter.ts +511 -0
  100. package/dist/docs/patterns/third-party-script.ts +68 -0
  101. package/dist/scripts/thumper/gom-jabbar.sh +241 -0
  102. package/dist/scripts/thumper/relay.sh +610 -0
  103. package/dist/scripts/thumper/scan.sh +359 -0
  104. package/dist/scripts/thumper/thumper.sh +190 -0
  105. package/dist/scripts/thumper/water-rings.sh +76 -0
  106. package/dist/wizard/ui/index.html +1 -1
  107. package/package.json +1 -1
  108. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,241 @@
1
+ #!/bin/bash
2
+ # gom-jabbar.sh — The Test of Humanity
3
+ # Authentication protocol for Chani's worm rider
4
+ # Sourced by relay.sh — not run standalone
5
+ #
6
+ # "Put your hand in the box."
7
+
8
+ GOM_JABBAR_FILE="$CONFIG_DIR/.gom-jabbar"
9
+ GOM_JABBAR_IDLE_TIMEOUT=3600 # 60 minutes
10
+ GOM_JABBAR_MAX_ATTEMPTS=3
11
+ GOM_JABBAR_LOCKOUT=300 # 5 minutes
12
+ GOM_JABBAR_DELETE_RETRIES=3
13
+
14
+ # ─── Hashing ───────────────────────────────────────────────────
15
+
16
+ _gom_jabbar_hash() {
17
+ local passphrase="$1"
18
+ # Salt derived from bot token hash — unique per bot installation
19
+ local salt="gom-jabbar-$(printf '%s' "$BOT_TOKEN" | openssl dgst -sha256 -hex 2>/dev/null | awk '{print substr($NF,1,16)}')"
20
+
21
+ local result=""
22
+ if command -v python3 >/dev/null 2>&1; then
23
+ # PBKDF2 with 100k iterations — brute-force resistant (ADR-003)
24
+ result=$(python3 -c "
25
+ import hashlib, sys
26
+ h = hashlib.pbkdf2_hmac('sha256', sys.argv[1].encode(), sys.argv[2].encode(), 100000)
27
+ print(h.hex())
28
+ " "$passphrase" "$salt" 2>/dev/null || echo "")
29
+ elif command -v openssl >/dev/null 2>&1; then
30
+ # Fallback: HMAC-SHA256 (less brute-force resistant — warn user)
31
+ log "WARNING: python3 unavailable — using HMAC-SHA256 (install python3 for stronger hashing)"
32
+ result=$(printf '%s' "$passphrase" | openssl dgst -sha256 -hmac "$salt" -hex 2>/dev/null | awk '{print $NF}')
33
+ fi
34
+
35
+ # SECURITY: empty hash must never be accepted — prevents auth bypass
36
+ if [[ -z "$result" ]]; then
37
+ log "FATAL: Cannot compute passphrase hash. Install python3 or openssl."
38
+ send_telegram "❌ Cannot secure The Voice — python3 or openssl required."
39
+ echo "HASH_FAILED"
40
+ return
41
+ fi
42
+ echo "$result"
43
+ }
44
+
45
+ # ─── State Management ─────────────────────────────────────────
46
+
47
+ _gom_jabbar_read_state() {
48
+ if [[ -f "$GOM_JABBAR_FILE" ]]; then
49
+ source "$GOM_JABBAR_FILE"
50
+ else
51
+ GJ_HASH=""
52
+ GJ_LAST_ACTIVITY=0
53
+ GJ_STATE="PENDING"
54
+ GJ_FAILED=0
55
+ GJ_LOCK_UNTIL=0
56
+ fi
57
+ }
58
+
59
+ _gom_jabbar_write_state() {
60
+ # Atomic write: tmp file then rename (prevents corruption on crash)
61
+ (
62
+ umask 077
63
+ {
64
+ printf 'GJ_HASH=%q\n' "${GJ_HASH:-}"
65
+ printf 'GJ_LAST_ACTIVITY=%q\n' "${GJ_LAST_ACTIVITY:-0}"
66
+ printf 'GJ_STATE=%q\n' "${GJ_STATE:-PENDING}"
67
+ printf 'GJ_FAILED=%q\n' "${GJ_FAILED:-0}"
68
+ printf 'GJ_LOCK_UNTIL=%q\n' "${GJ_LOCK_UNTIL:-0}"
69
+ } > "${GOM_JABBAR_FILE}.tmp"
70
+ )
71
+ mv "${GOM_JABBAR_FILE}.tmp" "$GOM_JABBAR_FILE"
72
+ }
73
+
74
+ # ─── Protocol Functions ───────────────────────────────────────
75
+
76
+ gom_jabbar_init() {
77
+ _gom_jabbar_read_state
78
+
79
+ if [[ -z "$GJ_HASH" ]]; then
80
+ # First time — The Choosing
81
+ GJ_STATE="PENDING"
82
+ _gom_jabbar_write_state
83
+ send_telegram "$(printf '%s\n\n%s\n\n%s\n\n%s\n%s' \
84
+ '🔮 THE GOM JABBAR' \
85
+ 'You seek to command The Voice across the desert. First, you must prove you are human.' \
86
+ 'Choose a passphrase — any word or phrase you will remember.' \
87
+ 'Type it now in this chat.' \
88
+ 'It will be deleted from the conversation immediately.')"
89
+ fi
90
+ # If hash exists, relay loop handles idle checks via gom_jabbar_verify_active
91
+ }
92
+
93
+ gom_jabbar_verify_active() {
94
+ _gom_jabbar_read_state
95
+
96
+ local now
97
+ now=$(date +%s)
98
+
99
+ # Check lockout
100
+ if [[ "$GJ_STATE" == "LOCKED" ]]; then
101
+ if [[ $now -lt ${GJ_LOCK_UNTIL:-0} ]]; then
102
+ echo "LOCKED"
103
+ return
104
+ fi
105
+ # Lockout expired — move to challenge
106
+ GJ_STATE="CHALLENGE"
107
+ GJ_FAILED=0
108
+ _gom_jabbar_write_state
109
+ fi
110
+
111
+ # Pending (first time, awaiting passphrase)
112
+ if [[ "$GJ_STATE" == "PENDING" ]]; then
113
+ echo "PENDING"
114
+ return
115
+ fi
116
+
117
+ # Already in challenge mode
118
+ if [[ "$GJ_STATE" == "CHALLENGE" ]]; then
119
+ echo "CHALLENGE"
120
+ return
121
+ fi
122
+
123
+ # Authenticated — check idle timeout
124
+ if [[ "$GJ_STATE" == "AUTHENTICATED" ]]; then
125
+ local elapsed=$((now - ${GJ_LAST_ACTIVITY:-0}))
126
+ if [[ $elapsed -gt $GOM_JABBAR_IDLE_TIMEOUT ]]; then
127
+ GJ_STATE="CHALLENGE"
128
+ _gom_jabbar_write_state
129
+ send_telegram "$(printf '%s\n\n%s\n%s' \
130
+ '⏳ Session idle for 60+ minutes. Re-authentication required.' \
131
+ '' \
132
+ 'Type your passphrase to continue.')"
133
+ echo "CHALLENGE"
134
+ return
135
+ fi
136
+ echo "AUTHENTICATED"
137
+ return
138
+ fi
139
+
140
+ echo "PENDING"
141
+ }
142
+
143
+ gom_jabbar_check() {
144
+ local passphrase="$1"
145
+ _gom_jabbar_read_state
146
+
147
+ local hash
148
+ hash=$(_gom_jabbar_hash "$passphrase")
149
+
150
+ # Reject if hashing failed (prevents empty-hash-equals-empty-hash bypass)
151
+ if [[ -z "$hash" ]] || [[ "$hash" == "HASH_FAILED" ]]; then
152
+ return 1
153
+ fi
154
+
155
+ if [[ "$GJ_STATE" == "PENDING" ]] && [[ -z "$GJ_HASH" ]]; then
156
+ # First time — store the hash (The Choosing)
157
+ GJ_HASH="$hash"
158
+ GJ_STATE="AUTHENTICATED"
159
+ GJ_LAST_ACTIVITY=$(date +%s)
160
+ GJ_FAILED=0
161
+ _gom_jabbar_write_state
162
+ return 0
163
+ fi
164
+
165
+ if [[ "$hash" == "$GJ_HASH" ]]; then
166
+ # Correct passphrase
167
+ GJ_STATE="AUTHENTICATED"
168
+ GJ_LAST_ACTIVITY=$(date +%s)
169
+ GJ_FAILED=0
170
+ _gom_jabbar_write_state
171
+ return 0
172
+ fi
173
+
174
+ return 1
175
+ }
176
+
177
+ gom_jabbar_fail() {
178
+ _gom_jabbar_read_state
179
+
180
+ GJ_FAILED=$((${GJ_FAILED:-0} + 1))
181
+
182
+ if [[ $GJ_FAILED -ge $GOM_JABBAR_MAX_ATTEMPTS ]]; then
183
+ local now
184
+ now=$(date +%s)
185
+ GJ_STATE="LOCKED"
186
+ GJ_LOCK_UNTIL=$((now + GOM_JABBAR_LOCKOUT))
187
+ _gom_jabbar_write_state
188
+ local unlock_time
189
+ unlock_time=$(date -u -r "$GJ_LOCK_UNTIL" +"%H:%M UTC" 2>/dev/null || \
190
+ date -u -d "@$GJ_LOCK_UNTIL" +"%H:%M UTC" 2>/dev/null || \
191
+ echo "soon")
192
+ send_telegram "$(printf '%s\n\n%s' \
193
+ '🔒 Too many failed attempts. Locked for 5 minutes.' \
194
+ "Locked until ${unlock_time}.")"
195
+ log "LOCKED: $GJ_FAILED failed attempts. Locked until $GJ_LOCK_UNTIL"
196
+ else
197
+ _gom_jabbar_write_state
198
+ send_telegram "$(printf '%s' \
199
+ "⚠️ Incorrect passphrase. (Attempt ${GJ_FAILED} of ${GOM_JABBAR_MAX_ATTEMPTS})")"
200
+ log "AUTH FAILED: attempt $GJ_FAILED of $GOM_JABBAR_MAX_ATTEMPTS"
201
+ fi
202
+ }
203
+
204
+ gom_jabbar_touch() {
205
+ GJ_LAST_ACTIVITY=$(date +%s)
206
+ _gom_jabbar_write_state
207
+ }
208
+
209
+ gom_jabbar_delete_message() {
210
+ local msg_id="$1"
211
+ local attempt
212
+ for attempt in $(seq 1 $GOM_JABBAR_DELETE_RETRIES); do
213
+ local result
214
+ result=$(curl -s --connect-timeout 5 --max-time 10 \
215
+ -X POST \
216
+ -d chat_id="$CHAT_ID" \
217
+ -d message_id="$msg_id" \
218
+ "${API_BASE}/deleteMessage" 2>/dev/null || echo "")
219
+
220
+ if echo "$result" | grep -q '"ok":true'; then
221
+ log "Message $msg_id erased from the sands"
222
+ return 0
223
+ fi
224
+ sleep 1
225
+ done
226
+
227
+ # Deletion failed — invalidate session for safety (ADR-004)
228
+ log "SECURITY: Failed to delete message $msg_id. Invalidating session."
229
+ GJ_STATE="PENDING"
230
+ GJ_HASH=""
231
+ _gom_jabbar_write_state
232
+ send_telegram "$(printf '%s\n%s\n\n%s' \
233
+ '⚠️ Could not erase your word from the sands.' \
234
+ 'For safety, the session is invalidated.' \
235
+ 'Choose a new word of passage.')"
236
+ return 1
237
+ }
238
+
239
+ gom_jabbar_cleanup() {
240
+ rm -f "$GOM_JABBAR_FILE"
241
+ }