@infersec/conduit 1.25.1 → 1.25.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.
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ const __dirname = __pathDirname(__filename);
|
|
|
6
6
|
|
|
7
7
|
import { parseArgs } from 'node:util';
|
|
8
8
|
import 'node:crypto';
|
|
9
|
-
import { a as asError, s as startInferenceAgent } from './start-
|
|
9
|
+
import { a as asError, s as startInferenceAgent } from './start-BJ-o7I20.js';
|
|
10
10
|
import 'argon2';
|
|
11
11
|
import 'node:child_process';
|
|
12
12
|
import 'node:stream';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
5
5
|
const __dirname = __pathDirname(__filename);
|
|
6
6
|
|
|
7
7
|
import 'node:crypto';
|
|
8
|
-
import { s as startInferenceAgent, a as asError } from './start-
|
|
8
|
+
import { s as startInferenceAgent, a as asError } from './start-BJ-o7I20.js';
|
|
9
9
|
import 'argon2';
|
|
10
10
|
import 'node:child_process';
|
|
11
11
|
import 'node:stream';
|
|
@@ -108774,6 +108774,17 @@ class ConduitStateReportManager {
|
|
|
108774
108774
|
reportDownloadProgress() {
|
|
108775
108775
|
this.scheduleConduitStateReport();
|
|
108776
108776
|
}
|
|
108777
|
+
reportStateChange() {
|
|
108778
|
+
if (this.pendingConduitStateReport) {
|
|
108779
|
+
clearTimeout(this.pendingConduitStateReport);
|
|
108780
|
+
this.pendingConduitStateReport = null;
|
|
108781
|
+
}
|
|
108782
|
+
this.triggerConduitStateReport().catch(error => {
|
|
108783
|
+
this.logger.error("Conduit state update failed", {
|
|
108784
|
+
error: asError(error)
|
|
108785
|
+
});
|
|
108786
|
+
});
|
|
108787
|
+
}
|
|
108777
108788
|
async sendConduitState() {
|
|
108778
108789
|
try {
|
|
108779
108790
|
await this.apiClient.reportConduitState(this.conduitStateManager.touch());
|
|
@@ -118716,6 +118727,7 @@ async function createApplication({ abortController, apiClient, configuration, lo
|
|
|
118716
118727
|
conduitStateManager.setState({
|
|
118717
118728
|
state: "bootingEngine"
|
|
118718
118729
|
});
|
|
118730
|
+
conduitStateReportManager.reportStateChange();
|
|
118719
118731
|
await modelManager.start();
|
|
118720
118732
|
// #region API routes
|
|
118721
118733
|
const app = express();
|
|
@@ -118785,10 +118797,14 @@ async function createApplication({ abortController, apiClient, configuration, lo
|
|
|
118785
118797
|
});
|
|
118786
118798
|
let activeRequests = 0;
|
|
118787
118799
|
const setOnlineState = () => {
|
|
118800
|
+
if (conduitStateManager.getState().state === "online") {
|
|
118801
|
+
return;
|
|
118802
|
+
}
|
|
118788
118803
|
conduitStateManager.setState({
|
|
118789
118804
|
modelName,
|
|
118790
118805
|
state: "online"
|
|
118791
118806
|
});
|
|
118807
|
+
conduitStateReportManager.reportStateChange();
|
|
118792
118808
|
};
|
|
118793
118809
|
modelManager.on("engineError", err => {
|
|
118794
118810
|
logger.error("LLM engine error", {
|
|
@@ -118798,12 +118814,14 @@ async function createApplication({ abortController, apiClient, configuration, lo
|
|
|
118798
118814
|
error: err.message,
|
|
118799
118815
|
state: "error"
|
|
118800
118816
|
});
|
|
118817
|
+
conduitStateReportManager.reportStateChange();
|
|
118801
118818
|
abortController.abort(err);
|
|
118802
118819
|
});
|
|
118803
118820
|
modelManager.on("engineTerminated", () => {
|
|
118804
118821
|
conduitStateManager.setState({
|
|
118805
118822
|
state: "offline"
|
|
118806
118823
|
});
|
|
118824
|
+
conduitStateReportManager.reportStateChange();
|
|
118807
118825
|
abortController.abort();
|
|
118808
118826
|
});
|
|
118809
118827
|
modelManager.on("engineReady", () => {
|
|
@@ -21,6 +21,7 @@ export declare class ConduitStateReportManager {
|
|
|
21
21
|
start(): Promise<void>;
|
|
22
22
|
stop(): void;
|
|
23
23
|
reportDownloadProgress(): void;
|
|
24
|
+
reportStateChange(): void;
|
|
24
25
|
private sendConduitState;
|
|
25
26
|
private triggerConduitStateReport;
|
|
26
27
|
private scheduleConduitStateReport;
|