@caido/sdk-frontend 0.54.2-beta.0 → 0.54.2-beta.1
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/package.json +1 -1
- package/src/types/index.d.ts +1 -1
- package/src/types/sdks/ai.d.ts +6 -1
- package/src/types/types/ai.d.ts +20 -0
package/package.json
CHANGED
package/src/types/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { HTTPHistorySlot, type HTTPHistorySlotContent, } from "./types/httpHisto
|
|
|
17
17
|
export type { EnvironmentVariable } from "./types/environment";
|
|
18
18
|
export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
|
|
19
19
|
export type { ListenerHandle } from "./types/utils";
|
|
20
|
-
export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, } from "./types/ai";
|
|
20
|
+
export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderId, AIUpstreamProviderStatus, } from "./types/ai";
|
|
21
21
|
export type { SelectedProjectChangeEvent } from "./types/projects";
|
|
22
22
|
export type { CommandPaletteView } from "./sdks/commandPalette";
|
|
23
23
|
export type { LogSDK } from "./sdks/log";
|
package/src/types/sdks/ai.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AIProvider } from "../types/ai";
|
|
1
|
+
import type { AIProvider, AIUpstreamProvider } from "../types/ai";
|
|
2
2
|
/**
|
|
3
3
|
* Utilities to interact with AI.
|
|
4
4
|
* @category AI
|
|
@@ -9,4 +9,9 @@ export type AiSDK = {
|
|
|
9
9
|
* @returns A provider instance compatible with the [ai](https://ai-sdk.dev/) library.
|
|
10
10
|
*/
|
|
11
11
|
createProvider: () => AIProvider;
|
|
12
|
+
/**
|
|
13
|
+
* Gets the list of upstream AI providers with their configuration status.
|
|
14
|
+
* @returns An array of AI upstream providers with their configuration status.
|
|
15
|
+
*/
|
|
16
|
+
getUpstreamProviders: () => AIUpstreamProvider[];
|
|
12
17
|
};
|
package/src/types/types/ai.d.ts
CHANGED
|
@@ -22,3 +22,23 @@ export type AILanguageModelSettings = {
|
|
|
22
22
|
* @category AI
|
|
23
23
|
*/
|
|
24
24
|
export type AIProvider = ProviderV2 & ((modelId: string, settings?: AILanguageModelSettings) => LanguageModelV2);
|
|
25
|
+
/**
|
|
26
|
+
* AI upstream provider ID.
|
|
27
|
+
* @category AI
|
|
28
|
+
*/
|
|
29
|
+
export type AIUpstreamProviderId = "anthropic" | "google" | "openai" | "openrouter";
|
|
30
|
+
/**
|
|
31
|
+
* AI upstream provider information.
|
|
32
|
+
* @category AI
|
|
33
|
+
*/
|
|
34
|
+
export type AIUpstreamProvider = {
|
|
35
|
+
id: AIUpstreamProviderId;
|
|
36
|
+
status: AIUpstreamProviderStatus;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* AI upstream provider status.
|
|
40
|
+
* Ready: The upstream provider is ready to use.
|
|
41
|
+
* Missing: The upstream provider is not configured.
|
|
42
|
+
* @category AI
|
|
43
|
+
*/
|
|
44
|
+
export type AIUpstreamProviderStatus = "Ready" | "Missing";
|