@scalar/agent-chat 0.9.10 → 0.9.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type Ref } from 'vue';
2
- import { type RegistryDocument } from '@/state/state';
3
- import { type ChatMode } from '@/types';
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("@/state/state").Tools>>;
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").ApiMetadata[]>;
31
+ registryDocuments: Ref<import("./entities/index.js").ApiMetadata[]>;
32
32
  pendingDocuments: Record<string, boolean>;
33
33
  mode: ChatMode;
34
34
  terms: {
@@ -54,7 +54,7 @@ declare const state: {
54
54
  getAgentKey?: () => string;
55
55
  api: import("./api").Api;
56
56
  uploadedTmpDocumentUrl: Ref<string | undefined>;
57
- curatedDocuments: Ref<import("./entities").ApiMetadata[]>;
57
+ curatedDocuments: Ref<import("./entities/index.js").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").AgentChatError<"FAILED_TO_FETCH", unknown>;
18
+ error: import("./entities/index.js").AgentChatError<"FAILED_TO_FETCH", unknown>;
19
19
  } | import("neverpanic").Result<never, null> | {
20
20
  success: false;
21
- error: import("./entities").AgentChatError<string, string>;
21
+ error: import("./entities/index.js").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").AgentChatError<"FAILED_TO_FETCH", unknown>;
42
+ error: import("./entities/index.js").AgentChatError<"FAILED_TO_FETCH", unknown>;
43
43
  } | import("neverpanic").Result<never, null> | {
44
44
  success: false;
45
- error: import("./entities").AgentChatError<string, string>;
45
+ error: import("./entities/index.js").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").AgentChatError<"FAILED_TO_FETCH", unknown>;
61
+ error: import("./entities/index.js").AgentChatError<"FAILED_TO_FETCH", unknown>;
62
62
  } | import("neverpanic").Result<never, null> | {
63
63
  success: false;
64
- error: import("./entities").AgentChatError<string, string>;
64
+ error: import("./entities/index.js").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").AgentChatError<"FAILED_TO_FETCH", unknown>;
82
+ error: import("./entities/index.js").AgentChatError<"FAILED_TO_FETCH", unknown>;
83
83
  } | import("neverpanic").Result<never, null> | {
84
84
  success: false;
85
- error: import("./entities").AgentChatError<string, string>;
85
+ error: import("./entities/index.js").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 '@/state/state';
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("@/entities").AgentChatError<"FAILED_TO_PARSE_RESPONSE_BODY", {
29
+ error: import("../entities/index.js").AgentChatError<"FAILED_TO_PARSE_RESPONSE_BODY", {
30
30
  originalError: unknown;
31
31
  }>;
32
32
  } | {
33
33
  success: false;
34
- error: import("@/entities").AgentChatError<"REQUEST_NOT_OK", {
34
+ error: import("../entities/index.js").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("@/entities").AgentChatError<"FAILED_TO_FETCH", {
55
+ error: import("../entities/index.js").AgentChatError<"FAILED_TO_FETCH", {
56
56
  originalError: unknown;
57
57
  }>;
58
58
  } | {
59
59
  success: false;
60
- error: import("@/entities").AgentChatError<"FAILED_TO_DETERMINE_DOCUMENT", {
60
+ error: import("../entities/index.js").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("@/entities").AgentChatError<"DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED", {
67
+ error: import("../entities/index.js").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("@/entities").AgentChatError<"FAILED_TO_EXECUTE_REQUEST", unknown>>;
72
+ }> | import("neverpanic").Result<never, import("../entities/index.js").AgentChatError<"FAILED_TO_EXECUTE_REQUEST", unknown>>;
73
73
  //# sourceMappingURL=execute-request.d.ts.map
@@ -1,4 +1,4 @@
1
- import { type ChatError } from '@/hooks/use-chat-error';
1
+ import { type ChatError } from '../hooks/use-chat-error';
2
2
  type __VLS_Props = {
3
3
  error: ChatError;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { type DeepPartial } from 'ai';
2
- import type { ExecuteClientSideRequestToolInput, ExecuteClientSideRequestToolOutput } from '@/entities/tools/execute-request';
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 '@/components/ResponseBody/helpers/media-types';
2
+ import { type MediaConfig } from '../../components/ResponseBody/helpers/media-types';
3
3
  type __VLS_Props = {
4
4
  data: unknown;
5
5
  responseBody: {
@@ -1,4 +1,4 @@
1
- import { type MediaPreview } from '@/components/ResponseBody/helpers/media-types';
1
+ import { type MediaPreview } from '../../components/ResponseBody/helpers/media-types';
2
2
  type __VLS_Props = {
3
3
  src: string;
4
4
  type: string;
@@ -1,4 +1,4 @@
1
- import { type UploadTmpDocumentState } from '@/hooks/use-upload-tmp-document';
1
+ import { type UploadTmpDocumentState } from '../hooks/use-upload-tmp-document';
2
2
  type __VLS_Props = {
3
3
  uploadState: UploadTmpDocumentState;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import type { Result } from 'neverpanic';
2
2
  import { z } from 'zod';
3
- import type { AgentChatError } from '@/entities/error/constants';
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;
@@ -1,5 +1,5 @@
1
1
  import type { ToolUIPart, UIMessagePart } from 'ai';
2
- import { type Tools } from '@/state/state';
2
+ import { type Tools } from '../state/state';
3
3
  type RequestToolPart = ToolUIPart & {
4
4
  type: 'tool-execute-request';
5
5
  state: 'input-available';
@@ -1,4 +1,4 @@
1
- import type { ApiMetadata } from '@/entities/registry/document';
1
+ import type { ApiMetadata } from '../entities/registry/document';
2
2
  export declare function useSearch(): {
3
3
  query: import("vue").WritableComputedRef<string, string>;
4
4
  results: import("vue").Ref<{
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export type { ChatExposed } from '@/App.vue';
2
- export { default as Chat } from '@/App.vue';
1
+ export type { ChatExposed } from './App.vue';
2
+ export { default as Chat } from './App.vue';
3
3
  //# sourceMappingURL=index.d.ts.map
package/dist/package.json CHANGED
@@ -10,12 +10,12 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/agent-chat"
12
12
  },
13
- "version": "0.9.10",
13
+ "version": "0.9.12",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
17
17
  "scripts": {
18
- "build": "vite build && vue-tsc -p tsconfig.build.json && cp package.json dist",
18
+ "build": "vite build && vue-tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && cp package.json dist",
19
19
  "build:watch": "vite build --watch",
20
20
  "playground": "cd playground && vite",
21
21
  "types:check": "vue-tsc --noEmit"
@@ -1,8 +1,8 @@
1
1
  import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
2
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
3
  import type { Ref } from 'vue';
4
- import type { Api } from '@/api';
5
- import type { ApiMetadata } from '@/entities/registry/document';
4
+ import type { Api } from '../api';
5
+ import type { ApiMetadata } from '../entities/registry/document';
6
6
  export declare const loadDocument: (args_0: {
7
7
  namespace: string;
8
8
  slug: string;
@@ -17,10 +17,10 @@ export declare const loadDocument: (args_0: {
17
17
  error: null;
18
18
  } | {
19
19
  success: false;
20
- error: import("@/entities").AgentChatError<"FAILED_TO_FETCH", unknown>;
20
+ error: import("../entities/index.js").AgentChatError<"FAILED_TO_FETCH", unknown>;
21
21
  } | {
22
22
  success: false;
23
- error: import("@/entities").AgentChatError<string, string>;
23
+ error: import("../entities/index.js").AgentChatError<string, string>;
24
24
  data?: undefined;
25
25
  } | {
26
26
  success: true;
@@ -32,5 +32,5 @@ export declare const loadDocument: (args_0: {
32
32
  logoUrl: string | null;
33
33
  slug: string;
34
34
  };
35
- }> | import("neverpanic").Result<never, import("@/entities").AgentChatError<"UNABLE_TO_LOAD_DOCUMENT", unknown>>;
35
+ }> | import("neverpanic").Result<never, import("../entities/index.js").AgentChatError<"UNABLE_TO_LOAD_DOCUMENT", unknown>>;
36
36
  //# sourceMappingURL=add-documents-to-store.d.ts.map
@@ -5,13 +5,13 @@ import { type WorkspaceStore } from '@scalar/workspace-store/client';
5
5
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
6
6
  import { type UIDataTypes, type UIMessage } from 'ai';
7
7
  import { type ComputedRef, type InjectionKey, type Ref } from 'vue';
8
- import { type Api } from '@/api';
9
- import type { ApiMetadata } from '@/entities/registry/document';
10
- import type { ASK_FOR_AUTHENTICATION_TOOL_NAME, AskForAuthenticationInput } from '@/entities/tools/ask-for-authentication';
11
- import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, type ExecuteClientSideRequestToolInput, type ExecuteClientSideRequestToolOutput } from '@/entities/tools/execute-request';
12
- import type { GET_MINI_OPENAPI_SPEC_TOOL_NAME, GetMiniOpenAPIDocToolInput, GetMiniOpenAPIDocToolOutput } from '@/entities/tools/get-mini-openapi-spec';
13
- import type { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, GetOpenAPISpecsSummaryToolOutput } from '@/entities/tools/get-openapi-spec-summary';
14
- import type { ChatMode } from '@/types';
8
+ import { type Api } from '../api';
9
+ import type { ApiMetadata } from '../entities/registry/document';
10
+ import type { ASK_FOR_AUTHENTICATION_TOOL_NAME, AskForAuthenticationInput } from '../entities/tools/ask-for-authentication';
11
+ import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, type ExecuteClientSideRequestToolInput, type ExecuteClientSideRequestToolOutput } from '../entities/tools/execute-request';
12
+ import type { GET_MINI_OPENAPI_SPEC_TOOL_NAME, GetMiniOpenAPIDocToolInput, GetMiniOpenAPIDocToolOutput } from '../entities/tools/get-mini-openapi-spec';
13
+ import type { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, GetOpenAPISpecsSummaryToolOutput } from '../entities/tools/get-openapi-spec-summary';
14
+ import type { ChatMode } from '../types';
15
15
  export type RegistryDocument = {
16
16
  namespace: string;
17
17
  slug: string;
@@ -1,7 +1,7 @@
1
1
  import type { ToolUIPart } from 'ai';
2
2
  import { type Ref } from 'vue';
3
- import { ASK_FOR_AUTHENTICATION_TOOL_NAME } from '@/entities/tools/ask-for-authentication';
4
- import { type Tools } from '@/state/state';
3
+ import { ASK_FOR_AUTHENTICATION_TOOL_NAME } from '../../../entities/tools/ask-for-authentication';
4
+ import { type Tools } from '../../../state/state';
5
5
  type __VLS_Props = {
6
6
  messagePart: Ref<ToolUIPart<Pick<Tools, typeof ASK_FOR_AUTHENTICATION_TOOL_NAME>>>;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { type ToolUIPart } from 'ai';
2
2
  import { type Ref } from 'vue';
3
- import type { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '@/entities/tools/execute-request';
4
- import { type Tools } from '@/state/state';
3
+ import type { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '../../../entities/tools/execute-request';
4
+ import { type Tools } from '../../../state/state';
5
5
  type __VLS_Props = {
6
6
  messagePart: Ref<ToolUIPart<Pick<Tools, typeof EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME>>>;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { type ToolUIPart, type UIMessage } from 'ai';
2
2
  import { type Reactive, type Ref } from 'vue';
3
- import type { GET_MINI_OPENAPI_SPEC_TOOL_NAME } from '@/entities/tools/get-mini-openapi-spec';
4
- import { type Tools } from '@/state/state';
3
+ import type { GET_MINI_OPENAPI_SPEC_TOOL_NAME } from '../../../entities/tools/get-mini-openapi-spec';
4
+ import { type Tools } from '../../../state/state';
5
5
  type __VLS_Props = {
6
6
  messagePart: Ref<ToolUIPart<Pick<Tools, typeof GET_MINI_OPENAPI_SPEC_TOOL_NAME>>>;
7
7
  message: Reactive<UIMessage>;
@@ -1,7 +1,7 @@
1
1
  import type { ToolUIPart, UIMessage } from 'ai';
2
2
  import { type Reactive, type Ref } from 'vue';
3
- import type { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME } from '@/entities/tools/get-openapi-spec-summary';
4
- import { type Tools } from '@/state/state';
3
+ import type { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME } from '../../../entities/tools/get-openapi-spec-summary';
4
+ import { type Tools } from '../../../state/state';
5
5
  type __VLS_Props = {
6
6
  messagePart: Ref<ToolUIPart<Pick<Tools, typeof GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME>>>;
7
7
  message: Reactive<UIMessage>;
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/agent-chat"
12
12
  },
13
- "version": "0.9.10",
13
+ "version": "0.9.12",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
@@ -50,16 +50,16 @@
50
50
  "vue": "^3.5.26",
51
51
  "whatwg-mimetype": "4.0.0",
52
52
  "zod": "^4.3.5",
53
- "@scalar/components": "0.20.10",
54
- "@scalar/api-client": "2.38.2",
55
- "@scalar/json-magic": "0.12.4",
56
- "@scalar/openapi-types": "0.6.1",
53
+ "@scalar/api-client": "2.38.4",
54
+ "@scalar/components": "0.20.12",
57
55
  "@scalar/helpers": "0.4.2",
56
+ "@scalar/icons": "0.6.3",
57
+ "@scalar/openapi-types": "0.6.1",
58
58
  "@scalar/themes": "0.15.1",
59
+ "@scalar/json-magic": "0.12.4",
59
60
  "@scalar/types": "0.7.4",
60
- "@scalar/icons": "0.6.1",
61
61
  "@scalar/use-toasts": "0.10.1",
62
- "@scalar/workspace-store": "0.40.3"
62
+ "@scalar/workspace-store": "0.40.4"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@modelcontextprotocol/sdk": "1.26.0",
@@ -71,7 +71,7 @@
71
71
  "vite": "8.0.0"
72
72
  },
73
73
  "scripts": {
74
- "build": "vite build && vue-tsc -p tsconfig.build.json && cp package.json dist",
74
+ "build": "vite build && vue-tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && cp package.json dist",
75
75
  "build:watch": "vite build --watch",
76
76
  "playground": "cd playground && vite",
77
77
  "types:check": "vue-tsc --noEmit"