@redocly/replay 0.23.0-next.1 → 0.23.0-next.2
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-EqalpLsI.js → replay-index-02jfHA1h.js} +1170 -1127
- package/dist/{replay-index-ChvV5L2N.js → replay-index-BUQKXz2B.js} +25299 -24558
- package/dist/{replay-index-rmmlneys.js → replay-index-BYc92SJQ.js} +1 -1
- package/dist/{replay-index-BRzRPq_g.js → replay-index-CadO8nkj.js} +1 -1
- package/dist/{replay-respect-run-COl6B6SF.js → replay-respect-run-COEQpruY.js} +1188 -1163
- package/dist/replay-respect-run-Dtez4mbP.js +84 -0
- package/dist/{replay-tauri-path-B1UtU85M.js → replay-tauri-path-BtbTHr-Q.js} +2 -2
- package/dist/{replay-tauri-path-aqQJB8US.js → replay-tauri-path-sLpMpgsP.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +58 -30
- package/dist/replay.js +1 -1
- package/package.json +4 -4
- package/dist/replay-respect-run-DEcYG1NI.js +0 -84
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as h, r as i, e as x } from "./replay-index-
|
|
2
|
-
import { d as j, a as b, j as d } from "./replay-index-
|
|
1
|
+
import { s as h, r as i, e as x } from "./replay-index-BUQKXz2B.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-BUQKXz2B.js";
|
|
3
3
|
async function u(n, e) {
|
|
4
4
|
const t = h(), 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;
|
|
@@ -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-02jfHA1h.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;
|
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-02jfHA1h.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
|
@@ -3,6 +3,8 @@ import { AsyncApiReplay } from '@redocly/replay-asyncapi-sdk';
|
|
|
3
3
|
import { Context } from 'react';
|
|
4
4
|
import { GenerateTextResult } from 'ai';
|
|
5
5
|
import { ImmutableObject } from '@redocly/hookstate-core';
|
|
6
|
+
import { InferToolInput } from 'ai';
|
|
7
|
+
import { InferToolOutput } from 'ai';
|
|
6
8
|
import { JSX } from 'react/jsx-runtime';
|
|
7
9
|
import { NamedExoticComponent } from 'react';
|
|
8
10
|
import { ReactElement } from 'react';
|
|
@@ -11,6 +13,7 @@ import { StreamTextResult } from 'ai';
|
|
|
11
13
|
import { SystemModelMessage } from 'ai';
|
|
12
14
|
import { Context as TelemetryContext } from '@opentelemetry/api';
|
|
13
15
|
import { Tool } from 'ai';
|
|
16
|
+
import { ToolExecuteFunction } from 'ai';
|
|
14
17
|
import { ToolLoopAgentOnFinishCallback } from 'ai';
|
|
15
18
|
import { ToolLoopAgentOnStepFinishCallback } from 'ai';
|
|
16
19
|
import { ToolLoopAgentSettings } from 'ai';
|
|
@@ -20,8 +23,8 @@ export declare class AgentLoop {
|
|
|
20
23
|
private readonly maxHistoryMessages;
|
|
21
24
|
private readonly maxHistoryChars;
|
|
22
25
|
constructor(config: AgentRuntimeConfig);
|
|
23
|
-
stream(options: AgentLoopMethodParameters): Promise<StreamTextResult<
|
|
24
|
-
generate(options: AgentLoopMethodParameters): Promise<GenerateTextResult<
|
|
26
|
+
stream(options: AgentLoopMethodParameters): Promise<StreamTextResult<ReplayToolSet, never>>;
|
|
27
|
+
generate(options: AgentLoopMethodParameters): Promise<GenerateTextResult<ReplayToolSet, never>>;
|
|
25
28
|
private prepareOptions;
|
|
26
29
|
}
|
|
27
30
|
|
|
@@ -31,12 +34,13 @@ declare type AgentRuntimeConfig = {
|
|
|
31
34
|
model: Model;
|
|
32
35
|
context: SystemModelMessage[];
|
|
33
36
|
maxSteps?: number;
|
|
34
|
-
maxOutputTokens?:
|
|
35
|
-
maxRetries?:
|
|
37
|
+
maxOutputTokens?: ToolLoopAgentConfig['maxOutputTokens'];
|
|
38
|
+
maxRetries?: ToolLoopAgentConfig['maxRetries'];
|
|
36
39
|
onStepFinish?: ToolLoopAgentOnStepFinishCallback<ReplayToolSet>;
|
|
37
40
|
onFinish?: ToolLoopAgentOnFinishCallback<ReplayToolSet>;
|
|
38
41
|
maxHistoryMessages?: number;
|
|
39
42
|
maxHistoryChars?: number;
|
|
43
|
+
toolRegistry: ToolRegistry;
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
export declare const AiPanelContext: Context<AiPanelContextValue>;
|
|
@@ -97,6 +101,21 @@ declare type ClientCredentialsOAuthFlowsObject = {
|
|
|
97
101
|
|
|
98
102
|
declare type ConvertOperationFunction = (path: string, method: string, openAPI: any) => OpenAPIOperation_2 | undefined;
|
|
99
103
|
|
|
104
|
+
declare const definitions: {
|
|
105
|
+
run_request: Tool< {}, {
|
|
106
|
+
error: {
|
|
107
|
+
message: string;
|
|
108
|
+
details?: unknown;
|
|
109
|
+
};
|
|
110
|
+
isError: true;
|
|
111
|
+
data?: undefined;
|
|
112
|
+
} | {
|
|
113
|
+
isError: false;
|
|
114
|
+
data?: unknown;
|
|
115
|
+
error?: undefined;
|
|
116
|
+
}>;
|
|
117
|
+
};
|
|
118
|
+
|
|
100
119
|
export declare function EmbeddedReplay(props: ReplayAppProps): JSX.Element;
|
|
101
120
|
|
|
102
121
|
declare type EndpointModel = {
|
|
@@ -126,6 +145,7 @@ declare type ImplicitOAuthFlowsObject = {
|
|
|
126
145
|
|
|
127
146
|
declare type InputSettings = {
|
|
128
147
|
corsProxyUrl?: string;
|
|
148
|
+
credentialOrigin?: string;
|
|
129
149
|
disableCollectionsTab?: boolean;
|
|
130
150
|
disableDraft?: boolean;
|
|
131
151
|
oAuth2RedirectURI?: string | null;
|
|
@@ -692,24 +712,6 @@ declare type Referenced<T> = T | OpenAPIRef;
|
|
|
692
712
|
|
|
693
713
|
export declare function Replay(props: ReplayAppProps): JSX.Element;
|
|
694
714
|
|
|
695
|
-
declare const REPLAY_TOOLS: {
|
|
696
|
-
readonly search: Tool<{
|
|
697
|
-
query: string;
|
|
698
|
-
}, ToolExecutionResult< {
|
|
699
|
-
message: string;
|
|
700
|
-
}>>;
|
|
701
|
-
readonly open_tab: Tool<{
|
|
702
|
-
operationId: string;
|
|
703
|
-
}, ToolExecutionResult< {
|
|
704
|
-
operationId: string;
|
|
705
|
-
}>>;
|
|
706
|
-
readonly run_request: Tool<{
|
|
707
|
-
operationId: string;
|
|
708
|
-
}, ToolExecutionResult< {
|
|
709
|
-
operationId: string;
|
|
710
|
-
}>>;
|
|
711
|
-
};
|
|
712
|
-
|
|
713
715
|
declare type ReplayAppProps = {
|
|
714
716
|
activeOperationId?: string;
|
|
715
717
|
activeOperationPointer?: string;
|
|
@@ -737,9 +739,29 @@ declare type ReplayOverlayProps = {
|
|
|
737
739
|
onRequestChange?: (props: ReplayOnChangeParams) => void;
|
|
738
740
|
} & ReplayAppProps;
|
|
739
741
|
|
|
740
|
-
declare type ReplayToolNames =
|
|
742
|
+
declare type ReplayTool<T extends ReplayToolNames> = Tool<ReplayToolInput<T>, ReplayToolOutput<T>> & {
|
|
743
|
+
execute: ReplayToolExecutor<T>;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
declare type ReplayToolDefinition<T extends ReplayToolNames> = ReplayToolDefinitions[T];
|
|
747
|
+
|
|
748
|
+
declare type ReplayToolDefinitions = typeof definitions;
|
|
741
749
|
|
|
742
|
-
declare type
|
|
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
|
+
declare type ReplayToolInput<T extends ReplayToolNames> = InferToolInput<ReplayToolDefinition<T>>;
|
|
757
|
+
|
|
758
|
+
declare type ReplayToolNames = keyof ReplayToolDefinitions;
|
|
759
|
+
|
|
760
|
+
declare type ReplayToolOutput<T extends ReplayToolNames> = InferToolOutput<ReplayToolDefinition<T>>;
|
|
761
|
+
|
|
762
|
+
declare type ReplayToolSet<T extends ReplayToolNames = ReplayToolNames> = {
|
|
763
|
+
[K in T]: ReplayTool<K>;
|
|
764
|
+
};
|
|
743
765
|
|
|
744
766
|
export declare type ResolvedTheme = 'light' | 'dark';
|
|
745
767
|
|
|
@@ -828,13 +850,19 @@ export declare type TelemetryMethods = {
|
|
|
828
850
|
|
|
829
851
|
export declare type Theme = 'light' | 'dark' | 'auto';
|
|
830
852
|
|
|
831
|
-
declare type
|
|
832
|
-
status: ToolExecutionStatus;
|
|
833
|
-
data?: TData;
|
|
834
|
-
error?: string;
|
|
835
|
-
};
|
|
853
|
+
declare type ToolLoopAgentConfig = ToolLoopAgentSettings<never, ReplayToolSet, never>;
|
|
836
854
|
|
|
837
|
-
declare
|
|
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
|
+
}
|
|
838
866
|
|
|
839
867
|
declare type TracerName = 'try-it' | 'replay-openapi' | 'desktop' | 'reunite-tab';
|
|
840
868
|
|
package/dist/replay.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as s, D as t, E as l, M as r, R as o, w as m, S as n, T as p, y, z as T, x as d, F as h, B as u, C } from "./replay-index-
|
|
1
|
+
import { G as s, D as t, E as l, M as r, R as o, w as m, S as n, T as p, y, z as T, x as d, F as h, B as u, C } from "./replay-index-BUQKXz2B.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.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
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.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ai-sdk/google": "3.0.1",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@opentelemetry/api": "1.9.0",
|
|
48
48
|
"@redocly/hookstate-core": "^4.2.1",
|
|
49
49
|
"@redocly/hookstate-devtools": "^4.2.0",
|
|
50
|
-
"@redocly/openapi-core": "2.
|
|
51
|
-
"@redocly/respect-core": "2.
|
|
50
|
+
"@redocly/openapi-core": "2.24.0",
|
|
51
|
+
"@redocly/respect-core": "2.24.0",
|
|
52
52
|
"@redocly/vscode-json-languageservice": "^3.4.9",
|
|
53
53
|
"@tauri-apps/api": "2.4.1",
|
|
54
54
|
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
|