autoreg-skills-max: initial public release (restored, redacted, hardened)
This commit is contained in:
64
skills/ai-provider-autoreg/references/vani-ai-autoreg.md
Normal file
64
skills/ai-provider-autoreg/references/vani-ai-autoreg.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Vani.ai (c.vani.ai) autoreg — cloakbrowser + voidash, NATIVE Turnstile only
|
||||
|
||||
Дата: 2026-10-12. Скрипты: `C:/Users/User/tmp/vani_autoreg/` (vani_reg.py, build_pool.py).
|
||||
|
||||
## GATEWAY + ПОЛНЫЙ РЕВЕРС (12.10)
|
||||
|
||||
- Gateway: tmp/vani_autoreg/vanigw.py :8500 (stdlib, Python311) — OpenAI-compat: /v1/chat/completions (37 моделей, stream SSE), /v1/images/generations (b64+url /media/{gid}), /v1/audio/speech (mp3), /v1/videos/generations + GET /v1/videos/{id}, /v1/research + GET /v1/research/{id}?format=md|pdf|docx|html|pptx, дашборд /. Пул 31 акк из vani_accounts.jsonl, ротация по 429/weekly_limit, авто-refresh cookie (GET c.vani.ai/), state vanigw_state.json. Репа: github.com/gbonnet65923/vani-toolkit.
|
||||
- Direct generations: POST /api/chat/generations + Idempotency-Key (ОБЯЗАТЕЛЕН). kind=image (mode generate, variant 1024x1024; gpt-image-2.5 ~30%/нед, gemini-3.1-flash-image ~1-2%), kind=video (mode text_to_video, seedance-2.0-mini, duration_secs/ratio 16:9/variant 720p, ~2мин, 1/нед/акк), kind=audio (mode text_to_speech, inworld/realtime-tts-2, variant=Alex). Poll GET /api/chat/generations/{gid} → attachment_id → GET /api/chat/attachments/{id}/url = bytes.
|
||||
- Chat: POST /api/chat/stream {model, tool_execution:confirm, media_prompt_mode:enhance, conversation_id, reasoning_effort, vani_mode:standard, messages} — STRICT validation (лишние поля = 400). SSE: content.delta/usage/message.complete.
|
||||
- Deep research: POST /api/chat/research/v2 {conversation_id, query} → scoping → awaiting_answers (clarify.questions [{id,text,options[4]}]) → POST /v2/{jid}/answers {"skip": true} (ДЕКОДИРОВАНО — {answers:[]} = 400) → planning → awaiting_approval → POST /v2/{jid}/start → researching/writing/verifying (4-8мин) → succeeded + artifact_id → GET /api/artifacts/{aid}/export?format=md = чистый markdown с [[n]](url) цитатами.
|
||||
- Каталог моделей: GET /api/onboarding/guide?kind=all → cards[{model,kind,name,provider,required_plan,enabled}] (45 шт).
|
||||
- Tool flow из чата: POST /api/chat/tools/proposals {assistant_message_id, execution_mode} → POST /api/chat/tools/actions/{id}/confirm → generation_id/research_job_id.
|
||||
|
||||
## ПОЛНЫЙ КАТАЛОГ ТУЛЗ (13.10 — error-driven schema decode)
|
||||
|
||||
Все тулзы декодированы через перебор — отправляли POST с заведомо невалидными полями, сервер возвращал что не так ("Choose a model" → добавили model → 202).
|
||||
|
||||
| Тулза | Эндпоинт | Пейлоад | Результат |
|
||||
|---|---|---|---|
|
||||
| Web Search | POST /api/chat/tools/search | {query} | {results:[{source_id,title,url,domain}], retrieved_at} |
|
||||
| Voice TTS (ElevenLabs) | GET /api/chat/voice/speech/plan?message_id=X&voice=eleven-alicia → POST /api/chat/voice/speech | {message_id, voice, chunk: int, text_sha256} | mp3 blob, ~0.8% неделя |
|
||||
| Voice STT | POST /api/chat/voice/transcriptions | multipart file=*.webm | 415 на ВСЕХ форматах (mp3/wav/webm/pcm) — только браузерный MediaRecorder |
|
||||
| Tasks Scheduler | POST /api/tasks/draft {text} → POST /api/tasks {name,instructions,schedule} | {text:"Every morning at 9 summarize"} → {name,instructions,schedule:{kind:daily,time},next_run_at} | 201 created, free=1 scheduled/день, min_interval 1440мин |
|
||||
| Artifacts Document | POST /api/artifacts | {kind:"document", title, content:{markdown:"# Title"}} | 201 {artifact:{id,kind,title,preview}}, cap 20 |
|
||||
| Artifacts Slides | POST /api/artifacts | {kind:"slides", title, content:{slides:[{title,bullets}]}} | 201 slides |
|
||||
| Artifacts Design | POST /api/artifacts | kind=design — схема неизвестна | 400 invalid |
|
||||
| Export Artifact | GET /api/artifacts/{id}/export?format=md|pdf|docx|html|pptx | — | clean markdown/pdf |
|
||||
| Studio Generations | POST /api/studio/generations | {kind:"image", model:"openai/gpt-image-2.5", prompt} | 202 {generation:{id,status:queued}} — алиас на /api/chat/generations |
|
||||
| Code Sandbox | GET /api/sandbox/status | — | {code:{enabled:true,minutes_per_day:5,used_seconds_today}} — exec только через чат tool_execution:auto |
|
||||
| Memory | GET/POST/DELETE /api/memory/memories | — | CRUD memory |
|
||||
| Projects | GET /api/projects | — | items[] |
|
||||
| Skills Community | GET /api/skills/community* | — | 0/5 free skills |
|
||||
| Notifications | GET /api/notifications | — | working |
|
||||
|
||||
**Метод error-driven decode**: отправляешь POST с минимальным телом вида {prompt:"test"} → сервер возвращает "Choose image or video" → добавляешь kind → "Choose a model" → добавляешь model → 202. НЕ гадай полную схему — используй сервер как оракула. Работает на Next.js strict-валидации (zod): лишние поля = 400 "Unsupported field X", нехватка = 400 "Choose X" или "X is required".
|
||||
|
||||
## Протокол
|
||||
- Логин: email → magic link + 6-digit code на почту. Аккаунт создаётся при верификации.
|
||||
- Форма = React Server Action: POST /login?next=/chat, заголовки `Accept: text/x-component`, `next-action: 60a5b5a651168d4412eb32812099a2f1000fe56554` (signInWithMagicLink), поля FormData: email, turnstile_token, next.
|
||||
- Turnstile sitekey: `0x4AAAAAAFM_3cPV7Jg5kRlB` (в RSC flight-данных страницы, НЕ в бандлах). action=signup.
|
||||
- Auth = Supabase (ref `bfwynudfpppahxozcexw`), cookie `sb-bfwynudfpppahxozcexw-auth-token` = base64(`jwt,refresh_token`), httpOnly. Access JWT живёт ~1ч, refresh есть.
|
||||
|
||||
## КРИТИЧНО: 2captcha turnstile НЕ принимается
|
||||
Солвенный токен (2captcha method=turnstile, 12с, $0.003) → сервер отвечает 500 на raw POST и «Complete the security check» на server-action POST (siteverify hostname-binding, как terrapolis). ТОЛЬКО нативное решение в реальном браузере: cloakbrowser headless рендерит невидимый виджет (response-field:false) и токен сам появляется в `input[name=turnstile_token]` за ~5-60с. CDP-Chromium (browser_exec) — timeout виджета, не годится.
|
||||
|
||||
## Флоу vani_reg.py (Python311, PYTHONPATH="")
|
||||
1. voidash inbox: POST api.voidash.com/api/v1/inboxes {domain: voidash.bond} → address + session_key. voidash НЕ заблокирован у Vani.
|
||||
2. cloakbrowser → /login?next=/chat → Accept cookies → fill email → poll hidden input turnstile_token (>50 символов) → click «Email me a sign-in link or code».
|
||||
3. «Check your email» → poll voidash GET /messages (Bearer session_key) ~20-60с.
|
||||
4. Из письма: 6-цифровой код + ссылка https://c.vani.ai/auth/confirm?token_hash=pkce_... Ввод кода в input[maxlength=6] (или click verify) ИЛИ goto ссылки.
|
||||
5. Лендинг на /chat = verified. Cookies (httpOnly!) снимать через pg.context.cookies() → vani_accounts.jsonl.
|
||||
6. build_pool.py: base64-decode auth-token cookie → {access_token JWT, refresh_token, sub, exp} → vani_pool.json.
|
||||
|
||||
## Выход и лимиты
|
||||
- Конверсия 9/11 (~82%), фейлы = voidash письмо не пришло за 240с. ~1.5-2 мин/акк. Домашний IP: 10 акков подряд без бана/лимитов.
|
||||
- Free tier: 0.2× capacity, weekly + 20-дневный период лимиты, 1 concurrent request, 50MiB storage. Модели в чате: GPT-6.1 Sol (default, ·High), Claude Haiku 5.5 и др. Chat API эндпоинты: /api/chat/*, conversation_id uuid, стриминг через сервер-экшены.
|
||||
- Smoke-тест акка: CDP Network.setCookie всех кук из записи → /chat logged-in → textarea (React native setter + input event!) → button[aria-label="Send message"] → GPT-6.1 Sol отвечает.
|
||||
- Onboarding wizard «Step 1 of 3» после верификации — можно скипать, сессия валидна.
|
||||
|
||||
## Питфолы
|
||||
- fill_input/прямой .value в textarea НЕ активирует Send (disabled) — только native setter + dispatchEvent input.
|
||||
- Raw multipart POST без next-action заголовка = 500 (не информативно).
|
||||
- Токены одноразовые для siteverify: каждый тест = новый токен.
|
||||
- Письмо Vani содержит И код И pkce-ссылку; код быстрее (не требует goto).
|
||||
Reference in New Issue
Block a user