spur-board 0.22.0 → 0.23.0
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/daemon.mjs +50 -41
- package/package.json +3 -3
package/dist/daemon.mjs
CHANGED
|
@@ -13554,6 +13554,7 @@ async function runDaemon(deps) {
|
|
|
13554
13554
|
code = 1;
|
|
13555
13555
|
} finally {
|
|
13556
13556
|
lock.release();
|
|
13557
|
+
clearTimeout(timer);
|
|
13557
13558
|
finish(code);
|
|
13558
13559
|
}
|
|
13559
13560
|
}
|
|
@@ -16814,7 +16815,10 @@ function createJob(options) {
|
|
|
16814
16815
|
}
|
|
16815
16816
|
//#endregion
|
|
16816
16817
|
//#region ../daemon/src/board-modules.ts
|
|
16817
|
-
/**
|
|
16818
|
+
/**
|
|
16819
|
+
* Compose the board's timer and adapter runner without adding lifecycle state to main. `tick`
|
|
16820
|
+
* runs the board-core job once more behind its active run and resolves when that run settles.
|
|
16821
|
+
*/
|
|
16818
16822
|
function createBoardModules(ctxFor, options = {}) {
|
|
16819
16823
|
const coreCtx = ctxFor("board-core");
|
|
16820
16824
|
const adapterCtx = ctxFor("board-adapters");
|
|
@@ -16840,44 +16844,47 @@ function createBoardModules(ctxFor, options = {}) {
|
|
|
16840
16844
|
}
|
|
16841
16845
|
});
|
|
16842
16846
|
let runner;
|
|
16843
|
-
return
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16847
|
+
return {
|
|
16848
|
+
entries: [{
|
|
16849
|
+
name: "board-core",
|
|
16850
|
+
stopStage: "final",
|
|
16851
|
+
module: boardCore
|
|
16852
|
+
}, {
|
|
16853
|
+
name: "board-adapters",
|
|
16854
|
+
stopStage: "pollers",
|
|
16855
|
+
module: {
|
|
16856
|
+
async start(startSignal) {
|
|
16857
|
+
const adapterOptions = {
|
|
16858
|
+
secrets: adapterCtx.secrets,
|
|
16859
|
+
now: () => adapterCtx.clock.now(),
|
|
16860
|
+
fetch: (url, init) => adapterCtx.logCall("adapter.fetch", () => fetch(url, init)),
|
|
16861
|
+
warn: (message) => {
|
|
16862
|
+
adapterCtx.log.warn({ message }, "adapter warning");
|
|
16863
|
+
},
|
|
16864
|
+
onPollFailure: ({ source, step, kind, error, issues }) => {
|
|
16865
|
+
adapterCtx.log.warn({
|
|
16866
|
+
source,
|
|
16867
|
+
step,
|
|
16868
|
+
kind,
|
|
16869
|
+
err: error,
|
|
16870
|
+
...issues === void 0 ? {} : { issues }
|
|
16871
|
+
}, "adapter poll failed");
|
|
16872
|
+
},
|
|
16873
|
+
onSpurNotice: async (notice) => {
|
|
16874
|
+
if (notice.kind === "restart") adapterCtx.log.info("spur restarted");
|
|
16875
|
+
else await core.notice(notice.kind, notice.value);
|
|
16876
|
+
}
|
|
16877
|
+
};
|
|
16878
|
+
runner = (options.startAdapters ?? startAdapters)(adapterCtx.config, core, adapterOptions);
|
|
16879
|
+
if (startSignal.aborted) await runner.stop();
|
|
16880
|
+
},
|
|
16881
|
+
async stop() {
|
|
16882
|
+
await runner?.stop();
|
|
16883
|
+
}
|
|
16878
16884
|
}
|
|
16879
|
-
}
|
|
16880
|
-
|
|
16885
|
+
}],
|
|
16886
|
+
tick: () => boardCore.trigger()
|
|
16887
|
+
};
|
|
16881
16888
|
}
|
|
16882
16889
|
//#endregion
|
|
16883
16890
|
//#region ../daemon/src/spur-port.ts
|
|
@@ -17620,14 +17627,15 @@ function createDaemonModules(ctxFor, ports = {}) {
|
|
|
17620
17627
|
}
|
|
17621
17628
|
})
|
|
17622
17629
|
}];
|
|
17623
|
-
|
|
17630
|
+
const boardModules = createBoardModules(ctxFor, {
|
|
17624
17631
|
core,
|
|
17625
17632
|
...ports.startAdapters === void 0 ? {} : { startAdapters: ports.startAdapters },
|
|
17626
17633
|
...ports.tick === void 0 ? {} : { tick: ports.tick },
|
|
17627
17634
|
onTick: () => {
|
|
17628
17635
|
notifier.watchdog();
|
|
17629
17636
|
}
|
|
17630
|
-
})
|
|
17637
|
+
});
|
|
17638
|
+
entries.push(...boardModules.entries);
|
|
17631
17639
|
const inbound = gateway === void 0 || ports.gateway === void 0 && settings?.appToken === void 0 ? void 0 : createInboundModule(ctxFor("inbound"), gateway, registry);
|
|
17632
17640
|
if (settings !== null && inbound === void 0) ctx.log.info("Slack inbound disabled: SLACK_APP_TOKEN is absent");
|
|
17633
17641
|
const outbox = createOutboxModule(ctxFor("outbox"), gateway, ports.spur === void 0 ? {} : { spur: ports.spur });
|
|
@@ -17677,7 +17685,8 @@ function createDaemonModules(ctxFor, ports = {}) {
|
|
|
17677
17685
|
return {
|
|
17678
17686
|
entries,
|
|
17679
17687
|
inbound,
|
|
17680
|
-
outbox
|
|
17688
|
+
outbox,
|
|
17689
|
+
tick: boardModules.tick
|
|
17681
17690
|
};
|
|
17682
17691
|
}
|
|
17683
17692
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spur-board",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^24.12.0 || ^26.0.0"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@commander-js/extra-typings": "^15.0.0",
|
|
27
27
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
28
28
|
"commander": "^15.0.0",
|
|
29
|
-
"@slack/socket-mode": "3.1.
|
|
30
|
-
"@slack/web-api": "8.
|
|
29
|
+
"@slack/socket-mode": "3.1.1",
|
|
30
|
+
"@slack/web-api": "8.3.0",
|
|
31
31
|
"better-sqlite3": "^13.0.3",
|
|
32
32
|
"fastify": "^5.12.2",
|
|
33
33
|
"kysely": "^0.29.7",
|