@scalar/agent-chat 0.9.14 → 0.9.15

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.
Files changed (79) hide show
  1. package/dist/App.vue.d.ts.map +1 -1
  2. package/dist/client-tools/execute-request.d.ts +1 -10
  3. package/dist/client-tools/execute-request.d.ts.map +1 -1
  4. package/dist/client-tools/execute-request.js +31 -46
  5. package/dist/client-tools/execute-request.js.map +1 -1
  6. package/dist/components/ContextItem.vue.d.ts.map +1 -1
  7. package/dist/components/ContextItem.vue.js +1 -1
  8. package/dist/components/ContextItem.vue.js.map +1 -1
  9. package/dist/components/ContextItem.vue.script.js +5 -5
  10. package/dist/components/ContextItem.vue.script.js.map +1 -1
  11. package/dist/components/{LoadingMiniOpenAPIDoc.vue.d.ts → LoadingSearchOpenAPIOperations.vue.d.ts} +1 -1
  12. package/dist/components/LoadingSearchOpenAPIOperations.vue.d.ts.map +1 -0
  13. package/dist/components/{LoadingMiniOpenAPIDoc.vue.js → LoadingSearchOpenAPIOperations.vue.js} +4 -4
  14. package/dist/components/LoadingSearchOpenAPIOperations.vue.js.map +1 -0
  15. package/dist/entities/index.d.ts +3 -3
  16. package/dist/entities/index.d.ts.map +1 -1
  17. package/dist/entities/index.js +7 -7
  18. package/dist/entities/tools/ask-for-authentication.d.ts +1 -0
  19. package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -1
  20. package/dist/entities/tools/ask-for-authentication.js +4 -1
  21. package/dist/entities/tools/ask-for-authentication.js.map +1 -1
  22. package/dist/entities/tools/execute-request.d.ts +1 -0
  23. package/dist/entities/tools/execute-request.d.ts.map +1 -1
  24. package/dist/entities/tools/execute-request.js +2 -1
  25. package/dist/entities/tools/execute-request.js.map +1 -1
  26. package/dist/entities/tools/get-openapi-specs-summary.d.ts +12 -0
  27. package/dist/entities/tools/get-openapi-specs-summary.d.ts.map +1 -0
  28. package/dist/entities/tools/get-openapi-specs-summary.js +6 -0
  29. package/dist/entities/tools/get-openapi-specs-summary.js.map +1 -0
  30. package/dist/entities/tools/search-openapi-operations.d.ts +9 -0
  31. package/dist/entities/tools/search-openapi-operations.d.ts.map +1 -0
  32. package/dist/entities/tools/search-openapi-operations.js +7 -0
  33. package/dist/entities/tools/search-openapi-operations.js.map +1 -0
  34. package/dist/package.json +1 -2
  35. package/dist/state/state.d.ts +6 -6
  36. package/dist/state/state.d.ts.map +1 -1
  37. package/dist/state/state.js +2 -5
  38. package/dist/state/state.js.map +1 -1
  39. package/dist/style.css +1 -1
  40. package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
  41. package/dist/views/Chat/Chat.vue.js +1 -1
  42. package/dist/views/Chat/Chat.vue.js.map +1 -1
  43. package/dist/views/Chat/Chat.vue.script.js +8 -8
  44. package/dist/views/Chat/Chat.vue.script.js.map +1 -1
  45. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -1
  46. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +1 -1
  47. package/dist/views/Chat/Messages/AskForAuthentication.vue.js.map +1 -1
  48. package/dist/views/Chat/Messages/AskForAuthentication.vue.script.js +38 -44
  49. package/dist/views/Chat/Messages/AskForAuthentication.vue.script.js.map +1 -1
  50. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
  51. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
  52. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js.map +1 -1
  53. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.script.js.map +1 -1
  54. package/dist/views/Chat/Messages/{GetMiniOpenAPIDocTool.vue.d.ts → SearchOpenAPIOperationsTool.vue.d.ts} +3 -3
  55. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.d.ts.map +1 -0
  56. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.js +9 -0
  57. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.js.map +1 -0
  58. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.script.js +57 -0
  59. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.script.js.map +1 -0
  60. package/package.json +6 -7
  61. package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +0 -1
  62. package/dist/components/LoadingMiniOpenAPIDoc.vue.js.map +0 -1
  63. package/dist/entities/tools/constants.d.ts +0 -2
  64. package/dist/entities/tools/constants.d.ts.map +0 -1
  65. package/dist/entities/tools/constants.js +0 -6
  66. package/dist/entities/tools/constants.js.map +0 -1
  67. package/dist/entities/tools/get-mini-openapi-spec.d.ts +0 -12
  68. package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +0 -1
  69. package/dist/entities/tools/get-mini-openapi-spec.js +0 -7
  70. package/dist/entities/tools/get-mini-openapi-spec.js.map +0 -1
  71. package/dist/entities/tools/get-openapi-spec-summary.d.ts +0 -10
  72. package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +0 -1
  73. package/dist/entities/tools/get-openapi-spec-summary.js +0 -6
  74. package/dist/entities/tools/get-openapi-spec-summary.js.map +0 -1
  75. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +0 -1
  76. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +0 -9
  77. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js.map +0 -1
  78. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.script.js +0 -39
  79. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.script.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":"AAyEA,OAAO,EAAW,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,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CAAA;IACf,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,MAAM,CAAA;IACpC,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACzB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AAsBF,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BY,CAAC;WACxB,CAAA;;;;;iBAEA,CAAA;;;;;;;;;;;;;CArBE,CAAA;AAIF,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,EAAE,OAAO,KAAK,CAAC,gBAAgB,CAAA;CAChD,CAAA;AA8CD,QAAA,MAAM,YAAY;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -19,7 +19,7 @@ export declare const executeRequestTool: (args_0: {
19
19
  path: string;
20
20
  headers?: Record<string, string>;
21
21
  body?: string;
22
- documentIdentifier: string;
22
+ documentName: string;
23
23
  };
24
24
  }) => Promise<{
25
25
  success: true;
@@ -55,19 +55,10 @@ export declare const executeRequestTool: (args_0: {
55
55
  error: import("../entities/index.js").AgentChatError<"FAILED_TO_FETCH", {
56
56
  originalError: unknown;
57
57
  }>;
58
- } | {
59
- success: false;
60
- error: import("../entities/index.js").AgentChatError<"FAILED_TO_DETERMINE_DOCUMENT", {
61
- namespace: string | undefined;
62
- slug: string | undefined;
63
- documentIdentifier: string;
64
- }>;
65
58
  } | {
66
59
  success: false;
67
60
  error: import("../entities/index.js").AgentChatError<"DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED", {
68
61
  documentName: string;
69
- namespace: string;
70
- slug: string;
71
62
  }>;
72
63
  }> | import("neverpanic").Result<never, import("../entities/index.js").AgentChatError<"FAILED_TO_EXECUTE_REQUEST", unknown>>;
73
64
  //# sourceMappingURL=execute-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../src/client-tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AAEzG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAOhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AA8E1C;;GAEG;AACH,eAAO,MAAM,kBAAkB;sBAQT,MAAM,CACtB,MAAM,EACN;QAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;QAAC,eAAe,EAAE,0BAA0B,EAAE,CAAA;KAAE,CACrF;gBACW,MAAM;UACZ,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;cACxC,MAAM;WACT;QACL,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,kBAAkB,EAAE,MAAM,CAAA;KAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHAsDJ,CAAA"}
1
+ {"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../src/client-tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AAEzG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAMhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AA8E1C;;GAEG;AACH,eAAO,MAAM,kBAAkB;sBAQT,MAAM,CACtB,MAAM,EACN;QAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;QAAC,eAAe,EAAE,0BAA0B,EAAE,CAAA;KAAE,CACrF;gBACW,MAAM;UACZ,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;cACxC,MAAM;WACT;QACL,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,MAAM,CAAA;KACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHA2CJ,CAAA"}
@@ -1,25 +1,23 @@
1
1
  import { createError as e } from "../entities/error/helpers.js";
2
- import "../entities/tools/constants.js";
3
2
  import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME as t } from "../entities/tools/execute-request.js";
4
- import { createDocumentName as n } from "../registry/create-document-name.js";
5
- import { n as r } from "neverpanic";
6
- import { buildRequestSecurity as i, getResolvedUrl as a } from "@scalar/api-client/v2/blocks/operation-block";
7
- import { redirectToProxy as o } from "@scalar/helpers/url/redirect-to-proxy";
8
- import s from "truncate-json";
3
+ import { n } from "neverpanic";
4
+ import { buildRequestSecurity as r, getResolvedUrl as i } from "@scalar/api-client/v2/blocks/operation-block";
5
+ import { redirectToProxy as a } from "@scalar/helpers/url/redirect-to-proxy";
6
+ import o from "truncate-json";
9
7
  //#region src/client-tools/execute-request.ts
10
- var c = 5e4, l = r.safeFn(async (e) => e.headers.get("content-type") === "application/json" ? {
8
+ var s = 5e4, c = n.safeFn(async (e) => e.headers.get("content-type") === "application/json" ? {
11
9
  success: !0,
12
10
  data: await e.json()
13
11
  } : {
14
12
  success: !0,
15
13
  data: await e.text()
16
- }, (t) => e("FAILED_TO_PARSE_RESPONSE_BODY", { originalError: t })), u = (e) => JSON.parse(s(JSON.stringify(e), c).jsonString), d = r.safeFn(async (t, n) => {
17
- let r = await fetch(t, n), i = await l(r);
14
+ }, (t) => e("FAILED_TO_PARSE_RESPONSE_BODY", { originalError: t })), l = (e) => JSON.parse(o(JSON.stringify(e), s).jsonString), u = n.safeFn(async (t, n) => {
15
+ let r = await fetch(t, n), i = await c(r);
18
16
  return r.ok ? i.success ? {
19
17
  success: !0,
20
18
  data: {
21
19
  status: r.status,
22
- responseBody: u(i.data),
20
+ responseBody: l(i.data),
23
21
  headers: Object.fromEntries(r.headers.entries())
24
22
  }
25
23
  } : i : {
@@ -27,13 +25,13 @@ var c = 5e4, l = r.safeFn(async (e) => e.headers.get("content-type") === "applic
27
25
  error: e("REQUEST_NOT_OK", {
28
26
  status: r.status,
29
27
  url: r.url,
30
- responseBody: u(i.success ? i.data : void 0),
28
+ responseBody: l(i.success ? i.data : void 0),
31
29
  headers: Object.fromEntries(r.headers.entries())
32
30
  })
33
31
  };
34
32
  }, (t) => e("FAILED_TO_FETCH", { originalError: t }));
35
- function f({ path: e, activeServer: t, proxyUrl: n }) {
36
- return o(n, a({
33
+ function d({ path: e, activeServer: t, proxyUrl: n }) {
34
+ return a(n, i({
37
35
  path: e,
38
36
  server: t,
39
37
  pathVariables: {},
@@ -43,46 +41,33 @@ function f({ path: e, activeServer: t, proxyUrl: n }) {
43
41
  }
44
42
  }));
45
43
  }
46
- var p = r.safeFn(async ({ documentSettings: r, toolCallId: a, chat: o, proxyUrl: s, input: { method: c, path: l, body: u, headers: p, documentIdentifier: m } }) => {
47
- let [h, g] = m.split("---");
48
- if (!h || !g) return {
44
+ var f = n.safeFn(async ({ documentSettings: n, toolCallId: i, chat: a, proxyUrl: o, input: { method: s, path: c, body: l, headers: f, documentName: p } }) => {
45
+ let m = n[p];
46
+ if (!m) return {
49
47
  success: !1,
50
- error: e("FAILED_TO_DETERMINE_DOCUMENT", {
51
- namespace: h,
52
- slug: g,
53
- documentIdentifier: m
54
- })
55
- };
56
- let _ = n(h, g), v = r[_];
57
- if (!v) return {
58
- success: !1,
59
- error: e("DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED", {
60
- documentName: _,
61
- namespace: h,
62
- slug: g
63
- })
48
+ error: e("DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED", { documentName: p })
64
49
  };
65
- let y = i(v.securitySchemes), b = {
66
- method: c,
67
- body: u,
68
- ...y,
50
+ let h = r(m.securitySchemes), g = {
51
+ method: s,
52
+ body: l,
53
+ ...h,
69
54
  headers: {
70
- ...p,
71
- ...y.headers
55
+ ...f,
56
+ ...h.headers
72
57
  }
73
- }, x = await d(f({
74
- path: l,
75
- activeServer: v.activeServer,
76
- proxyUrl: s
77
- }), b);
78
- return o.addToolOutput({
58
+ }, _ = await u(d({
59
+ path: c,
60
+ activeServer: m.activeServer,
61
+ proxyUrl: o
62
+ }), g);
63
+ return a.addToolOutput({
79
64
  tool: t,
80
- toolCallId: a,
81
- output: x,
65
+ toolCallId: i,
66
+ output: _,
82
67
  state: "output-available"
83
- }), x;
68
+ }), _;
84
69
  }, (t) => e("FAILED_TO_EXECUTE_REQUEST", t));
85
70
  //#endregion
86
- export { p as executeRequestTool };
71
+ export { f as executeRequestTool };
87
72
 
88
73
  //# sourceMappingURL=execute-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute-request.js","names":[],"sources":["../../src/client-tools/execute-request.ts"],"sourcesContent":["import type { Chat } from '@ai-sdk/vue'\nimport { buildRequestSecurity, getResolvedUrl } from '@scalar/api-client/v2/blocks/operation-block'\nimport type { SecuritySchemeObjectSecret } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { UIDataTypes, UIMessage } from 'ai'\nimport { n } from 'neverpanic'\nimport truncateJson from 'truncate-json'\n\nimport { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, TOOL_NAMESPACE_SLUG_DELIMITER } from '@/entities'\nimport { createError } from '@/entities/error/helpers'\nimport { createDocumentName } from '@/registry/create-document-name'\nimport type { Tools } from '@/state/state'\n\n// The maximum number of bytes the requests response can be.\nconst MAX_RESPONSE_SIZE = 50_000\n\nconst getBody = n.safeFn(\n async (response: Response) => {\n const contentType = response.headers.get('content-type')\n\n if (contentType === 'application/json') {\n return { success: true, data: await response.json() }\n }\n\n return { success: true, data: await response.text() }\n },\n (originalError) => createError('FAILED_TO_PARSE_RESPONSE_BODY', { originalError }),\n)\n\nconst truncateResponse = (response: unknown) =>\n JSON.parse(truncateJson(JSON.stringify(response), MAX_RESPONSE_SIZE).jsonString)\n\n/* Result type wrapper for fetch */\nconst safeFetch = n.safeFn(\n async (url: string, init: RequestInit) => {\n const response = await fetch(url, init)\n\n const responseBodyResult = await getBody(response)\n\n if (!response.ok) {\n return {\n success: false,\n error: createError('REQUEST_NOT_OK', {\n status: response.status,\n url: response.url,\n responseBody: truncateResponse(responseBodyResult.success ? responseBodyResult.data : undefined),\n headers: Object.fromEntries(response.headers.entries()),\n }),\n }\n }\n\n if (!responseBodyResult.success) {\n return responseBodyResult\n }\n\n return {\n success: true,\n data: {\n status: response.status,\n responseBody: truncateResponse(responseBodyResult.data),\n headers: Object.fromEntries(response.headers.entries()),\n },\n }\n },\n (originalError) => createError('FAILED_TO_FETCH', { originalError }),\n)\n\nfunction createUrl({\n path,\n activeServer,\n proxyUrl,\n}: {\n path: string\n activeServer: ServerObject | null\n proxyUrl: string\n}) {\n const resolvedUrl = getResolvedUrl({\n path,\n server: activeServer,\n pathVariables: {},\n environment: {\n color: '',\n variables: [],\n },\n })\n\n return redirectToProxy(proxyUrl, resolvedUrl)\n}\n\n/**\n * Executes an HTTP request with the specified options, including method, path, headers, and security schemes, and returns the processed response.\n */\nexport const executeRequestTool = n.safeFn(\n async ({\n documentSettings,\n toolCallId,\n chat,\n proxyUrl,\n input: { method, path, body, headers, documentIdentifier },\n }: {\n documentSettings: Record<\n string,\n { activeServer: ServerObject | null; securitySchemes: SecuritySchemeObjectSecret[] }\n >\n toolCallId: string\n chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>\n proxyUrl: string\n input: {\n method: string\n path: string\n headers?: Record<string, string>\n body?: string\n documentIdentifier: string\n }\n }) => {\n const [namespace, slug] = documentIdentifier.split(TOOL_NAMESPACE_SLUG_DELIMITER)\n if (!namespace || !slug) {\n return {\n success: false,\n error: createError('FAILED_TO_DETERMINE_DOCUMENT', { namespace, slug, documentIdentifier }),\n }\n }\n\n const documentName = createDocumentName(namespace, slug)\n const settings = documentSettings[documentName]\n\n if (!settings) {\n return {\n success: false,\n error: createError('DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED', {\n documentName,\n namespace,\n slug,\n }),\n }\n }\n\n const requestSecurityOptions = buildRequestSecurity(settings.securitySchemes)\n\n const fetchOptions = {\n method,\n body,\n ...requestSecurityOptions,\n headers: {\n ...headers,\n ...requestSecurityOptions.headers,\n },\n }\n\n const url = createUrl({\n path,\n activeServer: settings.activeServer,\n proxyUrl,\n })\n\n const result = await safeFetch(url, fetchOptions)\n\n chat.addToolOutput({\n tool: EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME,\n toolCallId,\n output: result,\n state: 'output-available',\n })\n\n return result\n },\n (originalError) => createError('FAILED_TO_EXECUTE_REQUEST', originalError),\n)\n"],"mappings":";;;;;;;;;AAeA,IAAM,IAAoB,KAEpB,IAAU,EAAE,OAChB,OAAO,MACe,EAAS,QAAQ,IAAI,eAAe,KAEpC,qBACX;CAAE,SAAS;CAAM,MAAM,MAAM,EAAS,MAAM;CAAE,GAGhD;CAAE,SAAS;CAAM,MAAM,MAAM,EAA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,EACH,QAAO;EACL,SAAS;EACT,OAAO,EAAY,6CAA6C;GAC9D;GACA;GACA;GACD,CAAC;EACH;CAGH,IAAM,IAAyB,EAAqB,EAAS,gBAAgB,EAEvE,IAAe;EACnB;EACA;EACA,GAAG;EACH,SAAS;GACP,GAAG;GACH,GAAG,EAAuB;GAC3B;EACF,EAQK,IAAS,MAAM,EANT,EAAU;EACpB;EACA,cAAc,EAAS;EACvB;EACD,CAAC,EAEkC,EAAa;AASjD,QAPA,EAAK,cAAc;EACjB,MAAM;EACN;EACA,QAAQ;EACR,OAAO;EACR,CAAC,EAEK;IAER,MAAkB,EAAY,6BAA6B,EAAc,CAC3E"}
1
+ {"version":3,"file":"execute-request.js","names":[],"sources":["../../src/client-tools/execute-request.ts"],"sourcesContent":["import type { Chat } from '@ai-sdk/vue'\nimport { buildRequestSecurity, getResolvedUrl } from '@scalar/api-client/v2/blocks/operation-block'\nimport type { SecuritySchemeObjectSecret } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { UIDataTypes, UIMessage } from 'ai'\nimport { n } from 'neverpanic'\nimport truncateJson from 'truncate-json'\n\nimport { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '@/entities'\nimport { createError } from '@/entities/error/helpers'\nimport type { Tools } from '@/state/state'\n\n// The maximum number of bytes the requests response can be.\nconst MAX_RESPONSE_SIZE = 50_000\n\nconst getBody = n.safeFn(\n async (response: Response) => {\n const contentType = response.headers.get('content-type')\n\n if (contentType === 'application/json') {\n return { success: true, data: await response.json() }\n }\n\n return { success: true, data: await response.text() }\n },\n (originalError) => createError('FAILED_TO_PARSE_RESPONSE_BODY', { originalError }),\n)\n\nconst truncateResponse = (response: unknown) =>\n JSON.parse(truncateJson(JSON.stringify(response), MAX_RESPONSE_SIZE).jsonString)\n\n/* Result type wrapper for fetch */\nconst safeFetch = n.safeFn(\n async (url: string, init: RequestInit) => {\n const response = await fetch(url, init)\n\n const responseBodyResult = await getBody(response)\n\n if (!response.ok) {\n return {\n success: false,\n error: createError('REQUEST_NOT_OK', {\n status: response.status,\n url: response.url,\n responseBody: truncateResponse(responseBodyResult.success ? responseBodyResult.data : undefined),\n headers: Object.fromEntries(response.headers.entries()),\n }),\n }\n }\n\n if (!responseBodyResult.success) {\n return responseBodyResult\n }\n\n return {\n success: true,\n data: {\n status: response.status,\n responseBody: truncateResponse(responseBodyResult.data),\n headers: Object.fromEntries(response.headers.entries()),\n },\n }\n },\n (originalError) => createError('FAILED_TO_FETCH', { originalError }),\n)\n\nfunction createUrl({\n path,\n activeServer,\n proxyUrl,\n}: {\n path: string\n activeServer: ServerObject | null\n proxyUrl: string\n}) {\n const resolvedUrl = getResolvedUrl({\n path,\n server: activeServer,\n pathVariables: {},\n environment: {\n color: '',\n variables: [],\n },\n })\n\n return redirectToProxy(proxyUrl, resolvedUrl)\n}\n\n/**\n * Executes an HTTP request with the specified options, including method, path, headers, and security schemes, and returns the processed response.\n */\nexport const executeRequestTool = n.safeFn(\n async ({\n documentSettings,\n toolCallId,\n chat,\n proxyUrl,\n input: { method, path, body, headers, documentName },\n }: {\n documentSettings: Record<\n string,\n { activeServer: ServerObject | null; securitySchemes: SecuritySchemeObjectSecret[] }\n >\n toolCallId: string\n chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>\n proxyUrl: string\n input: {\n method: string\n path: string\n headers?: Record<string, string>\n body?: string\n documentName: string\n }\n }) => {\n const settings = documentSettings[documentName]\n\n if (!settings) {\n return {\n success: false,\n error: createError('DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED', {\n documentName,\n }),\n }\n }\n\n const requestSecurityOptions = buildRequestSecurity(settings.securitySchemes)\n\n const fetchOptions = {\n method,\n body,\n ...requestSecurityOptions,\n headers: {\n ...headers,\n ...requestSecurityOptions.headers,\n },\n }\n\n const url = createUrl({\n path,\n activeServer: settings.activeServer,\n proxyUrl,\n })\n\n const result = await safeFetch(url, fetchOptions)\n\n chat.addToolOutput({\n tool: EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME,\n toolCallId,\n output: result,\n state: 'output-available',\n })\n\n return result\n },\n (originalError) => createError('FAILED_TO_EXECUTE_REQUEST', originalError),\n)\n"],"mappings":";;;;;;;AAcA,IAAM,IAAoB,KAEpB,IAAU,EAAE,OAChB,OAAO,MACe,EAAS,QAAQ,IAAI,eAAe,KAEpC,qBACX;CAAE,SAAS;CAAM,MAAM,MAAM,EAAS,MAAM;CAAE,GAGhD;CAAE,SAAS;CAAM,MAAM,MAAM,EAAS,MAAM;CAAE,GAEtD,MAAkB,EAAY,iCAAiC,EAAE,kBAAe,CAAC,CACnF,EAEK,KAAoB,MACxB,KAAK,MAAM,EAAa,KAAK,UAAU,EAAS,EAAE,EAAkB,CAAC,WAAW,EAG5E,IAAY,EAAE,OAClB,OAAO,GAAa,MAAsB;CACxC,IAAM,IAAW,MAAM,MAAM,GAAK,EAAK,EAEjC,IAAqB,MAAM,EAAQ,EAAS;AAkBlD,QAhBK,EAAS,KAYT,EAAmB,UAIjB;EACL,SAAS;EACT,MAAM;GACJ,QAAQ,EAAS;GACjB,cAAc,EAAiB,EAAmB,KAAK;GACvD,SAAS,OAAO,YAAY,EAAS,QAAQ,SAAS,CAAC;GACxD;EACF,GAVQ,IAZA;EACL,SAAS;EACT,OAAO,EAAY,kBAAkB;GACnC,QAAQ,EAAS;GACjB,KAAK,EAAS;GACd,cAAc,EAAiB,EAAmB,UAAU,EAAmB,OAAO,KAAA,EAAU;GAChG,SAAS,OAAO,YAAY,EAAS,QAAQ,SAAS,CAAC;GACxD,CAAC;EACH;IAgBJ,MAAkB,EAAY,mBAAmB,EAAE,kBAAe,CAAC,CACrE;AAED,SAAS,EAAU,EACjB,SACA,iBACA,eAKC;AAWD,QAAO,EAAgB,GAVH,EAAe;EACjC;EACA,QAAQ;EACR,eAAe,EAAE;EACjB,aAAa;GACX,OAAO;GACP,WAAW,EAAE;GACd;EACF,CAAC,CAE2C;;AAM/C,IAAa,IAAqB,EAAE,OAClC,OAAO,EACL,qBACA,eACA,SACA,aACA,OAAO,EAAE,WAAQ,SAAM,SAAM,YAAS,wBAgBlC;CACJ,IAAM,IAAW,EAAiB;AAElC,KAAI,CAAC,EACH,QAAO;EACL,SAAS;EACT,OAAO,EAAY,6CAA6C,EAC9D,iBACD,CAAC;EACH;CAGH,IAAM,IAAyB,EAAqB,EAAS,gBAAgB,EAEvE,IAAe;EACnB;EACA;EACA,GAAG;EACH,SAAS;GACP,GAAG;GACH,GAAG,EAAuB;GAC3B;EACF,EAQK,IAAS,MAAM,EANT,EAAU;EACpB;EACA,cAAc,EAAS;EACvB;EACD,CAAC,EAEkC,EAAa;AASjD,QAPA,EAAK,cAAc;EACjB,MAAM;EACN;EACA,QAAQ;EACR,OAAO;EACR,CAAC,EAEK;IAER,MAAkB,EAAY,6BAA6B,EAAc,CAC3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextItem.vue"],"names":[],"mappings":"AAqEA,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAiCxC,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ContextItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextItem.vue"],"names":[],"mappings":"AA+EA,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAsCxC,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./ContextItem.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/components/ContextItem.vue
5
- var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b6e5aa96"]]);
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-e6786ce3"]]);
6
6
  //#endregion
7
7
  export { n as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ContextItem.vue.js","names":[],"sources":["../../src/components/ContextItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { loading } = defineProps<{ loading: boolean }>()\n</script>\n\n<template>\n <div\n class=\"contextItem\"\n :class=\"{\n shimmer: loading,\n }\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.contextItem {\n font-size: 10px;\n display: inline-block;\n color: var(--scalar-color-2);\n cursor: pointer;\n vertical-align: middle;\n padding: 1px 8px;\n border-radius: 12px;\n padding: 5px 10px;\n display: flex;\n align-items: center;\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n}\n\n.shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #202020 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n.light-mode .shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #fafafa 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n@keyframes shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ContextItem.vue.js","names":[],"sources":["../../src/components/ContextItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { loading } = defineProps<{ loading: boolean }>()\n</script>\n\n<template>\n <div\n class=\"contextItem\"\n :class=\"{\n shimmer: loading,\n }\">\n <span class=\"contextItemText\">\n <slot />\n </span>\n </div>\n</template>\n\n<style scoped>\n.contextItem {\n white-space: nowrap;\n font-size: 10px;\n display: inline-block;\n color: var(--scalar-color-2);\n cursor: pointer;\n vertical-align: middle;\n padding: 1px 8px;\n border-radius: 12px;\n padding: 5px 10px;\n display: flex;\n align-items: center;\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n max-width: 200px;\n}\n\n.contextItemText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #202020 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n.light-mode .shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #fafafa 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n@keyframes shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n</style>\n"],"mappings":""}
@@ -1,13 +1,13 @@
1
- import { createElementBlock as e, defineComponent as t, normalizeClass as n, openBlock as r, renderSlot as i } from "vue";
1
+ import { createElementBlock as e, createElementVNode as t, defineComponent as n, normalizeClass as r, openBlock as i, renderSlot as a } from "vue";
2
2
  //#region src/components/ContextItem.vue?vue&type=script&setup=true&lang.ts
3
- var a = /* @__PURE__ */ t({
3
+ var o = { class: "contextItemText" }, s = /* @__PURE__ */ n({
4
4
  __name: "ContextItem",
5
5
  props: { loading: { type: Boolean } },
6
- setup(t) {
7
- return (a, o) => (r(), e("div", { class: n(["contextItem", { shimmer: t.loading }]) }, [i(a.$slots, "default", {}, void 0, !0)], 2));
6
+ setup(n) {
7
+ return (s, c) => (i(), e("div", { class: r(["contextItem", { shimmer: n.loading }]) }, [t("span", o, [a(s.$slots, "default", {}, void 0, !0)])], 2));
8
8
  }
9
9
  });
10
10
  //#endregion
11
- export { a as default };
11
+ export { s as default };
12
12
 
13
13
  //# sourceMappingURL=ContextItem.vue.script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextItem.vue.script.js","names":[],"sources":["../../src/components/ContextItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { loading } = defineProps<{ loading: boolean }>()\n</script>\n\n<template>\n <div\n class=\"contextItem\"\n :class=\"{\n shimmer: loading,\n }\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.contextItem {\n font-size: 10px;\n display: inline-block;\n color: var(--scalar-color-2);\n cursor: pointer;\n vertical-align: middle;\n padding: 1px 8px;\n border-radius: 12px;\n padding: 5px 10px;\n display: flex;\n align-items: center;\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n}\n\n.shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #202020 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n.light-mode .shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #fafafa 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n@keyframes shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n</style>\n"],"mappings":";;;;;;yBAKE,EAMM,OAAA,EALJ,OAAK,EAAA,CAAC,eAAa,EAAA,SACM,EAAA,SAAA,CAAA,CAAA,EAAA,EAAA,CAGzB,EAAQ,EAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,GAAA,CAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"ContextItem.vue.script.js","names":[],"sources":["../../src/components/ContextItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { loading } = defineProps<{ loading: boolean }>()\n</script>\n\n<template>\n <div\n class=\"contextItem\"\n :class=\"{\n shimmer: loading,\n }\">\n <span class=\"contextItemText\">\n <slot />\n </span>\n </div>\n</template>\n\n<style scoped>\n.contextItem {\n white-space: nowrap;\n font-size: 10px;\n display: inline-block;\n color: var(--scalar-color-2);\n cursor: pointer;\n vertical-align: middle;\n padding: 1px 8px;\n border-radius: 12px;\n padding: 5px 10px;\n display: flex;\n align-items: center;\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n max-width: 200px;\n}\n\n.contextItemText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #202020 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n.light-mode .shimmer {\n background: var(--scalar-background-2);\n background-image: linear-gradient(\n 90deg,\n #fafafa 0%,\n var(--scalar-background-2) 40%,\n var(--scalar-background-3) 80%\n );\n background-size: 200% 100%;\n animation: shimmer 1.4s ease-in-out infinite;\n}\n\n@keyframes shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n</style>\n"],"mappings":";;;;;;yBAKE,EAQM,OAAA,EAPJ,OAAK,EAAA,CAAC,eAAa,EAAA,SACM,EAAA,SAAA,CAAA,CAAA,EAAA,EAAA,CAGzB,EAEO,QAFP,GAEO,CADL,EAAQ,EAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,GAAA,CAAA,CAAA,CAAA,EAAA,EAAA"}
@@ -1,4 +1,4 @@
1
1
  declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
2
  declare const _default: typeof __VLS_export;
3
3
  export default _default;
4
- //# sourceMappingURL=LoadingMiniOpenAPIDoc.vue.d.ts.map
4
+ //# sourceMappingURL=LoadingSearchOpenAPIOperations.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingSearchOpenAPIOperations.vue.d.ts","sourceRoot":"","sources":["../../src/components/LoadingSearchOpenAPIOperations.vue"],"names":[],"mappings":"AAyFA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,13 +1,13 @@
1
1
  import e from "../_virtual/_plugin-vue_export-helper.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import { createElementBlock as t, createElementVNode as n, createTextVNode as r, openBlock as i } from "vue";
4
- //#region src/components/LoadingMiniOpenAPIDoc.vue
4
+ //#region src/components/LoadingSearchOpenAPIOperations.vue
5
5
  var a = {}, o = { class: "sendingRequest" };
6
6
  function s(e, a) {
7
7
  return i(), t("div", o, [...a[0] ||= [n("div", { class: "playIcon" }, null, -1), r(" Retrieving relevant information... ", -1)]]);
8
8
  }
9
- var c = /* @__PURE__ */ e(a, [["render", s], ["__scopeId", "data-v-653c66b3"]]);
9
+ var c = /* @__PURE__ */ e(a, [["render", s], ["__scopeId", "data-v-6e0ac42c"]]);
10
10
  //#endregion
11
11
  export { c as default };
12
12
 
13
- //# sourceMappingURL=LoadingMiniOpenAPIDoc.vue.js.map
13
+ //# sourceMappingURL=LoadingSearchOpenAPIOperations.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingSearchOpenAPIOperations.vue.js","names":[],"sources":["../../src/components/LoadingSearchOpenAPIOperations.vue"],"sourcesContent":["<template>\n <div class=\"sendingRequest\">\n <div class=\"playIcon\"></div>\n Retrieving relevant information...\n </div>\n</template>\n\n<style scoped>\n.playIcon {\n padding: 4px;\n height: 16px;\n width: 16px;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n background: var(--scalar-background-1);\n border-radius: 50%;\n}\n\n.playIcon::before {\n content: '';\n width: 16px;\n height: 16px;\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n border-width: 1.5px;\n border-style: solid;\n border-color: currentcolor currentcolor transparent;\n border-image: initial;\n border-radius: 50%;\n background: var(--scalar-background-1);\n animation: 0.42s linear 0s infinite normal none running rotation;\n}\n\n.sendingRequest {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-font-size-3);\n margin-bottom: 10px;\n}\n\n.sendingRequest svg {\n width: 100%;\n height: 100%;\n z-index: 1;\n border-radius: 50%;\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n</style>\n"],"mappings":";;;;kBACO,OAAM,kBAAgB;;aAA3B,EAGM,OAHN,GAGM,CAAA,GAAA,AAAA,EAAA,OAAA,CAFJ,EAA4B,OAAA,EAAvB,OAAM,YAAU,EAAA,MAAA,GAAA,EAAA,EAAO,wCAE9B,GAAA,CAAA,CAAA,CAAA"}
@@ -1,10 +1,10 @@
1
+ export { createDocumentName } from '../registry/create-document-name.js';
1
2
  export { type AgentChatError, AgentErrorCodes, } from './error/constants.js';
2
3
  export { createError } from './error/helpers.js';
3
4
  export { MAX_PROMPT_SIZE } from './prompt/constants.js';
4
5
  export { type ApiMetadata, type DocumentSettings, type RegistryDocument, registryApiMetadata, } from './registry/document.js';
5
6
  export { ASK_FOR_AUTHENTICATION_TOOL_NAME, type AskForAuthenticationInput, askForAuthenticationInputSchema, } from './tools/ask-for-authentication.js';
6
- export { TOOL_NAMESPACE_SLUG_DELIMITER } from './tools/constants.js';
7
7
  export { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, type ExecuteClientSideRequestToolInput, type ExecuteClientSideRequestToolOutput, executeClientSideRequestToolInputSchema, } from './tools/execute-request.js';
8
- export { GET_MINI_OPENAPI_SPEC_TOOL_NAME, type GetMiniOpenAPIDocToolInput, type GetMiniOpenAPIDocToolOutput, getMiniOpenAPIDocToolInputSchema, } from './tools/get-mini-openapi-spec.js';
9
- export { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, type GetOpenAPISpecsSummaryToolOutput, } from './tools/get-openapi-spec-summary.js';
8
+ export { type GetOpenAPISpecsSummaryToolOutput, SUMMARIZE_OPENAPI_SPECS_TOOL_NAME, } from './tools/get-openapi-specs-summary.js';
9
+ export { SEARCH_OPENAPI_OPERATIONS_TOOL_NAME, type SearchOpenAPIOperationsToolInput, type SearchOpenAPIOperationsToolOutput, searchOpenAPIOperationsInputSchema, } from './tools/search-openapi-operations.js';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,eAAe,GAChB,MAAM,mBAAmB,CAAA;AA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yBAAyB,CAAA;AAChC,OAAO,EACL,KAAK,gCAAgC,EACrC,iCAAiC,GAClC,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,mCAAmC,EACnC,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,kCAAkC,GACnC,MAAM,mCAAmC,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { createError as e } from "./error/helpers.js";
2
2
  import { registryApiMetadata as t } from "./registry/document.js";
3
- import { AgentErrorCodes as n } from "./error/constants.js";
4
- import { MAX_PROMPT_SIZE as r } from "./prompt/constants.js";
5
- import { ASK_FOR_AUTHENTICATION_TOOL_NAME as i, askForAuthenticationInputSchema as a } from "./tools/ask-for-authentication.js";
6
- import { TOOL_NAMESPACE_SLUG_DELIMITER as o } from "./tools/constants.js";
3
+ import { createDocumentName as n } from "../registry/create-document-name.js";
4
+ import { AgentErrorCodes as r } from "./error/constants.js";
5
+ import { MAX_PROMPT_SIZE as i } from "./prompt/constants.js";
6
+ import { ASK_FOR_AUTHENTICATION_TOOL_NAME as a, askForAuthenticationInputSchema as o } from "./tools/ask-for-authentication.js";
7
7
  import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME as s, executeClientSideRequestToolInputSchema as c } from "./tools/execute-request.js";
8
- import { GET_MINI_OPENAPI_SPEC_TOOL_NAME as l, getMiniOpenAPIDocToolInputSchema as u } from "./tools/get-mini-openapi-spec.js";
9
- import { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME as d } from "./tools/get-openapi-spec-summary.js";
10
- export { i as ASK_FOR_AUTHENTICATION_TOOL_NAME, n as AgentErrorCodes, s as EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, l as GET_MINI_OPENAPI_SPEC_TOOL_NAME, d as GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, r as MAX_PROMPT_SIZE, o as TOOL_NAMESPACE_SLUG_DELIMITER, a as askForAuthenticationInputSchema, e as createError, c as executeClientSideRequestToolInputSchema, u as getMiniOpenAPIDocToolInputSchema, t as registryApiMetadata };
8
+ import { SUMMARIZE_OPENAPI_SPECS_TOOL_NAME as l } from "./tools/get-openapi-specs-summary.js";
9
+ import { SEARCH_OPENAPI_OPERATIONS_TOOL_NAME as u, searchOpenAPIOperationsInputSchema as d } from "./tools/search-openapi-operations.js";
10
+ export { a as ASK_FOR_AUTHENTICATION_TOOL_NAME, r as AgentErrorCodes, s as EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, i as MAX_PROMPT_SIZE, u as SEARCH_OPENAPI_OPERATIONS_TOOL_NAME, l as SUMMARIZE_OPENAPI_SPECS_TOOL_NAME, o as askForAuthenticationInputSchema, n as createDocumentName, e as createError, c as executeClientSideRequestToolInputSchema, t as registryApiMetadata, d as searchOpenAPIOperationsInputSchema };
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const ASK_FOR_AUTHENTICATION_TOOL_NAME: "ask-for-authentication";
3
3
  export declare const askForAuthenticationInputSchema: z.ZodObject<{
4
+ documentName: z.ZodString;
4
5
  uniqueIdentifier: z.ZodString;
5
6
  }, z.core.$strip>;
6
7
  export type AskForAuthenticationInput = z.input<typeof askForAuthenticationInputSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"ask-for-authentication.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/ask-for-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gCAAgC,EAAG,wBAAiC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
1
+ {"version":3,"file":"ask-for-authentication.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/ask-for-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gCAAgC,EAAG,wBAAiC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;;iBAG1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
@@ -1,6 +1,9 @@
1
1
  import { z as e } from "zod";
2
2
  //#region src/entities/tools/ask-for-authentication.ts
3
- var t = "ask-for-authentication", n = e.object({ uniqueIdentifier: e.string() });
3
+ var t = "ask-for-authentication", n = e.object({
4
+ documentName: e.string(),
5
+ uniqueIdentifier: e.string().describe("Needed for legacy support for old clients")
6
+ });
4
7
  //#endregion
5
8
  export { t as ASK_FOR_AUTHENTICATION_TOOL_NAME, n as askForAuthenticationInputSchema };
6
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"ask-for-authentication.js","names":[],"sources":["../../../src/entities/tools/ask-for-authentication.ts"],"sourcesContent":["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"],"mappings":";;AAEA,IAAa,IAAmC,0BAEnC,IAAkC,EAAE,OAAO,EACtD,kBAAkB,EAAE,QAAQ,EAC7B,CAAC"}
1
+ {"version":3,"file":"ask-for-authentication.js","names":[],"sources":["../../../src/entities/tools/ask-for-authentication.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport const ASK_FOR_AUTHENTICATION_TOOL_NAME = 'ask-for-authentication' as const\n\nexport const askForAuthenticationInputSchema = z.object({\n documentName: z.string(),\n uniqueIdentifier: z.string().describe('Needed for legacy support for old clients'),\n})\n\nexport type AskForAuthenticationInput = z.input<typeof askForAuthenticationInputSchema>\n"],"mappings":";;AAEA,IAAa,IAAmC,0BAEnC,IAAkC,EAAE,OAAO;CACtD,cAAc,EAAE,QAAQ;CACxB,kBAAkB,EAAE,QAAQ,CAAC,SAAS,4CAA4C;CACnF,CAAC"}
@@ -7,6 +7,7 @@ export declare const executeClientSideRequestToolInputSchema: z.ZodObject<{
7
7
  path: z.ZodString;
8
8
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9
9
  body: z.ZodOptional<z.ZodString>;
10
+ documentName: z.ZodString;
10
11
  documentIdentifier: z.ZodString;
11
12
  }, z.core.$strip>;
12
13
  export type ExecuteClientSideRequestToolInput = z.input<typeof executeClientSideRequestToolInputSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,eAAO,MAAM,qCAAqC,EAAG,iBAA0B,CAAA;AAE/E,eAAO,MAAM,uCAAuC;;;;;;iBAMlD,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEvG,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,EAAE,CAAA;CAAE,EACrD,cAAc,CACZ,+BAA+B,EAC/B;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,gBAAgB,EAChB;IACE,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CACF,GACD,cAAc,CACZ,iBAAiB,EACjB;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,2CAA2C,EAC3C;IACE,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,CACF,GACD,cAAc,CAAC,8BAA8B,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC,GACjH,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC,CACvD,CAAA"}
1
+ {"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,eAAO,MAAM,qCAAqC,EAAG,iBAA0B,CAAA;AAE/E,eAAO,MAAM,uCAAuC;;;;;;;iBAOlD,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEvG,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,EAAE,CAAA;CAAE,EACrD,cAAc,CACZ,+BAA+B,EAC/B;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,gBAAgB,EAChB;IACE,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CACF,GACD,cAAc,CACZ,iBAAiB,EACjB;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,2CAA2C,EAC3C;IACE,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,CACF,GACD,cAAc,CAAC,8BAA8B,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC,GACjH,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC,CACvD,CAAA"}
@@ -5,7 +5,8 @@ var t = "execute-request", n = e.object({
5
5
  path: e.string(),
6
6
  headers: e.record(e.string(), e.string()).optional(),
7
7
  body: e.string().optional(),
8
- documentIdentifier: e.string()
8
+ documentName: e.string(),
9
+ documentIdentifier: e.string().describe("Needed for legacy support for old clients")
9
10
  });
10
11
  //#endregion
11
12
  export { t as EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, n as executeClientSideRequestToolInputSchema };
@@ -1 +1 @@
1
- {"version":3,"file":"execute-request.js","names":[],"sources":["../../../src/entities/tools/execute-request.ts"],"sourcesContent":["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"],"mappings":";;AAKA,IAAa,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"}
1
+ {"version":3,"file":"execute-request.js","names":[],"sources":["../../../src/entities/tools/execute-request.ts"],"sourcesContent":["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 documentName: z.string(),\n documentIdentifier: z.string().describe('Needed for legacy support for old clients'),\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"],"mappings":";;AAKA,IAAa,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,cAAc,EAAE,QAAQ;CACxB,oBAAoB,EAAE,QAAQ,CAAC,SAAS,4CAA4C;CACrF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare const SUMMARIZE_OPENAPI_SPECS_TOOL_NAME: "summarize-openapi-specs";
3
+ export type GetOpenAPISpecsSummaryToolOutput = {
4
+ paths: string[];
5
+ components?: {
6
+ securitySchemes: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject>;
7
+ };
8
+ info?: OpenAPIV3_1.InfoObject;
9
+ externalDocs: any;
10
+ servers?: OpenAPIV3_1.ServerObject[];
11
+ }[];
12
+ //# sourceMappingURL=get-openapi-specs-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-openapi-specs-summary.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/get-openapi-specs-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,eAAO,MAAM,iCAAiC,EAAG,yBAAkC,CAAA;AAEnF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,UAAU,CAAC,EAAE;QACX,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,eAAe,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAA;KAChG,CAAA;IACD,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,CAAA;IAC7B,YAAY,EAAE,GAAG,CAAA;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,CAAA;CACrC,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ //#region src/entities/tools/get-openapi-specs-summary.ts
2
+ var e = "summarize-openapi-specs";
3
+ //#endregion
4
+ export { e as SUMMARIZE_OPENAPI_SPECS_TOOL_NAME };
5
+
6
+ //# sourceMappingURL=get-openapi-specs-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-openapi-specs-summary.js","names":[],"sources":["../../../src/entities/tools/get-openapi-specs-summary.ts"],"sourcesContent":["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nexport const SUMMARIZE_OPENAPI_SPECS_TOOL_NAME = 'summarize-openapi-specs' as const\n\nexport type GetOpenAPISpecsSummaryToolOutput = {\n paths: string[]\n components?: {\n securitySchemes: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject>\n }\n info?: OpenAPIV3_1.InfoObject\n externalDocs: any\n servers?: OpenAPIV3_1.ServerObject[]\n}[]\n"],"mappings":";AAEA,IAAa,IAAoC"}
@@ -0,0 +1,9 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { z } from 'zod';
3
+ export declare const SEARCH_OPENAPI_OPERATIONS_TOOL_NAME: "search-openapi-operations";
4
+ export declare const searchOpenAPIOperationsInputSchema: z.ZodObject<{
5
+ question: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type SearchOpenAPIOperationsToolInput = z.input<typeof searchOpenAPIOperationsInputSchema>;
8
+ export type SearchOpenAPIOperationsToolOutput = Partial<OpenAPIV3_1.Document>[];
9
+ //# sourceMappingURL=search-openapi-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-openapi-operations.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/search-openapi-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mCAAmC,EAAG,2BAAoC,CAAA;AAEvF,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEjG,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { z as e } from "zod";
2
+ //#region src/entities/tools/search-openapi-operations.ts
3
+ var t = "search-openapi-operations", n = e.object({ question: e.string() });
4
+ //#endregion
5
+ export { t as SEARCH_OPENAPI_OPERATIONS_TOOL_NAME, n as searchOpenAPIOperationsInputSchema };
6
+
7
+ //# sourceMappingURL=search-openapi-operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-openapi-operations.js","names":[],"sources":["../../../src/entities/tools/search-openapi-operations.ts"],"sourcesContent":["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { z } from 'zod'\n\nexport const SEARCH_OPENAPI_OPERATIONS_TOOL_NAME = 'search-openapi-operations' as const\n\nexport const searchOpenAPIOperationsInputSchema = z.object({\n question: z.string(),\n})\n\nexport type SearchOpenAPIOperationsToolInput = z.input<typeof searchOpenAPIOperationsInputSchema>\n\nexport type SearchOpenAPIOperationsToolOutput = Partial<OpenAPIV3_1.Document>[]\n"],"mappings":";;AAGA,IAAa,IAAsC,6BAEtC,IAAqC,EAAE,OAAO,EACzD,UAAU,EAAE,QAAQ,EACrB,CAAC"}
package/dist/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.14",
13
+ "version": "0.9.15",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
@@ -68,7 +68,6 @@
68
68
  "zod": "catalog:*"
69
69
  },
70
70
  "devDependencies": {
71
- "@modelcontextprotocol/sdk": "catalog:*",
72
71
  "@tailwindcss/vite": "catalog:*",
73
72
  "@types/whatwg-mimetype": "catalog:*",
74
73
  "@vitejs/plugin-vue": "catalog:*",
@@ -9,23 +9,23 @@ import { type Api } from '../api.js';
9
9
  import type { ApiMetadata } from '../entities/registry/document.js';
10
10
  import type { ASK_FOR_AUTHENTICATION_TOOL_NAME, AskForAuthenticationInput } from '../entities/tools/ask-for-authentication.js';
11
11
  import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME, type ExecuteClientSideRequestToolInput, type ExecuteClientSideRequestToolOutput } from '../entities/tools/execute-request.js';
12
- import type { GET_MINI_OPENAPI_SPEC_TOOL_NAME, GetMiniOpenAPIDocToolInput, GetMiniOpenAPIDocToolOutput } from '../entities/tools/get-mini-openapi-spec.js';
13
- import type { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME, GetOpenAPISpecsSummaryToolOutput } from '../entities/tools/get-openapi-spec-summary.js';
12
+ import type { GetOpenAPISpecsSummaryToolOutput, SUMMARIZE_OPENAPI_SPECS_TOOL_NAME } from '../entities/tools/get-openapi-specs-summary.js';
13
+ import type { SEARCH_OPENAPI_OPERATIONS_TOOL_NAME, SearchOpenAPIOperationsToolInput, SearchOpenAPIOperationsToolOutput } from '../entities/tools/search-openapi-operations.js';
14
14
  import type { ChatMode } from '../types';
15
15
  export type RegistryDocument = {
16
16
  namespace: string;
17
17
  slug: string;
18
18
  };
19
19
  export type Tools = {
20
- [GET_MINI_OPENAPI_SPEC_TOOL_NAME]: {
21
- input: GetMiniOpenAPIDocToolInput;
22
- output: GetMiniOpenAPIDocToolOutput;
20
+ [SEARCH_OPENAPI_OPERATIONS_TOOL_NAME]: {
21
+ input: SearchOpenAPIOperationsToolInput;
22
+ output: SearchOpenAPIOperationsToolOutput;
23
23
  };
24
24
  [EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME]: {
25
25
  input: ExecuteClientSideRequestToolInput;
26
26
  output: ExecuteClientSideRequestToolOutput;
27
27
  };
28
- [GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME]: {
28
+ [SUMMARIZE_OPENAPI_SPECS_TOOL_NAME]: {
29
29
  input: object;
30
30
  output: GetOpenAPISpecsSummaryToolOutput;
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,KAAK,4BAA4B,EAAmC,MAAM,6BAA6B,CAAA;AAEhH,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAwB,KAAK,WAAW,EAAE,KAAK,SAAS,EAA+C,MAAM,IAAI,CAAA;AAExH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAA0C,MAAM,KAAK,CAAA;AAE3G,OAAO,EAAE,KAAK,GAAG,EAAyC,MAAM,OAAO,CAAA;AAIvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EACV,gCAAgC,EAChC,yBAAyB,EAC1B,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,qCAAqC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kCAAkC,EACxC,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EACV,mCAAmC,E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sNR;AAED,wBAAgB,QAAQ,UAQvB"}
@@ -1,7 +1,7 @@
1
1
  import { createError as e } from "../entities/error/helpers.js";
2
2
  import { createApi as t, createAuthorizationHeaders as n } from "../api.js";
3
- import "../entities/tools/execute-request.js";
4
3
  import { createDocumentName as r } from "../registry/create-document-name.js";
4
+ import "../entities/tools/execute-request.js";
5
5
  import { executeRequestTool as i } from "../client-tools/execute-request.js";
6
6
  import { URLS as a } from "../consts/urls.js";
7
7
  import { createDocumentSettings as o } from "../helpers.js";
@@ -29,10 +29,7 @@ function D({ registryDocuments: e, workspaceStore: t, baseUrl: r, proxyUrl: a, g
29
29
  getAccessToken: s,
30
30
  getAgentKey: c
31
31
  }),
32
- body: () => ({
33
- registryDocuments: e.value,
34
- documentSettings: o(t)
35
- })
32
+ body: () => ({ registryDocuments: e.value })
36
33
  }),
37
34
  async onToolCall({ toolCall: e }) {
38
35
  e.dynamic || e.toolName === "execute-request" && e.input.method.toLowerCase() === "get" && await i({