recovered snapshot from suspended aaronjaworski710 (history unavailable)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
accounts.jsonl
|
||||||
|
.pubkey
|
||||||
|
*.session
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# arcai-tools
|
||||||
|
|
||||||
|
Unofficial CLI client + account registrar for **ArcAI** (`askarc.chat`) — a
|
||||||
|
Supabase-backed AI chat platform. Talks directly to the public Supabase
|
||||||
|
endpoints (auth + `functions/v1/chat`), no browser needed.
|
||||||
|
|
||||||
|
> Clean client for the **free API surface only**. No payment, no card, no
|
||||||
|
> captcha-bypass code. Register accounts, probe the service, and chat through
|
||||||
|
> the API when it's live.
|
||||||
|
|
||||||
|
## What is ArcAI
|
||||||
|
|
||||||
|
AI chat/voice/image platform ("Arc"). Reverse-engineered from the frontend
|
||||||
|
bundle:
|
||||||
|
|
||||||
|
- **Backend:** Supabase project `jpqtoixhjnfdubvqshwk`
|
||||||
|
- **Auth:** email + password, **no captcha**, session returned instantly
|
||||||
|
(email auto-confirmed). Any mailbox domain works (gmail `+alias`, outlook,
|
||||||
|
temp-mail).
|
||||||
|
- **Inference:** `POST {supabase_url}/functions/v1/chat`
|
||||||
|
with `Authorization: Bearer <access_token>` + `apikey: <publishable_key>`.
|
||||||
|
- **Payments:** Stripe (Boost plan) — **not** handled by this tool.
|
||||||
|
|
||||||
|
## Models (ids for the `model` field)
|
||||||
|
|
||||||
|
| Tier | Models |
|
||||||
|
|------|--------|
|
||||||
|
| Text — free/Auto | `gemini-3.8-flash`, `gpt-6-luna` |
|
||||||
|
| Text — Boost (paid) | `gpt-6-astra`, `gpt-6.1-sol` |
|
||||||
|
| Voice | `gpt-live-1` |
|
||||||
|
| Image | `gpt-image-2.5-flare`, `gpt-image-2.5-sunburst`, `gemini-3.1-flash-image` |
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Python 3.9+, **stdlib only** (no pip installs). Config (Supabase URL +
|
||||||
|
publishable key + model list) is in `config.json`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python arcai.py status # is chat live or restricted right now?
|
||||||
|
python arcai.py models # list known model ids
|
||||||
|
python arcai.py reg 5 gmail # register 5 accounts (gmail +alias)
|
||||||
|
python arcai.py accounts # how many saved
|
||||||
|
python arcai.py chat "hi" gemini-3.8-flash # one-shot chat (needs live svc)
|
||||||
|
```
|
||||||
|
|
||||||
|
Accounts append to `accounts.jsonl` (gitignored).
|
||||||
|
|
||||||
|
## Service state note
|
||||||
|
|
||||||
|
At the time of writing the ArcAI chat backend returns
|
||||||
|
`403 {"code":"arc_incident_restricted"}` ("AskArc is temporarily restricted")
|
||||||
|
for **every** model and account — a server-side incident flag, not an
|
||||||
|
account/IP ban. Registration still works; inference is globally paused.
|
||||||
|
Run `python arcai.py status` to re-check. When the incident clears, `chat`
|
||||||
|
will start returning completions.
|
||||||
|
|
||||||
|
## Free-tier limits (from bundle)
|
||||||
|
|
||||||
|
- `FREE_DAILY_MESSAGE_LIMIT`, balanced 20/day, deep 0/day
|
||||||
|
- voice 3/day, image 30/day
|
||||||
|
- Astra / Sol / premium image modes require **Boost** (paid) — out of scope.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
👻 [**иишко**](https://t.me/AlStack)
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""ArcAI (askarc.chat) — account registrar + API client.
|
||||||
|
|
||||||
|
ArcAI is a Supabase-backed AI chat platform. This tool talks to its public
|
||||||
|
Supabase endpoints directly:
|
||||||
|
|
||||||
|
* register / login / refresh (auth, no captcha, instant session)
|
||||||
|
* chat (POST /functions/v1/chat, streaming JSON)
|
||||||
|
* models / service status
|
||||||
|
|
||||||
|
The Supabase publishable key + URL live in config.json (public frontend
|
||||||
|
constants). NO payment / card / captcha-bypass code here — this is a clean
|
||||||
|
client for the free API surface only.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
python arcai.py reg N [gmail|outlook|voidash] # register N accounts
|
||||||
|
python arcai.py status # is chat live or restricted?
|
||||||
|
python arcai.py models # list known model ids
|
||||||
|
python arcai.py chat "your prompt" [model] # send one chat (needs live svc)
|
||||||
|
python arcai.py accounts # count saved accounts
|
||||||
|
"""
|
||||||
|
import json, os, re, sys, time, random, string, urllib.request, urllib.error
|
||||||
|
|
||||||
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
CFG = json.load(open(os.path.join(HERE, "config.json")))
|
||||||
|
SB = CFG["supabase_url"]
|
||||||
|
KEY = CFG["publishable_key"]
|
||||||
|
SITE = CFG.get("site", "https://askarc.chat")
|
||||||
|
MODELS = CFG["models"]
|
||||||
|
ACC = os.path.join(HERE, "accounts.jsonl")
|
||||||
|
|
||||||
|
|
||||||
|
def req(url, payload=None, token=None):
|
||||||
|
h = {"apikey": KEY, "Content-Type": "application/json"}
|
||||||
|
if token:
|
||||||
|
h["Authorization"] = "Bearer " + token
|
||||||
|
body = json.dumps(payload).encode() if payload is not None else None
|
||||||
|
r = urllib.request.Request(url, data=body, headers=h)
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(r, timeout=60) as resp:
|
||||||
|
return resp.status, resp.read().decode()
|
||||||
|
except urllib.error.HTTPError as e:
|
||||||
|
return e.code, e.read().decode()
|
||||||
|
except Exception as e:
|
||||||
|
return 0, str(e)
|
||||||
|
|
||||||
|
|
||||||
|
def rnd(n=10):
|
||||||
|
return "".join(random.choices(string.ascii_lowercase + string.digits, k=n))
|
||||||
|
|
||||||
|
|
||||||
|
def register(domain="gmail"):
|
||||||
|
if domain == "gmail":
|
||||||
|
em = f"youraddress+arc{rnd(6)}@gmail.com"
|
||||||
|
elif domain == "outlook":
|
||||||
|
em = f"arc{rnd(8)}@outlook.com"
|
||||||
|
else:
|
||||||
|
em = f"arc{rnd(10)}@voidash.bond"
|
||||||
|
pw = rnd(10) + "aA1!"
|
||||||
|
st, body = req(SB + "/auth/v1/signup", {"email": em, "password": pw})
|
||||||
|
if st == 200:
|
||||||
|
d = json.loads(body)
|
||||||
|
rec = {"email": em, "pass": pw, "uid": d["user"]["id"],
|
||||||
|
"access_token": d["access_token"], "refresh_token": d["refresh_token"],
|
||||||
|
"ts": int(time.time())}
|
||||||
|
with open(ACC, "a") as f:
|
||||||
|
f.write(json.dumps(rec) + "\n")
|
||||||
|
return rec
|
||||||
|
return {"error": body[:160], "status": st, "email": em}
|
||||||
|
|
||||||
|
|
||||||
|
def refresh(rec):
|
||||||
|
st, body = req(SB + "/auth/v1/token?grant_type=refresh_token",
|
||||||
|
{"refresh_token": rec["refresh_token"]})
|
||||||
|
if st == 200:
|
||||||
|
d = json.loads(body)
|
||||||
|
rec["access_token"] = d["access_token"]
|
||||||
|
rec["refresh_token"] = d["refresh_token"]
|
||||||
|
return rec if st == 200 else None
|
||||||
|
|
||||||
|
|
||||||
|
def login(email, pw):
|
||||||
|
st, body = req(SB + "/auth/v1/token?grant_type=password",
|
||||||
|
{"email": email, "password": pw})
|
||||||
|
if st == 200:
|
||||||
|
d = json.loads(body)
|
||||||
|
return {"email": email, "pass": pw, "uid": d["user"]["id"],
|
||||||
|
"access_token": d["access_token"], "refresh_token": d["refresh_token"]}
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def last_acc():
|
||||||
|
if not os.path.exists(ACC):
|
||||||
|
return None
|
||||||
|
lines = [l for l in open(ACC) if l.strip()]
|
||||||
|
return json.loads(lines[-1]) if lines else None
|
||||||
|
|
||||||
|
|
||||||
|
def chat(prompt, model="gemini-3.8-flash", rec=None):
|
||||||
|
rec = rec or last_acc()
|
||||||
|
if not rec:
|
||||||
|
return {"error": "no account; run: arcai.py reg 1"}
|
||||||
|
st, body = req(SB + "/functions/v1/chat",
|
||||||
|
{"messages": [{"role": "user", "content": prompt}], "model": model},
|
||||||
|
token=rec["access_token"])
|
||||||
|
return {"status": st, "body": body[:500]}
|
||||||
|
|
||||||
|
|
||||||
|
def service_status():
|
||||||
|
st, b = req(SITE + "/api/location")
|
||||||
|
c = chat("ping", MODELS["text_free"][0])
|
||||||
|
restricted = c.get("status") == 403 or "arc_incident_restricted" in str(c.get("body"))
|
||||||
|
return {"site_status": st,
|
||||||
|
"under_construction": "under construction" in b.lower(),
|
||||||
|
"chat_status": c.get("status"),
|
||||||
|
"chat_restricted": restricted,
|
||||||
|
"chat_body": str(c.get("body"))[:160]}
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
cmd = sys.argv[1] if len(sys.argv) > 1 else "status"
|
||||||
|
if cmd == "reg":
|
||||||
|
n = int(sys.argv[2]) if len(sys.argv) > 2 else 1
|
||||||
|
dom = sys.argv[3] if len(sys.argv) > 3 else "gmail"
|
||||||
|
ok = 0
|
||||||
|
for i in range(n):
|
||||||
|
r = register(dom)
|
||||||
|
if "uid" in r:
|
||||||
|
ok += 1
|
||||||
|
print(f"[{i+1}/{n}] OK {r['email']} uid={r['uid'][:8]}")
|
||||||
|
else:
|
||||||
|
print(f"[{i+1}/{n}] FAIL {r}")
|
||||||
|
time.sleep(1.1)
|
||||||
|
print(f"registered {ok}/{n} -> {ACC}")
|
||||||
|
elif cmd == "status":
|
||||||
|
print(json.dumps(service_status(), indent=2))
|
||||||
|
elif cmd == "models":
|
||||||
|
for k, v in MODELS.items():
|
||||||
|
print(f"{k}: {', '.join(v)}")
|
||||||
|
elif cmd == "chat":
|
||||||
|
prompt = sys.argv[2] if len(sys.argv) > 2 else "hello"
|
||||||
|
model = sys.argv[3] if len(sys.argv) > 3 else MODELS["text_free"][0]
|
||||||
|
print(json.dumps(chat(prompt, model), indent=2))
|
||||||
|
elif cmd == "accounts":
|
||||||
|
n = sum(1 for _ in open(ACC)) if os.path.exists(ACC) else 0
|
||||||
|
print(f"{n} accounts in {ACC}")
|
||||||
|
else:
|
||||||
|
print(__doc__)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"supabase_url": "https://jpqtoixhjnfdubvqshwk.supabase.co",
|
||||||
|
"publishable_key": "sb_publishable_naGne-ZO0cSBFFeOLRoGkg_Cx-QpG9r",
|
||||||
|
"site": "https://askarc.chat",
|
||||||
|
"models": {
|
||||||
|
"text_free": [
|
||||||
|
"gemini-3.8-flash",
|
||||||
|
"gpt-6-luna"
|
||||||
|
],
|
||||||
|
"text_boost": [
|
||||||
|
"gpt-6-astra",
|
||||||
|
"gpt-6.1-sol"
|
||||||
|
],
|
||||||
|
"voice": [
|
||||||
|
"gpt-live-1"
|
||||||
|
],
|
||||||
|
"image": [
|
||||||
|
"gpt-image-2.5-flare",
|
||||||
|
"gpt-image-2.5-sunburst",
|
||||||
|
"gemini-3.1-flash-image"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# stdlib only — no third-party dependencies required.
|
||||||
|
# (Python 3.9+)
|
||||||
Reference in New Issue
Block a user