Non-customers attempting to use customer-only features (troubleshoot,
billing, asset) now see a friendly explanation before being handed off
to the onboarding agent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Non-customers (no assets and no wallet balance) are redirected to
onboarding agent. Customer check queries servers, domains, DDoS/VPN
services, and wallet balance. Admins bypass the check. On DB error,
defaults to allowing access to prevent false lockouts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add queue() handler in index.ts for WORK_QUEUE processing
- Add consumers/queue-dispatcher.ts with tag-based routing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- billing-agent: auto-create wallet if not exists, include deposit
account info when balance is 0
- wallet-tool: auto-create wallet on balance check instead of error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add chatId/messageId to AgentToolContext
- Update BaseAgent.processConsultation to accept meta parameter
- Update agent-registry routeToActiveAgent to forward meta
- Fix session end detection to check __SESSION_END__ in finalResponse
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SK uses different error than KT/LG: "socket disconnected before secure
TLS connection was established" instead of ECONNRESET. Now all 3 Korean
ISPs (KT, LG U+, SK) are correctly detected.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No SK eyeball probes available in Globalping, so summary now notes
"SK Broadband 등 다른 통신사에서도 동일하게 차단되었을 것으로 추정"
when KT/LG SNI blocking is detected.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split HTTP measurements: general probes for performance + eyeball-only
probes (KT, LG U+) for SNI blocking detection. Ensures ISP probes are
always included regardless of random probe selection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Korean ISPs use SNI-based DPI (not DNS hijacking) to block sites.
TCP DNS queries to ISP servers from Cloudflare Workers returned real IPs
even for blocked domains. Now uses Globalping eyeball probes (KT, LG U+)
to detect ECONNRESET on HTTPS — the signature of SNI-based blocking.
Verified: pornhub.com correctly detected as blocked by Korea Telecom.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrates Globalping API to measure ping and HTTP response times from
Korean probes (Seoul, Chuncheon, Daejeon). Results include per-probe
ping stats and HTTP timing breakdown (DNS, TCP, TLS, TTFB).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Import connect from cloudflare:sockets instead of globalThis
- Fix socket.opened / readable / writable API usage
- Skip TCP test for HTTP ports (80/443) since fetch HEAD already covers
them; only test user-specified non-HTTP ports (e.g. SSH, DB)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of regex patterns to detect user intent, use a lightweight AI
call (classifyIntent) that categorizes messages into troubleshoot,
onboarding, billing, asset, or general. This catches ambiguous
expressions like "example.com 좀 봐주세요" that patterns would miss.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DNS lookup (DoH via Cloudflare/Google), Korean ISP block detection
(KT/LG/SK via TCP DNS), HTTP/HTTPS check, and TCP port test — all
run in parallel with per-check timeouts. Integrated as diagnose_domain
tool in troubleshoot-agent with updated patterns for network keywords.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
routeToActiveAgent now returns {response, agentName} so the message
handler can reliably determine which agent handled the request. Feedback
is only prompted for troubleshoot and onboarding agents, not billing
or asset single-shot agents.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Billing and asset agents (single-shot) no longer trigger the star rating
feedback prompt after every response. Feedback is now only requested
after troubleshoot/onboarding sessions or when the conversation had 3+
exchanges in the last hour.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, single-shot agents (billing, asset) returned raw JSON tool
results directly to users. Now tool results are sent back to the AI for
natural language synthesis, with graceful fallback to raw results if the
synthesis call fails.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace placeholder IDs with provisioned Cloudflare resource IDs
for D1 database, RATE_LIMIT_KV, SESSION_KV, and CACHE_KV.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement hybrid knowledge search using Cloudflare Vectorize + Workers AI
embeddings (bge-base-en-v1.5, 768d) merged with existing D1 LIKE queries,
with graceful degradation when Vectorize is unavailable. Add admin API
endpoints for batch/single article indexing.
Add 4 proactive notification cron jobs: server status changes, deposit
confirmation/rejection alerts, pending payment reminders (1h+), and bank
deposit matching notifications — all with DB-column-based deduplication.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>