@sideboard-ai/core 0.1.162 → 0.1.163

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.
@@ -464,7 +464,7 @@ async function continueSourceThread(threadId, prompt) {
464
464
  await continueOnReply(threadId, prompt);
465
465
  return;
466
466
  }
467
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-6RDRATVE.js");
467
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-LXSGYRX2.js");
468
468
  await getOrchestrator2().send(threadId, prompt);
469
469
  } catch {
470
470
  }
@@ -6504,7 +6504,7 @@ function formatScheduledPrompt(name, prompt) {
6504
6504
  ${prompt}`;
6505
6505
  }
6506
6506
  async function defaultDeps() {
6507
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-6RDRATVE.js");
6507
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-LXSGYRX2.js");
6508
6508
  const orch = getOrchestrator2();
6509
6509
  return {
6510
6510
  findThread: (id) => findThreadByRef(id),
@@ -399,7 +399,7 @@ async function continueSourceThread(threadId, prompt) {
399
399
  await continueOnReply(threadId, prompt);
400
400
  return;
401
401
  }
402
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-AXE7GCJA.js");
402
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-IPD6I53Y.js");
403
403
  await getOrchestrator2().send(threadId, prompt);
404
404
  } catch {
405
405
  }
@@ -6094,7 +6094,7 @@ function formatScheduledPrompt(name, prompt) {
6094
6094
  ${prompt}`;
6095
6095
  }
6096
6096
  async function defaultDeps() {
6097
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-AXE7GCJA.js");
6097
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-IPD6I53Y.js");
6098
6098
  const orch = getOrchestrator2();
6099
6099
  return {
6100
6100
  findThread: (id) => findThreadByRef(id),
package/dist/index.cjs CHANGED
@@ -28733,6 +28733,7 @@ var lookupPreferPublicDns = (hostname2, options, callback) => {
28733
28733
 
28734
28734
  // src/slack/relay-client.ts
28735
28735
  var import_ws2 = require("ws");
28736
+ var CLAIM_FALLBACK_MS = 400;
28736
28737
  var BACKOFF_START_MS2 = 1e3;
28737
28738
  var BACKOFF_MAX_MS2 = 3e4;
28738
28739
  function wait2(ms, signal) {
@@ -28803,6 +28804,16 @@ function connectSession2(ws, opts, log) {
28803
28804
  return new Promise((resolve, reject) => {
28804
28805
  let settled = false;
28805
28806
  const pending = /* @__PURE__ */ new Map();
28807
+ let relayAnswersClaims = false;
28808
+ const fallbackTimers = /* @__PURE__ */ new Map();
28809
+ const clearFallbackTimers = () => {
28810
+ for (const timer of fallbackTimers.values()) clearTimeout(timer);
28811
+ fallbackTimers.clear();
28812
+ };
28813
+ const markClaimsAnswered = () => {
28814
+ relayAnswersClaims = true;
28815
+ clearFallbackTimers();
28816
+ };
28806
28817
  const allowedUsers = new Set(
28807
28818
  opts.workspaces.map((w) => `${w.teamId.trim()}:${w.userId.trim()}`)
28808
28819
  );
@@ -28820,6 +28831,7 @@ function connectSession2(ws, opts, log) {
28820
28831
  if (settled) return;
28821
28832
  settled = true;
28822
28833
  pending.clear();
28834
+ clearFallbackTimers();
28823
28835
  stopKeepalive();
28824
28836
  opts.signal?.removeEventListener("abort", onAbort);
28825
28837
  if (err) reject(err);
@@ -28904,23 +28916,29 @@ function connectSession2(ws, opts, log) {
28904
28916
  }
28905
28917
  pending.set(msg.eventId, msg.message);
28906
28918
  send(ws, { type: "claim", eventId: msg.eventId });
28907
- const eventId = msg.eventId;
28908
- setTimeout(() => {
28909
- const inbound = pending.get(eventId);
28910
- if (!inbound) return;
28911
- pending.delete(eventId);
28912
- void Promise.resolve(opts.onEvent(inbound)).catch((err) => {
28913
- const errMsg = err instanceof Error ? err.message : String(err);
28914
- log(`event error: ${errMsg}`);
28915
- });
28916
- }, 400);
28919
+ if (!relayAnswersClaims) {
28920
+ const eventId = msg.eventId;
28921
+ const timer = setTimeout(() => {
28922
+ fallbackTimers.delete(eventId);
28923
+ const inbound = pending.get(eventId);
28924
+ if (!inbound) return;
28925
+ pending.delete(eventId);
28926
+ void Promise.resolve(opts.onEvent(inbound)).catch((err) => {
28927
+ const errMsg = err instanceof Error ? err.message : String(err);
28928
+ log(`event error: ${errMsg}`);
28929
+ });
28930
+ }, opts.claimFallbackMs ?? CLAIM_FALLBACK_MS);
28931
+ fallbackTimers.set(eventId, timer);
28932
+ }
28917
28933
  return;
28918
28934
  }
28919
28935
  if (msg.type === "claim_denied") {
28936
+ markClaimsAnswered();
28920
28937
  pending.delete(msg.eventId);
28921
28938
  return;
28922
28939
  }
28923
28940
  if (msg.type === "claim_ok") {
28941
+ markClaimsAnswered();
28924
28942
  const inbound = pending.get(msg.eventId);
28925
28943
  pending.delete(msg.eventId);
28926
28944
  if (!inbound) return;
package/dist/index.d.cts CHANGED
@@ -5991,6 +5991,8 @@ interface SlackRelayClientOptions {
5991
5991
  /** Tests: override keepalive cadence. */
5992
5992
  pingIntervalMs?: number;
5993
5993
  pongTimeoutMs?: number;
5994
+ /** Tests: override the legacy-relay claim fallback delay. */
5995
+ claimFallbackMs?: number;
5994
5996
  }
5995
5997
  /**
5996
5998
  * Desktop client: connect to the hosted Slack relay, register this Mac as a
package/dist/index.d.ts CHANGED
@@ -5991,6 +5991,8 @@ interface SlackRelayClientOptions {
5991
5991
  /** Tests: override keepalive cadence. */
5992
5992
  pingIntervalMs?: number;
5993
5993
  pongTimeoutMs?: number;
5994
+ /** Tests: override the legacy-relay claim fallback delay. */
5995
+ claimFallbackMs?: number;
5994
5996
  }
5995
5997
  /**
5996
5998
  * Desktop client: connect to the hosted Slack relay, register this Mac as a
package/dist/index.js CHANGED
@@ -236,7 +236,7 @@ import {
236
236
  worktreeCleanupSettings,
237
237
  wrapReviewSkillMarkdown,
238
238
  writeWorktreeFile
239
- } from "./chunk-MWQOHQX7.js";
239
+ } from "./chunk-7K7GT2EI.js";
240
240
  import {
241
241
  LEGACY_PLAN_FILE_REL,
242
242
  PLAN_FILE_NAME,
@@ -6176,6 +6176,7 @@ var lookupPreferPublicDns = (hostname, options, callback) => {
6176
6176
 
6177
6177
  // src/slack/relay-client.ts
6178
6178
  import { WebSocket as WsWebSocket2 } from "ws";
6179
+ var CLAIM_FALLBACK_MS = 400;
6179
6180
  var BACKOFF_START_MS2 = 1e3;
6180
6181
  var BACKOFF_MAX_MS2 = 3e4;
6181
6182
  function wait2(ms, signal) {
@@ -6246,6 +6247,16 @@ function connectSession2(ws, opts, log) {
6246
6247
  return new Promise((resolve, reject) => {
6247
6248
  let settled = false;
6248
6249
  const pending = /* @__PURE__ */ new Map();
6250
+ let relayAnswersClaims = false;
6251
+ const fallbackTimers = /* @__PURE__ */ new Map();
6252
+ const clearFallbackTimers = () => {
6253
+ for (const timer of fallbackTimers.values()) clearTimeout(timer);
6254
+ fallbackTimers.clear();
6255
+ };
6256
+ const markClaimsAnswered = () => {
6257
+ relayAnswersClaims = true;
6258
+ clearFallbackTimers();
6259
+ };
6249
6260
  const allowedUsers = new Set(
6250
6261
  opts.workspaces.map((w) => `${w.teamId.trim()}:${w.userId.trim()}`)
6251
6262
  );
@@ -6263,6 +6274,7 @@ function connectSession2(ws, opts, log) {
6263
6274
  if (settled) return;
6264
6275
  settled = true;
6265
6276
  pending.clear();
6277
+ clearFallbackTimers();
6266
6278
  stopKeepalive();
6267
6279
  opts.signal?.removeEventListener("abort", onAbort);
6268
6280
  if (err) reject(err);
@@ -6347,23 +6359,29 @@ function connectSession2(ws, opts, log) {
6347
6359
  }
6348
6360
  pending.set(msg.eventId, msg.message);
6349
6361
  send(ws, { type: "claim", eventId: msg.eventId });
6350
- const eventId = msg.eventId;
6351
- setTimeout(() => {
6352
- const inbound = pending.get(eventId);
6353
- if (!inbound) return;
6354
- pending.delete(eventId);
6355
- void Promise.resolve(opts.onEvent(inbound)).catch((err) => {
6356
- const errMsg = err instanceof Error ? err.message : String(err);
6357
- log(`event error: ${errMsg}`);
6358
- });
6359
- }, 400);
6362
+ if (!relayAnswersClaims) {
6363
+ const eventId = msg.eventId;
6364
+ const timer = setTimeout(() => {
6365
+ fallbackTimers.delete(eventId);
6366
+ const inbound = pending.get(eventId);
6367
+ if (!inbound) return;
6368
+ pending.delete(eventId);
6369
+ void Promise.resolve(opts.onEvent(inbound)).catch((err) => {
6370
+ const errMsg = err instanceof Error ? err.message : String(err);
6371
+ log(`event error: ${errMsg}`);
6372
+ });
6373
+ }, opts.claimFallbackMs ?? CLAIM_FALLBACK_MS);
6374
+ fallbackTimers.set(eventId, timer);
6375
+ }
6360
6376
  return;
6361
6377
  }
6362
6378
  if (msg.type === "claim_denied") {
6379
+ markClaimsAnswered();
6363
6380
  pending.delete(msg.eventId);
6364
6381
  return;
6365
6382
  }
6366
6383
  if (msg.type === "claim_ok") {
6384
+ markClaimsAnswered();
6367
6385
  const inbound = pending.get(msg.eventId);
6368
6386
  pending.delete(msg.eventId);
6369
6387
  if (!inbound) return;
@@ -36,7 +36,7 @@ import {
36
36
  syncBoardPins,
37
37
  updateSchedule,
38
38
  waitForDetachedJob
39
- } from "../chunk-SAVAC53C.js";
39
+ } from "../chunk-NYYGQT5Y.js";
40
40
  import {
41
41
  isInternalAgentStatusText,
42
42
  listModelsForAgent,
@@ -7,7 +7,7 @@ import {
7
7
  isPidAlive,
8
8
  startOrchestration,
9
9
  waitForPidExit
10
- } from "./chunk-SAVAC53C.js";
10
+ } from "./chunk-NYYGQT5Y.js";
11
11
  import "./chunk-GGOU4JJU.js";
12
12
  import "./chunk-LZ6QMEQC.js";
13
13
  import "./chunk-S42XV45P.js";
@@ -5,7 +5,7 @@ import {
5
5
  isPidAlive,
6
6
  startOrchestration,
7
7
  waitForPidExit
8
- } from "./chunk-MWQOHQX7.js";
8
+ } from "./chunk-7K7GT2EI.js";
9
9
  import "./chunk-RFMQY56R.js";
10
10
  import "./chunk-QPJJ7H7C.js";
11
11
  import "./chunk-QANLIT2E.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.162",
3
+ "version": "0.1.163",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",