@rynx-ai/daemon 0.1.11-beta.23 → 0.1.11-beta.24
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/plugin-host-rpc.js
CHANGED
|
@@ -601,10 +601,6 @@ export class PluginHostRpc {
|
|
|
601
601
|
}
|
|
602
602
|
async interruptRun(params) {
|
|
603
603
|
const input = record(params);
|
|
604
|
-
const forceAfterMs = optionalPositiveNumber(input.forceAfterMs, "forceAfterMs");
|
|
605
|
-
if (forceAfterMs !== undefined && forceAfterMs > 30_000) {
|
|
606
|
-
throw new PluginHostCallError("INVALID_PARAMS", "forceAfterMs must not exceed 30000");
|
|
607
|
-
}
|
|
608
604
|
const sessionId = optionalString(input.sessionId, "sessionId", 128);
|
|
609
605
|
const runId = optionalString(input.runId, "runId", 128);
|
|
610
606
|
const operationId = optionalString(input.operationId, "operationId", 512);
|
|
@@ -616,13 +612,10 @@ export class PluginHostRpc {
|
|
|
616
612
|
this.ownedSession(sessionId);
|
|
617
613
|
run = this.activeSessionRuns.get(sessionId);
|
|
618
614
|
if (!run) {
|
|
619
|
-
const
|
|
615
|
+
const interrupted = this.services.interruptSession
|
|
620
616
|
? Promise.resolve().then(() => this.services.interruptSession(sessionId))
|
|
621
617
|
: Promise.resolve(false);
|
|
622
|
-
|
|
623
|
-
? await graceful
|
|
624
|
-
: await forceStoppedInterrupt(graceful, forceAfterMs, () => this.services.terminateSession?.(sessionId) ?? Promise.resolve(false));
|
|
625
|
-
return { interrupted };
|
|
618
|
+
return { interrupted: await interrupted };
|
|
626
619
|
}
|
|
627
620
|
}
|
|
628
621
|
else {
|
|
@@ -646,9 +639,7 @@ export class PluginHostRpc {
|
|
|
646
639
|
// effort and cannot prove that native execution stopped.
|
|
647
640
|
return false;
|
|
648
641
|
});
|
|
649
|
-
const interruptResult =
|
|
650
|
-
? graceful
|
|
651
|
-
: forceStoppedInterrupt(graceful, forceAfterMs, () => this.services.terminateSession?.(run.sessionId) ?? Promise.resolve(false));
|
|
642
|
+
const interruptResult = graceful;
|
|
652
643
|
run.interruptResult = interruptResult;
|
|
653
644
|
try {
|
|
654
645
|
const interrupted = await interruptResult;
|
|
@@ -670,18 +661,11 @@ export class PluginHostRpc {
|
|
|
670
661
|
const sessionId = requiredSessionId(params);
|
|
671
662
|
this.ownedSession(sessionId);
|
|
672
663
|
const snapshot = structuredClone(await this.services.sessionActivity(sessionId));
|
|
673
|
-
const activeRun = this.activeSessionRuns.get(sessionId);
|
|
674
664
|
const waiting = snapshot.pendingInteractions.length > 0;
|
|
675
|
-
const status = waiting
|
|
676
|
-
? "waiting"
|
|
677
|
-
: activeRun
|
|
678
|
-
? "running"
|
|
679
|
-
: snapshot.status;
|
|
680
|
-
const startup = Boolean(activeRun && snapshot.activeResponseIds.length === 0 && !waiting);
|
|
681
665
|
return {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
666
|
+
status: waiting ? "waiting" : snapshot.status,
|
|
667
|
+
activeResponseIds: snapshot.activeResponseIds,
|
|
668
|
+
pendingInteractions: snapshot.pendingInteractions,
|
|
685
669
|
};
|
|
686
670
|
}
|
|
687
671
|
async interruptWon(run) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rynx-ai/daemon",
|
|
3
|
-
"version": "0.1.11-beta.
|
|
3
|
+
"version": "0.1.11-beta.24",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/rynx-ai/rynx.git",
|
|
@@ -50,17 +50,17 @@
|
|
|
50
50
|
"pm2": "^6.0.0",
|
|
51
51
|
"tar": "^7.5.19",
|
|
52
52
|
"ws": "^8.21.0",
|
|
53
|
-
"@rynx-ai/
|
|
54
|
-
"@rynx-ai/
|
|
55
|
-
"@rynx-ai/
|
|
56
|
-
"@rynx-ai/plugin-sdk": "0.1.11-beta.
|
|
57
|
-
"@rynx-ai/protocol": "0.1.11-beta.
|
|
58
|
-
"@rynx-ai/remote-runtime-client": "0.1.11-beta.
|
|
59
|
-
"@rynx-ai/server": "0.1.11-beta.
|
|
53
|
+
"@rynx-ai/core": "0.1.11-beta.24",
|
|
54
|
+
"@rynx-ai/emulator": "0.1.11-beta.24",
|
|
55
|
+
"@rynx-ai/plugin-runner": "0.1.11-beta.24",
|
|
56
|
+
"@rynx-ai/plugin-sdk": "0.1.11-beta.24",
|
|
57
|
+
"@rynx-ai/protocol": "0.1.11-beta.24",
|
|
58
|
+
"@rynx-ai/remote-runtime-client": "0.1.11-beta.24",
|
|
59
|
+
"@rynx-ai/server": "0.1.11-beta.24"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/ws": "^8.18.1",
|
|
63
|
-
"@rynx-ai/plugin-channel-lark": "0.1.11-beta.
|
|
63
|
+
"@rynx-ai/plugin-channel-lark": "0.1.11-beta.24"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "rm -rf dist bundled-plugins && tsc -p tsconfig.json && chmod +x dist/index-daemon.js && node ../../scripts/stage-bundled-plugins.mjs",
|