scaledthought 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ScaledThought Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # scaledthought
2
2
 
3
- The CLI for [ScaledThought](https://scaledthought.com): headless open-model inference run by your agent.
3
+ The CLI for [ScaledThought](https://scaledthought.com): headless, OpenAI-compatible inference for
4
+ open-weight models, hosted in the US or Canada. It's built for coding agents: it never prompts, prints
5
+ JSON when stdout isn't a terminal, and every error is one JSON line on stderr with a non-zero exit.
4
6
 
5
- **Not launched yet.** This release only reserves the name. Running it prints a notice and exits; it makes no network calls.
7
+ Agents: the full setup protocol is at <https://scaledthought.com/llms.txt>.
8
+
9
+ ```bash
10
+ npx -y scaledthought@latest init --region us # or: --region ca (data stays in Canada)
11
+ ```
12
+
13
+ `init` creates a free account (no card), writes `ST_API_KEY` and `ST_BASE_URL` to `./.env` (mode 0600),
14
+ adds `.env` to `.gitignore`, and prints the account, the models live in your region and `next_steps`.
15
+ Running it again is safe. If a key already exists it returns `"already_initialized": true` and the
16
+ account status instead of creating a second account.
17
+
18
+ If you arrived through a `scaledthought.com/go/<code>` link, its instructions add `--source <code>` (a campaign code
19
+ such as `a-rd`, stored on the new account so we know which campaign worked). It's optional, and a value that isn't a
20
+ code is dropped with a warning rather than failing `init`. On some US campaigns the human can copy an opt-in prompt
21
+ ending in `(ad click <token>)`; the `/go` instructions then tell the agent to add `--ad-click <token>` (the token is
22
+ in the prompt, never in the link). A malformed token is dropped with a warning, and the flag is ignored outside `us`.
23
+ Turn ad measurement off at any time with `account ad-measurement off` (nothing about the account is then sent to any
24
+ ad platform). `account` and `account ad-measurement` print `ad_measurement` (true only when something about the
25
+ account could be sent: a `us` account that signed up with an ad click and hasn't opted out; always false in `ca`) and
26
+ `ad_measurement_opt_out` (the stored preference). Neither flag is a secret.
27
+
28
+ ```bash
29
+ npx -y scaledthought@latest models --live # models serving in your region now
30
+ npx -y scaledthought@latest chat -m auto "Reply with OK" # one real completion
31
+ npx -y scaledthought@latest mcp # `claude mcp add …` command + JSON config
32
+ npx -y scaledthought@latest account # plan, region, spend
33
+ npx -y scaledthought@latest account ad-measurement off # opt out of ad measurement
34
+ ```
35
+
36
+ Other commands: `keys list|create|rotate|revoke|revoke-self` (`keys create --expires-in 30d --scopes inference --child`, `keys rotate <id> --grace 24h`), `usage`, `billing status|topup|auto-reload|transactions`, `batches …`,
37
+ `fine-tune …`, `benchmarks <id>`, `status` (with your account's notices when a key is set), `doctor` (setup check),
38
+ `webhooks add <url> [--events …]|list|remove <id>` (signed callbacks), `transcribe <file>` (speech to text, `--translate` for English,
39
+ `--format srt|vtt|text|verbose_json`) and `speak -o out.mp3 "text"` (text to speech, streamed to the file; US
40
+ only for now) and `realtime --model <id> --input question.wav --output reply.wav` (one spoken turn over the realtime
41
+ WebSocket; mono 16-bit 24 kHz WAV; paid from prepaid credits). Add `--help` to any of them.
42
+
43
+ Use the key from any OpenAI SDK: `base_url = $ST_BASE_URL`, `api_key = $ST_API_KEY`.
44
+
45
+ - Keys are read from `ST_API_KEY` or `./.env`, never from flags.
46
+ - The key's prefix (`st_us_…` / `st_ca_…`) picks the region's hosts. Requests never cross regions.
47
+ - Errors look like `{"error":{"code":"…","message":"…","hint":"…"}}`. Exit code 2 means bad usage, 1 anything else.
48
+
49
+ Free tier: $1/day of inference across the account, 60 requests/min per key, up to 5 keys, no card.