@infersec/conduit 1.115.0 → 1.116.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.
@@ -3,6 +3,8 @@ export interface StartCommandOptions {
3
3
  apiUrl?: string;
4
4
  enginePort?: string;
5
5
  key?: string;
6
+ oauthClientId?: string;
7
+ oauthClientSecret?: string;
6
8
  port?: string;
7
9
  root?: string;
8
10
  source?: string;
@@ -1,15 +1,19 @@
1
1
  import { z } from "zod";
2
2
  import { ULID } from "@infersec/definitions";
3
+ import { type AuthHeadersProvider } from "./auth/tokenManager.js";
3
4
  declare const StartModeSchema: z.ZodEnum<{
4
5
  idle: "idle";
5
6
  auto: "auto";
6
7
  }>;
7
8
  export type StartMode = z.infer<typeof StartModeSchema>;
8
9
  export interface Configuration {
9
- apiKey: string;
10
+ apiKey: string | null;
10
11
  apiURL: string;
12
+ getAuthHeaders: AuthHeadersProvider;
11
13
  enginePort: number;
12
14
  inferenceSourceID: ULID;
15
+ oauthClientID: string | null;
16
+ oauthClientSecret: string | null;
13
17
  port: number;
14
18
  rootDirectory: string;
15
19
  startMode: StartMode;
@@ -20,10 +24,22 @@ export interface ConfigurationOverrides {
20
24
  enginePort?: number;
21
25
  groupID?: ULID;
22
26
  inferenceSourceID?: ULID;
27
+ oauthClientID?: string;
28
+ oauthClientSecret?: string;
23
29
  port?: number;
24
30
  rootDirectory?: string;
25
31
  startMode?: string;
26
32
  }
33
+ export declare function resolveConduitAuth({ overrides }: {
34
+ overrides?: ConfigurationOverrides;
35
+ }): Promise<{
36
+ apiKey: string | null;
37
+ apiURL: string;
38
+ getAuthHeaders: AuthHeadersProvider;
39
+ oauthClientID: string;
40
+ oauthClientSecret: string;
41
+ useOAuth: boolean;
42
+ }>;
27
43
  export declare function getConfiguration({ overrides }?: {
28
44
  overrides?: ConfigurationOverrides;
29
45
  }): Promise<Configuration>;
@@ -1,12 +1,13 @@
1
1
  import { ULID } from "@infersec/definitions";
2
2
  import { type Logger } from "@infersec/logger";
3
+ import { type AuthHeadersProvider } from "./auth/tokenManager.js";
3
4
  export interface RegisterGroupSourceResult {
4
5
  configuration: unknown;
5
6
  sourceID: ULID;
6
7
  }
7
- export declare function registerGroupSource({ apiKeyOverride, apiURLOverride, groupID, logger }: {
8
- apiKeyOverride?: string;
9
- apiURLOverride?: string;
8
+ export declare function registerGroupSource({ apiURL, getAuthHeaders, groupID, logger }: {
9
+ apiURL?: string;
10
+ getAuthHeaders: AuthHeadersProvider;
10
11
  groupID: ULID;
11
12
  logger?: Logger;
12
13
  }): Promise<RegisterGroupSourceResult>;
@@ -1,9 +1,10 @@
1
1
  import type { ULID } from "@infersec/definitions";
2
2
  import type { Logger } from "@infersec/logger";
3
+ import type { AuthHeadersProvider } from "../auth/tokenManager.js";
3
4
  import type { MysqlConnectionConfig } from "./configuration.js";
4
5
  export interface ToolConnectionOptions {
5
- apiKey: string;
6
6
  apiURL: string;
7
+ getAuthHeaders: AuthHeadersProvider;
7
8
  logger: Logger;
8
9
  maxRows: number;
9
10
  mysql: MysqlConnectionConfig | null;
@@ -1,5 +1,6 @@
1
1
  import { ULID } from "@infersec/definitions";
2
2
  import { Logger } from "@infersec/logger";
3
+ import { type AuthHeadersProvider } from "../../auth/tokenManager.js";
3
4
  export interface ToolAPIClient {
4
5
  getToolConfiguration: () => Promise<{
5
6
  type: string;
@@ -9,9 +10,9 @@ export interface ToolAPIClient {
9
10
  timestamp: string;
10
11
  }) => Promise<void>;
11
12
  }
12
- export declare function createToolAPIClient({ apiKey, apiURL, logger, toolID }: {
13
- apiKey: string;
13
+ export declare function createToolAPIClient({ apiURL, getAuthHeaders, logger, toolID }: {
14
14
  apiURL: string;
15
+ getAuthHeaders: AuthHeadersProvider;
15
16
  logger: Logger;
16
17
  toolID: ULID;
17
18
  }): ToolAPIClient;
@@ -1,4 +1,5 @@
1
1
  import { ULID } from "@infersec/definitions";
2
+ import { type AuthHeadersProvider } from "../auth/tokenManager.js";
2
3
  export interface MysqlConnectionConfig {
3
4
  connectionLimit: number;
4
5
  database?: string;
@@ -10,8 +11,8 @@ export interface MysqlConnectionConfig {
10
11
  user?: string;
11
12
  }
12
13
  export interface ToolConfiguration {
13
- apiKey: string;
14
14
  apiURL: string;
15
+ getAuthHeaders: AuthHeadersProvider;
15
16
  maxRows: number;
16
17
  mysql: MysqlConnectionConfig | null;
17
18
  mysqlAllow: string[];
@@ -22,9 +23,12 @@ export interface ToolConfiguration {
22
23
  export interface ToolConfigurationOverrides {
23
24
  apiKey?: string;
24
25
  apiURL?: string;
26
+ authURL?: string;
25
27
  maxRows?: number;
26
28
  mysql?: MysqlConnectionConfig;
27
29
  mysqlAllow?: string[];
30
+ oauthClientID?: string;
31
+ oauthClientSecret?: string;
28
32
  readOnly?: boolean;
29
33
  rootPath?: string;
30
34
  toolID?: ULID;
@@ -32,4 +36,4 @@ export interface ToolConfigurationOverrides {
32
36
  export declare function parseAllowList(raw: string): string[];
33
37
  export declare function getToolConfiguration({ overrides }?: {
34
38
  overrides?: ToolConfigurationOverrides;
35
- }): ToolConfiguration;
39
+ }): Promise<ToolConfiguration>;
@@ -1,11 +1,12 @@
1
1
  import { Logger } from "@infersec/logger";
2
+ import type { AuthHeadersProvider } from "../auth/tokenManager.js";
2
3
  import { type LocalToolServer } from "./mcp/server.js";
3
4
  export interface ToolConnectionOptions {
4
5
  apiURL: string;
5
- apiKey: string;
6
+ getAuthHeaders: AuthHeadersProvider;
6
7
  logger: Logger;
7
8
  signal?: AbortSignal;
8
9
  toolServer: LocalToolServer;
9
10
  toolID: string;
10
11
  }
11
- export declare function handleToolSSE({ apiURL, apiKey, logger, signal, toolServer, toolID }: ToolConnectionOptions): Promise<void>;
12
+ export declare function handleToolSSE({ apiURL, getAuthHeaders, logger, signal, toolServer, toolID }: ToolConnectionOptions): Promise<void>;
@@ -1,5 +1,6 @@
1
- export declare function fetchWithRetry(input: URL | string, init: RequestInit, { baseDelayMs, maxAttempts, maxDelayMs, retryOnStatus, signal, timeoutMs }?: {
1
+ export declare function fetchWithRetry(input: URL | string, init: RequestInit, { baseDelayMs, buildRequestInit, maxAttempts, maxDelayMs, retryOnStatus, signal, timeoutMs }?: {
2
2
  baseDelayMs?: number;
3
+ buildRequestInit?: () => RequestInit | Promise<RequestInit>;
3
4
  maxAttempts?: number;
4
5
  maxDelayMs?: number;
5
6
  retryOnStatus?: number[];
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.115.0",
4
+ "version": "1.116.0",
5
5
  "bin": {
6
6
  "infersec-conduit": "./dist/cli.js"
7
7
  },