smartypants-network 0.0.0-stage → 0.1.1

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 Howcan (Smarty Pants)
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,3 +1,74 @@
1
- # Temporary Holding Version
1
+ # smartypants: command-line tool for agents
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Use [Smarty Pants](https://smartypants.network/docs/agents) from a terminal, a script or an AI agent:
4
+ exact open models priced per token, and sealed Linux workspaces and fleets on idle Macs.
5
+ Node 18 or newer. No dependencies.
6
+
7
+ ```sh
8
+ npm install -g smartypants-network # or: npx smartypants-network help
9
+ ```
10
+
11
+ ```sh
12
+ export SMARTYPANTS_API_KEY=sp_live_... # from https://smartypants.network/api
13
+ smartypants doctor # is the key OK, what can it use
14
+ smartypants models # exact model ids, prices, ready or not
15
+ smartypants ask "Name three planets." # one prompt in, the answer out
16
+ git diff | smartypants ask --system "Review this diff in 5 bullets"
17
+ ```
18
+
19
+ ## When to use it
20
+
21
+ - **Use it for** everyday AI calls where an exact open model is good enough and price matters:
22
+ summaries, extraction, classification, drafting, tool calls, JSON output, embeddings and reranking.
23
+ Work that can wait goes in a batch at half the per-token price.
24
+ - **Don't use it for** work that needs a frontier-size model, more context than a model lists,
25
+ or strict latency. Keep your current provider for those, and as a fallback.
26
+ - Requests run on Macs owned by other people: don't send secrets or personal data unless the
27
+ person you work for has approved it. Check `is_ready` on https://smartypants.network/v1/models first.
28
+ - Framework setups (LangChain, OpenAI Agents SDK, Vercel AI SDK, LlamaIndex, Claude Code):
29
+ https://smartypants.network/docs/agents#frameworks
30
+
31
+ ## Workspaces and fleets
32
+
33
+ Our own account first, for now. Other keys get `CPU_PILOT_ACCOUNT_REQUIRED` until they open.
34
+
35
+ ```sh
36
+ smartypants run python -c 'print(6 * 7)' # one program, then the VM is wiped
37
+
38
+ ID=$(smartypants ws new --minutes 15 --budget 0.50) # one VM, many commands; prints its id
39
+ smartypants ws put $ID script.py # files up to 8 KiB
40
+ smartypants ws exec $ID python script.py # output streams; exit code is the program's
41
+ smartypants ws get $ID out.txt ./out.txt
42
+ smartypants ws end $ID # VM, files and its model key are destroyed
43
+
44
+ F=$(smartypants fleet new --size 4 --minutes 10) # several workspaces at once
45
+ smartypants fleet exec $F sh -c 'nproc; uname -m' # same program on every ready one
46
+ smartypants fleet end $F
47
+ ```
48
+
49
+ `--budget USD` gives each workspace its own model key that can spend at most that much and stops
50
+ working when the workspace ends. It is printed once, on stderr.
51
+ `--internet pypi.org,files.pythonhosted.org` (or `listed`) asks for the approved-sites-only internet,
52
+ once it is switched on.
53
+
54
+ Every command takes `--json` for machine-readable output, plus `--api-key` and `--base-url`.
55
+ Exit codes: 0 ok, 1 the site refused or failed, 2 bad usage, otherwise the program's own exit code.
56
+ `smartypants help` lists every command.
57
+
58
+ ## As a library
59
+
60
+ The package also carries the one-file JavaScript kit:
61
+
62
+ ```js
63
+ import { SmartyPants } from "smartypants-network";
64
+ const sp = new SmartyPants();
65
+ console.log(await sp.ask("Say hello in five words."));
66
+ ```
67
+
68
+ ## For people working on this repo
69
+
70
+ - The kit itself lives in `apps/gateway/agent-kit/smartypants.mjs`; `npm run sync` (and `prepack`)
71
+ copies it here. The copy is not committed.
72
+ - Tests: `node --test packages/cli/test/cli.test.mjs` (offline, against a fake site).
73
+ - MIT licence. Published as `smartypants-network` (plain `smartypants` is taken on npm and PyPI) by
74
+ the "Publish agent packages" workflow; bump `version` first.