lingling 2.1.20.post33__tar.gz → 2.1.20.post35__tar.gz

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.
Files changed (27) hide show
  1. {lingling-2.1.20.post33/lingling.egg-info → lingling-2.1.20.post35}/PKG-INFO +61 -10
  2. lingling-2.1.20.post33/PKG-INFO → lingling-2.1.20.post35/README.md +288 -262
  3. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/__init__.py +1 -1
  4. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/bench.py +281 -211
  5. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/bounds.py +0 -3
  6. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/cli.py +48 -33
  7. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/demo.py +1 -4
  8. lingling-2.1.20.post35/lingling/exits.py +256 -0
  9. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/health.py +127 -46
  10. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/lanes.py +85 -119
  11. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/mitm.py +140 -156
  12. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/netutil.py +1 -12
  13. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/proof.py +1 -14
  14. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/relay.py +3 -32
  15. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/update.py +19 -47
  16. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/winjob.py +0 -1
  17. lingling-2.1.20.post33/README.md → lingling-2.1.20.post35/lingling.egg-info/PKG-INFO +313 -237
  18. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/pyproject.toml +1 -1
  19. lingling-2.1.20.post33/lingling/exits.py +0 -154
  20. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/LICENSE +0 -0
  21. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling/__main__.py +0 -0
  22. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling.egg-info/SOURCES.txt +0 -0
  23. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling.egg-info/dependency_links.txt +0 -0
  24. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling.egg-info/entry_points.txt +0 -0
  25. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling.egg-info/requires.txt +0 -0
  26. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/lingling.egg-info/top_level.txt +0 -0
  27. {lingling-2.1.20.post33 → lingling-2.1.20.post35}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lingling
3
- Version: 2.1.20.post33
3
+ Version: 2.1.20.post35
4
4
  Summary: Official OpenCode, but your requests ride rotating Tor exit lanes.
5
5
  Author: huranth
6
6
  License-Expression: LicenseRef-Lingling
@@ -74,7 +74,7 @@ fast. A losing lane's 429 is shown too -- that is the pool working, not your
74
74
  call failing.
75
75
 
76
76
  ```
77
- 14:19:24 #208.1 lanes 1,2,3,5,4 {us,nl,de,at,se} -> muse-spark-1.3-contributor-free
77
+ 14:19:24 #208.1 lanes 1,2,3,5,4 {us,nl,de,at,se} -> deepseek-v4.1-flash-free
78
78
  14:19:24 | #208.1 lane 5 {at} 429 free limit -- exit out until 05:30 (00:00 UTC) -- moving it 0.1 KB in 7.4s
79
79
  14:19:25 | #208.1 lane 4 {se} 200 29.7 KB in 7.7s first 5.8s event 7.44s
80
80
  14:19:27 * lane 5 was refused (429) -- moved to {se}
@@ -87,7 +87,7 @@ your tokens are flowing through a German exit. `--no-proof` if you trust us.
87
87
 
88
88
  ### How a limit dies without you noticing
89
89
 
90
- Six different things can go wrong, and they are kept strictly apart.
90
+ A lot of things can go wrong here, and they are kept strictly apart.
91
91
 
92
92
  Two 429s, and they are not the same thing. The lane is moved to another exit
93
93
  for both; what differs is which **notepad section** that exit is written into.
@@ -128,16 +128,32 @@ is opencode's own edge having a bad moment, so it is never written into the
128
128
  notepad at all and the pane says so loudly: `429 OPENCODE EDGE UNAVAILABLE --
129
129
  not this exit`.
130
130
 
131
+ **The gate's refusal (403).** Some exits are refused outright —
132
+ `FreeTierError`, the gate's answer to a client it will not credit for the free
133
+ tier through that address. Nothing about the lane or its tor is wrong, so no
134
+ lane moves. But it is not your answer either, and refusing is cheaper than
135
+ answering, so a gated lane always reaches the race *first*. It is held back
136
+ like a 429 is: the call goes on to the lanes that can still serve, and only a
137
+ pool where every exit is gated hands the 403 over. That exit is then sat out
138
+ for the rest of the free-tier day rather than raced on every call, and the
139
+ sweep moves its lane somewhere else: `lane 9 {fr} 403 -- the gate closed this
140
+ exit, sitting it out`. The pane still shows the attempt that found it, so you
141
+ can see which exits the gate has closed.
142
+
131
143
  **Load.** How much a lane is carrying decides where it sits in the race,
132
144
  never whether it keeps serving. A loaded lane is healthy and still ours, so
133
145
  nothing is retired for it — and nothing queues either, because the request
134
- already went out on every live lane at once. The quickest answer wins.
146
+ already went out on every live lane at once. **The quickest 200 wins** — and
147
+ nothing but a 200 may take the call.
135
148
 
136
149
  **The far end's bad moments.** A 502, 503 or 504 means opencode's edge is
137
150
  unwell — not your client, and not that exit's quota. A different exit reaches
138
151
  a different edge, so those are retried on another lane exactly like a 429. A
139
- plain 500 is *not* retried: that may be a genuine error, and repeating it
140
- would just fail twice.
152
+ plain 500 is not allowed to take the call either, for the same reason a 403
153
+ isn't: it is the cheapest thing a bad lane can send, and the lane beside it
154
+ may still be one second away from your answer. An error only reaches you when
155
+ the whole pool answered with errors — and then it is the far end's own words,
156
+ not an invented one.
141
157
 
142
158
  **A slow exit.** If a lane makes your answer wait 20s for its first token, it
143
159
  is written off on the spot — the same treatment a 429 gets — and your next
@@ -202,7 +218,7 @@ se, pl, ch). Want different exits? Drop a `countries.txt` into Lingling's
202
218
  data directory (`%LOCALAPPDATA%\Temp\lingling-data` on Windows):
203
219
 
204
220
  ```
205
- # big pools first: the six boot lanes take the first six here
221
+ # big pools first: the ten boot lanes take the first ten here
206
222
  de,nl,se,at,lu,fr,us,no,ch,hu,it,fi
207
223
  # fallback, used once the primary pool is exhausted
208
224
  sg,ro,cz,pl,bg,is,dk,za,ca,gb
@@ -227,15 +243,47 @@ move. If a country does run out, that lane falls back to letting Tor choose.
227
243
 
228
244
  | Flag | What it does |
229
245
  |---|---|
230
- | `--lanes N` | how many lanes to keep warm (default 5, env `LINGLING_TOR_COUNT`) |
246
+ | `--lanes N` | how many lanes to keep warm (default 10, env `LINGLING_TOR_COUNT`) |
231
247
  | `--no-tor` | skip the lanes, run opencode on your own IP like a civilian |
232
248
  | `--no-proof` | no proof window (coward's mode) |
233
- | `--demo [question]` | fire one real Muse Spark request through a lane, show receipts |
249
+ | `--demo [question]` | fire one real request through a lane, show receipts (`LINGLING_DEMO_MODEL` picks the model) |
250
+ | `update [--check] [--now]` | ask what the newest lingling is, and install it between sessions |
234
251
  | `uninstall [--yes]` | wipe the lanes, Tor bundle, geoip and logs (keeps `countries.txt`) |
235
252
 
236
253
  Everything else is handed to opencode byte-for-byte. We don't touch it,
237
254
  we don't parse it, we don't want to know.
238
255
 
256
+ ### Leaving an exit before it is spent
257
+
258
+ An exit IP's daily allowance belongs to whoever reaches it first, and the only
259
+ way to find out that somebody else got there is to be refused. So lanes leave
260
+ early instead: after `LINGLING_EXIT_SOFT_CAP` requests through one address
261
+ (default: half of `LINGLING_EXIT_CAP`), or after `LINGLING_EXIT_HOLD_S` seconds
262
+ riding it (default 600). The second one exists because the requests other
263
+ people put through that address show up in no ledger we keep. Each cycle the
264
+ sweep takes up to `LINGLING_SWEEP_MOVES` lanes (default 3), every
265
+ `LINGLING_SWEEP_S` seconds (default 20), longest-riding first.
266
+
267
+ ### Staying current
268
+
269
+ A copy of lingling has the code it was installed with, and nothing outside can
270
+ change that. So the launch asks one small manifest what the newest version is:
271
+ a background request, three seconds at most, silent unless there is something
272
+ to say. When there is, it says so once the lanes are hot -- `lingling
273
+ 2.1.20.post35 is out (you are on 2.1.20.post34)` -- and offers to install it
274
+ when this session ends (Enter or `y` takes it, `n` leaves it for later).
275
+ Windows will not let pip replace the console launcher while it is running, so
276
+ the install waits for this process to exit and lands in the gap between two
277
+ launches.
278
+
279
+ How long an answer is trusted depends on what it said: "you are current" for
280
+ fifteen minutes, "an update is out" for six hours. A release published a
281
+ minute after a launch is therefore picked up by the next launch, not by the one
282
+ after lunch. `lingling update --check` asks right now and changes nothing;
283
+ `lingling update` asks and schedules the install. `LINGLING_UPDATE=off` (or
284
+ `LINGLING_NO_UPDATE_CHECK=1`) stops the check entirely; `LINGLING_UPDATE=notify`
285
+ keeps the notice and drops the question.
286
+
239
287
  ### Under the hood
240
288
 
241
289
  ```
@@ -259,4 +307,7 @@ Runtime state (tor, lanes, proof log, local CA) lives in the per-user data
259
307
  directory — never in the package, never in your project folder.
260
308
 
261
309
  Requirements: Python 3.11+, Windows/macOS/Linux, and `opencode` on your PATH.
262
- Runs entirely on your machine. Nothing calls home. The kitchen is local.
310
+ Runs entirely on your machine. The one outbound call that is not your own
311
+ traffic is the update check above -- a GET for a small manifest (PyPI's index
312
+ if that fails), carrying nothing but the version you are on. Nothing else
313
+ calls home, and nothing is collected. The kitchen is local.