wontopos 2.2.36 → 2.2.38
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/README.md +5 -100
- package/dist/cjs/wontopos.d.cts +1048 -0
- package/dist/cjs/wontopos.js +106 -719
- package/dist/wontopos.d.ts +63 -3
- package/dist/wontopos.js +106 -719
- package/package.json +17 -7
package/README.md
CHANGED
|
@@ -210,103 +210,8 @@ data to fix it.
|
|
|
210
210
|
|
|
211
211
|
## Changelog
|
|
212
212
|
|
|
213
|
-
The three clients release in lockstep — same version, same surface, same day.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
for a reader to hit.
|
|
219
|
-
|
|
220
|
-
- **2.2.36** — an outside review, read by a different model with no knowledge of why
|
|
221
|
-
any of this was written. The one that mattered: `recall()` promised in its own
|
|
222
|
-
documentation that a count outside 5–20 was refused rather than clamped, and
|
|
223
|
-
nothing checked — so `{ limit: 500 }` travelled to the service and failed there, for a
|
|
224
|
-
mistake visible before opening a socket. `context_limit` (0–20) was unchecked the same way.
|
|
225
|
-
Both are refused here now, and `0` still passes for `context_limit` because "attach none" is
|
|
226
|
-
an answer, not a missing value.
|
|
227
|
-
An argument mistake now throws a plain `Error`, not a `WosError`. A `WosError` with
|
|
228
|
-
status 0 is `APIConnectionError` — "the request never got a response" — so
|
|
229
|
-
`if (e.status === 0) retry()` would have retried a typo forever. And `recall` is
|
|
230
|
-
now `async`: validating inside a non-async method threw synchronously, so
|
|
231
|
-
`mem.recall(...).catch(h)` walked past the handler while the same mistake in
|
|
232
|
-
`search` landed in it.
|
|
233
|
-
New `deadlineMs` / `withDeadline(ms)`: a TOTAL budget for one call across every
|
|
234
|
-
retry. `timeoutMs` bounds one ATTEMPT, so at the defaults a call could hold for 30s
|
|
235
|
-
+ backoff + 30s + backoff + 30s and a request handler with five seconds had no way
|
|
236
|
-
to say so. New `signal` / `withSignal(signal)`: cancel work in flight — an abort
|
|
237
|
-
ends the request AND any backoff sleep waiting to retry it.
|
|
238
|
-
`require("wontopos")` now resolves: the package ships CommonJS and ESM from one
|
|
239
|
-
source. Previously `"type": "module"` with no `require` condition meant Node's CJS
|
|
240
|
-
resolver could not resolve this package at all.
|
|
241
|
-
`replayed` is set only when the service did not send that field itself.
|
|
242
|
-
- **2.2.35** — fixes, and **two behaviour changes**, both listed first because a patch
|
|
243
|
-
release is not the place to find one by surprise.
|
|
244
|
-
|
|
245
|
-
⚠️ **`search`'s count is now 5–20, and out of range is refused rather than
|
|
246
|
-
adjusted.** `recall` has carried that range from the start; search had no contract
|
|
247
|
-
anywhere, so the clients sent whatever they were given and the service capped at 50
|
|
248
|
-
with no floor. `search(q, limit=50)` and `search(q, limit=3)` both worked on 2.2.34
|
|
249
|
-
and now raise. The default is still 10, so a call that passes no count is unaffected.
|
|
250
|
-
Asking for 20 and silently getting 10 reads as "that is all there is", which is why
|
|
251
|
-
this refuses instead of clamping.
|
|
252
|
-
|
|
253
|
-
⚠️ **A Rust `limit` of 0 is no longer rewritten to 10.** It was, and the caller whose
|
|
254
|
-
prompt budget computed zero was handed ten memories and the bill for them. It is now
|
|
255
|
-
refused under the range above rather than quietly changed to something nobody asked
|
|
256
|
-
for.
|
|
257
|
-
|
|
258
|
-
The fixes: a `null` idempotency key no longer becomes the literal key `"null"`, which
|
|
259
|
-
had made every write on that path share one key so the second onward stored nothing
|
|
260
|
-
(TypeScript). The async client no longer reads an explicit `retries=2` as "the caller
|
|
261
|
-
said nothing" (Python). The image read is actually streamed, so the 64MB cap bounds a
|
|
262
|
-
compressed body instead of measuring bytes already in memory (Python async), and that
|
|
263
|
-
route's ERROR body is capped too (Rust). `iter_images` stops on a repeated cursor the
|
|
264
|
-
way `iter_memories` always did (Python). `iterImages` no longer throws on the ordinary
|
|
265
|
-
end of a walk (TypeScript). `get_image` retries a 429 and a connect-level failure like
|
|
266
|
-
every other call — it had none at all — in the **sync Python client and TypeScript**;
|
|
267
|
-
the async Python client and the Rust crate still make a single attempt there, and say
|
|
268
|
-
so at the method. An empty or control-character API key is refused at the call site
|
|
269
|
-
rather than at the network in **Python and Rust**; TypeScript still refuses only empty
|
|
270
|
-
and whitespace. And a page walk that reaches its ceiling now raises instead of
|
|
271
|
-
returning a truncated list that looks complete.
|
|
272
|
-
- **2.2.34** — the default engine is `tablet-2`: same token price as `tablet-1`, and
|
|
273
|
-
the one that serves images and re-ask. Pin the old one with
|
|
274
|
-
`model="tablet-1"` for the previous behaviour exactly. (The engine's own default
|
|
275
|
-
count differs between the two, but these SDKs always send one, so a call through
|
|
276
|
-
them is unaffected.) New `search_full` /
|
|
277
|
-
`searchFull` keeps every field the answer came with — `search` was merging away
|
|
278
|
-
the photos and `verify_used`, both of which you were billed for. Also: results arrive
|
|
279
|
-
best-first — take the order as given. `similarity` is a raw closeness score, and
|
|
280
|
-
sorting by it makes results worse.
|
|
281
|
-
- **2.2.33** — `get_image` can return a different FORMAT than you uploaded: the
|
|
282
|
-
service re-encodes on downscale, so a large PNG comes back as WebP. Take the file
|
|
283
|
-
extension from the response Content-Type, not from what you sent.
|
|
284
|
-
- **2.2.32** — `get_image` returns the picture the SERVICE holds, not your original.
|
|
285
|
-
An image whose long edge is over 1568px is downscaled on the way in, and that
|
|
286
|
-
smaller picture is what is stored and handed back. Keep your own copy if you need
|
|
287
|
-
the full file.
|
|
288
|
-
- **2.2.31** — images, by-speaker, lineage and revisions are SDK methods in all three
|
|
289
|
-
clients; `search` and `recall` take `verify`, `max_images` and recall's `limit` /
|
|
290
|
-
`context_limit`.
|
|
291
|
-
- **2.2.30** — documentation only: this changelog, which had not been updated
|
|
292
|
-
in the shipped package since 2.2.10.
|
|
293
|
-
- **2.2.29** — a store id that was PASSED but unusable no longer becomes the
|
|
294
|
-
default store. 2.2.28 caught a blank string; the value a failed tenant lookup
|
|
295
|
-
actually produces in JavaScript is `null` — and `String(null)` is the truthy
|
|
296
|
-
`"null"`, so it walked past the check and `null || default` sent the write to
|
|
297
|
-
the client's default store. `0` did the same. Anything but a non-blank string
|
|
298
|
-
now throws, on `deleteStore` / `deleteAll` too. Omitting the argument still
|
|
299
|
-
means "use the default". Also: `deleteStore` validates before it warns, so a
|
|
300
|
-
non-string no longer surfaces as a `TypeError` from inside the SDK.
|
|
301
|
-
- **2.2.28** — audit: the API key no longer survives an object spread (`private`
|
|
302
|
-
is erased at runtime, so `{...client}` copied it), a whitespace `memoryId` can
|
|
303
|
-
no longer read as a whole-store delete, and a blank store id throws instead of
|
|
304
|
-
silently using the default.
|
|
305
|
-
- **2.2.11–2.2.27** — additive fixes and hardening across all three clients.
|
|
306
|
-
- **2.2.10** — `Memory` fix: the relevance field is `similarity` (not `score`);
|
|
307
|
-
added typed `importance`, `category`, `is_superseded`, `superseded_by`,
|
|
308
|
-
`created_at`, `event_date`.
|
|
309
|
-
- **2.2.4–2.2.9** — one version across Python, TypeScript and Rust, released in
|
|
310
|
-
lockstep; retries, redirect refusal, response cap, key masking, speakers.
|
|
311
|
-
|
|
312
|
-
License: MIT.
|
|
213
|
+
The three clients release in lockstep — same version, same surface, same day. Patch
|
|
214
|
+
releases are additive. Four inside 2.2 were not, deliberately and each with its
|
|
215
|
+
reason; the changelog lists them.
|
|
216
|
+
|
|
217
|
+
See [CHANGELOG.md](https://github.com/wontopos/wontopos-node/blob/main/CHANGELOG.md).
|