@lawaty/lacode 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 +32 -0
- package/README.md +562 -2
- package/dist/agents.js +819 -0
- package/dist/commands.js +109 -0
- package/dist/index.js +2250 -0
- package/dist/lacode.js +254 -0
- package/dist/pool.js +487 -0
- package/dist/tunnel.js +180 -0
- package/docs/BENCHMARKS.md +127 -0
- package/docs/CONTEXT.md +211 -0
- package/docs/TUNNEL.md +174 -0
- package/docs/USER-STORIES.md +421 -0
- package/package.json +60 -4
- package/presets/README.md +121 -0
- package/presets/free-tier.json +60 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": [
|
|
3
|
+
"THE BUNDLED DEFAULT, not the only source. See presets/README.md for the resolution chain:",
|
|
4
|
+
"plugin options -> ~/.config/lacode/pool.json -> this file -> a built-in fallback.",
|
|
5
|
+
"",
|
|
6
|
+
"src/lib/pool.ts reads it at config time and rewrites every pooled variant agent",
|
|
7
|
+
"(explore-fast-N, implement-fast-N, context-manager-N) plus the provider whitelists",
|
|
8
|
+
"to match, so no model is written down next to an agent anywhere.",
|
|
9
|
+
"Slot N is the same model for every base agent, which is what makes load shared.",
|
|
10
|
+
"",
|
|
11
|
+
"RULES, all validated at startup: models are written provider/model-id, split on the FIRST",
|
|
12
|
+
"slash only so openrouter's vendor-prefixed ids (nvidia/x:free) resolve; must be distinct.",
|
|
13
|
+
"AT MOST 4 SLOTS: one hidden variant per base per slot is declared, so a fifth entry would",
|
|
14
|
+
"route at an agent that does not exist. Extra entries are dropped with a warning.",
|
|
15
|
+
"",
|
|
16
|
+
"WEIGHT IS THE ONLY KNOWN KNOB, and it is a SOFT CEILING on how many concurrent claims a",
|
|
17
|
+
"slot holds -- not a share of the work. Priority is that same number, so the rule is:",
|
|
18
|
+
" 1. the HIGHEST-weight slot that is still under its ceiling takes the spawn",
|
|
19
|
+
" 2. slot 1 therefore fills to its number before slot 2 sees any work at all",
|
|
20
|
+
" 3. once EVERY slot is at its ceiling, the overflow goes to the least loaded slot,",
|
|
21
|
+
" so a burst past the summed ceilings degrades to even spreading and never blocks",
|
|
22
|
+
"",
|
|
23
|
+
"With this file: longcat (opencode-go) takes 3 sessions to itself, then space-bunny",
|
|
24
|
+
"takes 2, then big-pickle and longcat (Zen) take 1 each -- sequence 1,1,1,2,2,3,4,...",
|
|
25
|
+
"Equal weights give a plain round robin in list order. 2,2,1,1 reproduces the old",
|
|
26
|
+
"primary/overflow cycle exactly, which is why the old tier values still work.",
|
|
27
|
+
"",
|
|
28
|
+
"Absent means weight 1. Must be a number in (0, 100]; anything else warns and uses 1.",
|
|
29
|
+
"List order is the tie-break between slots of equal weight, so put the ones you want",
|
|
30
|
+
"first and treat the bottom of the list as the reserve.",
|
|
31
|
+
"",
|
|
32
|
+
"COST IS THE DEFAULT, NOT A CONSTRAINT. These four slots are free because that is what",
|
|
33
|
+
"the pool is FOR: mechanical work -- reading files, grepping, mechanical edits, cartography.",
|
|
34
|
+
"They are not here to be the smartest model in the system. The point of putting that work",
|
|
35
|
+
"on a near-free model is that the mechanical tokens stop being spent by your expensive",
|
|
36
|
+
"main model, and that the main model's context is never filled with file contents it does",
|
|
37
|
+
"not need to reason about. Those are two separate effects and the second is the larger one.",
|
|
38
|
+
"",
|
|
39
|
+
"The pool is OPEN: it accepts any model you give it, free, cheap or expensive, and the",
|
|
40
|
+
"plugin never inspects, prices, warns about, filters or rewrites one. There is no",
|
|
41
|
+
"allowlist, no cost check, and no validation beyond structure (US-7). Free is expressed",
|
|
42
|
+
"once, right here, as the choice this file makes for you when you have not made one.",
|
|
43
|
+
"",
|
|
44
|
+
"You MAY substitute your own list, including paid models, and nothing will reject or",
|
|
45
|
+
"second-guess it: edit the \"slots\" array below (replace a {\"model\": ...} entry with your",
|
|
46
|
+
"own provider/id and keep the weight), or leave this file alone entirely and put the list",
|
|
47
|
+
"in ~/.config/lacode/pool.json instead, which wins over it.",
|
|
48
|
+
"",
|
|
49
|
+
"Re-check any model you substitute against models.dev; this project does not look prices",
|
|
50
|
+
"up at runtime and will not guess at them for you.",
|
|
51
|
+
"",
|
|
52
|
+
"Changing this file requires restarting every opencode process: plugins are not hot-reloaded."
|
|
53
|
+
],
|
|
54
|
+
"slots": [
|
|
55
|
+
{ "model": "opencode-go/longcat-2.5-preview-free", "weight": 3 },
|
|
56
|
+
{ "model": "opencode/space-bunny-free", "weight": 2 },
|
|
57
|
+
{ "model": "opencode/big-pickle", "weight": 1 },
|
|
58
|
+
{ "model": "opencode/longcat-2.5-preview-free", "weight": 1 }
|
|
59
|
+
]
|
|
60
|
+
}
|