@infersec/conduit 1.4.1 → 1.5.0
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/README.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{start-CijRnu19.js → start-BmI1Iw_1.js} +18 -18
- package/package.json +3 -2
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ const __dirname = dirname(__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-BmI1Iw_1.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 = dirname(__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-BmI1Iw_1.js';
|
|
9
9
|
import 'argon2';
|
|
10
10
|
import 'node:child_process';
|
|
11
11
|
import 'node:stream';
|
|
@@ -5211,8 +5211,8 @@ const InferenceAgentConfigurationSchema = object({
|
|
|
5211
5211
|
targetModel: LLMModelSchema
|
|
5212
5212
|
});
|
|
5213
5213
|
|
|
5214
|
-
const
|
|
5215
|
-
"/
|
|
5214
|
+
const API_SERVICE_CONDUIT_API_REFERENCE = {
|
|
5215
|
+
"/conduit/api/v1/source/:sourceID/configuration": {
|
|
5216
5216
|
GET: {
|
|
5217
5217
|
auth: {
|
|
5218
5218
|
type: "api-key"
|
|
@@ -5228,7 +5228,7 @@ const API_SERVICE_INFERENCE_AGENT_API_REFERENCE = {
|
|
|
5228
5228
|
}
|
|
5229
5229
|
}
|
|
5230
5230
|
},
|
|
5231
|
-
"/
|
|
5231
|
+
"/conduit/api/v1/source/:sourceID/metrics/llm": {
|
|
5232
5232
|
POST: {
|
|
5233
5233
|
auth: {
|
|
5234
5234
|
type: "api-key"
|
|
@@ -5245,7 +5245,7 @@ const API_SERVICE_INFERENCE_AGENT_API_REFERENCE = {
|
|
|
5245
5245
|
}
|
|
5246
5246
|
}
|
|
5247
5247
|
},
|
|
5248
|
-
"/
|
|
5248
|
+
"/conduit/api/v1/source/:sourceID/machine": {
|
|
5249
5249
|
POST: {
|
|
5250
5250
|
auth: {
|
|
5251
5251
|
type: "api-key"
|
|
@@ -5262,7 +5262,7 @@ const API_SERVICE_INFERENCE_AGENT_API_REFERENCE = {
|
|
|
5262
5262
|
}
|
|
5263
5263
|
}
|
|
5264
5264
|
},
|
|
5265
|
-
"/
|
|
5265
|
+
"/conduit/api/v1/source/:sourceID/heartbeat": {
|
|
5266
5266
|
POST: {
|
|
5267
5267
|
auth: {
|
|
5268
5268
|
type: "api-key"
|
|
@@ -5279,7 +5279,7 @@ const API_SERVICE_INFERENCE_AGENT_API_REFERENCE = {
|
|
|
5279
5279
|
}
|
|
5280
5280
|
}
|
|
5281
5281
|
},
|
|
5282
|
-
"/
|
|
5282
|
+
"/conduit/api/v1/source/:sourceID/requests/:requestID/chunk": {
|
|
5283
5283
|
POST: {
|
|
5284
5284
|
auth: {
|
|
5285
5285
|
type: "api-key"
|
|
@@ -5663,7 +5663,7 @@ const ClientToServerAPIResponseSchema = object({
|
|
|
5663
5663
|
APIRequestSchema.extend({
|
|
5664
5664
|
path: string()
|
|
5665
5665
|
.min(1)
|
|
5666
|
-
.regex(/^\/
|
|
5666
|
+
.regex(/^\/conduit/)
|
|
5667
5667
|
});
|
|
5668
5668
|
const ServerToClientAPIRequestSchema = APIRequestSchema.extend({
|
|
5669
5669
|
path: string().min(1).regex(/^\//)
|
|
@@ -85225,8 +85225,8 @@ function createAPIClient({ apiURL, inferenceSourceID }) {
|
|
|
85225
85225
|
getAgentConfiguration: async () => {
|
|
85226
85226
|
const result = await fetchByReference({
|
|
85227
85227
|
baseURL: apiURL,
|
|
85228
|
-
reference:
|
|
85229
|
-
route: "/
|
|
85228
|
+
reference: API_SERVICE_CONDUIT_API_REFERENCE,
|
|
85229
|
+
route: "/conduit/api/v1/source/:sourceID/configuration",
|
|
85230
85230
|
method: "GET",
|
|
85231
85231
|
parameters: {
|
|
85232
85232
|
sourceID: inferenceSourceID
|
|
@@ -85242,8 +85242,8 @@ function createAPIClient({ apiURL, inferenceSourceID }) {
|
|
|
85242
85242
|
parameters: {
|
|
85243
85243
|
sourceID: inferenceSourceID
|
|
85244
85244
|
},
|
|
85245
|
-
reference:
|
|
85246
|
-
route: "/
|
|
85245
|
+
reference: API_SERVICE_CONDUIT_API_REFERENCE,
|
|
85246
|
+
route: "/conduit/api/v1/source/:sourceID/machine"
|
|
85247
85247
|
});
|
|
85248
85248
|
},
|
|
85249
85249
|
reportHeartbeat: async (payload) => {
|
|
@@ -85254,8 +85254,8 @@ function createAPIClient({ apiURL, inferenceSourceID }) {
|
|
|
85254
85254
|
parameters: {
|
|
85255
85255
|
sourceID: inferenceSourceID
|
|
85256
85256
|
},
|
|
85257
|
-
reference:
|
|
85258
|
-
route: "/
|
|
85257
|
+
reference: API_SERVICE_CONDUIT_API_REFERENCE,
|
|
85258
|
+
route: "/conduit/api/v1/source/:sourceID/heartbeat"
|
|
85259
85259
|
});
|
|
85260
85260
|
},
|
|
85261
85261
|
reportPromptMetrics: async (payload) => {
|
|
@@ -85266,8 +85266,8 @@ function createAPIClient({ apiURL, inferenceSourceID }) {
|
|
|
85266
85266
|
parameters: {
|
|
85267
85267
|
sourceID: inferenceSourceID
|
|
85268
85268
|
},
|
|
85269
|
-
reference:
|
|
85270
|
-
route: "/
|
|
85269
|
+
reference: API_SERVICE_CONDUIT_API_REFERENCE,
|
|
85270
|
+
route: "/conduit/api/v1/source/:sourceID/metrics/llm"
|
|
85271
85271
|
});
|
|
85272
85272
|
}
|
|
85273
85273
|
};
|
|
@@ -95102,7 +95102,7 @@ class ModelManager extends EventEmitter {
|
|
|
95102
95102
|
}
|
|
95103
95103
|
|
|
95104
95104
|
async function handleSSERequests({ apiURL, configuration, logger, onRequest }) {
|
|
95105
|
-
const streamURL = `${apiURL}/
|
|
95105
|
+
const streamURL = `${apiURL}/conduit/api/v1/source/${configuration.inferenceSourceID}/requests/stream`;
|
|
95106
95106
|
await connectSSE(streamURL, {
|
|
95107
95107
|
headers: {
|
|
95108
95108
|
"x-api-key": configuration.apiKey
|
|
@@ -95235,7 +95235,7 @@ async function postChunk({ apiURL, configuration, payload, requestID }) {
|
|
|
95235
95235
|
requestID,
|
|
95236
95236
|
status: payload.status
|
|
95237
95237
|
});
|
|
95238
|
-
await fetch(`${apiURL}/
|
|
95238
|
+
await fetch(`${apiURL}/conduit/api/v1/source/${configuration.inferenceSourceID}/requests/${requestID}/chunk`, {
|
|
95239
95239
|
body: JSON.stringify({
|
|
95240
95240
|
...response,
|
|
95241
95241
|
sequence: payload.sequence
|
|
@@ -104903,7 +104903,7 @@ async function startInferenceAgent({ configurationOverrides }) {
|
|
|
104903
104903
|
const abortController = new AbortController();
|
|
104904
104904
|
const configuration = getConfiguration({ overrides: configurationOverrides });
|
|
104905
104905
|
const logger = createLogger({
|
|
104906
|
-
name: "infersec-
|
|
104906
|
+
name: "infersec-conduit"
|
|
104907
104907
|
});
|
|
104908
104908
|
logger.info("Application starting", {
|
|
104909
104909
|
agentEngineType: configuration.agentEngineType
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infersec/conduit",
|
|
3
|
-
"description": "End user
|
|
4
|
-
"version": "1.
|
|
3
|
+
"description": "End user conduit agent for connecting local LLMs to the cloud.",
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"infersec-conduit": "./dist/cli.js"
|
|
7
7
|
},
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@huggingface/hub": "^2.5.2",
|
|
54
|
+
"argon2": "^0.31.2",
|
|
54
55
|
"eventemitter3": "^5.0.1",
|
|
55
56
|
"execa": "^9.6.0",
|
|
56
57
|
"express": "^4.21.2",
|