29 lines
3.0 KiB
Markdown
29 lines
3.0 KiB
Markdown
---
|
|
name: plane-so-farm-gateway
|
|
description: Use when farming plane.so accounts or Plane AI gateway.
|
|
---
|
|
|
|
# Plane.so Farm + Gateway
|
|
|
|
Full runbook: `PLANE_RUNBOOK.md` (in this skill dir) — READ IT FIRST.
|
|
|
|
Files (bundled in this skill):
|
|
- `scripts/plane_full_combo.py` — autoreg combo: email-check -> magic-generate -> IMAP OTP (code in SUBJECT 'login code is NNNNNN') -> CSRF -> magic-sign-up -> workspace -> API token -> verify. ~25s/account, no captcha. CONFIG block needs IMAP creds + EMAIL_LOCAL/DOMAIN.
|
|
- `scripts/plane_gw.py` (v2) — OpenAI-compatible gateway on :20130 over pi.plane.so chat API. Pool from plane_accounts.jsonl (FULL_OK records), round-robin, auto-disable on 401/403/429, /admin/reload hot-reload. TRUE SSE streaming + EMULATED OpenAI tool-calling (upstream takes no client tools; gateway injects schemas as JSON protocol, parses fenced tool_calls blocks, returns real tool_calls/finish_reason, folds role:tool results back into transcript). Models (GET /v1/models): plane/claude-sonnet-5, plane/gpt-5.6-terra, plane/gpt-5.4, plane/zai-org/GLM-5.3, plane/moonshotai/Kimi-K3, plane/deepseek-ai/DeepSeek-V4-Pro, 10 total.
|
|
|
|
Quick start (agent flow):
|
|
1. Copy scripts/ to a work dir. Fill CONFIG in plane_full_combo.py (IMAP creds, EMAIL_LOCAL/DOMAIN).
|
|
2. `python plane_full_combo.py test1` — single-account smoke test, expect result FULL_OK.
|
|
3. `python plane_full_combo.py --bulk N plane_accounts.jsonl` — farm N accounts (built-in 7s throttle sleep).
|
|
4. `python plane_gw.py 20130` — start gateway (background). Pool auto-loads plane_accounts.jsonl from same dir.
|
|
5. Verify: `curl :20130/health` (pool_live>0), `curl :20130/v1/models`, live completion POST.
|
|
6. Connect any OpenAI-compat CLI: base_url http://127.0.0.1:20130/v1, any api_key, model plane/<id>.
|
|
|
|
Key facts (verified 2026-09-20):
|
|
- Backend hosts: api.plane.so (auth/REST, session-id cookie) + pi.plane.so (Plane AI, FastAPI, openapi.json public). app.plane.so = SPA only, 405 on API.
|
|
- Chat flow: POST /api/v1/chat/initialize-chat/ {workspace_slug, workspace_in_context:false} -> chat_id; POST /api/v1/chat/queue-answer/ {query, llm, is_new:true, is_temp:true, workspace_id, workspace_slug, chat_id, context:{}, mode:'ask'} -> stream_token; GET /api/v1/chat/stream-answer/{token} SSE (take delta.chunk only).
|
|
- Credits: 105/day per account, reset 00:00 UTC. Session cookie: 7 days. Auth throttle: 10/min per IP (bulk sleeps 7s).
|
|
- Pitfalls: CSRF required on all POST (failure = csrf_failure.html with 200!); headers.get_all('Set-Cookie') not dict(); Gmail +alias needs MIME decode before match; queue-answer requires context:{} else 422; old ai-assistant endpoints = 410 Gone; write_file/execute_code masker eats os.environ.get secret patterns — build such lines via string concat or chr().
|
|
|
|
Usage: `python plane_full_combo.py --bulk N plane_accounts.jsonl` then `python plane_gw.py 20130`. Verify: curl /health (pool_live>0), /v1/models, then live completion. CLI connect: base_url http://127.0.0.1:20130/v1, any api_key, model plane/<id>.
|