@drisp/cli 0.6.0 → 0.6.2
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.
|
@@ -15063,6 +15063,7 @@ function createDashboardFeedOutbox(options = {}) {
|
|
|
15063
15063
|
last_error
|
|
15064
15064
|
FROM dashboard_feed_outbox
|
|
15065
15065
|
WHERE acked_at IS NULL AND next_attempt_at <= ?
|
|
15066
|
+
AND (? IS NULL OR instance_id = ?)
|
|
15066
15067
|
ORDER BY delivery_seq ASC
|
|
15067
15068
|
LIMIT ?
|
|
15068
15069
|
`);
|
|
@@ -15106,7 +15107,13 @@ function createDashboardFeedOutbox(options = {}) {
|
|
|
15106
15107
|
enqueueTx(input);
|
|
15107
15108
|
},
|
|
15108
15109
|
pendingBatch(input) {
|
|
15109
|
-
const
|
|
15110
|
+
const instanceId = input.instanceId ?? null;
|
|
15111
|
+
const rows = selectPending.all(
|
|
15112
|
+
input.now,
|
|
15113
|
+
instanceId,
|
|
15114
|
+
instanceId,
|
|
15115
|
+
input.limit
|
|
15116
|
+
);
|
|
15110
15117
|
return rows.map((row) => {
|
|
15111
15118
|
const feedEvent = JSON.parse(row.feed_event_json);
|
|
15112
15119
|
return {
|
|
@@ -15170,7 +15177,18 @@ function createPairedFeedPublisher(options = {}) {
|
|
|
15170
15177
|
}
|
|
15171
15178
|
function drain(force = false) {
|
|
15172
15179
|
if (!transport) return;
|
|
15180
|
+
let config2;
|
|
15181
|
+
try {
|
|
15182
|
+
config2 = readConfig2();
|
|
15183
|
+
} catch (err) {
|
|
15184
|
+
onError(
|
|
15185
|
+
`paired feed drain failed: ${err instanceof Error ? err.message : String(err)}`
|
|
15186
|
+
);
|
|
15187
|
+
return;
|
|
15188
|
+
}
|
|
15189
|
+
if (!config2) return;
|
|
15173
15190
|
const rows = getOutbox().pendingBatch({
|
|
15191
|
+
instanceId: config2.instanceId,
|
|
15174
15192
|
limit: 100,
|
|
15175
15193
|
now: force ? Number.POSITIVE_INFINITY : now()
|
|
15176
15194
|
});
|
|
@@ -33999,6 +34017,22 @@ async function startRunnerProcess(options = {}) {
|
|
|
33999
34017
|
};
|
|
34000
34018
|
}
|
|
34001
34019
|
|
|
34020
|
+
// src/infra/daemon/shutdownSignal.ts
|
|
34021
|
+
function waitForShutdownSignal() {
|
|
34022
|
+
return new Promise((resolve) => {
|
|
34023
|
+
const keepAlive = setInterval(() => {
|
|
34024
|
+
}, 2 ** 31 - 1);
|
|
34025
|
+
const onSignal = (signal) => {
|
|
34026
|
+
clearInterval(keepAlive);
|
|
34027
|
+
process.off("SIGINT", onSignal);
|
|
34028
|
+
process.off("SIGTERM", onSignal);
|
|
34029
|
+
resolve(signal);
|
|
34030
|
+
};
|
|
34031
|
+
process.on("SIGINT", onSignal);
|
|
34032
|
+
process.on("SIGTERM", onSignal);
|
|
34033
|
+
});
|
|
34034
|
+
}
|
|
34035
|
+
|
|
34002
34036
|
export {
|
|
34003
34037
|
releaseMcpAsset,
|
|
34004
34038
|
getGlyphs,
|
|
@@ -34099,6 +34133,7 @@ export {
|
|
|
34099
34133
|
readPidLock,
|
|
34100
34134
|
readRunnerStatusFile,
|
|
34101
34135
|
RunnerStartupError,
|
|
34102
|
-
startRunnerProcess
|
|
34136
|
+
startRunnerProcess,
|
|
34137
|
+
waitForShutdownSignal
|
|
34103
34138
|
};
|
|
34104
|
-
//# sourceMappingURL=chunk-
|
|
34139
|
+
//# sourceMappingURL=chunk-ANYY7XRT.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
startRunnerProcess
|
|
3
|
-
|
|
2
|
+
startRunnerProcess,
|
|
3
|
+
waitForShutdownSignal
|
|
4
|
+
} from "./chunk-ANYY7XRT.js";
|
|
4
5
|
|
|
5
6
|
// src/app/entry/runnerDaemon.ts
|
|
6
7
|
import path from "path";
|
|
@@ -21,15 +22,7 @@ async function runRunnerDaemonEntry() {
|
|
|
21
22
|
);
|
|
22
23
|
return 1;
|
|
23
24
|
}
|
|
24
|
-
const reason = await
|
|
25
|
-
const onSignal = (signal) => {
|
|
26
|
-
process.off("SIGINT", onSignal);
|
|
27
|
-
process.off("SIGTERM", onSignal);
|
|
28
|
-
resolve(signal);
|
|
29
|
-
};
|
|
30
|
-
process.on("SIGINT", onSignal);
|
|
31
|
-
process.on("SIGTERM", onSignal);
|
|
32
|
-
});
|
|
25
|
+
const reason = await waitForShutdownSignal();
|
|
33
26
|
await runner.stop(reason);
|
|
34
27
|
return 0;
|
|
35
28
|
}
|
|
@@ -53,4 +46,4 @@ if (process.argv.includes("--help")) {
|
|
|
53
46
|
export {
|
|
54
47
|
runRunnerDaemonEntry
|
|
55
48
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-VETXW62U.js.map
|
package/dist/cli.js
CHANGED
|
@@ -98,10 +98,11 @@ import {
|
|
|
98
98
|
supportsSessionApproval,
|
|
99
99
|
todoGlyphSet,
|
|
100
100
|
visualPositionToOffset,
|
|
101
|
+
waitForShutdownSignal,
|
|
101
102
|
wrapText,
|
|
102
103
|
writeAttachmentMirror,
|
|
103
104
|
writeDashboardClientConfig
|
|
104
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-ANYY7XRT.js";
|
|
105
106
|
import {
|
|
106
107
|
generateId as generateId2
|
|
107
108
|
} from "./chunk-USK5VSQ7.js";
|
|
@@ -8811,7 +8812,7 @@ function WizardHints({ stepState, stepIndex }) {
|
|
|
8811
8812
|
|
|
8812
8813
|
// src/infra/telemetry/client.ts
|
|
8813
8814
|
import { PostHog } from "posthog-node";
|
|
8814
|
-
var POSTHOG_API_KEY = true ? "
|
|
8815
|
+
var POSTHOG_API_KEY = true ? "" : "";
|
|
8815
8816
|
var POSTHOG_HOST = "https://us.i.posthog.com";
|
|
8816
8817
|
var client = null;
|
|
8817
8818
|
var deviceId = null;
|
|
@@ -13147,7 +13148,7 @@ var cachedVersion = null;
|
|
|
13147
13148
|
function readPackageVersion() {
|
|
13148
13149
|
if (cachedVersion !== null) return cachedVersion;
|
|
13149
13150
|
try {
|
|
13150
|
-
const injected = "0.6.
|
|
13151
|
+
const injected = "0.6.2";
|
|
13151
13152
|
if (typeof injected === "string" && injected.length > 0) {
|
|
13152
13153
|
cachedVersion = injected;
|
|
13153
13154
|
return cachedVersion;
|
|
@@ -13648,7 +13649,7 @@ async function runRunnerCommand(input, deps = {}) {
|
|
|
13648
13649
|
return err instanceof RunnerStartupError ? err.exitCode : 1;
|
|
13649
13650
|
}
|
|
13650
13651
|
logOut(`runner: foreground runtime connected (pid ${runner.pid})`);
|
|
13651
|
-
const wait = deps.waitForShutdown ??
|
|
13652
|
+
const wait = deps.waitForShutdown ?? waitForShutdownSignal;
|
|
13652
13653
|
const reason = await wait();
|
|
13653
13654
|
await runner.stop(reason);
|
|
13654
13655
|
logOut(`runner: stopped (${reason})`);
|
|
@@ -14028,17 +14029,6 @@ async function runRunnerCommand(input, deps = {}) {
|
|
|
14028
14029
|
logError(USAGE3);
|
|
14029
14030
|
return 2;
|
|
14030
14031
|
}
|
|
14031
|
-
function defaultWaitForShutdown() {
|
|
14032
|
-
return new Promise((resolve) => {
|
|
14033
|
-
const onSignal = (signal) => {
|
|
14034
|
-
process.off("SIGINT", onSignal);
|
|
14035
|
-
process.off("SIGTERM", onSignal);
|
|
14036
|
-
resolve(signal);
|
|
14037
|
-
};
|
|
14038
|
-
process.once("SIGINT", onSignal);
|
|
14039
|
-
process.once("SIGTERM", onSignal);
|
|
14040
|
-
});
|
|
14041
|
-
}
|
|
14042
14032
|
function resolveRunnerEntry() {
|
|
14043
14033
|
let here;
|
|
14044
14034
|
try {
|
package/dist/dashboard-daemon.js
CHANGED
package/dist/runner.js
CHANGED