donobu 2.26.0 → 2.27.0

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 (113) hide show
  1. package/dist/apis/SpecialFlowsApi.d.ts.map +1 -1
  2. package/dist/apis/SpecialFlowsApi.js +60 -31
  3. package/dist/apis/SpecialFlowsApi.js.map +1 -1
  4. package/dist/apis/ToolsApi.d.ts.map +1 -1
  5. package/dist/apis/ToolsApi.js +2 -1
  6. package/dist/apis/ToolsApi.js.map +1 -1
  7. package/dist/assets/generated/version +1 -1
  8. package/dist/esm/apis/SpecialFlowsApi.d.ts.map +1 -1
  9. package/dist/esm/apis/SpecialFlowsApi.js +60 -31
  10. package/dist/esm/apis/SpecialFlowsApi.js.map +1 -1
  11. package/dist/esm/apis/ToolsApi.d.ts.map +1 -1
  12. package/dist/esm/apis/ToolsApi.js +2 -1
  13. package/dist/esm/apis/ToolsApi.js.map +1 -1
  14. package/dist/esm/assets/generated/version +1 -1
  15. package/dist/esm/lib/testExtension.js +1 -1
  16. package/dist/esm/lib/testExtension.js.map +1 -1
  17. package/dist/esm/lib/utils/selfHealing.d.ts.map +1 -1
  18. package/dist/esm/lib/utils/selfHealing.js +44 -45
  19. package/dist/esm/lib/utils/selfHealing.js.map +1 -1
  20. package/dist/esm/main.d.ts +2 -0
  21. package/dist/esm/main.d.ts.map +1 -1
  22. package/dist/esm/main.js +2 -0
  23. package/dist/esm/main.js.map +1 -1
  24. package/dist/esm/managers/DonobuFlowsManager.d.ts.map +1 -1
  25. package/dist/esm/managers/DonobuFlowsManager.js +2 -1
  26. package/dist/esm/managers/DonobuFlowsManager.js.map +1 -1
  27. package/dist/esm/managers/PageInspector.d.ts.map +1 -1
  28. package/dist/esm/managers/PageInspector.js +4 -2
  29. package/dist/esm/managers/PageInspector.js.map +1 -1
  30. package/dist/esm/managers/PluginLoader.d.ts.map +1 -1
  31. package/dist/esm/managers/PluginLoader.js +2 -1
  32. package/dist/esm/managers/PluginLoader.js.map +1 -1
  33. package/dist/esm/managers/ToolManager.d.ts +6 -2
  34. package/dist/esm/managers/ToolManager.d.ts.map +1 -1
  35. package/dist/esm/managers/ToolManager.js +90 -76
  36. package/dist/esm/managers/ToolManager.js.map +1 -1
  37. package/dist/esm/utils/PlaywrightUtils.d.ts.map +1 -1
  38. package/dist/esm/utils/PlaywrightUtils.js +42 -22
  39. package/dist/esm/utils/PlaywrightUtils.js.map +1 -1
  40. package/dist/lib/testExtension.js +1 -1
  41. package/dist/lib/testExtension.js.map +1 -1
  42. package/dist/lib/utils/selfHealing.d.ts.map +1 -1
  43. package/dist/lib/utils/selfHealing.js +44 -45
  44. package/dist/lib/utils/selfHealing.js.map +1 -1
  45. package/dist/main.d.ts +2 -0
  46. package/dist/main.d.ts.map +1 -1
  47. package/dist/main.js +2 -0
  48. package/dist/main.js.map +1 -1
  49. package/dist/managers/DonobuFlowsManager.d.ts.map +1 -1
  50. package/dist/managers/DonobuFlowsManager.js +2 -1
  51. package/dist/managers/DonobuFlowsManager.js.map +1 -1
  52. package/dist/managers/PageInspector.d.ts.map +1 -1
  53. package/dist/managers/PageInspector.js +4 -2
  54. package/dist/managers/PageInspector.js.map +1 -1
  55. package/dist/managers/PluginLoader.js +2 -2
  56. package/dist/managers/PluginLoader.js.map +1 -1
  57. package/dist/managers/ToolManager.d.ts +6 -2
  58. package/dist/managers/ToolManager.d.ts.map +1 -1
  59. package/dist/managers/ToolManager.js +90 -76
  60. package/dist/managers/ToolManager.js.map +1 -1
  61. package/dist/models/FlowMetadata.d.ts.map +1 -1
  62. package/dist/utils/PlaywrightUtils.d.ts.map +1 -1
  63. package/dist/utils/PlaywrightUtils.js +42 -22
  64. package/dist/utils/PlaywrightUtils.js.map +1 -1
  65. package/package.json +3 -2
  66. package/dist/esm/tools/AggregateExtractedStreetviewDataTool.d.ts +0 -22
  67. package/dist/esm/tools/AggregateExtractedStreetviewDataTool.d.ts.map +0 -1
  68. package/dist/esm/tools/AggregateExtractedStreetviewDataTool.js +0 -61
  69. package/dist/esm/tools/AggregateExtractedStreetviewDataTool.js.map +0 -1
  70. package/dist/esm/tools/ExtractGoogleStreetviewEntityDataTool.d.ts +0 -62
  71. package/dist/esm/tools/ExtractGoogleStreetviewEntityDataTool.d.ts.map +0 -1
  72. package/dist/esm/tools/ExtractGoogleStreetviewEntityDataTool.js +0 -164
  73. package/dist/esm/tools/ExtractGoogleStreetviewEntityDataTool.js.map +0 -1
  74. package/dist/esm/tools/ExtractPaymentProviderKeyTool.d.ts +0 -81
  75. package/dist/esm/tools/ExtractPaymentProviderKeyTool.d.ts.map +0 -1
  76. package/dist/esm/tools/ExtractPaymentProviderKeyTool.js +0 -316
  77. package/dist/esm/tools/ExtractPaymentProviderKeyTool.js.map +0 -1
  78. package/dist/esm/tools/ExtractPublicFacebookEntityDataTool.d.ts +0 -39
  79. package/dist/esm/tools/ExtractPublicFacebookEntityDataTool.d.ts.map +0 -1
  80. package/dist/esm/tools/ExtractPublicFacebookEntityDataTool.js +0 -228
  81. package/dist/esm/tools/ExtractPublicFacebookEntityDataTool.js.map +0 -1
  82. package/dist/esm/tools/GoToGoogleMapsStreetViewTool.d.ts +0 -47
  83. package/dist/esm/tools/GoToGoogleMapsStreetViewTool.d.ts.map +0 -1
  84. package/dist/esm/tools/GoToGoogleMapsStreetViewTool.js +0 -126
  85. package/dist/esm/tools/GoToGoogleMapsStreetViewTool.js.map +0 -1
  86. package/dist/esm/tools/NavigateWithinStreetView.d.ts +0 -54
  87. package/dist/esm/tools/NavigateWithinStreetView.d.ts.map +0 -1
  88. package/dist/esm/tools/NavigateWithinStreetView.js +0 -119
  89. package/dist/esm/tools/NavigateWithinStreetView.js.map +0 -1
  90. package/dist/tools/AggregateExtractedStreetviewDataTool.d.ts +0 -22
  91. package/dist/tools/AggregateExtractedStreetviewDataTool.d.ts.map +0 -1
  92. package/dist/tools/AggregateExtractedStreetviewDataTool.js +0 -61
  93. package/dist/tools/AggregateExtractedStreetviewDataTool.js.map +0 -1
  94. package/dist/tools/ExtractGoogleStreetviewEntityDataTool.d.ts +0 -62
  95. package/dist/tools/ExtractGoogleStreetviewEntityDataTool.d.ts.map +0 -1
  96. package/dist/tools/ExtractGoogleStreetviewEntityDataTool.js +0 -164
  97. package/dist/tools/ExtractGoogleStreetviewEntityDataTool.js.map +0 -1
  98. package/dist/tools/ExtractPaymentProviderKeyTool.d.ts +0 -81
  99. package/dist/tools/ExtractPaymentProviderKeyTool.d.ts.map +0 -1
  100. package/dist/tools/ExtractPaymentProviderKeyTool.js +0 -316
  101. package/dist/tools/ExtractPaymentProviderKeyTool.js.map +0 -1
  102. package/dist/tools/ExtractPublicFacebookEntityDataTool.d.ts +0 -39
  103. package/dist/tools/ExtractPublicFacebookEntityDataTool.d.ts.map +0 -1
  104. package/dist/tools/ExtractPublicFacebookEntityDataTool.js +0 -228
  105. package/dist/tools/ExtractPublicFacebookEntityDataTool.js.map +0 -1
  106. package/dist/tools/GoToGoogleMapsStreetViewTool.d.ts +0 -47
  107. package/dist/tools/GoToGoogleMapsStreetViewTool.d.ts.map +0 -1
  108. package/dist/tools/GoToGoogleMapsStreetViewTool.js +0 -126
  109. package/dist/tools/GoToGoogleMapsStreetViewTool.js.map +0 -1
  110. package/dist/tools/NavigateWithinStreetView.d.ts +0 -54
  111. package/dist/tools/NavigateWithinStreetView.d.ts.map +0 -1
  112. package/dist/tools/NavigateWithinStreetView.js +0 -119
  113. package/dist/tools/NavigateWithinStreetView.js.map +0 -1
@@ -1,228 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExtractPublicFacebookEntityDataTool = exports.ExtractPublicFacebookEntityDataGptSchema = exports.ExtractPublicFacebookEntityDataCoreSchema = void 0;
4
- const Tool_1 = require("./Tool");
5
- const DonobuException_1 = require("../exceptions/DonobuException");
6
- const InvalidParamValueException_1 = require("../exceptions/InvalidParamValueException");
7
- const MiscUtils_1 = require("../utils/MiscUtils");
8
- const JsonUtils_1 = require("../utils/JsonUtils");
9
- const Logger_1 = require("../utils/Logger");
10
- const ToolSchema_1 = require("../models/ToolSchema");
11
- const zod_1 = require("zod");
12
- exports.ExtractPublicFacebookEntityDataCoreSchema = zod_1.z.object({
13
- facebookEntityName: zod_1.z
14
- .string()
15
- .optional()
16
- .describe("The name of the entity's public Facebook page used in its URL. For example, passing a value of 'TheCocaColaCo' would cause Donobu to inspect https://www.facebook.com/TheCocaColaCo."),
17
- facebookEntityUrl: zod_1.z
18
- .string()
19
- .optional()
20
- .describe("The URL of the entity's public Facebook page. For example, https://www.facebook.com/TheCocaColaCo."),
21
- });
22
- exports.ExtractPublicFacebookEntityDataGptSchema = ToolSchema_1.BaseGptArgsSchema.merge(exports.ExtractPublicFacebookEntityDataCoreSchema);
23
- const FACEBOOK_ENTITY_PAGE_INFO_SCHEMA = zod_1.z.object({
24
- pageId: zod_1.z.string().nullable().describe("The entity's Facebook page ID."),
25
- companyLegalName: zod_1.z
26
- .string()
27
- .nullable()
28
- .describe('The legal name of the entity AS FOUND ON THE GIVEN FACEBOOK WEBPAGE TEXT! This is not the marketing name! ' +
29
- 'The legal name is in the section of the Facebook website that says "<some-legal-entity-name> is responsible for this Page." ' +
30
- 'IMPORTANT: If this string pattern is not found, then the `legalEntityName` must be set to null.'),
31
- businessName: zod_1.z
32
- .string()
33
- .nullable()
34
- .describe("The entity's business name. This is not necessarily the legal name of the entity. This could be the name used in marketing, for example."),
35
- topCountryOfPageManagers: zod_1.z
36
- .string()
37
- .nullable()
38
- .describe("The country with the most number of page managers for this entity's Facebook page."),
39
- managerIsVerified: zod_1.z
40
- .boolean()
41
- .nullable()
42
- .describe('The person that manages the Facebook page for this entity has been verified.'),
43
- companyIsVerified: zod_1.z
44
- .boolean()
45
- .nullable()
46
- .describe('The company itself has a verified Facebook status.'),
47
- creationDate: zod_1.z
48
- .string()
49
- .nullable()
50
- .describe('Creation date of the page in the format yyyy-mm-dd.'),
51
- isRunningAds: zod_1.z
52
- .boolean()
53
- .nullable()
54
- .describe('Is set to true if the entity reports that it is running ads. Otherwise false.'),
55
- physicalAddress: zod_1.z
56
- .string()
57
- .nullable()
58
- .describe("The entity's physical address."),
59
- categories: zod_1.z.array(zod_1.z.string()).describe("The entity's categories."),
60
- numberOfReviews: zod_1.z
61
- .number()
62
- .int()
63
- .nullable()
64
- .describe('The number of reviews for the entity.'),
65
- percentRecommended: zod_1.z
66
- .number()
67
- .int()
68
- .nullable()
69
- .describe('The percent recommended based on reviews.'),
70
- numberOfLikes: zod_1.z
71
- .number()
72
- .int()
73
- .nullable()
74
- .describe('The number of likes for the entity.'),
75
- numberOfFollowers: zod_1.z
76
- .number()
77
- .int()
78
- .nullable()
79
- .describe('The number of followers for the entity.'),
80
- phone: zod_1.z.string().nullable().describe("The entity's phone number."),
81
- websiteUrl: zod_1.z.string().nullable().describe("The entity's website URL."),
82
- });
83
- class ExtractPublicFacebookEntityDataTool extends Tool_1.Tool {
84
- constructor() {
85
- super(ExtractPublicFacebookEntityDataTool.NAME, 'Source Facebook transparency data for a given Facebook entity.', exports.ExtractPublicFacebookEntityDataCoreSchema, exports.ExtractPublicFacebookEntityDataGptSchema, true);
86
- }
87
- async call(context, parameters) {
88
- try {
89
- const initialUrl = this.getInitialFacebookPageUrl(parameters);
90
- const page = context.page.current;
91
- const aboutProfileTransparencyPageUrl = this.getAboutProfileTransparencyPageUrl(initialUrl);
92
- await page.goto(aboutProfileTransparencyPageUrl);
93
- await page.waitForLoadState();
94
- // Detect if the given entity exists
95
- const bodyText = await page.evaluate(() => document.body.innerText);
96
- if (bodyText.includes("This content isn't available right now")) {
97
- context.metadata.nextState = 'FAILED';
98
- if (parameters.facebookEntityName) {
99
- throw new InvalidParamValueException_1.InvalidParamValueException('facebookEntityName', parameters.facebookEntityName ?? null);
100
- }
101
- else {
102
- throw new InvalidParamValueException_1.InvalidParamValueException('facebookEntityUrl', parameters.facebookEntityUrl ?? null);
103
- }
104
- }
105
- // Close the login modal
106
- await this.closeModal(page);
107
- // Click into modal to see extended transparency information
108
- await page
109
- .locator('div[aria-label="See all transparency information"]')
110
- .click({
111
- delay: MiscUtils_1.MiscUtils.generateHumanLikeClickDurationInMs(),
112
- timeout: 5000,
113
- });
114
- await page.waitForTimeout(1500);
115
- await page.waitForLoadState();
116
- const transparencyInfoRawText = await page.evaluate(() => document.body.innerText);
117
- // Click out of the extended transparency information modal
118
- await this.closeModal(page);
119
- // Navigate to remaining public profile details
120
- const basicInfoUrl = this.getAboutContactAndBasicInfoPageUrl(page.url());
121
- await page.goto(basicInfoUrl);
122
- await page.waitForLoadState();
123
- // Close the login modal
124
- await this.closeModal(page);
125
- await page.waitForLoadState();
126
- const basicInfoRawText = await page.evaluate(() => document.body.innerText);
127
- const prompt = `
128
- \`\`\`
129
- ${transparencyInfoRawText}
130
- ${basicInfoRawText}
131
- \`\`\`
132
-
133
- Above is the raw textual content of a business/organization entity's Facebook webpage.
134
-
135
- Note that since this is the raw textual content, the text may be a bit jumbled, have its styling lost,
136
- careful positioning lost, etc.
137
-
138
- Extract this entity's information from the given raw textual content. Only use the supplied raw textual
139
- content. DO NOT use your internal model knowledge to fill in gaps of information. ONLY use the supplied
140
- text!`;
141
- const resp = await context.gptClient.getStructuredOutput([
142
- {
143
- type: 'user',
144
- items: [{ type: 'text', text: prompt }],
145
- },
146
- ], FACEBOOK_ENTITY_PAGE_INFO_SCHEMA);
147
- MiscUtils_1.MiscUtils.updateTokenCounts(resp, context.metadata);
148
- context.metadata.nextState = 'SUCCESS';
149
- return {
150
- isSuccessful: true,
151
- forLlm: 'Successfully extracted Facebook data.',
152
- metadata: resp.output,
153
- };
154
- }
155
- catch (error) {
156
- if (error instanceof DonobuException_1.DonobuException) {
157
- context.metadata.nextState = 'FAILED';
158
- return {
159
- isSuccessful: false,
160
- forLlm: error.userFacingMessage,
161
- metadata: JsonUtils_1.JsonUtils.objectToJson(error),
162
- };
163
- }
164
- Logger_1.appLogger.error('Failed to extract Facebook data due to unexpected exception!', error);
165
- context.metadata.nextState = 'FAILED';
166
- return {
167
- isSuccessful: false,
168
- forLlm: error instanceof Error ? error.message : String(error),
169
- metadata: null,
170
- };
171
- }
172
- }
173
- async callFromGpt(context, parameters) {
174
- return this.call(context, parameters);
175
- }
176
- getInitialFacebookPageUrl(parameters) {
177
- if (parameters.facebookEntityName) {
178
- return `https://www.facebook.com/${parameters.facebookEntityName}`;
179
- }
180
- else if (parameters.facebookEntityUrl) {
181
- const tmp = parameters.facebookEntityUrl;
182
- return !tmp.startsWith('http') ? 'https://' + tmp : tmp;
183
- }
184
- else {
185
- throw new InvalidParamValueException_1.InvalidParamValueException('facebookEntityUrl', null);
186
- }
187
- }
188
- getAboutProfileTransparencyPageUrl(url) {
189
- try {
190
- const uri = new URL(url);
191
- const params = new URLSearchParams(uri.search);
192
- params.delete('sk');
193
- params.append('sk', 'about_profile_transparency');
194
- uri.search = params.toString();
195
- return uri.toString();
196
- }
197
- catch (_error) {
198
- throw new Error(`Invalid URL: ${url}`);
199
- }
200
- }
201
- getAboutContactAndBasicInfoPageUrl(url) {
202
- try {
203
- const uri = new URL(url);
204
- const params = new URLSearchParams(uri.search);
205
- params.delete('sk');
206
- params.append('sk', 'about_contact_and_basic_info');
207
- uri.search = params.toString();
208
- return uri.toString();
209
- }
210
- catch (_error) {
211
- throw new Error(`Invalid URL: ${url}`);
212
- }
213
- }
214
- async closeModal(page) {
215
- try {
216
- await page.locator('div[aria-label="Close"]').first().click({
217
- delay: MiscUtils_1.MiscUtils.generateHumanLikeClickDurationInMs(),
218
- timeout: 5000,
219
- });
220
- }
221
- catch (_error) {
222
- Logger_1.appLogger.warn('Failed to detect Facebook modal to close, but continuing anyway...');
223
- }
224
- }
225
- }
226
- exports.ExtractPublicFacebookEntityDataTool = ExtractPublicFacebookEntityDataTool;
227
- ExtractPublicFacebookEntityDataTool.NAME = 'extractPublicFacebookEntityData';
228
- //# sourceMappingURL=ExtractPublicFacebookEntityDataTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExtractPublicFacebookEntity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C;QACJ,CAAC;IACH,CAAC;;AAlMH,kFAmMC;AA/LwB,wCAAI,GAAG,iCAAiC,CAAC"}
@@ -1,47 +0,0 @@
1
- import { Tool } from './Tool';
2
- import { ToolCallContext } from '../models/ToolCallContext';
3
- import { ToolCallResult } from '../models/ToolCallResult';
4
- import { z } from 'zod';
5
- export declare const GoToGoogleMapsStreetViewCoreSchema: z.ZodObject<{
6
- entityName: z.ZodString;
7
- entityLocation: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- entityName: string;
10
- entityLocation: string;
11
- }, {
12
- entityName: string;
13
- entityLocation: string;
14
- }>;
15
- export declare const GoToGoogleMapsStreetViewGptSchema: z.ZodObject<{
16
- rationale: z.ZodString;
17
- } & {
18
- entityName: z.ZodString;
19
- entityLocation: z.ZodString;
20
- }, "strip", z.ZodTypeAny, {
21
- rationale: string;
22
- entityName: string;
23
- entityLocation: string;
24
- }, {
25
- rationale: string;
26
- entityName: string;
27
- entityLocation: string;
28
- }>;
29
- /**
30
- * Attempts to verify that the given business/entity exists at the given location by using a Google
31
- * Maps street view. If the business/entity is found, then a AggregateExtractedStreetviewDataTool
32
- * tool call is queued containing the results.
33
- */
34
- export declare class GoToGoogleMapsStreetViewTool extends Tool<typeof GoToGoogleMapsStreetViewCoreSchema, typeof GoToGoogleMapsStreetViewGptSchema> {
35
- static readonly NAME = "goToGoogleMapsStreetView";
36
- constructor();
37
- call(context: ToolCallContext, parameters: z.infer<typeof GoToGoogleMapsStreetViewCoreSchema>): Promise<ToolCallResult>;
38
- callFromGpt(context: ToolCallContext, parameters: z.infer<typeof GoToGoogleMapsStreetViewGptSchema>): Promise<ToolCallResult>;
39
- private setStreetView;
40
- private setStreetViewUsingQuery;
41
- /**
42
- * Remove UI elements that can distract the GPT when performing an analysis. This is a fragile
43
- * script and will break depending on the device used and on the whims of Google.
44
- */
45
- private cleanupUiElements;
46
- }
47
- //# sourceMappingURL=GoToGoogleMapsStreetViewTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GoToGoogleMapsStreetViewTool.d.ts","sourceRoot":"","sources":["../../src/tools/GoToGoogleMapsStreetViewTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kCAAkC;;;;;;;;;EAK7C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;EAE7C,CAAC;AAEF;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,IAAI,CACpD,OAAO,kCAAkC,EACzC,OAAO,iCAAiC,CACzC;IACC,gBAAuB,IAAI,8BAA8B;;IAWnC,IAAI,CACxB,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,GAC7D,OAAO,CAAC,cAAc,CAAC;IAsBV,WAAW,CACzB,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,GAC5D,OAAO,CAAC,cAAc,CAAC;YAIZ,aAAa;YAab,uBAAuB;IA4BrC;;;OAGG;YACW,iBAAiB;CAkDhC"}
@@ -1,126 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GoToGoogleMapsStreetViewTool = exports.GoToGoogleMapsStreetViewGptSchema = exports.GoToGoogleMapsStreetViewCoreSchema = void 0;
4
- const Tool_1 = require("./Tool");
5
- const ToolCallResult_1 = require("../models/ToolCallResult");
6
- const AggregateExtractedStreetviewDataTool_1 = require("./AggregateExtractedStreetviewDataTool");
7
- const ToolSchema_1 = require("../models/ToolSchema");
8
- const PlaywrightUtils_1 = require("../utils/PlaywrightUtils");
9
- const MiscUtils_1 = require("../utils/MiscUtils");
10
- const Logger_1 = require("../utils/Logger");
11
- const zod_1 = require("zod");
12
- exports.GoToGoogleMapsStreetViewCoreSchema = zod_1.z.object({
13
- entityName: zod_1.z.string().describe('The name of the business/entity to find.'),
14
- entityLocation: zod_1.z
15
- .string()
16
- .describe('The address of the business/entity to find.'),
17
- });
18
- exports.GoToGoogleMapsStreetViewGptSchema = ToolSchema_1.BaseGptArgsSchema.merge(exports.GoToGoogleMapsStreetViewCoreSchema);
19
- /**
20
- * Attempts to verify that the given business/entity exists at the given location by using a Google
21
- * Maps street view. If the business/entity is found, then a AggregateExtractedStreetviewDataTool
22
- * tool call is queued containing the results.
23
- */
24
- class GoToGoogleMapsStreetViewTool extends Tool_1.Tool {
25
- constructor() {
26
- super(GoToGoogleMapsStreetViewTool.NAME, 'Go to the Google Maps street view of a given business/entity by name and location.', exports.GoToGoogleMapsStreetViewCoreSchema, exports.GoToGoogleMapsStreetViewGptSchema);
27
- }
28
- async call(context, parameters) {
29
- const page = context.page.current;
30
- const entityName = parameters.entityName.trim();
31
- const entityLocation = parameters.entityLocation.trim();
32
- if (!(await this.setStreetView(entityName, entityLocation, page))) {
33
- context.proposedToolCalls.length = 0;
34
- context.proposedToolCalls.push({
35
- name: AggregateExtractedStreetviewDataTool_1.AggregateExtractedStreetviewDataTool.NAME,
36
- parameters: {},
37
- });
38
- return {
39
- isSuccessful: false,
40
- forLlm: 'Unable to set the street-view mode for Google Maps!',
41
- metadata: null,
42
- };
43
- }
44
- else {
45
- await PlaywrightUtils_1.PlaywrightUtils.waitForPageStability(page);
46
- return ToolCallResult_1.ToolCallResult.successful();
47
- }
48
- }
49
- callFromGpt(context, parameters) {
50
- return this.call(context, parameters);
51
- }
52
- async setStreetView(entityName, entityLocation, page) {
53
- const googleMapsCombinedQuery = `${entityName} ${entityLocation}`.trim();
54
- // TODO: Try using the peg-man if these calls fail.
55
- return ((await this.setStreetViewUsingQuery(googleMapsCombinedQuery, page)) ||
56
- (await this.setStreetViewUsingQuery(entityLocation, page)));
57
- }
58
- async setStreetViewUsingQuery(googleMapsQuery, page) {
59
- const encodedQuery = encodeURIComponent(googleMapsQuery);
60
- const googleMapsUrl = 'https://www.google.com/maps/search/?api=1&map_action=pano&query=' +
61
- encodedQuery;
62
- await page.goto(googleMapsUrl);
63
- await page.waitForLoadState();
64
- const streetViewButton = page.locator('button[aria-label="Street View"]');
65
- try {
66
- await streetViewButton.waitFor({ timeout: 10000 });
67
- await streetViewButton.click({
68
- delay: MiscUtils_1.MiscUtils.generateHumanLikeClickDurationInMs(),
69
- });
70
- await page.waitForLoadState();
71
- await page.waitForTimeout(2559);
72
- await this.cleanupUiElements(page);
73
- return true;
74
- }
75
- catch (error) {
76
- Logger_1.appLogger.error(`Failed to set street view for ${googleMapsUrl}`, error);
77
- return false;
78
- }
79
- }
80
- /**
81
- * Remove UI elements that can distract the GPT when performing an analysis. This is a fragile
82
- * script and will break depending on the device used and on the whims of Google.
83
- */
84
- async cleanupUiElements(page) {
85
- await page.evaluate(() => {
86
- const removeElement = (element) => {
87
- if (element) {
88
- element.remove();
89
- }
90
- };
91
- // This is the search box.
92
- removeElement(document.querySelector('#omnibox-singlebox'));
93
- // This is miscellaneous footer data.
94
- removeElement(document.querySelector('.id-fineprint'));
95
- // This is a display card overlay.
96
- removeElement(document.querySelector('#titlecard'));
97
- // This is the picture-in-picture box.
98
- removeElement(Array.from(document.querySelectorAll('div[style]')).find((el) => el.style.marginBottom === '20px'));
99
- // Remove the "Share" and "Close" buttons.
100
- removeElement(document.querySelector('#image-header'));
101
- // Collapse the side panel.
102
- let isSidePanelCollapsed = false;
103
- // Step 1: Select the button element using the aria-label and jsaction attributes
104
- const buttonElement = document.querySelector('button[aria-label="Collapse side panel"][jsaction*="drawer.close"]');
105
- // Check if the button element is selected
106
- if (buttonElement) {
107
- // Step 2: Find the img element within the button
108
- const imgElement = buttonElement.querySelector('img');
109
- // Check if the img element is found within the button
110
- if (imgElement) {
111
- // Step 3: Click!
112
- imgElement.click();
113
- isSidePanelCollapsed = true;
114
- }
115
- }
116
- if (!isSidePanelCollapsed) {
117
- // Hack it.
118
- removeElement(Array.from(document.querySelectorAll('div[style]')).find((el) => el.style.width === '480px'));
119
- }
120
- });
121
- await page.waitForLoadState();
122
- }
123
- }
124
- exports.GoToGoogleMapsStreetViewTool = GoToGoogleMapsStreetViewTool;
125
- GoToGoogleMapsStreetViewTool.NAME = 'goToGoogleMapsStreetView';
126
- //# sourceMappingURL=GoToGoogleMapsStreetViewTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GoToGoogleMapsStreetViewTool.js","sourceRoot":"","sources":["../../src/tools/GoToGoogleMapsStreetViewTool.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B,6DAA0D;AAE1D,iGAA8F;AAC9F,qDAAyD;AACzD,8DAA2D;AAC3D,kDAA+C;AAC/C,4CAA4C;AAC5C,6BAAwB;AAEX,QAAA,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACzD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC3E,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,CAAC,6CAA6C,CAAC;CAC3D,CAAC,CAAC;AAEU,QAAA,iCAAiC,GAAG,8BAAiB,CAAC,KAAK,CACtE,0CAAkC,CACnC,CAAC;AAEF;;;;GAIG;AACH,MAAa,4BAA6B,SAAQ,WAGjD;IAGC;QACE,KAAK,CACH,4BAA4B,CAAC,IAAI,EACjC,oFAAoF,EACpF,0CAAkC,EAClC,yCAAiC,CAClC,CAAC;IACJ,CAAC;IAEe,KAAK,CAAC,IAAI,CACxB,OAAwB,EACxB,UAA8D;QAE9D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAQ,CAAC;QACnC,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAChD,MAAM,cAAc,GAAG,UAAU,CAAC,cAAc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CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CACtD,CAAC,EAAE,EAAE,EAAE,CAAE,EAAkB,CAAC,KAAK,CAAC,YAAY,KAAK,MAAM,CAC1D,CACF,CAAC;YACF,0CAA0C;YAC1C,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC;YACvD,2BAA2B;YAC3B,IAAI,oBAAoB,GAAG,KAAK,CAAC;YACjC,iFAAiF;YACjF,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAC1C,oEAAoE,CACrE,CAAC;YACF,0CAA0C;YAC1C,IAAI,aAAa,EAAE,CAAC;gBAClB,iDAAiD;gBACjD,MAAM,UAAU,GAAG,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBACtD,sDAAsD;gBACtD,IAAI,UAAU,EAAE,CAAC;oBACf,iBAAiB;oBACjB,UAAU,CAAC,KAAK,EAAE,CAAC;oBACnB,oBAAoB,GAAG,IAAI,CAAC;gBAC9B,CAAC;YACH,CAAC;YAED,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC1B,WAAW;gBACX,aAAa,CACX,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CACtD,CAAC,EAAE,EAAE,EAAE,CAAE,EAAkB,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,CACpD,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC;;AA7IH,oEA8IC;AA1IwB,iCAAI,GAAG,0BAA0B,CAAC"}
@@ -1,54 +0,0 @@
1
- import { Tool } from './Tool';
2
- import { ToolCallContext } from '../models/ToolCallContext';
3
- import { ToolCallResult } from '../models/ToolCallResult';
4
- import { Page } from 'playwright';
5
- import { z } from 'zod';
6
- export declare const Action: z.ZodEnum<["ROTATE_CLOCKWISE", "ROTATE_COUNTERCLOCKWISE", "ZOOM_IN", "ZOOM_OUT"]>;
7
- export declare const NavigateWithinStreetViewCoreSchema: z.ZodObject<{
8
- /**
9
- * Choose a value that will most likely help towards the current objective.
10
- * - A value of ZOOM_IN will zoom in on current street maps view.
11
- * - A value of ZOOM_OUT will zoom out on current street maps view.
12
- * - A value of ROTATE_CLOCKWISE will rotate the current street maps view clockwise.
13
- * - A value of ROTATE_COUNTERCLOCKWISE will rotate the current street maps view counterclockwise.
14
- */
15
- action: z.ZodEnum<["ROTATE_CLOCKWISE", "ROTATE_COUNTERCLOCKWISE", "ZOOM_IN", "ZOOM_OUT"]>;
16
- }, "strip", z.ZodTypeAny, {
17
- action: "ROTATE_CLOCKWISE" | "ROTATE_COUNTERCLOCKWISE" | "ZOOM_IN" | "ZOOM_OUT";
18
- }, {
19
- action: "ROTATE_CLOCKWISE" | "ROTATE_COUNTERCLOCKWISE" | "ZOOM_IN" | "ZOOM_OUT";
20
- }>;
21
- export declare const NavigateWithinStreetViewGptSchema: z.ZodObject<{
22
- rationale: z.ZodString;
23
- } & {
24
- /**
25
- * Choose a value that will most likely help towards the current objective.
26
- * - A value of ZOOM_IN will zoom in on current street maps view.
27
- * - A value of ZOOM_OUT will zoom out on current street maps view.
28
- * - A value of ROTATE_CLOCKWISE will rotate the current street maps view clockwise.
29
- * - A value of ROTATE_COUNTERCLOCKWISE will rotate the current street maps view counterclockwise.
30
- */
31
- action: z.ZodEnum<["ROTATE_CLOCKWISE", "ROTATE_COUNTERCLOCKWISE", "ZOOM_IN", "ZOOM_OUT"]>;
32
- }, "strip", z.ZodTypeAny, {
33
- rationale: string;
34
- action: "ROTATE_CLOCKWISE" | "ROTATE_COUNTERCLOCKWISE" | "ZOOM_IN" | "ZOOM_OUT";
35
- }, {
36
- rationale: string;
37
- action: "ROTATE_CLOCKWISE" | "ROTATE_COUNTERCLOCKWISE" | "ZOOM_IN" | "ZOOM_OUT";
38
- }>;
39
- export declare class NavigateWithinStreetViewTool extends Tool<typeof NavigateWithinStreetViewCoreSchema, typeof NavigateWithinStreetViewGptSchema> {
40
- static readonly NAME = "navigateWithinStreetView";
41
- constructor();
42
- call(context: ToolCallContext, parameters: z.infer<typeof NavigateWithinStreetViewCoreSchema>): Promise<ToolCallResult>;
43
- callFromGpt(context: ToolCallContext, parameters: z.infer<typeof NavigateWithinStreetViewGptSchema>): Promise<ToolCallResult>;
44
- /**
45
- * Removes the Google Maps survey iframe from the given Page.
46
- * If no survey exists, this call has no effect.
47
- *
48
- * @param page - The Playwright Page object to remove the survey from
49
- */
50
- static removeGoogleMapsSurvey(page: Page): Promise<void>;
51
- private static rotateStreetView;
52
- private static zoomStreetView;
53
- }
54
- //# sourceMappingURL=NavigateWithinStreetView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NavigateWithinStreetView.d.ts","sourceRoot":"","sources":["../../src/tools/NavigateWithinStreetView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM,mFAKjB,CAAC;AAEH,eAAO,MAAM,kCAAkC;IAC7C;;;;;;OAMG;;;;;;EAEH,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;IAV5C;;;;;;OAMG;;;;;;;;EAMJ,CAAC;AAEF,qBAAa,4BAA6B,SAAQ,IAAI,CACpD,OAAO,kCAAkC,EACzC,OAAO,iCAAiC,CACzC;IACC,gBAAuB,IAAI,8BAA8B;;IAWnC,IAAI,CACxB,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,GAC7D,OAAO,CAAC,cAAc,CAAC;IA8DV,WAAW,CACzB,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,GAC5D,OAAO,CAAC,cAAc,CAAC;IAI1B;;;;;OAKG;WACiB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;mBAQhD,gBAAgB;mBAwBhB,cAAc;CAqBpC"}
@@ -1,119 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NavigateWithinStreetViewTool = exports.NavigateWithinStreetViewGptSchema = exports.NavigateWithinStreetViewCoreSchema = exports.Action = void 0;
4
- const Tool_1 = require("./Tool");
5
- const ToolCallResult_1 = require("../models/ToolCallResult");
6
- const GoToGoogleMapsStreetViewTool_1 = require("./GoToGoogleMapsStreetViewTool");
7
- const ExtractGoogleStreetviewEntityDataTool_1 = require("./ExtractGoogleStreetviewEntityDataTool");
8
- const ToolSchema_1 = require("../models/ToolSchema");
9
- const PlaywrightUtils_1 = require("../utils/PlaywrightUtils");
10
- const MiscUtils_1 = require("../utils/MiscUtils");
11
- const zod_1 = require("zod");
12
- exports.Action = zod_1.z.enum([
13
- 'ROTATE_CLOCKWISE',
14
- 'ROTATE_COUNTERCLOCKWISE',
15
- 'ZOOM_IN',
16
- 'ZOOM_OUT',
17
- ]);
18
- exports.NavigateWithinStreetViewCoreSchema = zod_1.z.object({
19
- /**
20
- * Choose a value that will most likely help towards the current objective.
21
- * - A value of ZOOM_IN will zoom in on current street maps view.
22
- * - A value of ZOOM_OUT will zoom out on current street maps view.
23
- * - A value of ROTATE_CLOCKWISE will rotate the current street maps view clockwise.
24
- * - A value of ROTATE_COUNTERCLOCKWISE will rotate the current street maps view counterclockwise.
25
- */
26
- action: exports.Action,
27
- });
28
- exports.NavigateWithinStreetViewGptSchema = ToolSchema_1.BaseGptArgsSchema.merge(exports.NavigateWithinStreetViewCoreSchema);
29
- class NavigateWithinStreetViewTool extends Tool_1.Tool {
30
- constructor() {
31
- super(NavigateWithinStreetViewTool.NAME, 'Zoom in or out or rotate clockwise or counterclockwise on Google Street View.', exports.NavigateWithinStreetViewCoreSchema, exports.NavigateWithinStreetViewGptSchema);
32
- }
33
- async call(context, parameters) {
34
- const page = context.page.current;
35
- await NavigateWithinStreetViewTool.removeGoogleMapsSurvey(page);
36
- let isSuccess;
37
- if (parameters.action === exports.Action.enum.ROTATE_CLOCKWISE ||
38
- parameters.action === exports.Action.enum.ROTATE_COUNTERCLOCKWISE) {
39
- // First zoom out before rotating so that we do not miss content.
40
- await NavigateWithinStreetViewTool.zoomStreetView(page, exports.Action.enum.ZOOM_OUT);
41
- isSuccess = await NavigateWithinStreetViewTool.rotateStreetView(page, parameters.action);
42
- }
43
- else {
44
- isSuccess = await NavigateWithinStreetViewTool.zoomStreetView(page, parameters.action);
45
- }
46
- const goToGoogleMapsStreetViewTool = new GoToGoogleMapsStreetViewTool_1.GoToGoogleMapsStreetViewTool();
47
- // Queue a ExtractGoogleStreetviewEntityDataTool call if one is not already planned.
48
- const isExtractToolAlreadyProposed = context.proposedToolCalls.some((call) => call.name === ExtractGoogleStreetviewEntityDataTool_1.ExtractGoogleStreetviewEntityDataTool.NAME);
49
- if (!isExtractToolAlreadyProposed) {
50
- // Extract the target business/entity name from the original GoToGoogleMapsStreetViewTool tool call.
51
- const originalToolCall = context.invokedToolCalls.find((tc) => tc.toolName === goToGoogleMapsStreetViewTool.name);
52
- if (originalToolCall) {
53
- const entityName = originalToolCall.parameters.entityName;
54
- const extractEntityDataProposedToolCall = {
55
- name: ExtractGoogleStreetviewEntityDataTool_1.ExtractGoogleStreetviewEntityDataTool.NAME,
56
- parameters: {
57
- entityName,
58
- },
59
- };
60
- context.proposedToolCalls.push(extractEntityDataProposedToolCall);
61
- }
62
- }
63
- await PlaywrightUtils_1.PlaywrightUtils.waitForPageStability(page);
64
- return isSuccess
65
- ? ToolCallResult_1.ToolCallResult.successful()
66
- : {
67
- isSuccessful: false,
68
- forLlm: 'FAILED',
69
- metadata: null,
70
- };
71
- }
72
- callFromGpt(context, parameters) {
73
- return this.call(context, parameters);
74
- }
75
- /**
76
- * Removes the Google Maps survey iframe from the given Page.
77
- * If no survey exists, this call has no effect.
78
- *
79
- * @param page - The Playwright Page object to remove the survey from
80
- */
81
- static async removeGoogleMapsSurvey(page) {
82
- return page.evaluate(() => {
83
- document.querySelectorAll('#google-hats-survey').forEach((element) => {
84
- element.remove();
85
- });
86
- });
87
- }
88
- static async rotateStreetView(googleMapsPage, direction) {
89
- const rotateDirection = direction === exports.Action.enum.ROTATE_COUNTERCLOCKWISE
90
- ? 'Rotate the view counterclockwise'
91
- : 'Rotate the view clockwise';
92
- const rotateStreetViewButton = await googleMapsPage.$(`button[aria-label="${rotateDirection}"]`);
93
- if (rotateStreetViewButton) {
94
- await rotateStreetViewButton.click({
95
- delay: MiscUtils_1.MiscUtils.generateHumanLikeClickDurationInMs(),
96
- });
97
- await googleMapsPage.waitForLoadState();
98
- await googleMapsPage.waitForTimeout(931);
99
- return true;
100
- }
101
- return false;
102
- }
103
- static async zoomStreetView(googleMapsPage, direction) {
104
- const zoomDirection = direction === exports.Action.enum.ZOOM_OUT ? 'Zoom out' : 'Zoom in';
105
- const zoomStreetViewButton = await googleMapsPage.$(`button[aria-label="${zoomDirection}"]`);
106
- if (zoomStreetViewButton && !(await zoomStreetViewButton.isDisabled())) {
107
- await zoomStreetViewButton.click({
108
- delay: MiscUtils_1.MiscUtils.generateHumanLikeClickDurationInMs(),
109
- });
110
- await googleMapsPage.waitForLoadState();
111
- await googleMapsPage.waitForTimeout(931);
112
- return true;
113
- }
114
- return false;
115
- }
116
- }
117
- exports.NavigateWithinStreetViewTool = NavigateWithinStreetViewTool;
118
- NavigateWithinStreetViewTool.NAME = 'navigateWithinStreetView';
119
- //# sourceMappingURL=NavigateWithinStreetView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NavigateWithinStreetView.js","sourceRoot":"","sources":["../../src/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