@infersec/conduit 1.74.0 → 1.75.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/dist/cli.js CHANGED
@@ -21899,6 +21899,40 @@ function parseSSEEvent(rawEvent) {
21899
21899
  };
21900
21900
  }
21901
21901
 
21902
+ function buildConfigurationOverrides(options) {
21903
+ const configurationOverrides = {};
21904
+ if (options.apiUrl) {
21905
+ configurationOverrides.apiURL = options.apiUrl;
21906
+ }
21907
+ if (options.enginePort) {
21908
+ const enginePort = Number.parseInt(options.enginePort, 10);
21909
+ if (Number.isNaN(enginePort) || enginePort < 1 || enginePort > 65535) {
21910
+ throw new Error(`Invalid engine port: ${options.enginePort}`);
21911
+ }
21912
+ configurationOverrides.enginePort = enginePort;
21913
+ }
21914
+ if (options.key) {
21915
+ configurationOverrides.apiKey = options.key;
21916
+ }
21917
+ if (options.port) {
21918
+ const port = Number.parseInt(options.port, 10);
21919
+ if (Number.isNaN(port) || port < 1 || port > 65535) {
21920
+ throw new Error(`Invalid port: ${options.port}`);
21921
+ }
21922
+ configurationOverrides.port = port;
21923
+ }
21924
+ if (options.root) {
21925
+ configurationOverrides.rootDirectory = options.root;
21926
+ }
21927
+ if (options.startMode) {
21928
+ configurationOverrides.startMode = options.startMode;
21929
+ }
21930
+ if (options.source) {
21931
+ configurationOverrides.inferenceSourceID = options.source;
21932
+ }
21933
+ return configurationOverrides;
21934
+ }
21935
+
21902
21936
  function commonjsRequire(path) {
21903
21937
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
21904
21938
  }
@@ -129278,36 +129312,7 @@ function registerInferenceCommands({ program }) {
129278
129312
  .option("--start-mode <mode>", "Startup mode: auto|idle (or START_MODE env)")
129279
129313
  .option("--source <id>", "Inference source ID (or SOURCE env)")
129280
129314
  .action(async (options) => {
129281
- const configurationOverrides = {};
129282
- if (options["api-url"]) {
129283
- configurationOverrides.apiURL = options["api-url"];
129284
- }
129285
- if (options["engine-port"]) {
129286
- const enginePort = Number.parseInt(options["engine-port"], 10);
129287
- if (Number.isNaN(enginePort) || enginePort < 1 || enginePort > 65535) {
129288
- throw new Error(`Invalid engine port: ${options["engine-port"]}`);
129289
- }
129290
- configurationOverrides.enginePort = enginePort;
129291
- }
129292
- if (options.key) {
129293
- configurationOverrides.apiKey = options.key;
129294
- }
129295
- if (options.port) {
129296
- const port = Number.parseInt(options.port, 10);
129297
- if (Number.isNaN(port)) {
129298
- throw new Error(`Invalid port: ${options.port}`);
129299
- }
129300
- configurationOverrides.port = port;
129301
- }
129302
- if (options.root) {
129303
- configurationOverrides.rootDirectory = options.root;
129304
- }
129305
- if (options["start-mode"]) {
129306
- configurationOverrides.startMode = options["start-mode"];
129307
- }
129308
- if (options.source) {
129309
- configurationOverrides.inferenceSourceID = options.source;
129310
- }
129315
+ const configurationOverrides = buildConfigurationOverrides(options);
129311
129316
  await startInferenceAgent({ configurationOverrides });
129312
129317
  });
129313
129318
  }
@@ -156373,13 +156378,13 @@ function registerBenchmarkCommands({ program }) {
156373
156378
  .option("--account-id <id>", "Account ID (or ACCOUNT_ID env)")
156374
156379
  .option("--output-dir <path>", "Override output directory from config")
156375
156380
  .action(async (options) => {
156376
- const apiUrl = options["api-url"] || process.env.API_URL;
156381
+ const apiUrl = options.apiUrl || process.env.API_URL;
156377
156382
  if (!apiUrl)
156378
156383
  throw new Error("API URL is required (--api-url or API_URL env)");
156379
- const apiKey = options["api-key"] || process.env.API_KEY;
156384
+ const apiKey = options.apiKey || process.env.API_KEY;
156380
156385
  if (!apiKey)
156381
156386
  throw new Error("API key is required (--api-key or API_KEY env)");
156382
- const accountId = options["account-id"] || process.env.ACCOUNT_ID;
156387
+ const accountId = options.accountId || process.env.ACCOUNT_ID;
156383
156388
  if (!accountId)
156384
156389
  throw new Error("Account ID is required (--account-id or ACCOUNT_ID env)");
156385
156390
  const configPath = options.config;
@@ -156390,7 +156395,7 @@ function registerBenchmarkCommands({ program }) {
156390
156395
  apiKey,
156391
156396
  apiUrl,
156392
156397
  configPath,
156393
- outputDir: options["output-dir"]
156398
+ outputDir: options.outputDir
156394
156399
  });
156395
156400
  });
156396
156401
  }
@@ -0,0 +1,11 @@
1
+ import type { ConfigurationOverrides } from "../configuration.js";
2
+ export interface StartCommandOptions {
3
+ apiUrl?: string;
4
+ enginePort?: string;
5
+ key?: string;
6
+ port?: string;
7
+ root?: string;
8
+ source?: string;
9
+ startMode?: string;
10
+ }
11
+ export declare function buildConfigurationOverrides(options: StartCommandOptions): ConfigurationOverrides;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infersec/conduit",
3
3
  "description": "End user conduit agent for connecting local LLMs to the cloud.",
4
- "version": "1.74.0",
4
+ "version": "1.75.0",
5
5
  "bin": {
6
6
  "infersec-conduit": "./dist/cli.js"
7
7
  },