@astralform/js 7.0.0 → 7.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/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -625,7 +625,16 @@ var AstralformClient = class {
|
|
|
625
625
|
*/
|
|
626
626
|
async getModels() {
|
|
627
627
|
const raw = await this.get("/v1/models");
|
|
628
|
-
return raw.map((m) =>
|
|
628
|
+
return raw.map((m) => {
|
|
629
|
+
const option = camelizeKeys(m);
|
|
630
|
+
return {
|
|
631
|
+
...option,
|
|
632
|
+
iconUrl: option.iconUrl ?? null,
|
|
633
|
+
lastUsedAt: option.lastUsedAt ?? null,
|
|
634
|
+
useCount: option.useCount ?? null,
|
|
635
|
+
contextWindow: option.contextWindow ?? null
|
|
636
|
+
};
|
|
637
|
+
});
|
|
629
638
|
}
|
|
630
639
|
async getSkills() {
|
|
631
640
|
const raw = await this.get("/v1/skills");
|
|
@@ -1301,7 +1310,7 @@ function translateWireEvent(wire) {
|
|
|
1301
1310
|
|
|
1302
1311
|
// src/session.ts
|
|
1303
1312
|
var SSE_MAX_RECONNECTS = 6;
|
|
1304
|
-
var SSE_STALL_TIMEOUT_MS =
|
|
1313
|
+
var SSE_STALL_TIMEOUT_MS = 135e3;
|
|
1305
1314
|
var TOOL_RESULT_MAX_RETRIES = 3;
|
|
1306
1315
|
var CONVERSATION_PAGE_SIZE = 50;
|
|
1307
1316
|
function sseReconnectDelayMs(attempt) {
|
|
@@ -1712,7 +1721,7 @@ var ChatSession = class {
|
|
|
1712
1721
|
* whether an ended stream means "turn done" vs "dropped, reconnect".
|
|
1713
1722
|
*
|
|
1714
1723
|
* ``onStall`` aborts the per-attempt connection: if no event arrives within
|
|
1715
|
-
* SSE_STALL_TIMEOUT_MS (backend keepalives land every
|
|
1724
|
+
* SSE_STALL_TIMEOUT_MS (backend keepalives land every 15-45s), the stream is a
|
|
1716
1725
|
* zombie — ``reader.read()`` will never settle — so we kill the fetch and
|
|
1717
1726
|
* throw a ConnectionError, feeding the caller's reconnect-from-lastSeq loop.
|
|
1718
1727
|
*/
|