@drisp/cli 0.6.4 → 0.6.5
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startRunnerProcess,
|
|
3
3
|
waitForShutdownSignal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RWE433V6.js";
|
|
5
5
|
|
|
6
6
|
// src/app/entry/runnerDaemon.ts
|
|
7
7
|
import path from "path";
|
|
@@ -46,4 +46,4 @@ if (process.argv.includes("--help")) {
|
|
|
46
46
|
export {
|
|
47
47
|
runRunnerDaemonEntry
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-C6BXC2JM.js.map
|
|
@@ -31119,6 +31119,10 @@ function createRunStreamClient(opts) {
|
|
|
31119
31119
|
queue.shift();
|
|
31120
31120
|
}
|
|
31121
31121
|
}
|
|
31122
|
+
function continueSequenceAfter(lastAckedSeq) {
|
|
31123
|
+
for (const frame of queue) frame.seq += lastAckedSeq;
|
|
31124
|
+
nextSeq += lastAckedSeq;
|
|
31125
|
+
}
|
|
31122
31126
|
function trimQueueUpToExclusive(expectedSeq) {
|
|
31123
31127
|
while (queue.length > 0 && queue[0].seq < expectedSeq) {
|
|
31124
31128
|
queue.shift();
|
|
@@ -31200,6 +31204,9 @@ function createRunStreamClient(opts) {
|
|
|
31200
31204
|
switch (parsed.type) {
|
|
31201
31205
|
case "resume": {
|
|
31202
31206
|
resumeResolved = true;
|
|
31207
|
+
if (firstConnect) {
|
|
31208
|
+
continueSequenceAfter(parsed.lastAckedSeq);
|
|
31209
|
+
}
|
|
31203
31210
|
trimQueueUpTo(parsed.lastAckedSeq);
|
|
31204
31211
|
if (firstConnect) {
|
|
31205
31212
|
const f = firstConnect;
|
|
@@ -31894,6 +31901,11 @@ function resolveWakeTarget(athenaSessionId) {
|
|
|
31894
31901
|
...resumable ? { adapterResumeSessionId: run.adapterSessionId } : {}
|
|
31895
31902
|
};
|
|
31896
31903
|
}
|
|
31904
|
+
function parseWake(value) {
|
|
31905
|
+
if (typeof value !== "object" || value === null) return {};
|
|
31906
|
+
const reply = value.reply;
|
|
31907
|
+
return typeof reply === "string" && reply.trim().length > 0 ? { wake: { reply } } : {};
|
|
31908
|
+
}
|
|
31897
31909
|
function parseRemoteRunSpec(value) {
|
|
31898
31910
|
if (typeof value !== "object" || value === null) return null;
|
|
31899
31911
|
const obj = value;
|
|
@@ -31922,6 +31934,7 @@ function parseRemoteRunSpec(value) {
|
|
|
31922
31934
|
)
|
|
31923
31935
|
) : void 0,
|
|
31924
31936
|
timeoutSec: typeof obj["timeoutSec"] === "number" && Number.isFinite(obj["timeoutSec"]) ? obj["timeoutSec"] : void 0,
|
|
31937
|
+
...parseWake(obj["wake"]),
|
|
31925
31938
|
callbackWsUrl: typeof callbackWsUrl === "string" && callbackWsUrl.length > 0 ? callbackWsUrl : void 0,
|
|
31926
31939
|
callbackToken: typeof callbackToken === "string" && callbackToken.length > 0 ? callbackToken : void 0
|
|
31927
31940
|
};
|
|
@@ -32776,6 +32789,29 @@ function createDashboardPairedExecution(options) {
|
|
|
32776
32789
|
origin: "hub",
|
|
32777
32790
|
receivedAt: steer.receivedAt
|
|
32778
32791
|
});
|
|
32792
|
+
const launch = launched.get(submission.runId);
|
|
32793
|
+
if (!entry && record2.status === "awaiting_attention" && launch) {
|
|
32794
|
+
steer.pending = false;
|
|
32795
|
+
log(
|
|
32796
|
+
"info",
|
|
32797
|
+
`steer for parked run ${submission.runId} wakes it: ${submission.text}`
|
|
32798
|
+
);
|
|
32799
|
+
const admission = launch_(launch.assignment, {
|
|
32800
|
+
projectDir: launch.projectDir,
|
|
32801
|
+
wake: {
|
|
32802
|
+
reply: `A person replied while the Run waited: ${submission.text}
|
|
32803
|
+
Continue the workflow with this.`
|
|
32804
|
+
}
|
|
32805
|
+
});
|
|
32806
|
+
if (admission.kind === "rejected") {
|
|
32807
|
+
steer.pending = true;
|
|
32808
|
+
log(
|
|
32809
|
+
"warn",
|
|
32810
|
+
`run ${submission.runId} could not be woken: ${admission.rejection.message}`
|
|
32811
|
+
);
|
|
32812
|
+
}
|
|
32813
|
+
return true;
|
|
32814
|
+
}
|
|
32779
32815
|
log(
|
|
32780
32816
|
"info",
|
|
32781
32817
|
`steer ${entry ? "queued for the next Turn of" : "held for the continue of"} run ${submission.runId} (${record2.status}): ${submission.text}`
|
|
@@ -32798,6 +32834,7 @@ function createDashboardPairedExecution(options) {
|
|
|
32798
32834
|
}
|
|
32799
32835
|
function launch_(assignment, input = {}) {
|
|
32800
32836
|
const { runId, runnerId } = assignment;
|
|
32837
|
+
const wake = input.wake ?? assignment.spec.wake;
|
|
32801
32838
|
if (active.has(runId)) {
|
|
32802
32839
|
const rejection = {
|
|
32803
32840
|
reason: "duplicate",
|
|
@@ -32818,7 +32855,7 @@ function createDashboardPairedExecution(options) {
|
|
|
32818
32855
|
const controller = new AbortController();
|
|
32819
32856
|
const steerQueue = createSteerQueue();
|
|
32820
32857
|
takeHeldSteers(runId, steerQueue);
|
|
32821
|
-
const resumed =
|
|
32858
|
+
const resumed = wake ? [...runHistory].reverse().find((r) => r.runId === runId) : void 0;
|
|
32822
32859
|
const record2 = resumed ?? {
|
|
32823
32860
|
runId,
|
|
32824
32861
|
startedAt: now(),
|
|
@@ -32844,7 +32881,7 @@ function createDashboardPairedExecution(options) {
|
|
|
32844
32881
|
decisionInbox,
|
|
32845
32882
|
steerQueue,
|
|
32846
32883
|
...pairedFeedPublisher ? { dashboardFeedPublisher: pairedFeedPublisher } : {},
|
|
32847
|
-
...
|
|
32884
|
+
...wake ? { wake } : {}
|
|
32848
32885
|
}).then(() => {
|
|
32849
32886
|
if (record2.status === "running") record2.status = "completed";
|
|
32850
32887
|
}).catch((err) => {
|
|
@@ -34257,4 +34294,4 @@ export {
|
|
|
34257
34294
|
startRunnerProcess,
|
|
34258
34295
|
waitForShutdownSignal
|
|
34259
34296
|
};
|
|
34260
|
-
//# sourceMappingURL=chunk-
|
|
34297
|
+
//# sourceMappingURL=chunk-RWE433V6.js.map
|
package/dist/cli.js
CHANGED
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
wrapText,
|
|
103
103
|
writeAttachmentMirror,
|
|
104
104
|
writeDashboardClientConfig
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-RWE433V6.js";
|
|
106
106
|
import {
|
|
107
107
|
generateId as generateId2
|
|
108
108
|
} from "./chunk-USK5VSQ7.js";
|
|
@@ -13148,7 +13148,7 @@ var cachedVersion = null;
|
|
|
13148
13148
|
function readPackageVersion() {
|
|
13149
13149
|
if (cachedVersion !== null) return cachedVersion;
|
|
13150
13150
|
try {
|
|
13151
|
-
const injected = "0.6.
|
|
13151
|
+
const injected = "0.6.5";
|
|
13152
13152
|
if (typeof injected === "string" && injected.length > 0) {
|
|
13153
13153
|
cachedVersion = injected;
|
|
13154
13154
|
return cachedVersion;
|
package/dist/dashboard-daemon.js
CHANGED
package/dist/runner.js
CHANGED