@redocly/replay 0.27.0-next.4 → 0.27.0-next.6
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/replay-AiChatProvider-D7E0a83D.js +1006 -0
- package/dist/replay-AiChatProvider-p9SioFWy.js +6 -0
- package/dist/replay-AiChatSqliteDBStorage-CKQJ5VZi.js +88 -0
- package/dist/replay-AiChatSqliteDBStorage-DgGB1XKW.js +1 -0
- package/dist/replay-AiPanel-BLkqnlmb.js +849 -0
- package/dist/replay-AiPanel-DvOGYsWl.js +2918 -0
- package/dist/replay-HistorySqliteDBStorage-BrILW8Fu.js +1 -0
- package/dist/replay-HistorySqliteDBStorage-CtF6-vY8.js +113 -0
- package/dist/replay-SqliteDBStorage-CNJbZXTw.js +14 -0
- package/dist/replay-SqliteDBStorage-D_31Bd3Z.js +2857 -0
- package/dist/replay-StepContextSqliteDBStorage-BSepLyBI.js +1 -0
- package/dist/replay-StepContextSqliteDBStorage-BfAAKDwA.js +83 -0
- package/dist/replay-agent-loop-DklepPbJ.js +1533 -0
- package/dist/replay-agent-loop-fKCHgyOD.js +1 -0
- package/dist/replay-ai-chat-mappers-D-vUBq2s.js +1 -0
- package/dist/replay-ai-chat-mappers-IWtvE0Nl.js +99 -0
- package/dist/replay-ai-message-parts.schema-BBdjwldJ.js +1 -0
- package/dist/replay-ai-message-parts.schema-E9u9-nqr.js +60 -0
- package/dist/replay-create-model-CfrWgdF7.js +38224 -0
- package/dist/replay-create-model-xGRAIhcu.js +104 -0
- package/dist/replay-db-BtdwaWh3.js +306 -0
- package/dist/replay-db-XlueEDU-.js +64 -0
- package/dist/replay-defaults-CzR6jw9a.js +32 -0
- package/dist/replay-defaults-DVvOnvnR.js +27 -0
- package/dist/replay-external-resolver-D6VSVDwt.js +34 -0
- package/dist/replay-external-resolver-Skh0OGde.js +2 -0
- package/dist/replay-history.schema-5ce6X0R1.js +28 -0
- package/dist/replay-history.schema-miM3Etuf.js +1 -0
- package/dist/replay-index-BEzVYZeb.js +504 -0
- package/dist/{replay-index-DCclzbQl.js → replay-index-BOB__Jm6.js} +1 -1
- package/dist/replay-index-C6SJPGDO.js +23 -0
- package/dist/{replay-index-D6LeDb4M.js → replay-index-CCvitTKt.js} +6 -6
- package/dist/replay-index-CUs62_1f.js +1 -0
- package/dist/replay-index-DXnDNeqk.js +93088 -0
- package/dist/replay-index-S_wAPmTA.js +6877 -0
- package/dist/replay-index-fVC8e5y9.js +1 -0
- package/dist/replay-indexes-CfsvVMi_.js +1242 -0
- package/dist/replay-indexes-Dqjl8m6C.js +1 -0
- package/dist/replay-lint-BCVeL_wb.js +184 -0
- package/dist/replay-lint-DjMIgYfF.js +33416 -0
- package/dist/{replay-lint-graphql-Cdmm_aJs.js → replay-lint-graphql-Bltv-T6_.js} +2 -2
- package/dist/{replay-lint-graphql-8tMA-ttz.js → replay-lint-graphql-bkrdHRy7.js} +5 -5
- package/dist/replay-resolve-BhcSceq-.js +3694 -0
- package/dist/replay-resolve-CQL6WBG1.js +47 -0
- package/dist/{replay-respect-run-DrWWHTWp.js → replay-respect-run-CecN1j9r.js} +1608 -1558
- package/dist/replay-respect-run-rJm4W93K.js +78 -0
- package/dist/replay-step-context.schema-BuuXkAck.js +1 -0
- package/dist/replay-step-context.schema-DBk4jufr.js +21 -0
- package/dist/{replay-tauri-path-BIIo3xjJ.js → replay-tauri-path--8KtMkGg.js} +1 -1
- package/dist/{replay-tauri-path-BQmCYwRI.js → replay-tauri-path--BfusnkB.js} +4 -4
- package/dist/replay-useAiChatQueries-B1-NwsZz.js +213 -0
- package/dist/replay-useAiChatQueries-Btd-PmIH.js +3532 -0
- package/dist/replay-validate-key-Bk0SFd3-.js +1 -0
- package/dist/replay-validate-key-CYsfegSv.js +28 -0
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +37 -5
- package/dist/replay.js +18 -18
- package/package.json +4 -4
- package/dist/replay-index-BFggGnsX.js +0 -181252
- package/dist/replay-index-BWX4r5us.js +0 -8354
- package/dist/replay-index-DuAFN7X8.js +0 -21
- package/dist/replay-index-tDvNtfHp.js +0 -1
- package/dist/replay-respect-run-DGe96SG3.js +0 -78
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-xGRAIhcu.js"),n=require("./replay-index-S_wAPmTA.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { c as i, g as n } from "./replay-create-model-CfrWgdF7.js";
|
|
2
|
+
import { M as s } from "./replay-index-DXnDNeqk.js";
|
|
3
|
+
import { V as l } from "./replay-defaults-CzR6jw9a.js";
|
|
4
|
+
async function g(a, e, t, o) {
|
|
5
|
+
try {
|
|
6
|
+
const r = i({
|
|
7
|
+
provider: a,
|
|
8
|
+
modelId: t,
|
|
9
|
+
apiKey: e
|
|
10
|
+
});
|
|
11
|
+
return await n({
|
|
12
|
+
model: r,
|
|
13
|
+
prompt: l,
|
|
14
|
+
maxOutputTokens: s,
|
|
15
|
+
abortSignal: o?.abortSignal
|
|
16
|
+
}), { valid: !0 };
|
|
17
|
+
} catch (r) {
|
|
18
|
+
if (r instanceof Error && r.name === "AbortError")
|
|
19
|
+
throw r;
|
|
20
|
+
return {
|
|
21
|
+
valid: !1,
|
|
22
|
+
error: r instanceof Error && r.message.length > 0 ? r.message : "Validation failed. Please try again."
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
g as validateApiKey
|
|
28
|
+
};
|
package/dist/replay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-S_wAPmTA.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AsyncApiReplay } from '@redocly/replay-asyncapi-sdk';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
2
3
|
import { ConfigureRequestValues } from '../../node_modules/@redocly/theme/src/ext/configure';
|
|
3
4
|
import { ConfigureServerRequestValues } from '../../node_modules/@redocly/theme/src/ext/configure';
|
|
4
5
|
import { Context } from 'react';
|
|
@@ -8,6 +9,7 @@ import { ImmutableObject } from '@redocly/hookstate-core';
|
|
|
8
9
|
import { JSX } from 'react/jsx-runtime';
|
|
9
10
|
import { NamedExoticComponent } from 'react';
|
|
10
11
|
import { ReactElement } from 'react';
|
|
12
|
+
import { ReactNode } from 'react';
|
|
11
13
|
import { SpanStatusCode } from '@opentelemetry/api';
|
|
12
14
|
import { SystemModelMessage } from 'ai';
|
|
13
15
|
import { Context as TelemetryContext } from '@opentelemetry/api';
|
|
@@ -177,7 +179,7 @@ declare type InputSettings = {
|
|
|
177
179
|
selectedEnvironment?: string;
|
|
178
180
|
allowedEnvironments?: string[];
|
|
179
181
|
apiId?: string;
|
|
180
|
-
predefinedEnvValues?: Record<string, Record<string,
|
|
182
|
+
predefinedEnvValues?: Record<string, Record<string, PredefinedEnvValue>>;
|
|
181
183
|
dynamicReplayValues?: ConfigureRequestValues | ConfigureServerRequestValues | null;
|
|
182
184
|
certificates?: Certificate[];
|
|
183
185
|
storageKey?: string;
|
|
@@ -192,6 +194,8 @@ declare type InputSettings = {
|
|
|
192
194
|
aiProviders?: Partial<Record<AiProviderName, AiProviderConfig>>;
|
|
193
195
|
};
|
|
194
196
|
|
|
197
|
+
export declare function loadAgentLoop(): Promise<typeof AgentLoop>;
|
|
198
|
+
|
|
195
199
|
export declare function makeProviderRecord<T>(factory: (name: AiProviderName) => T): Record<AiProviderName, T>;
|
|
196
200
|
|
|
197
201
|
declare type MediaType = {
|
|
@@ -670,7 +674,7 @@ declare interface OpenAPIXBadges {
|
|
|
670
674
|
position?: 'before' | 'after';
|
|
671
675
|
}
|
|
672
676
|
|
|
673
|
-
declare type OperationIn = 'query' | 'header' | 'path' | 'cookie';
|
|
677
|
+
export declare type OperationIn = 'query' | 'header' | 'path' | 'cookie';
|
|
674
678
|
|
|
675
679
|
declare type OperationParameter = {
|
|
676
680
|
name: string;
|
|
@@ -695,7 +699,7 @@ declare type OperationParameterSchema = {
|
|
|
695
699
|
enum?: string[];
|
|
696
700
|
};
|
|
697
701
|
|
|
698
|
-
|
|
702
|
+
declare type OperationSecurity = {
|
|
699
703
|
id: string;
|
|
700
704
|
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
701
705
|
openIdConnectUrl?: string;
|
|
@@ -736,6 +740,11 @@ declare type PasswordOAuthFlowsObject = {
|
|
|
736
740
|
scopes: Record<string, string>;
|
|
737
741
|
};
|
|
738
742
|
|
|
743
|
+
declare type PredefinedEnvValue = string | {
|
|
744
|
+
value: string;
|
|
745
|
+
isSecret?: boolean;
|
|
746
|
+
};
|
|
747
|
+
|
|
739
748
|
declare type Referenced<T> = T | OpenAPIRef;
|
|
740
749
|
|
|
741
750
|
export declare function Replay(props: ReplayAppProps): JSX.Element;
|
|
@@ -751,6 +760,19 @@ declare type ReplayAppProps = {
|
|
|
751
760
|
onSettingsOpen?: (tab?: SettingsTab) => void;
|
|
752
761
|
};
|
|
753
762
|
|
|
763
|
+
export declare type ReplayComponents = {
|
|
764
|
+
ReplayGate: ComponentType<ReplayGateComponentProps> | null;
|
|
765
|
+
ReplayTopBarActions: ComponentType<ReplayTopBarActionsComponentProps> | null;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
declare type ReplayGateComponentProps = {
|
|
769
|
+
setEnvironmentValues: (envName: string, values: Record<string, PredefinedEnvValue>) => void;
|
|
770
|
+
setSelectedEnvironment: (envName: string) => void;
|
|
771
|
+
selectedEnvironment?: string;
|
|
772
|
+
apiId?: string;
|
|
773
|
+
children: ReactNode;
|
|
774
|
+
};
|
|
775
|
+
|
|
754
776
|
declare type ReplayLayout = 'default' | 'overlay' | 'preview';
|
|
755
777
|
|
|
756
778
|
export declare type ReplayOnChangeParams = {
|
|
@@ -762,12 +784,22 @@ export declare type ReplayOnChangeParams = {
|
|
|
762
784
|
}>;
|
|
763
785
|
};
|
|
764
786
|
|
|
765
|
-
export declare function ReplayOverlay(props: ReplayOverlayProps): JSX.Element;
|
|
787
|
+
export declare function ReplayOverlay({ ReplayGate: ReplayGateProp, ReplayTopBarActions: ReplayTopBarActionsProp, ...props }: ReplayOverlayProps): JSX.Element;
|
|
766
788
|
|
|
767
789
|
declare type ReplayOverlayProps = {
|
|
768
790
|
onClose: () => void;
|
|
769
791
|
onRequestChange?: (props: ReplayOnChangeParams) => void;
|
|
770
|
-
} & ReplayAppProps
|
|
792
|
+
} & ReplayAppProps & Partial<ReplayComponents>;
|
|
793
|
+
|
|
794
|
+
declare type ReplayTopBarActionsComponentProps = {
|
|
795
|
+
environments: ReadonlyArray<{
|
|
796
|
+
name: string;
|
|
797
|
+
}>;
|
|
798
|
+
activeEnvironment: string;
|
|
799
|
+
setEnvironmentValues: (envName: string, values: Record<string, PredefinedEnvValue>) => void;
|
|
800
|
+
setSelectedEnvironment: (envName: string) => void;
|
|
801
|
+
apiId?: string;
|
|
802
|
+
};
|
|
771
803
|
|
|
772
804
|
export declare type ResolvedTheme = 'light' | 'dark';
|
|
773
805
|
|
package/dist/replay.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as s, r, bd as t, be as l, R as o, bf as b, bg as d, x as R, bh as m, bi as p, z as n, bj as i, bk as y, bl as h, bm as u, p as A, o as T, bn as E, bo as O } from "./replay-index-DXnDNeqk.js";
|
|
2
2
|
import { O as I, h as P } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AI_PROVIDERS,
|
|
5
|
-
r as
|
|
6
|
-
t as
|
|
7
|
-
l as
|
|
8
|
-
o as Modal,
|
|
5
|
+
r as AiPanelContext,
|
|
6
|
+
t as EmbeddedReplay,
|
|
7
|
+
l as Modal,
|
|
9
8
|
I as OAuth2Error,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
o as REUNITE_AI_PROVIDER,
|
|
10
|
+
b as Replay,
|
|
11
|
+
d as ReplayOverlay,
|
|
12
|
+
R as SpanStatusCode,
|
|
13
|
+
m as TelemetryClient,
|
|
14
|
+
p as applyThemeToDOM,
|
|
15
|
+
n as createResource,
|
|
16
|
+
i as getCurrentTheme,
|
|
18
17
|
P as handleOAuth2Redirect,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
y as loadAgentLoop,
|
|
19
|
+
h as makeProviderRecord,
|
|
20
|
+
u as resolveTheme,
|
|
21
|
+
A as useAiPanel,
|
|
22
|
+
T as useTelemetry,
|
|
23
23
|
E as useTelemetryClient,
|
|
24
|
-
|
|
24
|
+
O as validateApiKey
|
|
25
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.27.0-next.
|
|
3
|
+
"version": "0.27.0-next.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-dom": "^19.2.4",
|
|
22
22
|
"react-router-dom": "^7.18.1",
|
|
23
23
|
"styled-components": "^6.4.2",
|
|
24
|
-
"@redocly/theme": "0.68.0-next.
|
|
24
|
+
"@redocly/theme": "0.68.0-next.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@ai-sdk/anthropic": "4.0.4",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@opentelemetry/api": "1.9.1",
|
|
54
54
|
"@redocly/hookstate-core": "^4.2.4",
|
|
55
55
|
"@redocly/hookstate-devtools": "^4.2.1",
|
|
56
|
-
"@redocly/openapi-core": "2.
|
|
57
|
-
"@redocly/respect-core": "2.
|
|
56
|
+
"@redocly/openapi-core": "2.43.1",
|
|
57
|
+
"@redocly/respect-core": "2.43.1",
|
|
58
58
|
"@redocly/vscode-json-languageservice": "^3.4.9",
|
|
59
59
|
"@tauri-apps/api": "2.4.1",
|
|
60
60
|
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
|