@lawaty/lacode 0.4.0 → 0.4.2
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/CHANGELOG.md +183 -0
- package/README.md +122 -548
- package/dist/agents.js +53 -16
- package/dist/commands.js +49 -15
- package/dist/index.js +248 -77
- package/dist/lacode.js +253 -11
- package/dist/pool.js +21 -4
- package/docs/CONFIGURATION.md +111 -0
- package/docs/INSTALL.md +209 -0
- package/docs/OMNIROUTE.md +232 -0
- package/package.json +2 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to LaCode are recorded here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and releases follow
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
Versions come from git release commits; the npm version is bumped in the same
|
|
8
|
+
commit as the changelog entry it describes.
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
## [0.4.2] — fix silent claim eviction, unkillable chatty tasks, and gateway 5xx misclassification
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **Heartbeat-aware claim publishing**: `publish()` now filters claims by `(claim.hb ?? claim.t)` instead of `claim.t`, matching how `pruneOwn` and `readSiblings` already judge liveness. A claim past `CLAIM_TTL_MS` with a fresh heartbeat was being written out of its own file, causing every other process to hand the slot out again while the task still held it.
|
|
17
|
+
- **Claim ceiling (`MAX_CLAIM_AGE_MS`)**: a claim older than 30 minutes is now condemned regardless of activity. Previously, any message event reset the silence clock, so a task that hung while trickling output could reset it forever and never be killed. The ceiling is checked first; a claim that is both past it and silent is reported as `overran`, not `hung`.
|
|
18
|
+
- **Single condemn rule**: `condemnReason()` is now the one place the condemn logic lives. Both `findStuck()` (the reaper) and `pool_status` use it, so a claim the status reports as healthy cannot be one the reaper is about to kill.
|
|
19
|
+
- **Gateway 5xx and transient errors take the flat cooldown**: a 502, 503, 504, queue-budget exhaustion, or `TimeoutError` now cools the model flat (~60s, `strikes: 1`, reason `endpoint-unavailable`) instead of falling through unhandled. A real 429 or limit-shaped error still escalates through `recordStrike` unchanged.
|
|
20
|
+
- **Reaper log distinguishes `overran` from `hung`**: a ceiling kill logs `overran <variant> on <model> after <age>s; aborted session <id>` with no silence claim; a silence kill keeps the existing `hung` wording.
|
|
21
|
+
- **`pool_status` reports `overran` count**: a new line shows how many claims are past the ceiling and would be condemned, matching the reaper's own judgment.
|
|
22
|
+
|
|
23
|
+
### Documented
|
|
24
|
+
|
|
25
|
+
- `docs/OMNIROUTE.md`: corrected the `ProviderModelNotFoundError` troubleshooting row — `combo` is registered whether or not the gateway advertises it, so a valid gateway route works there without an allowlist entry.
|
|
26
|
+
|
|
27
|
+
## [0.4.1] — refuse hand-named slot variants, and ship a changelog
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- `CHANGELOG.md`, reconstructing all 13 published releases from their commits. It
|
|
32
|
+
ships with the package, so an install can read what changed without the repo.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- A pool slot variant named by hand (`explore-1`, `implement-2`, …) is now
|
|
37
|
+
**refused** rather than counted. Naming one skipped both the round-robin
|
|
38
|
+
rotation and the slot's ceiling, so six spawns of `explore-1` put six
|
|
39
|
+
concurrent claims on a slot bounded at three. The refusal names the bare base
|
|
40
|
+
to spawn instead, is logged, and escapes the routing catch — swallowed into
|
|
41
|
+
"spawn unchanged" it would have admitted the spawn it forbids.
|
|
42
|
+
- Agent prompts dropped the long explanation of why a variant must not be named.
|
|
43
|
+
It is enforced now, and the refusal carries the reason; the prompts keep only
|
|
44
|
+
the bare-base rule and what to do on refusal. 1,012 characters removed across
|
|
45
|
+
the `build`, `plan` and `explore` prompts.
|
|
46
|
+
|
|
47
|
+
### Documented
|
|
48
|
+
|
|
49
|
+
- `isAvailable` and `pickSlot` now say, in place, that the pool is deliberately
|
|
50
|
+
fail-open in two places: a model absent from the catalog is not treated as
|
|
51
|
+
unavailable, and when every slot is cooling they are re-admitted rather than
|
|
52
|
+
the work refused. Both were previously only discoverable by reading the code.
|
|
53
|
+
|
|
54
|
+
## [0.4.0] — order-first weighted round-robin, and a reaper that can kill
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- **Slot selection is now order-first weighted round-robin.** Weight was both
|
|
59
|
+
the priority and the ceiling, so the heaviest slot was re-prioritised on every
|
|
60
|
+
spawn and refilled the moment a claim completed, while the others sat idle.
|
|
61
|
+
Selection walks the slot list in order, each slot taking as many turns as its
|
|
62
|
+
weight says, from a cursor persisted in the pool directory so the rotation is
|
|
63
|
+
shared by every opencode process rather than restarting in each one. Weights
|
|
64
|
+
`[3,2,1,1]` now produce the run `1,1,1,2,2,3,4`.
|
|
65
|
+
- The concurrency ceiling is unchanged: a slot still holds at most `weight`
|
|
66
|
+
concurrent claims, and overflow still goes to the least-loaded slot.
|
|
67
|
+
- `pool_status` previews the next slot without advancing the rotation, so
|
|
68
|
+
looking at the pool no longer shifts every spawn after it.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **A hung subagent could not be killed.** The reaper detected the wedge, freed
|
|
73
|
+
the claim, and then failed to abort the session — because the claim was
|
|
74
|
+
released *before* the abort, so a failed kill orphaned the session with
|
|
75
|
+
nothing left to retry it. Kills are verified against the response, retried
|
|
76
|
+
three times, and only a confirmed kill releases the claim; a give-up names
|
|
77
|
+
the session to kill by hand.
|
|
78
|
+
- A kill reported success for any HTTP response, including the gateway's
|
|
79
|
+
`200` with body `true` for a session that does not exist.
|
|
80
|
+
- A claim that never bound to a child session was logged as `Infinitys of
|
|
81
|
+
silence` and cooled the provider, though an unbound claim is no evidence that
|
|
82
|
+
anything hung. It is now released without cooling, and a child created before
|
|
83
|
+
its claim is bound at reap time instead of being lost.
|
|
84
|
+
- **A live task lost its slot past the TTL.** Claims now carry a heartbeat
|
|
85
|
+
refreshed by message activity, and abandonment is measured from it. A task
|
|
86
|
+
that ran past the 10-minute TTL previously stopped being counted while it
|
|
87
|
+
kept working, so the slot was handed out again — a ceiling-3 slot ran five.
|
|
88
|
+
|
|
89
|
+
## [0.3.0] — a sound per notification outcome (US-29)
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
|
|
93
|
+
- Notification outcomes are per-notification and sound, rather than one silent
|
|
94
|
+
aggregate.
|
|
95
|
+
|
|
96
|
+
## [0.2.2] — stop capping gateway traffic at 5s
|
|
97
|
+
|
|
98
|
+
### Fixed
|
|
99
|
+
|
|
100
|
+
- `timeoutMs` no longer caps real provider traffic at 5s. It was documented as
|
|
101
|
+
a probe budget only, but it was being applied to live completions too.
|
|
102
|
+
|
|
103
|
+
## [0.2.1] — OmniRoute registers the provider only
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
|
|
107
|
+
- The OmniRoute integration registers the provider and nothing else; it writes
|
|
108
|
+
no pool file and no variants.
|
|
109
|
+
|
|
110
|
+
## [0.2.0] — OmniRoute as the pool's primary slot
|
|
111
|
+
|
|
112
|
+
### Added
|
|
113
|
+
|
|
114
|
+
- OmniRoute, a local OpenAI-compatible gateway, as the pool's primary slot, with
|
|
115
|
+
combo routing, sticky sessions and cooldown on usage limits.
|
|
116
|
+
|
|
117
|
+
## [0.1.10] — observable self-update outcome
|
|
118
|
+
|
|
119
|
+
### Changed
|
|
120
|
+
|
|
121
|
+
- The self-update reports its outcome instead of failing silently.
|
|
122
|
+
|
|
123
|
+
## [0.1.9] — reclaim update locks orphaned by a dead process
|
|
124
|
+
|
|
125
|
+
### Fixed
|
|
126
|
+
|
|
127
|
+
- An update lock left behind by a dead process is reclaimed rather than blocking
|
|
128
|
+
every later update.
|
|
129
|
+
|
|
130
|
+
## [0.1.7] — self-update, hermetic tests
|
|
131
|
+
|
|
132
|
+
### Added
|
|
133
|
+
|
|
134
|
+
- Self-update on restart, and a hermetic test suite that does not read the
|
|
135
|
+
developer's own `~/.config`.
|
|
136
|
+
|
|
137
|
+
## [0.1.6] — small implement asks, Step 5 Preview pool
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
|
|
141
|
+
- Implementation asks are split into smaller units.
|
|
142
|
+
- `opencode-go/step-5-preview-free` added to the bundled pool preset.
|
|
143
|
+
|
|
144
|
+
## [0.1.5] — build/plan may spawn basic and expert
|
|
145
|
+
|
|
146
|
+
### Changed
|
|
147
|
+
|
|
148
|
+
- `build` and `plan` may spawn `basic` and `expert`, which are not pooled.
|
|
149
|
+
|
|
150
|
+
## [0.1.4] — flat pool.txt
|
|
151
|
+
|
|
152
|
+
### Changed
|
|
153
|
+
|
|
154
|
+
- The pool's user config is a flat `~/.config/lacode/pool.txt`, one model per
|
|
155
|
+
line with an optional weight.
|
|
156
|
+
|
|
157
|
+
## [0.1.3] — ship the updated notification/remote docs
|
|
158
|
+
|
|
159
|
+
### Changed
|
|
160
|
+
|
|
161
|
+
- Notification and remote-control documentation brought up to date.
|
|
162
|
+
|
|
163
|
+
## [0.1.1]
|
|
164
|
+
|
|
165
|
+
### Added
|
|
166
|
+
|
|
167
|
+
- First published release: pooled subagents over a shared set of models.
|
|
168
|
+
|
|
169
|
+
[Unreleased]: https://github.com/lawaty/lacode/compare/v0.4.1...HEAD
|
|
170
|
+
[0.4.1]: https://github.com/lawaty/lacode/compare/v0.4.0...v0.4.1
|
|
171
|
+
[0.4.0]: https://github.com/lawaty/lacode/compare/v0.3.0...v0.4.0
|
|
172
|
+
[0.3.0]: https://github.com/lawaty/lacode/compare/v0.2.2...v0.3.0
|
|
173
|
+
[0.2.2]: https://github.com/lawaty/lacode/compare/v0.2.1...v0.2.2
|
|
174
|
+
[0.2.1]: https://github.com/lawaty/lacode/compare/v0.2.0...v0.2.1
|
|
175
|
+
[0.2.0]: https://github.com/lawaty/lacode/compare/v0.1.10...v0.2.0
|
|
176
|
+
[0.1.10]: https://github.com/lawaty/lacode/compare/v0.1.9...v0.1.10
|
|
177
|
+
[0.1.9]: https://github.com/lawaty/lacode/compare/v0.1.7...v0.1.9
|
|
178
|
+
[0.1.7]: https://github.com/lawaty/lacode/compare/v0.1.6...v0.1.7
|
|
179
|
+
[0.1.6]: https://github.com/lawaty/lacode/compare/v0.1.5...v0.1.6
|
|
180
|
+
[0.1.5]: https://github.com/lawaty/lacode/compare/v0.1.4...v0.1.5
|
|
181
|
+
[0.1.4]: https://github.com/lawaty/lacode/compare/v0.1.3...v0.1.4
|
|
182
|
+
[0.1.3]: https://github.com/lawaty/lacode/compare/v0.1.1...v0.1.3
|
|
183
|
+
[0.1.1]: https://github.com/lawaty/lacode/releases/tag/v0.1.1
|