Iइंस्टॉलेशन
पहला प्रमाण।
एक साफ़ machine से एक hashed, replayable उत्तर तक — एक मिनट से कम में। कोई account नहीं, कोई key नहीं, कोई server नहीं। किसी भी भाषा में वही चार चरण चलाएँ — proof वही hash है।
TypeScriptNode ≥ 20
01इंस्टॉल करें
02एक source जोड़ें
import { createSQAI } from "@thyn-ai/sqai"; const sqai = createSQAI(); await sqai.connect("./sales.csv", { name: "sales" });03Query करें
const a = await sqai.ask({ metric: "revenue", aggregation: "sum", group_by: "region", source_name: "sales", }); // east 2130.5 · west 1519 · north 1000 // plan_hash f87610d8afeb…04एक मान compute करें
const r = await sqai.compute({ module: "finance", function: "npv", args: [0.1, [-1000, 300, 420, 560, 680]], });r.value505.020148896933r.computation_hashb74f67d0…d91bc8
PythonPython ≥ 3.10 आवश्यक
01इंस्टॉल करें
02एक source जोड़ें
from sqai import SQAI sqai = SQAI() sqai.connect("./sales.csv", name="sales")03Query करें
a = sqai.ask({ "metric": "revenue", "aggregation": "sum", "group_by": "region", "source_name": "sales", }) # east 2130.5 · west 1519 · north 1000 # plan_hash f87610d8afeb…04एक मान compute करें
r = sqai.compute( module="finance", function="npv", args=[0.1, [-1000, 300, 420, 560, 680]], )r["value"]505.020148896933r["computation_hash"]b74f67d0…d91bc8
b74f67d0d7a594aa7ac91f6291612452aa8ccdf603351ebc8d801a6fddd91bc8
समान। Byte दर byte।
दोनों SDK एक ही परिणाम को एक ही bytes में canonicalize करते हैं, इसलिए hash भाषाओं में मेल खाता है — संयोग से नहीं, निर्माण से। Call को कहीं भी replay करें — यही पंक्ति प्रिंट होनी चाहिए।
IIएकमुश्त सेटअप
एक बार provision करें। फिर तत्काल।
Query plane इंस्टॉल पूरा होते ही in-process चलता है — कोई daemon नहीं, कोई key नहीं। Compute plane अपना signed runtime पहली compute() पर एक बार provision करता है, फिर उसे resident रखता है।
await sqai.compute(…) // first call, ever~110 s · प्रति machine एक बार
await sqai.compute(…) // every call after0.83–0.93 ms · मापा गया
Runtime पहले से resident है — कोई download नहीं, कोई cold start नहीं, कोई per-query सेटअप नहीं।
Bundle प्रति user cache होता है, इसलिए provisioning प्रति machine एक बार होती है — प्रति process नहीं।
IIIसत्यापित करें
एक command पूरी machine पढ़ती है।
✓ node: v20.11.0
✓ sdk: @thyn-ai/sqai 0.1.4 imports cleanly
✓ contract: 4778 capabilities
sha256:79f1c5a6c7164e7e9e1750e70a5c03292fa87eb52d8148a740c06695924be9a1
• tested-pair: skipped (not in the repo)
• runtime: unavailable (checks skipped)
✓ doctor: okdoctor Node version, SDK import, embedded contract और एक live runtime probe जाँचता है। साफ़ machine पर runtime लाइन unavailable दिखती है — यह छोड़ना है, विफलता नहीं। Query plane को कोई runtime नहीं चाहिए।
- 4,778 capabilities hash-pinned contract में हैं; 4,574 SDK को उजागर हैं — read-only, deterministic।
- उस invariant को assert करने और running engine के विरुद्ध contract modules diff करने के लिए --parity जोड़ें।
- ठीक एक JSON object प्रिंट करने के लिए --json जोड़ें — CI के लिए तैयार।
IVआवश्यकताएँ
एक मिनट को क्या चाहिए।
- Node
- npm पैकेज के लिए 20 या नया — doctor इसे सुनिश्चित करता है।
- Python
- PyPI पैकेज के लिए 3.10 या नया।
- कम्प्यूट प्लेन
- darwin-arm64 या linux-x64 — पहले compute() पर signed runtime प्रोविज़न होता है।
- क्वेरी प्लेन
- जहाँ भी Node या Python चले।
- Windows और अन्य
- क्वेरी प्लेन पूरी तरह काम करता है; compute() एक structured unsupported_platform error लौटाता है — कभी क्रैश नहीं।
समर्थित होस्ट से बाहर हों तो SQAI_ENGINE_URL या SQAI_API_KEY से compute को किसी remote engine पर इंगित करें — क्वेरी और dispatch काम करते रहते हैं; केवल local provisioning छोड़ी जाती है।
Vऑपरेटर की पट्टी
SDK के इर्द-गिर्द तीन कमांड।
कनेक्ट करना, पूछना और कम्प्यूट करना — सब कुछ SDK के ज़रिए in-process होता है। CLI वह टूल है जो आप उनके आसपास चलाते हैं — डिवाइस साइन इन करें, परिवेश जाँचें, runtime प्रबंधित करें।
$sqai login [--no-browser]
accounts.thyn.ai के ज़रिए वैकल्पिक device sign-in (RFC 8628)। यह एक signed token स्थानांतरित करता है — आपका डेटा कभी नहीं। एक मशीन पर निःशुल्क।
$sqai doctor [--parity] [--json]
Node, SDK import, embedded contract, live runtime probe। --parity read-only, deterministic invariant की पुष्टि करता है।
$sqai runtime <status|install|verify|stop>
resident compute runtime: रिपोर्ट करें, पहले से इंस्टॉल करें, pinned sha256 सत्यापित करें, बंद करें।
हर कमांड --json स्वीकार करती है और ठीक एक JSON object प्रिंट करती है। Exit codes scriptable हैं: 0 सफलता · 1 जाँच विफल · 2 उपयोग त्रुटि।
VIआगे