@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abelxiaoxing/cadence",
3
- "version": "2.0.48",
3
+ "version": "2.0.50",
4
4
  "description": "Conversation-driven Pi workspace: persistent native and WebUI workflows, explicit plan approval, checks and local delivery.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -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.48",
32006
- build: "535e50b784b8c2c881f9f479382c17e0e3cd7e1b74314916dd6a8b708f0a71f8",
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,
@@ -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 || queued >= LIMITS.childReservations)
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
- .then(
329
- () => {},
330
- () => {},
331
- )
332
- .finally(() => {
333
- queued--;
334
- });
327
+ tail = original.then(
328
+ () => {},
329
+ () => {},
330
+ );
335
331
  return original;
336
332
  },
337
333
  close() {