@redocly/replay 0.23.0-next.2 → 0.23.0-next.3
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-index-BIn_L-wL.js +7088 -0
- package/dist/{replay-index-BUQKXz2B.js → replay-index-BZey8T6L.js} +43272 -36713
- package/dist/replay-index-BiGbduSF.js +43 -0
- package/dist/replay-index-D0afgYe2.js +1 -0
- package/dist/replay-respect-run-DA0kXc2x.js +81 -0
- package/dist/{replay-respect-run-COEQpruY.js → replay-respect-run-naS5LaxK.js} +4128 -4861
- package/dist/{replay-tauri-path-sLpMpgsP.js → replay-tauri-path--QWniCtD.js} +1 -1
- package/dist/{replay-tauri-path-BtbTHr-Q.js → replay-tauri-path-Ep0VMwdL.js} +4 -4
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +143 -36
- package/dist/replay.js +1 -1
- package/package.json +6 -5
- package/dist/replay-index-02jfHA1h.js +0 -6889
- package/dist/replay-index-BYc92SJQ.js +0 -7
- package/dist/replay-index-CadO8nkj.js +0 -1
- package/dist/replay-respect-run-Dtez4mbP.js +0 -84
|
@@ -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-BIn_L-wL.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as j, a as b, j as d } from "./replay-index-
|
|
1
|
+
import { e as h, s as x, r as i } from "./replay-index-BZey8T6L.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-BZey8T6L.js";
|
|
3
3
|
async function u(n, e) {
|
|
4
|
-
const t =
|
|
4
|
+
const t = x(), l = await i(n), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), r = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, r.length);
|
|
5
5
|
let s = 0;
|
|
6
6
|
for (let a = 0; a < m && o[a] === r[a]; a++)
|
|
7
7
|
s++;
|
|
@@ -9,7 +9,7 @@ async function u(n, e) {
|
|
|
9
9
|
return [...p, ...f].join(t);
|
|
10
10
|
}
|
|
11
11
|
async function w(n) {
|
|
12
|
-
const e = await
|
|
12
|
+
const e = await h(n);
|
|
13
13
|
return e ? `.${e}` : "";
|
|
14
14
|
}
|
|
15
15
|
export {
|
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-BIn_L-wL.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.js");exports.AgentLoop=e.AgentLoop;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;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.getCurrentTheme=e.getCurrentTheme;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { AgentCallParameters } from 'ai';
|
|
2
1
|
import { AsyncApiReplay } from '@redocly/replay-asyncapi-sdk';
|
|
3
2
|
import { Context } from 'react';
|
|
4
|
-
import { GenerateTextResult } from 'ai';
|
|
5
3
|
import { ImmutableObject } from '@redocly/hookstate-core';
|
|
6
4
|
import { InferToolInput } from 'ai';
|
|
7
5
|
import { InferToolOutput } from 'ai';
|
|
@@ -9,11 +7,10 @@ import { JSX } from 'react/jsx-runtime';
|
|
|
9
7
|
import { NamedExoticComponent } from 'react';
|
|
10
8
|
import { ReactElement } from 'react';
|
|
11
9
|
import { SpanStatusCode } from '@opentelemetry/api';
|
|
12
|
-
import { StreamTextResult } from 'ai';
|
|
13
10
|
import { SystemModelMessage } from 'ai';
|
|
14
11
|
import { Context as TelemetryContext } from '@opentelemetry/api';
|
|
15
12
|
import { Tool } from 'ai';
|
|
16
|
-
import {
|
|
13
|
+
import { ToolLoopAgent } from 'ai';
|
|
17
14
|
import { ToolLoopAgentOnFinishCallback } from 'ai';
|
|
18
15
|
import { ToolLoopAgentOnStepFinishCallback } from 'ai';
|
|
19
16
|
import { ToolLoopAgentSettings } from 'ai';
|
|
@@ -22,17 +19,20 @@ export declare class AgentLoop {
|
|
|
22
19
|
private readonly toolLoopAgent;
|
|
23
20
|
private readonly maxHistoryMessages;
|
|
24
21
|
private readonly maxHistoryChars;
|
|
22
|
+
private readonly context;
|
|
23
|
+
private readonly systemInstructions;
|
|
24
|
+
private tools;
|
|
25
25
|
constructor(config: AgentRuntimeConfig);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
getAgent(): ToolLoopAgent<never, ReplayToolSet, never>;
|
|
27
|
+
addContext(context: SystemModelMessage[]): void;
|
|
28
|
+
registerTools(tools: ReplayToolSet): void;
|
|
29
|
+
private prepareMessages;
|
|
30
|
+
private preparePrompt;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
declare type AgentLoopMethodParameters = AgentCallParameters<never, ReplayToolSet>;
|
|
32
|
-
|
|
33
33
|
declare type AgentRuntimeConfig = {
|
|
34
34
|
model: Model;
|
|
35
|
-
|
|
35
|
+
tools: ReplayToolSet;
|
|
36
36
|
maxSteps?: number;
|
|
37
37
|
maxOutputTokens?: ToolLoopAgentConfig['maxOutputTokens'];
|
|
38
38
|
maxRetries?: ToolLoopAgentConfig['maxRetries'];
|
|
@@ -40,7 +40,6 @@ declare type AgentRuntimeConfig = {
|
|
|
40
40
|
onFinish?: ToolLoopAgentOnFinishCallback<ReplayToolSet>;
|
|
41
41
|
maxHistoryMessages?: number;
|
|
42
42
|
maxHistoryChars?: number;
|
|
43
|
-
toolRegistry: ToolRegistry;
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
export declare const AiPanelContext: Context<AiPanelContextValue>;
|
|
@@ -102,7 +101,126 @@ declare type ClientCredentialsOAuthFlowsObject = {
|
|
|
102
101
|
declare type ConvertOperationFunction = (path: string, method: string, openAPI: any) => OpenAPIOperation_2 | undefined;
|
|
103
102
|
|
|
104
103
|
declare const definitions: {
|
|
105
|
-
|
|
104
|
+
open_tab: Tool< {
|
|
105
|
+
action: "focus_tab" | "open_operation" | "open_collection" | "open_workflow" | "open_step" | "open_workflow_run";
|
|
106
|
+
tabIndex?: number | undefined;
|
|
107
|
+
collectionId?: string | undefined;
|
|
108
|
+
workflowId?: string | undefined;
|
|
109
|
+
stepId?: string | undefined;
|
|
110
|
+
operationId?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
error: {
|
|
113
|
+
message: string;
|
|
114
|
+
details?: unknown;
|
|
115
|
+
};
|
|
116
|
+
isError: true;
|
|
117
|
+
data?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
data: {
|
|
120
|
+
tabId: string;
|
|
121
|
+
outcome: "focused" | "opened";
|
|
122
|
+
activeTabIndex: number;
|
|
123
|
+
tabType: TabDataType;
|
|
124
|
+
};
|
|
125
|
+
isError: false;
|
|
126
|
+
error?: undefined;
|
|
127
|
+
}>;
|
|
128
|
+
run_request: Tool< {
|
|
129
|
+
collectionId: string;
|
|
130
|
+
workflowId: string;
|
|
131
|
+
stepId: string;
|
|
132
|
+
}, {
|
|
133
|
+
error: {
|
|
134
|
+
message: string;
|
|
135
|
+
details?: unknown;
|
|
136
|
+
};
|
|
137
|
+
isError: true;
|
|
138
|
+
data?: undefined;
|
|
139
|
+
} | {
|
|
140
|
+
data: {
|
|
141
|
+
body?: string | undefined;
|
|
142
|
+
url?: string | undefined;
|
|
143
|
+
status?: number | undefined;
|
|
144
|
+
size?: number | undefined;
|
|
145
|
+
headers?: [string, string][] | undefined;
|
|
146
|
+
cookies?: [string, string][] | undefined;
|
|
147
|
+
duration?: number | undefined;
|
|
148
|
+
};
|
|
149
|
+
isError: false;
|
|
150
|
+
error?: undefined;
|
|
151
|
+
}>;
|
|
152
|
+
get_current_tab: Tool< {
|
|
153
|
+
sections: ("security" | "result" | "info" | "workflows" | "sourceDescriptions" | "inputs" | "steps" | "parameters" | "outputs" | "successCriteria" | "requestBody" | "response" | "severity")[];
|
|
154
|
+
}, {
|
|
155
|
+
error: {
|
|
156
|
+
message: string;
|
|
157
|
+
details?: unknown;
|
|
158
|
+
};
|
|
159
|
+
isError: true;
|
|
160
|
+
data?: undefined;
|
|
161
|
+
} | {
|
|
162
|
+
data: {
|
|
163
|
+
message: string;
|
|
164
|
+
};
|
|
165
|
+
isError: false;
|
|
166
|
+
error?: undefined;
|
|
167
|
+
}>;
|
|
168
|
+
search: Tool< {
|
|
169
|
+
path?: string | undefined;
|
|
170
|
+
type?: "workflow" | "collection" | "step" | "api" | "api_operation" | undefined;
|
|
171
|
+
method?: string | undefined;
|
|
172
|
+
collectionId?: string | undefined;
|
|
173
|
+
workflowId?: string | undefined;
|
|
174
|
+
stepId?: string | undefined;
|
|
175
|
+
apiId?: string | undefined;
|
|
176
|
+
operationId?: string | undefined;
|
|
177
|
+
query?: string | undefined;
|
|
178
|
+
}, unknown>;
|
|
179
|
+
update_step: Tool< {
|
|
180
|
+
collectionId: string;
|
|
181
|
+
workflowId: string;
|
|
182
|
+
stepId: string;
|
|
183
|
+
body?: {
|
|
184
|
+
content: string;
|
|
185
|
+
contentType?: string | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
security?: ({
|
|
188
|
+
values: Record<string, unknown>;
|
|
189
|
+
schemeName: string;
|
|
190
|
+
} | {
|
|
191
|
+
values: Record<string, unknown>;
|
|
192
|
+
scheme: {
|
|
193
|
+
type: "http";
|
|
194
|
+
scheme: "basic" | "digest" | "bearer";
|
|
195
|
+
bearerFormat?: string | undefined;
|
|
196
|
+
} | {
|
|
197
|
+
type: "apiKey";
|
|
198
|
+
name: string;
|
|
199
|
+
in: "header" | "query" | "cookie";
|
|
200
|
+
} | {
|
|
201
|
+
type: "oauth2";
|
|
202
|
+
flows: Record<string, unknown>;
|
|
203
|
+
} | {
|
|
204
|
+
type: "openIdConnect";
|
|
205
|
+
flows?: Record<string, unknown> | undefined;
|
|
206
|
+
openIdConnectUrl?: string | undefined;
|
|
207
|
+
};
|
|
208
|
+
})[] | undefined;
|
|
209
|
+
description?: string | undefined;
|
|
210
|
+
url?: string | undefined;
|
|
211
|
+
method?: string | undefined;
|
|
212
|
+
parameters?: {
|
|
213
|
+
name: string;
|
|
214
|
+
in: "header" | "path" | "query" | "cookie";
|
|
215
|
+
value: string;
|
|
216
|
+
}[] | undefined;
|
|
217
|
+
outputs?: Record<string, string> | undefined;
|
|
218
|
+
successCriteria?: {
|
|
219
|
+
condition: string;
|
|
220
|
+
type?: "simple" | "regex" | "jsonpath" | "xpath" | undefined;
|
|
221
|
+
context?: string | undefined;
|
|
222
|
+
}[] | undefined;
|
|
223
|
+
}, {
|
|
106
224
|
error: {
|
|
107
225
|
message: string;
|
|
108
226
|
details?: unknown;
|
|
@@ -110,8 +228,10 @@ declare const definitions: {
|
|
|
110
228
|
isError: true;
|
|
111
229
|
data?: undefined;
|
|
112
230
|
} | {
|
|
231
|
+
data: {
|
|
232
|
+
changedFields: string[];
|
|
233
|
+
};
|
|
113
234
|
isError: false;
|
|
114
|
-
data?: unknown;
|
|
115
235
|
error?: undefined;
|
|
116
236
|
}>;
|
|
117
237
|
};
|
|
@@ -739,28 +859,20 @@ declare type ReplayOverlayProps = {
|
|
|
739
859
|
onRequestChange?: (props: ReplayOnChangeParams) => void;
|
|
740
860
|
} & ReplayAppProps;
|
|
741
861
|
|
|
742
|
-
declare type ReplayTool<T extends ReplayToolNames> = Tool<ReplayToolInput<T>, ReplayToolOutput<T
|
|
743
|
-
execute: ReplayToolExecutor<T>;
|
|
744
|
-
};
|
|
862
|
+
declare type ReplayTool<T extends ReplayToolNames> = Tool<ReplayToolInput<T>, ReplayToolOutput<T>>;
|
|
745
863
|
|
|
746
864
|
declare type ReplayToolDefinition<T extends ReplayToolNames> = ReplayToolDefinitions[T];
|
|
747
865
|
|
|
748
866
|
declare type ReplayToolDefinitions = typeof definitions;
|
|
749
867
|
|
|
750
|
-
declare type ReplayToolExecutor<T extends ReplayToolNames> = ToolExecuteFunction<ReplayToolInput<T>, ReplayToolOutput<T>>;
|
|
751
|
-
|
|
752
|
-
declare type ReplayToolExecutorMap<T extends ReplayToolNames = ReplayToolNames> = Partial<{
|
|
753
|
-
[K in T]: ReplayToolExecutor<K>;
|
|
754
|
-
}>;
|
|
755
|
-
|
|
756
868
|
declare type ReplayToolInput<T extends ReplayToolNames> = InferToolInput<ReplayToolDefinition<T>>;
|
|
757
869
|
|
|
758
870
|
declare type ReplayToolNames = keyof ReplayToolDefinitions;
|
|
759
871
|
|
|
760
872
|
declare type ReplayToolOutput<T extends ReplayToolNames> = InferToolOutput<ReplayToolDefinition<T>>;
|
|
761
873
|
|
|
762
|
-
declare type ReplayToolSet
|
|
763
|
-
[K in
|
|
874
|
+
declare type ReplayToolSet = {
|
|
875
|
+
[K in ReplayToolNames]: ReplayTool<K>;
|
|
764
876
|
};
|
|
765
877
|
|
|
766
878
|
export declare type ResolvedTheme = 'light' | 'dark';
|
|
@@ -807,6 +919,13 @@ declare type ServerVariable = {
|
|
|
807
919
|
|
|
808
920
|
export { SpanStatusCode }
|
|
809
921
|
|
|
922
|
+
declare enum TabDataType {
|
|
923
|
+
Workflow = "workflow",
|
|
924
|
+
WorkflowRun = "workflowRun",
|
|
925
|
+
Collection = "collection",
|
|
926
|
+
Step = "step"
|
|
927
|
+
}
|
|
928
|
+
|
|
810
929
|
export declare class TelemetryClient {
|
|
811
930
|
private _client;
|
|
812
931
|
private _isInitialized;
|
|
@@ -852,18 +971,6 @@ export declare type Theme = 'light' | 'dark' | 'auto';
|
|
|
852
971
|
|
|
853
972
|
declare type ToolLoopAgentConfig = ToolLoopAgentSettings<never, ReplayToolSet, never>;
|
|
854
973
|
|
|
855
|
-
declare class ToolRegistry {
|
|
856
|
-
private readonly executors;
|
|
857
|
-
private readonly definitions;
|
|
858
|
-
register<T extends ReplayToolNames>(name: T, executor: ReplayToolExecutor<T>): void;
|
|
859
|
-
registerMany<T extends ReplayToolNames>(executors: ReplayToolExecutorMap<T>): void;
|
|
860
|
-
get<T extends ReplayToolNames>(name: T): ReplayTool<T>;
|
|
861
|
-
list(): ReplayToolSet;
|
|
862
|
-
private buildTool;
|
|
863
|
-
getToolSet(): ReplayToolSet;
|
|
864
|
-
private assignBuiltTool;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
974
|
declare type TracerName = 'try-it' | 'replay-openapi' | 'desktop' | 'reunite-tab';
|
|
868
975
|
|
|
869
976
|
export declare function useAiPanel(): AiPanelContextValue;
|
package/dist/replay.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as s, x as t, E as l, M as r, R as o, y as m, S as n, T as p, z as y, C as T, D as d, F as h, G as u, H as C } from "./replay-index-BZey8T6L.js";
|
|
2
2
|
import { O as A, h as O } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AgentLoop,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.23.0-next.
|
|
3
|
+
"version": "0.23.0-next.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
"react-dom": "^19.2.4",
|
|
21
21
|
"react-router-dom": "^6.30.3",
|
|
22
22
|
"styled-components": "^5.3.11",
|
|
23
|
-
"@redocly/theme": "0.64.0-next.
|
|
23
|
+
"@redocly/theme": "0.64.0-next.3"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ai-sdk/google": "3.0.1",
|
|
27
27
|
"@ai-sdk/provider": "3.0.0",
|
|
28
|
+
"@ai-sdk/react": "3.0.118",
|
|
28
29
|
"@codemirror/autocomplete": "^6.15.0",
|
|
29
30
|
"@codemirror/lang-html": "^6.4.7",
|
|
30
31
|
"@codemirror/lang-java": "^6.0.2",
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
"@opentelemetry/api": "1.9.0",
|
|
48
49
|
"@redocly/hookstate-core": "^4.2.1",
|
|
49
50
|
"@redocly/hookstate-devtools": "^4.2.0",
|
|
50
|
-
"@redocly/openapi-core": "2.
|
|
51
|
-
"@redocly/respect-core": "2.
|
|
51
|
+
"@redocly/openapi-core": "2.25.2",
|
|
52
|
+
"@redocly/respect-core": "2.25.2",
|
|
52
53
|
"@redocly/vscode-json-languageservice": "^3.4.9",
|
|
53
54
|
"@tauri-apps/api": "2.4.1",
|
|
54
55
|
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"ai": "6.0.111",
|
|
60
61
|
"dayjs": "^1.11.7",
|
|
61
62
|
"drizzle-orm": "^0.36.4",
|
|
62
|
-
"fast-xml-parser": "5.
|
|
63
|
+
"fast-xml-parser": "5.5.9",
|
|
63
64
|
"idb": "^8.0.2",
|
|
64
65
|
"js-yaml": "4.1.1",
|
|
65
66
|
"json-pointer": "^0.6.2",
|