@drisp/cli 0.6.3 → 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
|
};
|
|
@@ -31993,6 +32006,11 @@ function ensureRemoteWorkflowInstalled(input) {
|
|
|
31993
32006
|
);
|
|
31994
32007
|
return input.installWorkflowFromSourceFn(resolved);
|
|
31995
32008
|
}
|
|
32009
|
+
function isParkedCompletion(event) {
|
|
32010
|
+
if (event.type !== "exec.completed") return false;
|
|
32011
|
+
const data = event.data;
|
|
32012
|
+
return data?.workflowOutcome?.status === "awaiting_attention";
|
|
32013
|
+
}
|
|
31996
32014
|
function eventKind(event) {
|
|
31997
32015
|
if (event.type === "exec.completed") {
|
|
31998
32016
|
const data = event.data;
|
|
@@ -32138,6 +32156,7 @@ async function executeRemoteAssignment({
|
|
|
32138
32156
|
deferredFailedCompletion.current = event;
|
|
32139
32157
|
continue;
|
|
32140
32158
|
}
|
|
32159
|
+
if (isParkedCompletion(event)) continue;
|
|
32141
32160
|
send(eventKind(event), eventPayload(event), now());
|
|
32142
32161
|
if (event.type === "run.suspended") reportNeedsHuman(event);
|
|
32143
32162
|
} catch (err) {
|
|
@@ -32770,6 +32789,29 @@ function createDashboardPairedExecution(options) {
|
|
|
32770
32789
|
origin: "hub",
|
|
32771
32790
|
receivedAt: steer.receivedAt
|
|
32772
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
|
+
}
|
|
32773
32815
|
log(
|
|
32774
32816
|
"info",
|
|
32775
32817
|
`steer ${entry ? "queued for the next Turn of" : "held for the continue of"} run ${submission.runId} (${record2.status}): ${submission.text}`
|
|
@@ -32792,6 +32834,7 @@ function createDashboardPairedExecution(options) {
|
|
|
32792
32834
|
}
|
|
32793
32835
|
function launch_(assignment, input = {}) {
|
|
32794
32836
|
const { runId, runnerId } = assignment;
|
|
32837
|
+
const wake = input.wake ?? assignment.spec.wake;
|
|
32795
32838
|
if (active.has(runId)) {
|
|
32796
32839
|
const rejection = {
|
|
32797
32840
|
reason: "duplicate",
|
|
@@ -32812,7 +32855,7 @@ function createDashboardPairedExecution(options) {
|
|
|
32812
32855
|
const controller = new AbortController();
|
|
32813
32856
|
const steerQueue = createSteerQueue();
|
|
32814
32857
|
takeHeldSteers(runId, steerQueue);
|
|
32815
|
-
const resumed =
|
|
32858
|
+
const resumed = wake ? [...runHistory].reverse().find((r) => r.runId === runId) : void 0;
|
|
32816
32859
|
const record2 = resumed ?? {
|
|
32817
32860
|
runId,
|
|
32818
32861
|
startedAt: now(),
|
|
@@ -32838,7 +32881,7 @@ function createDashboardPairedExecution(options) {
|
|
|
32838
32881
|
decisionInbox,
|
|
32839
32882
|
steerQueue,
|
|
32840
32883
|
...pairedFeedPublisher ? { dashboardFeedPublisher: pairedFeedPublisher } : {},
|
|
32841
|
-
...
|
|
32884
|
+
...wake ? { wake } : {}
|
|
32842
32885
|
}).then(() => {
|
|
32843
32886
|
if (record2.status === "running") record2.status = "completed";
|
|
32844
32887
|
}).catch((err) => {
|
|
@@ -34251,4 +34294,4 @@ export {
|
|
|
34251
34294
|
startRunnerProcess,
|
|
34252
34295
|
waitForShutdownSignal
|
|
34253
34296
|
};
|
|
34254
|
-
//# 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