@infersec/conduit 1.114.1 → 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.
- package/dist/ConduitConnection.d.ts +2 -1
- package/dist/apiClient/index.d.ts +3 -2
- package/dist/auth/tokenManager.d.ts +13 -0
- package/dist/cli.js +4295 -2656
- package/dist/cli.sea.cjs +4295 -2656
- package/dist/commands/inferenceOptions.d.ts +2 -0
- package/dist/configuration.d.ts +17 -1
- package/dist/groupRegistration.d.ts +4 -3
- package/dist/toolConnection/ToolConnection.d.ts +2 -1
- package/dist/toolConnection/apiClient/index.d.ts +3 -2
- package/dist/toolConnection/configuration.d.ts +6 -2
- package/dist/toolConnection/handler.d.ts +3 -2
- package/dist/utils/network.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
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
|
export interface ConduitConnectionOptions {
|
|
4
|
-
apiKey: string;
|
|
5
5
|
apiURL: string;
|
|
6
|
+
getAuthHeaders: AuthHeadersProvider;
|
|
6
7
|
enginePort: number;
|
|
7
8
|
logger: Logger;
|
|
8
9
|
port: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EngineExecutionReportPayload, InferenceAgentConfiguration, InferenceAgentLLMMetricsPayload, InferenceAgentMachineReportPayload, ULID, type ConduitState } from "@infersec/definitions";
|
|
2
2
|
import { Logger } from "@infersec/logger";
|
|
3
|
+
import { type AuthHeadersProvider } from "../auth/tokenManager.js";
|
|
3
4
|
export interface APIClient {
|
|
4
5
|
cycleInferenceSourceEngine: () => Promise<void>;
|
|
5
6
|
getConduitConfiguration: () => Promise<InferenceAgentConfiguration>;
|
|
@@ -11,9 +12,9 @@ export interface APIClient {
|
|
|
11
12
|
lastSeen: Date;
|
|
12
13
|
}) => Promise<void>;
|
|
13
14
|
}
|
|
14
|
-
export declare function createAPIClient({
|
|
15
|
-
apiKey: string;
|
|
15
|
+
export declare function createAPIClient({ apiURL, getAuthHeaders, inferenceSourceID, logger }: {
|
|
16
16
|
apiURL: string;
|
|
17
|
+
getAuthHeaders: AuthHeadersProvider;
|
|
17
18
|
inferenceSourceID: ULID;
|
|
18
19
|
logger: Logger;
|
|
19
20
|
}): APIClient;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type AuthHeadersProvider = () => Promise<Record<string, string>>;
|
|
2
|
+
export declare class OAuthTokenManager {
|
|
3
|
+
private readonly tokenURL;
|
|
4
|
+
private readonly clientID;
|
|
5
|
+
private readonly clientSecret;
|
|
6
|
+
private readonly resource?;
|
|
7
|
+
private token;
|
|
8
|
+
private expiresAt;
|
|
9
|
+
constructor(tokenURL: string, clientID: string, clientSecret: string, resource?: string | undefined);
|
|
10
|
+
getToken(): Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createOAuthAuthHeadersProvider(tokenManager: OAuthTokenManager): AuthHeadersProvider;
|
|
13
|
+
export declare function createStaticAuthHeadersProvider(headers: Record<string, string>): AuthHeadersProvider;
|