@ixo/oracle-runtime-workers 0.34.0 → 0.34.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixo/oracle-runtime-workers",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"description": "QiForge oracle runtime for Cloudflare Workers — Durable Object per user (SQLite in WASM over DO storage), Matrix E2EE gateway Durable Object, Hono HTTP/SSE shell.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"protobufjs": "^7.6.5",
|
|
68
68
|
"@ixo/topic-protocol": "1.0.0-rc.8",
|
|
69
69
|
"survey-core": "2.3.11",
|
|
70
|
+
"@ixo/common": "1.7.1",
|
|
70
71
|
"@ixo/ixo-transaction": "0.2.0",
|
|
71
|
-
"@ixo/ucan": "2.3.0"
|
|
72
|
-
"@ixo/common": "1.7.1"
|
|
72
|
+
"@ixo/ucan": "2.3.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@cloudflare/vitest-pool-workers": "^0.22.0",
|
|
@@ -179,7 +179,7 @@ function invalidInput(detail: string): Failure {
|
|
|
179
179
|
/* ── names ────────────────────────────────────────────────────────────── */
|
|
180
180
|
|
|
181
181
|
/** The longest a call waits for its names. */
|
|
182
|
-
export const NAMES_BUDGET_MS =
|
|
182
|
+
export const NAMES_BUDGET_MS = 6_000;
|
|
183
183
|
/** What the names wait leaves of the call's budget. */
|
|
184
184
|
export const NAMES_RESERVE_MS = 1_000;
|
|
185
185
|
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
*
|
|
18
18
|
* A POST belongs to no call: it runs under its own {@link POST_TIMEOUT_MS}
|
|
19
19
|
* through the plugin's bounded exchange (no redirects, body cut off at
|
|
20
|
-
* {@link MAX_RESPONSE_BYTES})
|
|
20
|
+
* {@link MAX_RESPONSE_BYTES}) and asks the worker to answer by
|
|
21
|
+
* {@link RESPONSE_BUDGET_MS} with what is ready. Each call waits for its own ids only, until
|
|
21
22
|
* its own deadline or its turn's abort; its answer then lands in the memo
|
|
22
23
|
* for the next call. Names never fail a tool: any failure is one log line
|
|
23
24
|
* (a status or an error class, never an identifier) and no names.
|
|
@@ -55,7 +56,14 @@ export const BATCH_WINDOW_MS = 10;
|
|
|
55
56
|
/** An open batch this old lost its window timer: the next caller sends it. */
|
|
56
57
|
export const BATCH_STALE_MS = 100;
|
|
57
58
|
/** One POST's whole time, the body read included; no caller shortens it. */
|
|
58
|
-
export const POST_TIMEOUT_MS =
|
|
59
|
+
export const POST_TIMEOUT_MS = 6_000;
|
|
60
|
+
/**
|
|
61
|
+
* The worker answers by this time with what is ready, the rest as `partial`
|
|
62
|
+
* ids, and finishes them in the background for the next call. Below
|
|
63
|
+
* {@link POST_TIMEOUT_MS} by enough for network time and the worker's D1
|
|
64
|
+
* reads, which come on top: an answer past the timeout would lose every id.
|
|
65
|
+
*/
|
|
66
|
+
export const RESPONSE_BUDGET_MS = 5_000;
|
|
59
67
|
/**
|
|
60
68
|
* An id outstanding this long lost its POST: it is never joined again and
|
|
61
69
|
* no longer counts toward {@link MAX_OUTSTANDING_IDS}.
|
|
@@ -220,7 +228,10 @@ async function post(
|
|
|
220
228
|
'content-type': 'application/json',
|
|
221
229
|
'x-client-id': target.clientId,
|
|
222
230
|
},
|
|
223
|
-
body: JSON.stringify({
|
|
231
|
+
body: JSON.stringify({
|
|
232
|
+
ids,
|
|
233
|
+
options: { include: ['name', 'cache'], budgetMs: RESPONSE_BUDGET_MS },
|
|
234
|
+
}),
|
|
224
235
|
},
|
|
225
236
|
{ timeoutMs: POST_TIMEOUT_MS, maxBytes: MAX_RESPONSE_BYTES },
|
|
226
237
|
);
|