@abelxiaoxing/cadence 2.0.48 → 2.0.50
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 +1 -1
- package/src/service-host.mjs +2 -2
- package/src/worker-model.mjs +8 -12
- package/web/dist/assets/cadence.css +1 -1
- package/web/dist/assets/cadence.js +13 -13
- package/web/dist/manifest.json +6 -6
package/package.json
CHANGED
package/src/service-host.mjs
CHANGED
|
@@ -32002,8 +32002,8 @@ function workflowResultDetail(value, secrets) {
|
|
|
32002
32002
|
|
|
32003
32003
|
// src/service/workflows.ts
|
|
32004
32004
|
var OWNER_RUNTIME = Object.freeze({
|
|
32005
|
-
version: "2.0.
|
|
32006
|
-
build: "
|
|
32005
|
+
version: "2.0.50",
|
|
32006
|
+
build: "4f9f6f3122a608f20c9ff55505dd7fb726d86c9f4cbc2017f4362e810b0fc9a0",
|
|
32007
32007
|
entry: fileURLToPath7(import.meta.url),
|
|
32008
32008
|
pid: process.pid,
|
|
32009
32009
|
node: process.versions.node,
|
package/src/worker-model.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
closed,
|
|
5
5
|
decodeModelRetry,
|
|
6
6
|
integer,
|
|
7
|
-
LIMITS,
|
|
8
7
|
list,
|
|
9
8
|
oneOf,
|
|
10
9
|
text,
|
|
@@ -274,11 +273,13 @@ export class WorkerModelState {
|
|
|
274
273
|
|
|
275
274
|
/** One private, sequential request at a time. Replies contain credentials only
|
|
276
275
|
* on the owner/child IPC pipe, never in capture or a tool result. No retry here.
|
|
276
|
+
* SDK availability checks and prompt/request auth can overlap in ONE worker;
|
|
277
|
+
* worker-reservation limits are not an admission limit for these callers.
|
|
278
|
+
* Await their originals in order, keeping at most one owner request in flight.
|
|
277
279
|
* Abort is owned by the session; disconnect is a real loss of its auth owner. */
|
|
278
280
|
export function ownerAuth(channel, retain, fail = () => {}) {
|
|
279
281
|
let sequence = 0;
|
|
280
282
|
let pending;
|
|
281
|
-
let queued = 0;
|
|
282
283
|
let tail = Promise.resolve();
|
|
283
284
|
let closed = false;
|
|
284
285
|
const disconnect = () => {
|
|
@@ -303,9 +304,8 @@ export function ownerAuth(channel, retain, fail = () => {}) {
|
|
|
303
304
|
channel.on("disconnect", disconnect);
|
|
304
305
|
return {
|
|
305
306
|
resolve() {
|
|
306
|
-
if (closed || !channel.connected
|
|
307
|
+
if (closed || !channel.connected)
|
|
307
308
|
return Promise.reject(new Error("Owner authentication unavailable"));
|
|
308
|
-
queued++;
|
|
309
309
|
const original = tail.then(
|
|
310
310
|
() =>
|
|
311
311
|
new Promise((resolve, reject) => {
|
|
@@ -324,14 +324,10 @@ export function ownerAuth(channel, retain, fail = () => {}) {
|
|
|
324
324
|
}
|
|
325
325
|
}),
|
|
326
326
|
);
|
|
327
|
-
tail = original
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
)
|
|
332
|
-
.finally(() => {
|
|
333
|
-
queued--;
|
|
334
|
-
});
|
|
327
|
+
tail = original.then(
|
|
328
|
+
() => {},
|
|
329
|
+
() => {},
|
|
330
|
+
);
|
|
335
331
|
return original;
|
|
336
332
|
},
|
|
337
333
|
close() {
|