@scalar/agent-chat 0.9.9 → 0.9.10
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/App.vue.d.ts +6 -6
- package/dist/api.d.ts +8 -8
- package/dist/client-tools/execute-request.d.ts +7 -7
- package/dist/components/ErrorMessage.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/UploadSection.vue.d.ts +1 -1
- package/dist/entities/error/helpers.d.ts +1 -1
- package/dist/entities/index.d.ts +9 -9
- package/dist/entities/index.js +2 -23
- package/dist/entities/tools/execute-request.d.ts +1 -1
- package/dist/entities-NWeuOkBB.js +28 -0
- package/dist/entities-NWeuOkBB.js.map +1 -0
- package/dist/hooks/use-chat-approvals.d.ts +1 -1
- package/dist/hooks/use-search.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2064 -3
- package/dist/index.js.map +1 -0
- package/dist/package.json +3 -5
- package/dist/registry/add-documents-to-store.d.ts +5 -5
- package/dist/state/state.d.ts +7 -7
- package/dist/style.css +2 -1
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/package.json +15 -17
- package/dist/App.vue.js +0 -43
- package/dist/App.vue2.js +0 -4
- package/dist/Chat.vue.js +0 -55
- package/dist/Chat.vue2.js +0 -4
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/api.js +0 -99
- package/dist/client-tools/execute-request.js +0 -98
- package/dist/components/ActionsDropdown.vue.js +0 -7
- package/dist/components/ActionsDropdown.vue2.js +0 -50
- package/dist/components/ApprovalSection.vue.js +0 -7
- package/dist/components/ApprovalSection.vue2.js +0 -33
- package/dist/components/AuthenticationProvided.vue.js +0 -13
- package/dist/components/AuthenticationRequired.vue.js +0 -13
- package/dist/components/AutosendPaused.vue.js +0 -13
- package/dist/components/BuildingRequest.vue.js +0 -24
- package/dist/components/ContextItem.vue.js +0 -7
- package/dist/components/ContextItem.vue2.js +0 -19
- package/dist/components/ErrorMessage.vue.js +0 -7
- package/dist/components/ErrorMessage.vue2.js +0 -25
- package/dist/components/FreeMessagesInfoSection.vue.js +0 -7
- package/dist/components/FreeMessagesInfoSection.vue2.js +0 -51
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +0 -14
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +0 -14
- package/dist/components/Logo.vue.js +0 -23
- package/dist/components/PaymentSection.vue.js +0 -7
- package/dist/components/PaymentSection.vue2.js +0 -30
- package/dist/components/RequestApproved.vue.js +0 -13
- package/dist/components/RequestFailed.vue.js +0 -24
- package/dist/components/RequestPreview.vue.js +0 -7
- package/dist/components/RequestPreview.vue2.js +0 -129
- package/dist/components/RequestRejected.vue.js +0 -22
- package/dist/components/RequestSuccess.vue.js +0 -13
- package/dist/components/ResponseBody/ResponseBody.vue.js +0 -41
- package/dist/components/ResponseBody/ResponseBody.vue2.js +0 -4
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +0 -14
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +0 -7
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +0 -65
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +0 -20
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +0 -4
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +0 -26
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +0 -4
- package/dist/components/ResponseBody/helpers/media-types.js +0 -129
- package/dist/components/ResponseBody/helpers/process-response-body.js +0 -33
- package/dist/components/SearchPopover.vue.js +0 -7
- package/dist/components/SearchPopover.vue2.js +0 -67
- package/dist/components/Selector.vue.js +0 -67
- package/dist/components/Selector.vue2.js +0 -4
- package/dist/components/SendingRequest.vue.js +0 -24
- package/dist/components/ServerSelector.vue.js +0 -63
- package/dist/components/ServerSelector.vue2.js +0 -4
- package/dist/components/UploadSection.vue.js +0 -7
- package/dist/components/UploadSection.vue2.js +0 -61
- package/dist/consts/urls.js +0 -10
- package/dist/entities/error/constants.js +0 -6
- package/dist/entities/error/helpers.js +0 -9
- package/dist/entities/prompt/constants.js +0 -4
- package/dist/entities/registry/document.js +0 -12
- package/dist/entities/tools/ask-for-authentication.js +0 -8
- package/dist/entities/tools/constants.js +0 -4
- package/dist/entities/tools/execute-request.js +0 -12
- package/dist/entities/tools/get-mini-openapi-spec.js +0 -8
- package/dist/entities/tools/get-openapi-spec-summary.js +0 -4
- package/dist/helpers.js +0 -67
- package/dist/hooks/use-agent-key-documents.js +0 -21
- package/dist/hooks/use-chat-approvals.js +0 -35
- package/dist/hooks/use-chat-error.js +0 -23
- package/dist/hooks/use-chat-pending-client-tool-parts.js +0 -12
- package/dist/hooks/use-chat-scroll.js +0 -16
- package/dist/hooks/use-curated-documents.js +0 -12
- package/dist/hooks/use-search.js +0 -21
- package/dist/hooks/use-signup-link.js +0 -12
- package/dist/hooks/use-term-and-conditions.js +0 -15
- package/dist/hooks/use-upload-tmp-document.js +0 -94
- package/dist/plugins/persistance.js +0 -23
- package/dist/registry/add-documents-to-store.js +0 -44
- package/dist/registry/create-document-name.js +0 -6
- package/dist/state/state.js +0 -200
- package/dist/views/Catalog/Catalog.vue.js +0 -8
- package/dist/views/Catalog/Catalog.vue2.js +0 -70
- package/dist/views/Chat/Chat.vue.js +0 -7
- package/dist/views/Chat/Chat.vue2.js +0 -78
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +0 -7
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +0 -91
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +0 -7
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +0 -24
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +0 -7
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +0 -56
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +0 -26
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +0 -4
- package/dist/views/Chat/Messages/Text.vue.js +0 -16
- package/dist/views/Chat/Messages/Text.vue2.js +0 -4
- package/dist/views/Layout.vue.js +0 -7
- package/dist/views/Layout.vue2.js +0 -25
- package/dist/views/PromptForm.vue.js +0 -7
- package/dist/views/PromptForm.vue2.js +0 -254
- package/dist/views/Settings/Auth.vue.js +0 -67
- package/dist/views/Settings/Auth.vue2.js +0 -4
- package/dist/views/Settings/DocSettings.vue.js +0 -7
- package/dist/views/Settings/DocSettings.vue2.js +0 -49
- package/dist/views/Settings/Settings.vue.js +0 -8
- package/dist/views/Settings/Settings.vue2.js +0 -79
- package/dist/views/Start.vue.js +0 -7
- package/dist/views/Start.vue2.js +0 -43
package/dist/App.vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
import { type RegistryDocument } from '
|
|
3
|
-
import { type ChatMode } from '
|
|
2
|
+
import { type RegistryDocument } from '@/state/state';
|
|
3
|
+
import { type ChatMode } from '@/types';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
registryDocuments: RegistryDocument[];
|
|
6
6
|
registryUrl: string;
|
|
@@ -16,7 +16,7 @@ type __VLS_Props = {
|
|
|
16
16
|
};
|
|
17
17
|
declare const state: {
|
|
18
18
|
prompt: Ref<string>;
|
|
19
|
-
chat: import("@ai-sdk/vue").Chat<import("ai").UIMessage<unknown, import("ai").UIDataTypes, import("
|
|
19
|
+
chat: import("@ai-sdk/vue").Chat<import("ai").UIMessage<unknown, import("ai").UIDataTypes, import("@/state/state").Tools>>;
|
|
20
20
|
workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
|
|
21
21
|
loading: import("vue").ComputedRef<boolean>;
|
|
22
22
|
settingsModal: import("@scalar/components").ModalState;
|
|
@@ -28,7 +28,7 @@ declare const state: {
|
|
|
28
28
|
dashboardUrl: string;
|
|
29
29
|
baseUrl: string;
|
|
30
30
|
isLoggedIn?: Ref<boolean>;
|
|
31
|
-
registryDocuments: Ref<import("./entities
|
|
31
|
+
registryDocuments: Ref<import("./entities").ApiMetadata[]>;
|
|
32
32
|
pendingDocuments: Record<string, boolean>;
|
|
33
33
|
mode: ChatMode;
|
|
34
34
|
terms: {
|
|
@@ -52,9 +52,9 @@ declare const state: {
|
|
|
52
52
|
}) => void;
|
|
53
53
|
getAccessToken?: () => string;
|
|
54
54
|
getAgentKey?: () => string;
|
|
55
|
-
api: import("./api
|
|
55
|
+
api: import("./api").Api;
|
|
56
56
|
uploadedTmpDocumentUrl: Ref<string | undefined>;
|
|
57
|
-
curatedDocuments: Ref<import("./entities
|
|
57
|
+
curatedDocuments: Ref<import("./entities").ApiMetadata[]>;
|
|
58
58
|
getActiveDocumentJson?: () => string;
|
|
59
59
|
hideAddApi?: boolean;
|
|
60
60
|
};
|
package/dist/api.d.ts
CHANGED
|
@@ -15,10 +15,10 @@ export declare function createApi({ baseUrl, proxyUrl, getAccessToken, getAgentK
|
|
|
15
15
|
}): {
|
|
16
16
|
search: (query: string) => Promise<{
|
|
17
17
|
success: false;
|
|
18
|
-
error: import("./entities
|
|
18
|
+
error: import("./entities").AgentChatError<"FAILED_TO_FETCH", unknown>;
|
|
19
19
|
} | import("neverpanic").Result<never, null> | {
|
|
20
20
|
success: false;
|
|
21
|
-
error: import("./entities
|
|
21
|
+
error: import("./entities").AgentChatError<string, string>;
|
|
22
22
|
data?: undefined;
|
|
23
23
|
} | {
|
|
24
24
|
success: true;
|
|
@@ -39,10 +39,10 @@ export declare function createApi({ baseUrl, proxyUrl, getAccessToken, getAgentK
|
|
|
39
39
|
slug: string;
|
|
40
40
|
}) => Promise<{
|
|
41
41
|
success: false;
|
|
42
|
-
error: import("./entities
|
|
42
|
+
error: import("./entities").AgentChatError<"FAILED_TO_FETCH", unknown>;
|
|
43
43
|
} | import("neverpanic").Result<never, null> | {
|
|
44
44
|
success: false;
|
|
45
|
-
error: import("./entities
|
|
45
|
+
error: import("./entities").AgentChatError<string, string>;
|
|
46
46
|
data?: undefined;
|
|
47
47
|
} | {
|
|
48
48
|
success: true;
|
|
@@ -58,10 +58,10 @@ export declare function createApi({ baseUrl, proxyUrl, getAccessToken, getAgentK
|
|
|
58
58
|
}>;
|
|
59
59
|
getKeyDocuments: () => Promise<{
|
|
60
60
|
success: false;
|
|
61
|
-
error: import("./entities
|
|
61
|
+
error: import("./entities").AgentChatError<"FAILED_TO_FETCH", unknown>;
|
|
62
62
|
} | import("neverpanic").Result<never, null> | {
|
|
63
63
|
success: false;
|
|
64
|
-
error: import("./entities
|
|
64
|
+
error: import("./entities").AgentChatError<string, string>;
|
|
65
65
|
data?: undefined;
|
|
66
66
|
} | {
|
|
67
67
|
success: true;
|
|
@@ -79,10 +79,10 @@ export declare function createApi({ baseUrl, proxyUrl, getAccessToken, getAgentK
|
|
|
79
79
|
}>;
|
|
80
80
|
getCuratedDocuments: () => Promise<{
|
|
81
81
|
success: false;
|
|
82
|
-
error: import("./entities
|
|
82
|
+
error: import("./entities").AgentChatError<"FAILED_TO_FETCH", unknown>;
|
|
83
83
|
} | import("neverpanic").Result<never, null> | {
|
|
84
84
|
success: false;
|
|
85
|
-
error: import("./entities
|
|
85
|
+
error: import("./entities").AgentChatError<string, string>;
|
|
86
86
|
data?: undefined;
|
|
87
87
|
} | {
|
|
88
88
|
success: true;
|
|
@@ -2,7 +2,7 @@ import type { Chat } from '@ai-sdk/vue';
|
|
|
2
2
|
import type { SecuritySchemeObjectSecret } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
|
|
3
3
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
4
|
import type { UIDataTypes, UIMessage } from 'ai';
|
|
5
|
-
import type { Tools } from '
|
|
5
|
+
import type { Tools } from '@/state/state';
|
|
6
6
|
/**
|
|
7
7
|
* Executes an HTTP request with the specified options, including method, path, headers, and security schemes, and returns the processed response.
|
|
8
8
|
*/
|
|
@@ -26,12 +26,12 @@ export declare const executeRequestTool: (args_0: {
|
|
|
26
26
|
data: never;
|
|
27
27
|
} | {
|
|
28
28
|
success: false;
|
|
29
|
-
error: import("
|
|
29
|
+
error: import("@/entities").AgentChatError<"FAILED_TO_PARSE_RESPONSE_BODY", {
|
|
30
30
|
originalError: unknown;
|
|
31
31
|
}>;
|
|
32
32
|
} | {
|
|
33
33
|
success: false;
|
|
34
|
-
error: import("
|
|
34
|
+
error: import("@/entities").AgentChatError<"REQUEST_NOT_OK", {
|
|
35
35
|
status: number;
|
|
36
36
|
url: string;
|
|
37
37
|
responseBody: any;
|
|
@@ -52,22 +52,22 @@ export declare const executeRequestTool: (args_0: {
|
|
|
52
52
|
error?: undefined;
|
|
53
53
|
} | {
|
|
54
54
|
success: false;
|
|
55
|
-
error: import("
|
|
55
|
+
error: import("@/entities").AgentChatError<"FAILED_TO_FETCH", {
|
|
56
56
|
originalError: unknown;
|
|
57
57
|
}>;
|
|
58
58
|
} | {
|
|
59
59
|
success: false;
|
|
60
|
-
error: import("
|
|
60
|
+
error: import("@/entities").AgentChatError<"FAILED_TO_DETERMINE_DOCUMENT", {
|
|
61
61
|
namespace: string | undefined;
|
|
62
62
|
slug: string | undefined;
|
|
63
63
|
documentIdentifier: string;
|
|
64
64
|
}>;
|
|
65
65
|
} | {
|
|
66
66
|
success: false;
|
|
67
|
-
error: import("
|
|
67
|
+
error: import("@/entities").AgentChatError<"DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED", {
|
|
68
68
|
documentName: string;
|
|
69
69
|
namespace: string;
|
|
70
70
|
slug: string;
|
|
71
71
|
}>;
|
|
72
|
-
}> | import("neverpanic").Result<never, import("
|
|
72
|
+
}> | import("neverpanic").Result<never, import("@/entities").AgentChatError<"FAILED_TO_EXECUTE_REQUEST", unknown>>;
|
|
73
73
|
//# sourceMappingURL=execute-request.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DeepPartial } from 'ai';
|
|
2
|
-
import type { ExecuteClientSideRequestToolInput, ExecuteClientSideRequestToolOutput } from '
|
|
2
|
+
import type { ExecuteClientSideRequestToolInput, ExecuteClientSideRequestToolOutput } from '@/entities/tools/execute-request';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
request?: ExecuteClientSideRequestToolInput | DeepPartial<ExecuteClientSideRequestToolInput>;
|
|
5
5
|
response?: ExecuteClientSideRequestToolOutput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type MIMEType from 'whatwg-mimetype';
|
|
2
|
-
import { type MediaConfig } from '
|
|
2
|
+
import { type MediaConfig } from '@/components/ResponseBody/helpers/media-types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
data: unknown;
|
|
5
5
|
responseBody: {
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { type AgentChatError, AgentErrorCodes, } from './error/constants
|
|
2
|
-
export { createError } from './error/helpers
|
|
3
|
-
export { MAX_PROMPT_SIZE } from './prompt/constants
|
|
4
|
-
export { type ApiMetadata, type DocumentSettings, type RegistryDocument, registryApiMetadata, } from './registry/document
|
|
5
|
-
export { ASK_FOR_AUTHENTICATION_TOOL_NAME, type AskForAuthenticationInput, askForAuthenticationInputSchema, } from './tools/ask-for-authentication
|
|
6
|
-
export { TOOL_NAMESPACE_SLUG_DELIMITER } from './tools/constants
|
|
7
|
-
export { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, type ExecuteClientSideRequestToolInput, type ExecuteClientSideRequestToolOutput, executeClientSideRequestToolInputSchema, } from './tools/execute-request
|
|
8
|
-
export { GET_MINI_OPENAPI_SPEC_TOOL_NAME, type GetMiniOpenAPIDocToolInput, type GetMiniOpenAPIDocToolOutput, getMiniOpenAPIDocToolInputSchema, } from './tools/get-mini-openapi-spec
|
|
9
|
-
export { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, type GetOpenAPISpecsSummaryToolOutput, } from './tools/get-openapi-spec-summary
|
|
1
|
+
export { type AgentChatError, AgentErrorCodes, } from './error/constants';
|
|
2
|
+
export { createError } from './error/helpers';
|
|
3
|
+
export { MAX_PROMPT_SIZE } from './prompt/constants';
|
|
4
|
+
export { type ApiMetadata, type DocumentSettings, type RegistryDocument, registryApiMetadata, } from './registry/document';
|
|
5
|
+
export { ASK_FOR_AUTHENTICATION_TOOL_NAME, type AskForAuthenticationInput, askForAuthenticationInputSchema, } from './tools/ask-for-authentication';
|
|
6
|
+
export { TOOL_NAMESPACE_SLUG_DELIMITER } from './tools/constants';
|
|
7
|
+
export { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, type ExecuteClientSideRequestToolInput, type ExecuteClientSideRequestToolOutput, executeClientSideRequestToolInputSchema, } from './tools/execute-request';
|
|
8
|
+
export { GET_MINI_OPENAPI_SPEC_TOOL_NAME, type GetMiniOpenAPIDocToolInput, type GetMiniOpenAPIDocToolOutput, getMiniOpenAPIDocToolInputSchema, } from './tools/get-mini-openapi-spec';
|
|
9
|
+
export { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, type GetOpenAPISpecsSummaryToolOutput, } from './tools/get-openapi-spec-summary';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/entities/index.js
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { MAX_PROMPT_SIZE as A } from "./prompt/constants.js";
|
|
4
|
-
import { registryApiMetadata as O } from "./registry/document.js";
|
|
5
|
-
import { ASK_FOR_AUTHENTICATION_TOOL_NAME as p, askForAuthenticationInputSchema as S } from "./tools/ask-for-authentication.js";
|
|
6
|
-
import { TOOL_NAMESPACE_SLUG_DELIMITER as m } from "./tools/constants.js";
|
|
7
|
-
import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME as x, executeClientSideRequestToolInputSchema as P } from "./tools/execute-request.js";
|
|
8
|
-
import { GET_MINI_OPENAPI_SPEC_TOOL_NAME as f, getMiniOpenAPIDocToolInputSchema as n } from "./tools/get-mini-openapi-spec.js";
|
|
9
|
-
import { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME as C } from "./tools/get-openapi-spec-summary.js";
|
|
10
|
-
export {
|
|
11
|
-
p as ASK_FOR_AUTHENTICATION_TOOL_NAME,
|
|
12
|
-
r as AgentErrorCodes,
|
|
13
|
-
x as EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME,
|
|
14
|
-
f as GET_MINI_OPENAPI_SPEC_TOOL_NAME,
|
|
15
|
-
C as GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME,
|
|
16
|
-
A as MAX_PROMPT_SIZE,
|
|
17
|
-
m as TOOL_NAMESPACE_SLUG_DELIMITER,
|
|
18
|
-
S as askForAuthenticationInputSchema,
|
|
19
|
-
t as createError,
|
|
20
|
-
P as executeClientSideRequestToolInputSchema,
|
|
21
|
-
n as getMiniOpenAPIDocToolInputSchema,
|
|
22
|
-
O as registryApiMetadata
|
|
23
|
-
};
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../entities-NWeuOkBB.js";
|
|
2
|
+
export { l as ASK_FOR_AUTHENTICATION_TOOL_NAME, d as AgentErrorCodes, i as EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, o as GET_MINI_OPENAPI_SPEC_TOOL_NAME, u as GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, a as MAX_PROMPT_SIZE, s as TOOL_NAMESPACE_SLUG_DELIMITER, t as askForAuthenticationInputSchema, r as createError, e as executeClientSideRequestToolInputSchema, c as getMiniOpenAPIDocToolInputSchema, n as registryApiMetadata };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Result } from 'neverpanic';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import type { AgentChatError } from '
|
|
3
|
+
import type { AgentChatError } from '@/entities/error/constants';
|
|
4
4
|
export declare const EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME: "execute-request";
|
|
5
5
|
export declare const executeClientSideRequestToolInputSchema: z.ZodObject<{
|
|
6
6
|
method: z.ZodString;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import e, { z as t } from "zod";
|
|
2
|
+
//#region src/entities/error/helpers.ts
|
|
3
|
+
function n(e, t) {
|
|
4
|
+
return {
|
|
5
|
+
code: e,
|
|
6
|
+
detail: t
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/entities/registry/document.ts
|
|
11
|
+
var r = e.object({
|
|
12
|
+
id: e.string(),
|
|
13
|
+
title: e.string(),
|
|
14
|
+
namespace: e.string(),
|
|
15
|
+
currentVersion: e.string(),
|
|
16
|
+
logoUrl: e.url().nullable(),
|
|
17
|
+
slug: e.string()
|
|
18
|
+
}), i = { LIMIT_REACHED: "LIMIT_REACHED" }, a = 1e4, o = "ask-for-authentication", s = t.object({ uniqueIdentifier: t.string() }), c = "---", l = "execute-request", u = t.object({
|
|
19
|
+
method: t.string(),
|
|
20
|
+
path: t.string(),
|
|
21
|
+
headers: t.record(t.string(), t.string()).optional(),
|
|
22
|
+
body: t.string().optional(),
|
|
23
|
+
documentIdentifier: t.string()
|
|
24
|
+
}), d = "get-mini-openapi-spec", f = t.object({ question: t.string() }), p = "get-openapi-specs-summary";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { u as a, s as c, r as d, n as f, l as i, a as l, d as n, c as o, f as r, o as s, p as t, i as u };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=entities-NWeuOkBB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities-NWeuOkBB.js","names":[],"sources":["../src/entities/error/helpers.ts","../src/entities/registry/document.ts","../src/entities/error/constants.ts","../src/entities/prompt/constants.ts","../src/entities/tools/ask-for-authentication.ts","../src/entities/tools/constants.ts","../src/entities/tools/execute-request.ts","../src/entities/tools/get-mini-openapi-spec.ts","../src/entities/tools/get-openapi-spec-summary.ts"],"sourcesContent":["import type { AgentChatError } from './constants'\n\nexport function createError<const T extends string, D>(code: T, detail: D): AgentChatError<T, D> {\n return {\n code,\n detail,\n }\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport type { SecurityScheme } from '@scalar/types/entities'\nimport z from 'zod'\n\nexport const registryApiMetadata = z.object({\n id: z.string(),\n title: z.string(),\n namespace: z.string(),\n currentVersion: z.string(),\n logoUrl: z.url().nullable(),\n slug: z.string(),\n})\n\nexport type ApiMetadata = z.infer<typeof registryApiMetadata> & { removable?: boolean; searchEnabled?: boolean }\n\nexport type RegistryDocument = { namespace: string; slug: string }\n\nexport type DocumentSettings = Record<\n string,\n {\n securitySchemes: SecurityScheme[]\n activeServer: OpenAPIV3_1.ServerObject | undefined\n }\n>\n","export type AgentChatError<T extends string = string, D = unknown> = {\n code: T\n detail: D\n}\n\nexport const AgentErrorCodes = {\n LIMIT_REACHED: 'LIMIT_REACHED',\n} as const\n","export const MAX_PROMPT_SIZE = 10_000\n","import { z } from 'zod'\n\nexport const ASK_FOR_AUTHENTICATION_TOOL_NAME = 'ask-for-authentication' as const\n\nexport const askForAuthenticationInputSchema = z.object({\n uniqueIdentifier: z.string(),\n})\n\nexport type AskForAuthenticationInput = z.input<typeof askForAuthenticationInputSchema>\n","export const TOOL_NAMESPACE_SLUG_DELIMITER = '---'\n","import type { Result } from 'neverpanic'\nimport { z } from 'zod'\n\nimport type { AgentChatError } from '@/entities/error/constants'\n\nexport const EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME = 'execute-request' as const\n\nexport const executeClientSideRequestToolInputSchema = z.object({\n method: z.string(),\n path: z.string(),\n headers: z.record(z.string(), z.string()).optional(),\n body: z.string().optional(),\n documentIdentifier: z.string(),\n})\n\nexport type ExecuteClientSideRequestToolInput = z.input<typeof executeClientSideRequestToolInputSchema>\n\nexport type ExecuteClientSideRequestToolOutput = Result<\n { status: number; responseBody?: unknown; headers: {} },\n | AgentChatError<\n 'FAILED_TO_PARSE_RESPONSE_BODY',\n {\n originalError: unknown\n }\n >\n | AgentChatError<\n 'REQUEST_NOT_OK',\n {\n status: number\n url: string\n responseBody: unknown\n headers: Record<string, string>\n }\n >\n | AgentChatError<\n 'FAILED_TO_FETCH',\n {\n originalError: unknown\n }\n >\n | AgentChatError<\n 'DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED',\n {\n documentName: string\n namespace: string\n slug: string\n }\n >\n | AgentChatError<'FAILED_TO_DETERMINE_DOCUMENT', { namespace?: string; slug?: string; documentIdentifier: string }>\n | AgentChatError<'FAILED_TO_EXECUTE_REQUEST', unknown>\n>\n","import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { z } from 'zod'\n\nexport const GET_MINI_OPENAPI_SPEC_TOOL_NAME = 'get-mini-openapi-spec' as const\n\nexport const getMiniOpenAPIDocToolInputSchema = z.object({\n question: z.string(),\n})\n\nexport type GetMiniOpenAPIDocToolInput = z.input<typeof getMiniOpenAPIDocToolInputSchema>\n\nexport type GetMiniOpenAPIDocToolOutput = CallToolResult & {\n structuredContent: Partial<OpenAPIV3_1.Document>\n}\n","import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nexport const GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME = 'get-openapi-specs-summary' as const\n\nexport type GetOpenAPISpecsSummaryToolOutput = CallToolResult & {\n structuredContent: {\n info?: OpenAPIV3_1.InfoObject\n paths: string[]\n }\n}\n"],"mappings":";;AAEA,SAAgB,EAAuC,GAAS,GAAiC;AAC/F,QAAO;EACL;EACA;EACD;;;;ACFH,IAAa,IAAsB,EAAE,OAAO;CAC1C,IAAI,EAAE,QAAQ;CACd,OAAO,EAAE,QAAQ;CACjB,WAAW,EAAE,QAAQ;CACrB,gBAAgB,EAAE,QAAQ;CAC1B,SAAS,EAAE,KAAK,CAAC,UAAU;CAC3B,MAAM,EAAE,QAAQ;CACjB,CAAC,ECNW,IAAkB,EAC7B,eAAe,iBAChB,ECPY,IAAkB,KCElB,IAAmC,0BAEnC,IAAkC,EAAE,OAAO,EACtD,kBAAkB,EAAE,QAAQ,EAC7B,CAAC,ECNW,IAAgC,OCKhC,IAAwC,mBAExC,IAA0C,EAAE,OAAO;CAC9D,QAAQ,EAAE,QAAQ;CAClB,MAAM,EAAE,QAAQ;CAChB,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,UAAU;CACpD,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,oBAAoB,EAAE,QAAQ;CAC/B,CAAC,ECTW,IAAkC,yBAElC,IAAmC,EAAE,OAAO,EACvD,UAAU,EAAE,QAAQ,EACrB,CAAC,ECLW,IAAsC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { ChatExposed } from '
|
|
2
|
-
export { default as Chat } from '
|
|
1
|
+
export type { ChatExposed } from '@/App.vue';
|
|
2
|
+
export { default as Chat } from '@/App.vue';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|