gtmmaxing 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gtm.js +1058 -41
- package/package.json +10 -11
package/dist/gtm.js
CHANGED
|
@@ -2981,7 +2981,7 @@ function isValidCIDRv6(value) {
|
|
|
2981
2981
|
const parts = value.split("/");
|
|
2982
2982
|
if (parts.length !== 2)
|
|
2983
2983
|
return false;
|
|
2984
|
-
const [
|
|
2984
|
+
const [address2, prefix] = parts;
|
|
2985
2985
|
if (!prefix)
|
|
2986
2986
|
return false;
|
|
2987
2987
|
const prefixNum = Number(prefix);
|
|
@@ -2989,7 +2989,7 @@ function isValidCIDRv6(value) {
|
|
|
2989
2989
|
return false;
|
|
2990
2990
|
if (prefixNum < 0 || prefixNum > 128)
|
|
2991
2991
|
return false;
|
|
2992
|
-
return isValidIPv6(
|
|
2992
|
+
return isValidIPv6(address2);
|
|
2993
2993
|
}
|
|
2994
2994
|
var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
2995
2995
|
def.pattern ?? (def.pattern = cidrv6);
|
|
@@ -18878,15 +18878,21 @@ var TOOL_CATALOG = {
|
|
|
18878
18878
|
"local-leads": { name: "Local business leads", credits: 1, unit: "search (up to 20 businesses)", limit: 20 },
|
|
18879
18879
|
website: { name: "Website brief", credits: 1, unit: "brief", limit: 1 },
|
|
18880
18880
|
icp: { name: "Decision-maker finder", credits: 2, unit: "search (up to 10 profiles)", limit: 10 },
|
|
18881
|
-
signals: { name: "Hiring signals", credits: 1, unit: "search (up to
|
|
18881
|
+
signals: { name: "Hiring signals", credits: 1, unit: "search (up to 50 companies)", limit: 50 },
|
|
18882
18882
|
"verify-email": { name: "Email verification", credits: 2, unit: "definitive verification", limit: 1 },
|
|
18883
18883
|
"phone-pilot": { name: "Mobile enrichment", credits: 5, unit: "returned number", limit: 1 },
|
|
18884
|
-
"people-search": { name: "People search", credits: 2, unit: "search (up to
|
|
18884
|
+
"people-search": { name: "People search", credits: 2, unit: "search (up to 100 people)", limit: 100 },
|
|
18885
18885
|
"google-search": { name: "Google search", credits: 1, unit: "search (up to 20 results)", limit: 20 },
|
|
18886
18886
|
"linkedin-profile": { name: "LinkedIn profile", credits: 1, unit: "profile", limit: 1 },
|
|
18887
18887
|
"linkedin-activity": { name: "LinkedIn activity", credits: 1, unit: "profile with posts", limit: 1 },
|
|
18888
18888
|
"profile-finder": { name: "Find LinkedIn profile", credits: 1, unit: "profile found", limit: 1 },
|
|
18889
|
-
"page-content": { name: "Web page content", credits: 1, unit: "page", limit: 1 }
|
|
18889
|
+
"page-content": { name: "Web page content", credits: 1, unit: "page", limit: 1 },
|
|
18890
|
+
"instagram-profile": { name: "Instagram profile", credits: 1, unit: "profile", limit: 1 },
|
|
18891
|
+
"x-search": { name: "X post search", credits: 1, unit: "search (up to 20 posts)", limit: 20 },
|
|
18892
|
+
"reddit-search": { name: "Reddit post search", credits: 1, unit: "search (up to 20 posts)", limit: 20 },
|
|
18893
|
+
"funding-signals": { name: "Funding signals", credits: 1, unit: "search (up to 50 companies)", limit: 50 },
|
|
18894
|
+
"lookalike-companies": { name: "Lookalike companies", credits: 2, unit: "search", limit: 50 },
|
|
18895
|
+
"post-engagers": { name: "LinkedIn post engagers", credits: 1, unit: "post (up to 100 people)", limit: 100 }
|
|
18890
18896
|
};
|
|
18891
18897
|
var toolIdSchema = external_exports.enum(Object.keys(TOOL_CATALOG));
|
|
18892
18898
|
function publicWebsite(value) {
|
|
@@ -18898,6 +18904,13 @@ function publicWebsite(value) {
|
|
|
18898
18904
|
return false;
|
|
18899
18905
|
}
|
|
18900
18906
|
}
|
|
18907
|
+
var INSTAGRAM_HANDLE = /^[A-Za-z0-9._]{1,30}$/;
|
|
18908
|
+
function instagramHandle(value) {
|
|
18909
|
+
const trimmed = value.trim().replace(/^@/, "");
|
|
18910
|
+
const match = /^(?:https?:\/\/)?(?:www\.)?instagram\.com\/([A-Za-z0-9._]{1,30})\/?(?:[?#].*)?$/i.exec(trimmed);
|
|
18911
|
+
return (match ? match[1] : trimmed).toLowerCase();
|
|
18912
|
+
}
|
|
18913
|
+
var SEARCH_WINDOWS = ["day", "week", "month", "year"];
|
|
18901
18914
|
var websiteUrl = (value) => /^https:\/\//i.test(value.trim()) ? value.trim() : `https://${value.trim().replace(/^http:\/\//i, "")}`;
|
|
18902
18915
|
var toolRequestSchema = external_exports.object({
|
|
18903
18916
|
tool: toolIdSchema,
|
|
@@ -18910,20 +18923,40 @@ var toolRequestSchema = external_exports.object({
|
|
|
18910
18923
|
titles: external_exports.string().trim().max(200).default(""),
|
|
18911
18924
|
/** LinkedIn activity: comma-separated topics to look for in posts. Optional so older saved requests keep their hash. */
|
|
18912
18925
|
keywords: external_exports.string().trim().max(300).optional(),
|
|
18913
|
-
|
|
18926
|
+
/** X and Reddit search: how far back to look. Optional so older saved requests keep their hash. */
|
|
18927
|
+
within: external_exports.enum(SEARCH_WINDOWS).optional(),
|
|
18928
|
+
/** People search and hiring signals: exact directory labels from filters.ts. Optional so older saved requests keep their hash. */
|
|
18929
|
+
industries: external_exports.array(external_exports.string().trim().min(1).max(400)).max(20).optional(),
|
|
18930
|
+
companySizes: external_exports.array(external_exports.string().trim().min(1).max(20)).max(9).optional(),
|
|
18931
|
+
/** People search: words in the company's own description. */
|
|
18932
|
+
companyWords: external_exports.array(external_exports.string().trim().min(1).max(60)).max(10).optional(),
|
|
18933
|
+
/** Funding signals: announced on or after this date. */
|
|
18934
|
+
since: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
18935
|
+
/** Results page, from 1. */
|
|
18936
|
+
page: external_exports.number().int().min(1).max(100).optional(),
|
|
18937
|
+
limit: external_exports.number().int().min(1).max(100).default(10)
|
|
18914
18938
|
}).strict().superRefine((v, c) => {
|
|
18915
18939
|
const reject = (message) => c.addIssue({ code: "custom", path: ["query"], message });
|
|
18916
18940
|
if (v.careerBoard && !/^https:\/\/(boards\.greenhouse\.io|jobs\.lever\.co)\/[a-zA-Z0-9_-]+\/?$/.test(v.careerBoard)) reject("Use a public Greenhouse or Lever company board URL.");
|
|
18917
18941
|
if (["website", "page-content", "seo-aeo-audit"].includes(v.tool) && !publicWebsite(websiteUrl(v.query))) reject("Enter a company website, like vercel.com.");
|
|
18918
|
-
if (["company", "icp"].includes(v.tool) && !publicWebsite(`https://${v.query.replace(/^https?:\/\//, "").replace(/\/$/, "")}`)) reject("Enter a public company domain.");
|
|
18942
|
+
if (["company", "icp", "lookalike-companies"].includes(v.tool) && !publicWebsite(`https://${v.query.replace(/^https?:\/\//, "").replace(/\/$/, "")}`)) reject("Enter a public company domain.");
|
|
18919
18943
|
if (v.tool === "local-leads" && !v.location) reject("Add a city or region.");
|
|
18920
18944
|
if (v.tool === "profile-finder" && !v.company) c.addIssue({ code: "custom", path: ["company"], message: "Add the person's company." });
|
|
18921
18945
|
if (v.tool === "verify-email" && !external_exports.string().email().safeParse(v.query).success) reject("Enter an email address.");
|
|
18946
|
+
if (v.tool === "instagram-profile" && !INSTAGRAM_HANDLE.test(v.query)) reject("Enter an Instagram username, like gymshark.");
|
|
18947
|
+
const badFilter = v.industries?.find((industry) => industry.startsWith("invalid:"));
|
|
18948
|
+
if (badFilter) c.addIssue({ code: "custom", path: ["industries"], message: badFilter.slice(8) });
|
|
18949
|
+
if (v.within && !["x-search", "reddit-search"].includes(v.tool)) c.addIssue({ code: "custom", path: ["within"], message: "Only post searches take a time window." });
|
|
18950
|
+
if (v.tool === "post-engagers" && !/^https:\/\/([a-z]{2,3}\.)?linkedin\.com\/(posts|feed\/update)\//.test(v.query)) reject("Enter a LinkedIn post URL.");
|
|
18922
18951
|
if (["phone-pilot", "linkedin-profile", "linkedin-activity"].includes(v.tool) && !/^https:\/\/(www\.)?linkedin\.com\/in\/[a-zA-Z0-9%_-]+\/?$/.test(v.query)) reject("Enter a LinkedIn profile URL.");
|
|
18923
18952
|
});
|
|
18924
18953
|
var toolResultSchema = external_exports.object({
|
|
18925
|
-
rows: external_exports.array(external_exports.record(external_exports.string(), external_exports.union([external_exports.string().max(1e5), external_exports.number(), external_exports.boolean(), external_exports.null()]))).max(
|
|
18926
|
-
notes: external_exports.array(external_exports.string().max(500)).max(10)
|
|
18954
|
+
rows: external_exports.array(external_exports.record(external_exports.string(), external_exports.union([external_exports.string().max(1e5), external_exports.number(), external_exports.boolean(), external_exports.null()]))).max(100),
|
|
18955
|
+
notes: external_exports.array(external_exports.string().max(500)).max(10),
|
|
18956
|
+
/** There are more results: the next page and, when the source says, how many match in all. */
|
|
18957
|
+
more: external_exports.object({ page: external_exports.number().int().positive(), total: external_exports.number().int().nonnegative().optional() }).optional(),
|
|
18958
|
+
/** Companies dropped before the rows, by why. */
|
|
18959
|
+
left: external_exports.record(external_exports.string(), external_exports.number().int().nonnegative()).optional()
|
|
18927
18960
|
});
|
|
18928
18961
|
var toolRunSchema = external_exports.object({
|
|
18929
18962
|
id: external_exports.string(),
|
|
@@ -18939,12 +18972,548 @@ var toolRunSchema = external_exports.object({
|
|
|
18939
18972
|
var toolRunResponseSchema = external_exports.object({ run: toolRunSchema, credits: external_exports.number().int().nonnegative() });
|
|
18940
18973
|
var toolRunsResponseSchema = external_exports.object({ runs: external_exports.array(toolRunSchema), credits: external_exports.number().int().nonnegative() });
|
|
18941
18974
|
|
|
18975
|
+
// ../contracts/src/filters.ts
|
|
18976
|
+
var COMPANY_SIZES = ["< 5", "5 - 19", "20 - 99", "100 - 249", "250 - 499", "500 - 999", "1000 - 4999", "5000 - 9999", ">10000"];
|
|
18977
|
+
var INDUSTRIES = [
|
|
18978
|
+
"Abrasives and Nonmetallic Minerals Manufacturing",
|
|
18979
|
+
"Accessible Architecture and Design",
|
|
18980
|
+
"Accessible Hardware Manufacturing",
|
|
18981
|
+
"Accommodation",
|
|
18982
|
+
"Accommodation and Food Services",
|
|
18983
|
+
"Accounting",
|
|
18984
|
+
"Administration of Justice",
|
|
18985
|
+
"Administrative and Support Services",
|
|
18986
|
+
"Advertising Services",
|
|
18987
|
+
"Agricultural Chemical Manufacturing",
|
|
18988
|
+
"Agriculture",
|
|
18989
|
+
"Agriculture, Construction, Mining Machinery Manufacturing",
|
|
18990
|
+
"Air, Water, and Waste Program Management",
|
|
18991
|
+
"Airlines and Aviation",
|
|
18992
|
+
"Alternative Dispute Resolution",
|
|
18993
|
+
"Alternative Fuel Vehicle Manufacturing",
|
|
18994
|
+
"Alternative Medicine",
|
|
18995
|
+
"Ambulance Services",
|
|
18996
|
+
"Amusement Parks and Arcades",
|
|
18997
|
+
"Animal Feed Manufacturing",
|
|
18998
|
+
"Animation and Post-production",
|
|
18999
|
+
"Apparel Manufacturing",
|
|
19000
|
+
"Appliances, Electrical, and Electronics Manufacturing",
|
|
19001
|
+
"Architectural and Structural Metal Manufacturing",
|
|
19002
|
+
"Architecture and Planning",
|
|
19003
|
+
"Armed Forces",
|
|
19004
|
+
"Artificial Rubber and Synthetic Fiber Manufacturing",
|
|
19005
|
+
"Artists and Writers",
|
|
19006
|
+
"Arts & Crafts",
|
|
19007
|
+
"Audio and Video Equipment Manufacturing",
|
|
19008
|
+
"Automation Machinery Manufacturing",
|
|
19009
|
+
"Aviation and Aerospace Component Manufacturing",
|
|
19010
|
+
"Baked Goods Manufacturing",
|
|
19011
|
+
"Banking",
|
|
19012
|
+
"Bars, Taverns, and Nightclubs",
|
|
19013
|
+
"Beverage Manufacturing",
|
|
19014
|
+
"Biomass Electric Power Generation",
|
|
19015
|
+
"Biotechnology Research",
|
|
19016
|
+
"Blockchain Services",
|
|
19017
|
+
"Blogs",
|
|
19018
|
+
"Boilers, Tanks, and Shipping Container Manufacturing",
|
|
19019
|
+
"Book and Periodical Publishing",
|
|
19020
|
+
"Book Publishing",
|
|
19021
|
+
"Breweries",
|
|
19022
|
+
"Broadcast Media Production and Distribution",
|
|
19023
|
+
"Building Construction",
|
|
19024
|
+
"Building Equipment Contractors",
|
|
19025
|
+
"Building Finishing Contractors",
|
|
19026
|
+
"Building Materials",
|
|
19027
|
+
"Building Structure and Exterior Contractors",
|
|
19028
|
+
"Business Consulting and Services",
|
|
19029
|
+
"Business Content",
|
|
19030
|
+
"Business Intelligence Platforms",
|
|
19031
|
+
"Business Supplies & Equipment",
|
|
19032
|
+
"Business Supplies and Equipment",
|
|
19033
|
+
"Cable and Satellite Programming",
|
|
19034
|
+
"Capital Markets",
|
|
19035
|
+
"Caterers",
|
|
19036
|
+
"Chemical Manufacturing",
|
|
19037
|
+
"Chemical Raw Materials Manufacturing",
|
|
19038
|
+
"Child Day Care Services",
|
|
19039
|
+
"Chiropractors",
|
|
19040
|
+
"Circuses and Magic Shows",
|
|
19041
|
+
"Civic and Social Organizations",
|
|
19042
|
+
"Civil Engineering",
|
|
19043
|
+
"Claims Adjusting, Actuarial Services",
|
|
19044
|
+
"Clay and Refractory Products Manufacturing",
|
|
19045
|
+
"Climate Data and Analytics",
|
|
19046
|
+
"Climate Technology Product Manufacturing",
|
|
19047
|
+
"Coal Mining",
|
|
19048
|
+
"Collection Agencies",
|
|
19049
|
+
"Commercial and Industrial Equipment Rental",
|
|
19050
|
+
"Commercial and Industrial Machinery Maintenance",
|
|
19051
|
+
"Commercial and Service Industry Machinery Manufacturing",
|
|
19052
|
+
"Communications Equipment Manufacturing",
|
|
19053
|
+
"Community Development and Urban Planning",
|
|
19054
|
+
"Community Services",
|
|
19055
|
+
"Computer and Network Security",
|
|
19056
|
+
"Computer Games",
|
|
19057
|
+
"Computer Hardware Manufacturing",
|
|
19058
|
+
"Computer Networking Products",
|
|
19059
|
+
"Computers and Electronics Manufacturing",
|
|
19060
|
+
"Conservation Programs",
|
|
19061
|
+
"Construction",
|
|
19062
|
+
"Construction Hardware Manufacturing",
|
|
19063
|
+
"Consumer Goods Rental",
|
|
19064
|
+
"Consumer Services",
|
|
19065
|
+
"Correctional Institutions",
|
|
19066
|
+
"Cosmetology and Barber Schools",
|
|
19067
|
+
"Courts of Law",
|
|
19068
|
+
"Credit Intermediation",
|
|
19069
|
+
"Cutlery and Handtool Manufacturing",
|
|
19070
|
+
"Dairy Product Manufacturing",
|
|
19071
|
+
"Dance Companies",
|
|
19072
|
+
"Data Infrastructure and Analytics",
|
|
19073
|
+
"Data Security Software Products",
|
|
19074
|
+
"Defense and Space Manufacturing",
|
|
19075
|
+
"Dentists",
|
|
19076
|
+
"Design Services",
|
|
19077
|
+
"Desktop Computing Software Products",
|
|
19078
|
+
"Digital Accessibility Services",
|
|
19079
|
+
"Distilleries",
|
|
19080
|
+
"E-Learning Providers",
|
|
19081
|
+
"Economic Programs",
|
|
19082
|
+
"Education",
|
|
19083
|
+
"Education Administration Programs",
|
|
19084
|
+
"Electric Lighting Equipment Manufacturing",
|
|
19085
|
+
"Electric Power Generation",
|
|
19086
|
+
"Electric Power Transmission, Control, and Distribution",
|
|
19087
|
+
"Electrical Equipment Manufacturing",
|
|
19088
|
+
"Electronic and Precision Equipment Maintenance",
|
|
19089
|
+
"Embedded Software Products",
|
|
19090
|
+
"Emergency and Relief Services",
|
|
19091
|
+
"Engineering Services",
|
|
19092
|
+
"Engines and Power Transmission Equipment Manufacturing",
|
|
19093
|
+
"Entertainment Providers",
|
|
19094
|
+
"Environmental Quality Programs",
|
|
19095
|
+
"Environmental Services",
|
|
19096
|
+
"Equipment Rental Services",
|
|
19097
|
+
"Events Services",
|
|
19098
|
+
"Executive Offices",
|
|
19099
|
+
"Executive Search Services",
|
|
19100
|
+
"Fabricated Metal Products",
|
|
19101
|
+
"Facilities Services",
|
|
19102
|
+
"Family Planning Centers",
|
|
19103
|
+
"Farming",
|
|
19104
|
+
"Farming, Ranching, Forestry",
|
|
19105
|
+
"Fashion Accessories Manufacturing",
|
|
19106
|
+
"Financial Services",
|
|
19107
|
+
"Fine Art",
|
|
19108
|
+
"Fine Arts Schools",
|
|
19109
|
+
"Fire Protection",
|
|
19110
|
+
"Fisheries",
|
|
19111
|
+
"Flight Training",
|
|
19112
|
+
"Food and Beverage Manufacturing",
|
|
19113
|
+
"Food and Beverage Retail",
|
|
19114
|
+
"Food and Beverage Services",
|
|
19115
|
+
"Food Production",
|
|
19116
|
+
"Footwear and Leather Goods Repair",
|
|
19117
|
+
"Footwear Manufacturing",
|
|
19118
|
+
"Forestry and Logging",
|
|
19119
|
+
"Fossil Fuel Electric Power Generation",
|
|
19120
|
+
"Freight and Package Transportation",
|
|
19121
|
+
"Fruit and Vegetable Preserves Manufacturing",
|
|
19122
|
+
"Fuel Cell Manufacturing",
|
|
19123
|
+
"Fundraising",
|
|
19124
|
+
"Funds and Trusts",
|
|
19125
|
+
"Furniture and Home Furnishings Manufacturing",
|
|
19126
|
+
"Gambling Facilities and Casinos",
|
|
19127
|
+
"Geothermal Electric Power Generation",
|
|
19128
|
+
"Glass Product Manufacturing",
|
|
19129
|
+
"Glass, Ceramics and Concrete Manufacturing",
|
|
19130
|
+
"Golf Courses and Country Clubs",
|
|
19131
|
+
"Government Administration",
|
|
19132
|
+
"Government Relations Services",
|
|
19133
|
+
"Graphic Design",
|
|
19134
|
+
"Ground Passenger Transportation",
|
|
19135
|
+
"Health and Human Services",
|
|
19136
|
+
"Health, Wellness & Fitness",
|
|
19137
|
+
"Higher Education",
|
|
19138
|
+
"Highway, Street, and Bridge Construction",
|
|
19139
|
+
"Historical Sites",
|
|
19140
|
+
"Holding Companies",
|
|
19141
|
+
"Home Health Care Services",
|
|
19142
|
+
"Horticulture",
|
|
19143
|
+
"Hospitality",
|
|
19144
|
+
"Hospitals",
|
|
19145
|
+
"Hospitals and Health Care",
|
|
19146
|
+
"Hotels and Motels",
|
|
19147
|
+
"Household and Institutional Furniture Manufacturing",
|
|
19148
|
+
"Household Appliance Manufacturing",
|
|
19149
|
+
"Household Services",
|
|
19150
|
+
"Housing and Community Development",
|
|
19151
|
+
"Housing Programs",
|
|
19152
|
+
"Human Resources Services",
|
|
19153
|
+
"HVAC and Refrigeration Equipment Manufacturing",
|
|
19154
|
+
"Hydroelectric Power Generation",
|
|
19155
|
+
"Import & Export",
|
|
19156
|
+
"Individual and Family Services",
|
|
19157
|
+
"Industrial Machinery Manufacturing",
|
|
19158
|
+
"Industry Associations",
|
|
19159
|
+
"Information Services",
|
|
19160
|
+
"Information Technology & Services",
|
|
19161
|
+
"Insurance",
|
|
19162
|
+
"Insurance Agencies and Brokerages",
|
|
19163
|
+
"Insurance and Employee Benefit Funds",
|
|
19164
|
+
"Insurance Carriers",
|
|
19165
|
+
"Interior Design",
|
|
19166
|
+
"International Affairs",
|
|
19167
|
+
"International Trade and Development",
|
|
19168
|
+
"Internet Marketplace Platforms",
|
|
19169
|
+
"Internet News",
|
|
19170
|
+
"Internet Publishing",
|
|
19171
|
+
"Interurban and Rural Bus Services",
|
|
19172
|
+
"Investment Advice",
|
|
19173
|
+
"Investment Banking",
|
|
19174
|
+
"Investment Management",
|
|
19175
|
+
"IT Services and IT Consulting",
|
|
19176
|
+
"IT System Custom Software Development",
|
|
19177
|
+
"IT System Data Services",
|
|
19178
|
+
"IT System Design Services",
|
|
19179
|
+
"IT System Installation and Disposal",
|
|
19180
|
+
"IT System Operations and Maintenance",
|
|
19181
|
+
"IT System Testing and Evaluation",
|
|
19182
|
+
"IT System Training and Support",
|
|
19183
|
+
"Janitorial Services",
|
|
19184
|
+
"Landscaping Services",
|
|
19185
|
+
"Language Schools",
|
|
19186
|
+
"Laundry and Drycleaning Services",
|
|
19187
|
+
"Law Enforcement",
|
|
19188
|
+
"Law Practice",
|
|
19189
|
+
"Leasing Non-residential Real Estate",
|
|
19190
|
+
"Leasing Residential Real Estate",
|
|
19191
|
+
"Leather Product Manufacturing",
|
|
19192
|
+
"Legal Services",
|
|
19193
|
+
"Legislative Offices",
|
|
19194
|
+
"Libraries",
|
|
19195
|
+
"Lime and Gypsum Products Manufacturing",
|
|
19196
|
+
"Loan Brokers",
|
|
19197
|
+
"Machinery Manufacturing",
|
|
19198
|
+
"Magnetic and Optical Media Manufacturing",
|
|
19199
|
+
"Manufacturing",
|
|
19200
|
+
"Maritime Transportation",
|
|
19201
|
+
"Market Research",
|
|
19202
|
+
"Marketing Services",
|
|
19203
|
+
"Mattress and Blinds Manufacturing",
|
|
19204
|
+
"Measuring and Control Instrument Manufacturing",
|
|
19205
|
+
"Meat Products Manufacturing",
|
|
19206
|
+
"Media and Telecommunications",
|
|
19207
|
+
"Media Production",
|
|
19208
|
+
"Medical and Diagnostic Laboratories",
|
|
19209
|
+
"Medical Device",
|
|
19210
|
+
"Medical Equipment Manufacturing",
|
|
19211
|
+
"Medical Practices",
|
|
19212
|
+
"Mental Health Care",
|
|
19213
|
+
"Metal Ore Mining",
|
|
19214
|
+
"Metal Treatments",
|
|
19215
|
+
"Metal Valve, Ball, and Roller Manufacturing",
|
|
19216
|
+
"Metalworking Machinery Manufacturing",
|
|
19217
|
+
"Military and International Affairs",
|
|
19218
|
+
"Mining",
|
|
19219
|
+
"Mobile Computing Software Products",
|
|
19220
|
+
"Mobile Food Services",
|
|
19221
|
+
"Mobile Gaming Apps",
|
|
19222
|
+
"Motor Vehicle Manufacturing",
|
|
19223
|
+
"Motor Vehicle Parts Manufacturing",
|
|
19224
|
+
"Movies and Sound Recording",
|
|
19225
|
+
"Movies, Videos, and Sound",
|
|
19226
|
+
"Museums",
|
|
19227
|
+
"Museums, Historical Sites, and Zoos",
|
|
19228
|
+
"Musicians",
|
|
19229
|
+
"Nanotechnology Research",
|
|
19230
|
+
"Natural Gas Distribution",
|
|
19231
|
+
"Natural Gas Extraction",
|
|
19232
|
+
"Newspaper Publishing",
|
|
19233
|
+
"Non-profit Organization Management",
|
|
19234
|
+
"Non-profit Organizations",
|
|
19235
|
+
"Nonmetallic Mineral Mining",
|
|
19236
|
+
"Nonresidential Building Construction",
|
|
19237
|
+
"Nuclear Electric Power Generation",
|
|
19238
|
+
"Nursing Homes and Residential Care Facilities",
|
|
19239
|
+
"Office Administration",
|
|
19240
|
+
"Office Furniture and Fixtures Manufacturing",
|
|
19241
|
+
"Oil and Coal Product Manufacturing",
|
|
19242
|
+
"Oil and Gas",
|
|
19243
|
+
"Oil Extraction",
|
|
19244
|
+
"Oil, Gas, and Mining",
|
|
19245
|
+
"Online and Mail Order Retail",
|
|
19246
|
+
"Online Audio and Video Media",
|
|
19247
|
+
"Operations Consulting",
|
|
19248
|
+
"Optometrists",
|
|
19249
|
+
"Outpatient Care Centers",
|
|
19250
|
+
"Outsourcing and Offshoring Consulting",
|
|
19251
|
+
"Packaging & Containers",
|
|
19252
|
+
"Packaging and Containers Manufacturing",
|
|
19253
|
+
"Paint, Coating, and Adhesive Manufacturing",
|
|
19254
|
+
"Paper and Forest Product Manufacturing",
|
|
19255
|
+
"Pension Funds",
|
|
19256
|
+
"Performing Arts",
|
|
19257
|
+
"Performing Arts and Spectator Sports",
|
|
19258
|
+
"Periodical Publishing",
|
|
19259
|
+
"Personal and Laundry Services",
|
|
19260
|
+
"Personal Care Product Manufacturing",
|
|
19261
|
+
"Personal Care Services",
|
|
19262
|
+
"Pet Services",
|
|
19263
|
+
"Pharmaceutical Manufacturing",
|
|
19264
|
+
"Philanthropic Fundraising Services",
|
|
19265
|
+
"Photography",
|
|
19266
|
+
"Physical, Occupational and Speech Therapists",
|
|
19267
|
+
"Physicians",
|
|
19268
|
+
"Pipeline Transportation",
|
|
19269
|
+
"Plastics and Rubber Product Manufacturing",
|
|
19270
|
+
"Plastics Manufacturing",
|
|
19271
|
+
"Political Organizations",
|
|
19272
|
+
"Postal Services",
|
|
19273
|
+
"Primary and Secondary Education",
|
|
19274
|
+
"Primary Metal Manufacturing",
|
|
19275
|
+
"Primary/Secondary Education",
|
|
19276
|
+
"Printing Services",
|
|
19277
|
+
"Professional Organizations",
|
|
19278
|
+
"Professional Services",
|
|
19279
|
+
"Professional Training & Coaching",
|
|
19280
|
+
"Professional Training and Coaching",
|
|
19281
|
+
"Public Assistance Programs",
|
|
19282
|
+
"Public Health",
|
|
19283
|
+
"Public Policy Offices",
|
|
19284
|
+
"Public Relations and Communications Services",
|
|
19285
|
+
"Public Safety",
|
|
19286
|
+
"Racetracks",
|
|
19287
|
+
"Radio and Television Broadcasting",
|
|
19288
|
+
"Rail Transportation",
|
|
19289
|
+
"Railroad Equipment Manufacturing",
|
|
19290
|
+
"Ranching",
|
|
19291
|
+
"Ranching and Fisheries",
|
|
19292
|
+
"Real Estate",
|
|
19293
|
+
"Real Estate Agents and Brokers",
|
|
19294
|
+
"Real Estate and Equipment Rental Services",
|
|
19295
|
+
"Recreational Facilities",
|
|
19296
|
+
"Regenerative Design",
|
|
19297
|
+
"Religious Institutions",
|
|
19298
|
+
"Renewable Energy Equipment Manufacturing",
|
|
19299
|
+
"Renewable Energy Power Generation",
|
|
19300
|
+
"Renewables & Environment",
|
|
19301
|
+
"Repair and Maintenance",
|
|
19302
|
+
"Research Services",
|
|
19303
|
+
"Residential Building Construction",
|
|
19304
|
+
"Restaurants",
|
|
19305
|
+
"Retail",
|
|
19306
|
+
"Retail Apparel and Fashion",
|
|
19307
|
+
"Retail Appliances, Electrical, and Electronic Equipment",
|
|
19308
|
+
"Retail Art Dealers",
|
|
19309
|
+
"Retail Art Supplies",
|
|
19310
|
+
"Retail Books and Printed News",
|
|
19311
|
+
"Retail Building Materials and Garden Equipment",
|
|
19312
|
+
"Retail Florists",
|
|
19313
|
+
"Retail Furniture and Home Furnishings",
|
|
19314
|
+
"Retail Gasoline",
|
|
19315
|
+
"Retail Groceries",
|
|
19316
|
+
"Retail Health and Personal Care Products",
|
|
19317
|
+
"Retail Luxury Goods and Jewelry",
|
|
19318
|
+
"Retail Motor Vehicles",
|
|
19319
|
+
"Retail Musical Instruments",
|
|
19320
|
+
"Retail Office Equipment",
|
|
19321
|
+
"Retail Office Supplies and Gifts",
|
|
19322
|
+
"Retail Pharmacies",
|
|
19323
|
+
"Retail Recyclable Materials & Used Merchandise",
|
|
19324
|
+
"Reupholstery and Furniture Repair",
|
|
19325
|
+
"Robot Manufacturing",
|
|
19326
|
+
"Robotics Engineering",
|
|
19327
|
+
"Rubber Products Manufacturing",
|
|
19328
|
+
"Satellite Telecommunications",
|
|
19329
|
+
"Savings Institutions",
|
|
19330
|
+
"School and Employee Bus Services",
|
|
19331
|
+
"Seafood Product Manufacturing",
|
|
19332
|
+
"Secretarial Schools",
|
|
19333
|
+
"Securities and Commodity Exchanges",
|
|
19334
|
+
"Security and Investigations",
|
|
19335
|
+
"Security Guards and Patrol Services",
|
|
19336
|
+
"Security Systems Services",
|
|
19337
|
+
"Semiconductor Manufacturing",
|
|
19338
|
+
"Services for Renewable Energy",
|
|
19339
|
+
"Services for the Elderly and Disabled",
|
|
19340
|
+
"Sheet Music Publishing",
|
|
19341
|
+
"Shipbuilding",
|
|
19342
|
+
"Shuttles and Special Needs Transportation Services",
|
|
19343
|
+
"Sightseeing Transportation",
|
|
19344
|
+
"Skiing Facilities",
|
|
19345
|
+
"Smart Meter Manufacturing",
|
|
19346
|
+
"Soap and Cleaning Product Manufacturing",
|
|
19347
|
+
"Social Networking Platforms",
|
|
19348
|
+
"Software Development",
|
|
19349
|
+
"Solar Electric Power Generation",
|
|
19350
|
+
"Sound Recording",
|
|
19351
|
+
"Space Research and Technology",
|
|
19352
|
+
"Specialty Trade Contractors",
|
|
19353
|
+
"Spectator Sports",
|
|
19354
|
+
"Sporting Goods Manufacturing",
|
|
19355
|
+
"Sports and Recreation Instruction",
|
|
19356
|
+
"Sports Teams and Clubs",
|
|
19357
|
+
"Spring and Wire Product Manufacturing",
|
|
19358
|
+
"Staffing and Recruiting",
|
|
19359
|
+
"Steam and Air-Conditioning Supply",
|
|
19360
|
+
"Strategic Management Services",
|
|
19361
|
+
"Subdivision of Land",
|
|
19362
|
+
"Sugar and Confectionery Product Manufacturing",
|
|
19363
|
+
"Surveying and Mapping Services",
|
|
19364
|
+
"Taxi and Limousine Services",
|
|
19365
|
+
"Technical and Vocational Training",
|
|
19366
|
+
"Technology, Information and Internet",
|
|
19367
|
+
"Technology, Information and Media",
|
|
19368
|
+
"Telecommunications",
|
|
19369
|
+
"Telecommunications Carriers",
|
|
19370
|
+
"Telephone Call Centers",
|
|
19371
|
+
"Temporary Help Services",
|
|
19372
|
+
"Textile Manufacturing",
|
|
19373
|
+
"Theater Companies",
|
|
19374
|
+
"Think Tanks",
|
|
19375
|
+
"Tobacco Manufacturing",
|
|
19376
|
+
"Translation and Localization",
|
|
19377
|
+
"Transportation Equipment Manufacturing",
|
|
19378
|
+
"Transportation Programs",
|
|
19379
|
+
"Transportation, Logistics, Supply Chain and Storage",
|
|
19380
|
+
"Travel Arrangements",
|
|
19381
|
+
"Truck Transportation",
|
|
19382
|
+
"Trusts and Estates",
|
|
19383
|
+
"Turned Products and Fastener Manufacturing",
|
|
19384
|
+
"Urban Transit Services",
|
|
19385
|
+
"Utilities",
|
|
19386
|
+
"Utilities Administration",
|
|
19387
|
+
"Utility System Construction",
|
|
19388
|
+
"Vehicle Repair and Maintenance",
|
|
19389
|
+
"Venture Capital & Private Equity",
|
|
19390
|
+
"Venture Capital and Private Equity Principals",
|
|
19391
|
+
"Veterinary",
|
|
19392
|
+
"Veterinary Services",
|
|
19393
|
+
"Vocational Rehabilitation Services",
|
|
19394
|
+
"Warehousing and Storage",
|
|
19395
|
+
"Waste Collection",
|
|
19396
|
+
"Waste Treatment and Disposal",
|
|
19397
|
+
"Water Supply and Irrigation Systems",
|
|
19398
|
+
"Water, Waste, Steam, and Air Conditioning Services",
|
|
19399
|
+
"Wellness and Fitness Services",
|
|
19400
|
+
"Wholesale",
|
|
19401
|
+
"Wholesale Alcoholic Beverages",
|
|
19402
|
+
"Wholesale Apparel and Sewing Supplies",
|
|
19403
|
+
"Wholesale Appliances, Electrical, and Electronics",
|
|
19404
|
+
"Wholesale Building Materials",
|
|
19405
|
+
"Wholesale Chemical and Allied Products",
|
|
19406
|
+
"Wholesale Computer Equipment",
|
|
19407
|
+
"Wholesale Drugs and Sundries",
|
|
19408
|
+
"Wholesale Food and Beverage",
|
|
19409
|
+
"Wholesale Footwear",
|
|
19410
|
+
"Wholesale Furniture and Home Furnishings",
|
|
19411
|
+
"Wholesale Hardware, Plumbing, Heating Equipment",
|
|
19412
|
+
"Wholesale Import and Export",
|
|
19413
|
+
"Wholesale Luxury Goods and Jewelry",
|
|
19414
|
+
"Wholesale Machinery",
|
|
19415
|
+
"Wholesale Metals and Minerals",
|
|
19416
|
+
"Wholesale Motor Vehicles and Parts",
|
|
19417
|
+
"Wholesale Paper Products",
|
|
19418
|
+
"Wholesale Petroleum and Petroleum Products",
|
|
19419
|
+
"Wholesale Photography Equipment and Supplies",
|
|
19420
|
+
"Wholesale Raw Farm Products",
|
|
19421
|
+
"Wholesale Recyclable Materials",
|
|
19422
|
+
"Wind Electric Power Generation",
|
|
19423
|
+
"Wine & Spirits",
|
|
19424
|
+
"Wineries",
|
|
19425
|
+
"Wireless Services",
|
|
19426
|
+
"Women's Handbag Manufacturing",
|
|
19427
|
+
"Wood Product Manufacturing",
|
|
19428
|
+
"Writing and Editing",
|
|
19429
|
+
"Zoos and Botanical Gardens"
|
|
19430
|
+
];
|
|
19431
|
+
var INDUSTRY_ALIASES = {
|
|
19432
|
+
saas: ["Software Development"],
|
|
19433
|
+
"b2b saas": ["Software Development"],
|
|
19434
|
+
software: ["Software Development"],
|
|
19435
|
+
ai: ["Software Development", "Technology, Information and Internet"],
|
|
19436
|
+
fintech: ["Financial Services"],
|
|
19437
|
+
devtools: ["Software Development"],
|
|
19438
|
+
cybersecurity: ["Computer and Network Security"],
|
|
19439
|
+
security: ["Computer and Network Security"],
|
|
19440
|
+
it: ["Information Technology & Services"],
|
|
19441
|
+
marketing: ["Marketing Services", "Advertising Services"],
|
|
19442
|
+
recruiting: ["Staffing and Recruiting"]
|
|
19443
|
+
};
|
|
19444
|
+
var LOWER = new Map(INDUSTRIES.map((name) => [name.toLowerCase(), name]));
|
|
19445
|
+
function industryLabels(value) {
|
|
19446
|
+
const wanted = value.trim().toLowerCase();
|
|
19447
|
+
const exact = LOWER.get(wanted);
|
|
19448
|
+
if (exact) return [exact];
|
|
19449
|
+
return INDUSTRY_ALIASES[wanted] ?? null;
|
|
19450
|
+
}
|
|
19451
|
+
function industrySuggestions(value) {
|
|
19452
|
+
const words = value.toLowerCase().split(/[^a-z0-9]+/).filter((word) => word.length > 2);
|
|
19453
|
+
return INDUSTRIES.filter((name) => words.some((word) => name.toLowerCase().includes(word))).slice(0, 3);
|
|
19454
|
+
}
|
|
19455
|
+
var SIZE_PLAIN = /^(\d+)\s*[-–to]+\s*(\d+)$/i;
|
|
19456
|
+
function companySizeLabels(value) {
|
|
19457
|
+
const plain = value.trim().toLowerCase().replace(/,/g, "");
|
|
19458
|
+
const exact = COMPANY_SIZES.find((size) => size === value.trim());
|
|
19459
|
+
if (exact) return [exact];
|
|
19460
|
+
const over = /^(?:>|over |more than )\s*(\d+)$|^(\d+)\+$/.exec(plain);
|
|
19461
|
+
if (over) return bands(Number(over[1] ?? over[2]), Number.MAX_SAFE_INTEGER);
|
|
19462
|
+
const under = /^(?:<|under |less than )\s*(\d+)$/.exec(plain);
|
|
19463
|
+
if (under) return bands(1, Number(under[1]) - 1);
|
|
19464
|
+
const range = SIZE_PLAIN.exec(plain);
|
|
19465
|
+
if (!range) return null;
|
|
19466
|
+
const low = Number(range[1]);
|
|
19467
|
+
const high = Number(range[2]);
|
|
19468
|
+
return low <= high ? bands(low, high) : null;
|
|
19469
|
+
}
|
|
19470
|
+
var BAND_EDGES = [[1, 4], [5, 19], [20, 99], [100, 249], [250, 499], [500, 999], [1e3, 4999], [5e3, 9999], [1e4, Number.MAX_SAFE_INTEGER]];
|
|
19471
|
+
function bands(low, high) {
|
|
19472
|
+
const hits = COMPANY_SIZES.filter((_, index) => {
|
|
19473
|
+
const [from, to] = BAND_EDGES[index];
|
|
19474
|
+
return from <= high && to >= low;
|
|
19475
|
+
});
|
|
19476
|
+
return hits.length ? hits : null;
|
|
19477
|
+
}
|
|
19478
|
+
function directoryFilters(input2) {
|
|
19479
|
+
const industries = [];
|
|
19480
|
+
for (const word of input2.industries ?? []) {
|
|
19481
|
+
const labels = industryLabels(word);
|
|
19482
|
+
if (!labels) {
|
|
19483
|
+
const near = industrySuggestions(word);
|
|
19484
|
+
return { ok: false, field: "industries", message: `"${word}" is not a known industry${near.length ? `; try ${near.join(" or ")}` : ""}` };
|
|
19485
|
+
}
|
|
19486
|
+
industries.push(...labels);
|
|
19487
|
+
}
|
|
19488
|
+
const sizes = [];
|
|
19489
|
+
for (const word of input2.company_sizes ?? []) {
|
|
19490
|
+
const labels = companySizeLabels(word);
|
|
19491
|
+
if (!labels) return { ok: false, field: "company_sizes", message: `"${word}" is not a size; use a range like 20-99` };
|
|
19492
|
+
sizes.push(...labels);
|
|
19493
|
+
}
|
|
19494
|
+
return { ok: true, industries: [...new Set(industries)], sizes: [...new Set(sizes)] };
|
|
19495
|
+
}
|
|
19496
|
+
|
|
18942
19497
|
// ../contracts/src/capabilities.ts
|
|
18943
19498
|
var text = (max) => external_exports.string().trim().min(1).max(max);
|
|
18944
19499
|
var optionalText = (max) => external_exports.string().trim().max(max).optional();
|
|
18945
19500
|
var limit = (id) => external_exports.number().int().min(1).max(TOOL_CATALOG[id].limit).optional();
|
|
18946
19501
|
var s = external_exports.string();
|
|
18947
19502
|
var n = external_exports.number().nullable();
|
|
19503
|
+
var companyFilters = {
|
|
19504
|
+
industries: external_exports.array(text(100)).min(1).max(10).optional().describe("Like SaaS"),
|
|
19505
|
+
company_sizes: external_exports.array(text(20)).min(1).max(9).optional().describe("Like 20-99")
|
|
19506
|
+
};
|
|
19507
|
+
var keywordsField = external_exports.array(text(60)).min(1).max(10).optional().describe("In company description");
|
|
19508
|
+
var pageField = external_exports.number().int().min(1).max(100).optional();
|
|
19509
|
+
function directoryRequest(input2) {
|
|
19510
|
+
const filters = directoryFilters(input2);
|
|
19511
|
+
return {
|
|
19512
|
+
...filters.ok ? { ...filters.industries.length ? { industries: filters.industries } : {}, ...filters.sizes.length ? { companySizes: filters.sizes } : {} } : { industries: [`invalid:${filters.message}`] },
|
|
19513
|
+
...input2.keywords?.length ? { companyWords: input2.keywords } : {},
|
|
19514
|
+
...input2.page ? { page: input2.page } : {}
|
|
19515
|
+
};
|
|
19516
|
+
}
|
|
18948
19517
|
var MAX_BATCH_PEOPLE = 100;
|
|
18949
19518
|
var batchPeople = external_exports.array(text(300)).min(1).max(MAX_BATCH_PEOPLE).optional().describe(`Up to ${MAX_BATCH_PEOPLE} LinkedIn profile URLs or handles, instead of profile`);
|
|
18950
19519
|
var toolPrice = (id, free = "Empty results are free.") => ({
|
|
@@ -19034,14 +19603,14 @@ var CAPABILITIES = {
|
|
|
19034
19603
|
}),
|
|
19035
19604
|
signals: capability({
|
|
19036
19605
|
title: "Hiring signals",
|
|
19037
|
-
description: "Companies hiring for a role in the past 30 days,
|
|
19038
|
-
input: external_exports.object({ role: text(200), location: optionalText(100), company: optionalText(100), limit: limit("signals") }).strict(),
|
|
19039
|
-
row: external_exports.object({ company: s, role: s, location: s, posted: s, url: s }),
|
|
19040
|
-
preview: ["company", "
|
|
19606
|
+
description: "Companies hiring for a role in the past 30 days, with website, industry and size; recruiters left out. A tool's name as the role finds companies using it.",
|
|
19607
|
+
input: external_exports.object({ role: text(200), location: optionalText(100), company: optionalText(100), ...companyFilters, page: pageField, limit: limit("signals") }).strict(),
|
|
19608
|
+
row: external_exports.object({ company: s, role: s, location: s, posted: s, domain: s, industry: s, employees: s, url: s }),
|
|
19609
|
+
preview: ["company", "domain", "role", "posted"],
|
|
19041
19610
|
noun: "signals",
|
|
19042
19611
|
price: toolPrice("signals"),
|
|
19043
19612
|
example: { role: "Sales Development Representative", location: "United States" },
|
|
19044
|
-
toolRequest: (input2) => ({ tool: "signals", query: input2.role, location: input2.location ?? "", company: input2.company ?? "", ...input2
|
|
19613
|
+
toolRequest: (input2) => ({ tool: "signals", query: input2.role, location: input2.location ?? "", company: input2.company ?? "", ...directoryRequest(input2), limit: input2.limit ?? TOOL_CATALOG.signals.limit })
|
|
19045
19614
|
}),
|
|
19046
19615
|
"verify-email": capability({
|
|
19047
19616
|
title: "Email verification",
|
|
@@ -19067,14 +19636,50 @@ var CAPABILITIES = {
|
|
|
19067
19636
|
}),
|
|
19068
19637
|
"people-search": capability({
|
|
19069
19638
|
title: "People search",
|
|
19070
|
-
description: "People by job titles and
|
|
19071
|
-
input: external_exports.object({ titles: external_exports.array(text(60)).min(1).max(5), location: optionalText(100), limit: limit("people-search") }).strict(),
|
|
19639
|
+
description: "People by job titles, where they live, and company industry, size or description. Up to 100 per page.",
|
|
19640
|
+
input: external_exports.object({ titles: external_exports.array(text(60)).min(1).max(5), location: optionalText(100), ...companyFilters, keywords: keywordsField, page: pageField, limit: limit("people-search") }).strict(),
|
|
19072
19641
|
row: external_exports.object({ name: s, title: s, company: s, domain: s, industry: s, employees: s, location: s, url: s }),
|
|
19073
19642
|
preview: ["name", "title", "company", "location"],
|
|
19074
19643
|
noun: "people",
|
|
19075
19644
|
price: toolPrice("people-search"),
|
|
19076
|
-
example: { titles: ["VP Sales"], location: "United States" },
|
|
19077
|
-
toolRequest: (input2) => ({ tool: "people-search", query: input2.titles.join(", "), location: input2.location ?? "", ...input2
|
|
19645
|
+
example: { titles: ["VP Sales"], location: "United States", industries: ["SaaS"], company_sizes: ["20-99"] },
|
|
19646
|
+
toolRequest: (input2) => ({ tool: "people-search", query: input2.titles.join(", "), location: input2.location ?? "", ...directoryRequest(input2), limit: input2.limit ?? TOOL_CATALOG["people-search"].limit })
|
|
19647
|
+
}),
|
|
19648
|
+
"funding-signals": capability({
|
|
19649
|
+
title: "Funding signals",
|
|
19650
|
+
description: "Companies that announced a funding round recently, from news feeds, with amount, date and source.",
|
|
19651
|
+
input: external_exports.object({ region: external_exports.enum(["US", "EU", "GLOBAL"]).optional(), since: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("YYYY-MM-DD"), ...companyFilters, limit: limit("funding-signals") }).strict(),
|
|
19652
|
+
row: external_exports.object({ company: s, amount: n, currency: s, round: s, announced: s, domain: s, industry: s, employees: s, source: s }),
|
|
19653
|
+
preview: ["company", "domain", "amount", "announced"],
|
|
19654
|
+
noun: "companies",
|
|
19655
|
+
price: toolPrice("funding-signals"),
|
|
19656
|
+
example: { region: "US" },
|
|
19657
|
+
toolRequest: (input2) => ({ tool: "funding-signals", query: `funding ${input2.region ?? "GLOBAL"}`, location: input2.region ?? "", ...input2.since ? { since: input2.since } : {}, ...directoryRequest(input2), limit: input2.limit ?? TOOL_CATALOG["funding-signals"].limit }),
|
|
19658
|
+
searchWords: "raised round series seed investors recently funded startup"
|
|
19659
|
+
}),
|
|
19660
|
+
"lookalike-companies": capability({
|
|
19661
|
+
title: "Lookalike companies",
|
|
19662
|
+
description: "Companies similar to one you name, from its domain, for finding more accounts like your best customers.",
|
|
19663
|
+
input: external_exports.object({ company: text(100).describe("Company domain, like vercel.com"), limit: limit("lookalike-companies") }).strict(),
|
|
19664
|
+
row: external_exports.object({ company: s, domain: s, industry: s }),
|
|
19665
|
+
preview: ["company", "domain", "industry"],
|
|
19666
|
+
noun: "companies",
|
|
19667
|
+
price: toolPrice("lookalike-companies"),
|
|
19668
|
+
example: { company: "vercel.com" },
|
|
19669
|
+
toolRequest: (input2) => ({ tool: "lookalike-companies", query: input2.company, limit: input2.limit ?? TOOL_CATALOG["lookalike-companies"].limit }),
|
|
19670
|
+
searchWords: "similar competitors like customers accounts"
|
|
19671
|
+
}),
|
|
19672
|
+
"post-engagers": capability({
|
|
19673
|
+
title: "Post engagers",
|
|
19674
|
+
description: "Who commented on or reacted to one post URL; a competitor's post finds warm leads.",
|
|
19675
|
+
input: external_exports.object({ post: text(500).describe("LinkedIn post URL"), page: pageField, limit: limit("post-engagers") }).strict(),
|
|
19676
|
+
row: external_exports.object({ name: s, headline: s, engagement: s, comment: s, url: s }),
|
|
19677
|
+
preview: ["name", "headline", "engagement"],
|
|
19678
|
+
noun: "people",
|
|
19679
|
+
price: toolPrice("post-engagers"),
|
|
19680
|
+
example: { post: "https://www.linkedin.com/posts/williamhgates_example-activity-7503320303024926720-1t50" },
|
|
19681
|
+
toolRequest: (input2) => ({ tool: "post-engagers", query: input2.post, ...input2.page ? { page: input2.page } : {}, limit: input2.limit ?? TOOL_CATALOG["post-engagers"].limit }),
|
|
19682
|
+
searchWords: "commented reacted liked warm competitor influencer"
|
|
19078
19683
|
}),
|
|
19079
19684
|
"google-search": capability({
|
|
19080
19685
|
title: "Google search",
|
|
@@ -19141,15 +19746,51 @@ var CAPABILITIES = {
|
|
|
19141
19746
|
price: toolPrice("page-content"),
|
|
19142
19747
|
example: { url: "vercel.com/pricing" },
|
|
19143
19748
|
toolRequest: (input2) => ({ tool: "page-content", query: input2.url })
|
|
19749
|
+
}),
|
|
19750
|
+
"instagram-profile": capability({
|
|
19751
|
+
title: "Instagram profile",
|
|
19752
|
+
description: "Public Instagram profile with followers, bio, website and the business email or phone it shows.",
|
|
19753
|
+
input: external_exports.object({ profile: text(200).describe("Instagram username, @handle or profile URL") }).strict(),
|
|
19754
|
+
row: external_exports.object({ handle: s, name: s, bio: s, followers: n, following: n, business: external_exports.boolean(), verified: external_exports.boolean(), website: s, email: s, phone: s, url: s }),
|
|
19755
|
+
preview: ["handle", "followers", "email", "website"],
|
|
19756
|
+
noun: "profiles",
|
|
19757
|
+
price: toolPrice("instagram-profile", "Private and missing accounts are free."),
|
|
19758
|
+
searchWords: "insta ig creator creators influencer influencers brand social contact email phone followers",
|
|
19759
|
+
example: { profile: "gymshark" },
|
|
19760
|
+
toolRequest: (input2) => ({ tool: "instagram-profile", query: instagramHandle(input2.profile) })
|
|
19761
|
+
}),
|
|
19762
|
+
"x-search": capability({
|
|
19763
|
+
title: "X post search",
|
|
19764
|
+
description: "Recent public X (Twitter) posts matching a phrase, newest first, with author and engagement. Every bare word must appear; quote a phrase or use OR.",
|
|
19765
|
+
input: external_exports.object({ query: text(300).describe('Phrase or X search syntax, like "looking for a CRM"'), within: external_exports.enum(SEARCH_WINDOWS).optional(), limit: limit("x-search") }).strict(),
|
|
19766
|
+
row: external_exports.object({ author: s, name: s, followers: n, text: s, postedAt: s, likes: n, replies: n, reposts: n, views: n, reply: external_exports.boolean(), url: s }),
|
|
19767
|
+
preview: ["author", "text", "postedAt"],
|
|
19768
|
+
noun: "posts",
|
|
19769
|
+
price: toolPrice("x-search"),
|
|
19770
|
+
searchWords: "twitter tweets tweet social listening intent buyer buyers asking recommendation mentions",
|
|
19771
|
+
example: { query: '"looking for a CRM"', within: "week" },
|
|
19772
|
+
toolRequest: (input2) => ({ tool: "x-search", query: input2.query, ...input2.within ? { within: input2.within } : {}, ...input2.limit ? { limit: input2.limit } : {} })
|
|
19773
|
+
}),
|
|
19774
|
+
"reddit-search": capability({
|
|
19775
|
+
title: "Reddit post search",
|
|
19776
|
+
description: "Public Reddit posts most relevant to a query, from the past year unless a window is given, with subreddit, score and comments.",
|
|
19777
|
+
input: external_exports.object({ query: text(300), within: external_exports.enum(SEARCH_WINDOWS).optional(), limit: limit("reddit-search") }).strict(),
|
|
19778
|
+
row: external_exports.object({ subreddit: s, title: s, text: s, author: s, postedAt: s, score: n, comments: n, url: s }),
|
|
19779
|
+
preview: ["subreddit", "title", "comments"],
|
|
19780
|
+
noun: "posts",
|
|
19781
|
+
price: toolPrice("reddit-search"),
|
|
19782
|
+
searchWords: "subreddit subreddits threads social listening intent buyer buyers asking recommendation alternatives",
|
|
19783
|
+
example: { query: "best cold email tool", within: "month" },
|
|
19784
|
+
toolRequest: (input2) => ({ tool: "reddit-search", query: input2.query, ...input2.within ? { within: input2.within } : {}, ...input2.limit ? { limit: input2.limit } : {} })
|
|
19144
19785
|
})
|
|
19145
19786
|
};
|
|
19146
19787
|
var CAPABILITY_IDS = Object.keys(CAPABILITIES);
|
|
19147
19788
|
var capabilityIdSchema = external_exports.enum(CAPABILITY_IDS);
|
|
19148
19789
|
var paidArgs = {
|
|
19149
|
-
|
|
19150
|
-
|
|
19151
|
-
idempotency_key: external_exports.string().pipe(external_exports.string().regex(/^[\x21-\x7e]{8,128}$/)).optional()
|
|
19152
|
-
dry_run: external_exports.boolean().optional()
|
|
19790
|
+
// No descriptions: these three repeat on every paid tool, and every agent tool list has a 2k-token budget. The server instructions explain them.
|
|
19791
|
+
max_credits: external_exports.number().int().min(0).max(1e5).optional(),
|
|
19792
|
+
idempotency_key: external_exports.string().pipe(external_exports.string().regex(/^[\x21-\x7e]{8,128}$/)).optional(),
|
|
19793
|
+
dry_run: external_exports.boolean().optional()
|
|
19153
19794
|
};
|
|
19154
19795
|
var price = (id) => TOOL_CATALOG[id].credits;
|
|
19155
19796
|
var findContactsInput = external_exports.object({
|
|
@@ -19163,9 +19804,13 @@ var findContactsInput = external_exports.object({
|
|
|
19163
19804
|
var buildListInput = external_exports.object({
|
|
19164
19805
|
titles: external_exports.array(text(60)).min(1).max(5).optional(),
|
|
19165
19806
|
company: text(100).optional().describe("Company domain: decision-makers there"),
|
|
19807
|
+
companies: external_exports.array(text(100)).min(1).max(100).optional().describe("Many domains"),
|
|
19166
19808
|
location: text(100).optional().describe("Country or city"),
|
|
19809
|
+
...companyFilters,
|
|
19810
|
+
keywords: keywordsField,
|
|
19167
19811
|
business_type: text(100).optional().describe("Local businesses, with location"),
|
|
19168
|
-
|
|
19812
|
+
page: pageField,
|
|
19813
|
+
limit: external_exports.number().int().min(1).max(100).optional(),
|
|
19169
19814
|
...paidArgs
|
|
19170
19815
|
}).strict();
|
|
19171
19816
|
var researchCompanyInput = external_exports.object({ company: text(100).describe("Company domain, like vercel.com"), ...paidArgs }).strict();
|
|
@@ -19173,9 +19818,34 @@ var findSignalsInput = external_exports.object({
|
|
|
19173
19818
|
role: text(200).describe("Role being hired"),
|
|
19174
19819
|
location: text(100).optional(),
|
|
19175
19820
|
company: text(100).optional().describe("Watch one company"),
|
|
19176
|
-
|
|
19821
|
+
...companyFilters,
|
|
19822
|
+
page: pageField,
|
|
19823
|
+
limit: external_exports.number().int().min(1).max(50).optional(),
|
|
19824
|
+
...paidArgs
|
|
19825
|
+
}).strict();
|
|
19826
|
+
var icpFields = {
|
|
19827
|
+
titles: external_exports.array(text(60)).min(1).max(5).optional(),
|
|
19828
|
+
location: text(100).optional(),
|
|
19829
|
+
...companyFilters,
|
|
19830
|
+
keywords: keywordsField
|
|
19831
|
+
};
|
|
19832
|
+
var findLeadsInput = external_exports.object({
|
|
19833
|
+
...icpFields,
|
|
19834
|
+
hiring_roles: external_exports.array(text(100)).min(1).max(5).optional().describe("Signal; a tool's name finds its users"),
|
|
19835
|
+
recently_funded: external_exports.boolean().optional().describe("Signal"),
|
|
19836
|
+
like_companies: external_exports.array(text(100)).min(1).max(5).optional().describe("Signal: domains"),
|
|
19837
|
+
post_urls: external_exports.array(text(500)).min(1).max(5).optional().describe("Signal: LinkedIn posts"),
|
|
19838
|
+
target: external_exports.number().int().min(1).max(500).optional().describe("Default 25"),
|
|
19839
|
+
max_per_company: external_exports.number().int().min(1).max(5).optional().describe("Default 2"),
|
|
19177
19840
|
...paidArgs
|
|
19178
19841
|
}).strict();
|
|
19842
|
+
var workspaceIcpInput = external_exports.object({ ...icpFields, notes: external_exports.string().trim().max(2e3).optional() }).strict();
|
|
19843
|
+
var workspaceInput = external_exports.object({
|
|
19844
|
+
action: external_exports.enum(["get", "set_icp", "exclude", "forget_seen"]),
|
|
19845
|
+
icp: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Fields of gtm_find_leads, plus notes"),
|
|
19846
|
+
domains: external_exports.array(text(100)).min(1).max(500).optional(),
|
|
19847
|
+
profiles: external_exports.array(text(300)).min(1).max(500).optional()
|
|
19848
|
+
}).strict();
|
|
19179
19849
|
var resultsInput = external_exports.object({
|
|
19180
19850
|
run_id: external_exports.string().min(1).max(64),
|
|
19181
19851
|
offset: external_exports.number().int().min(0).max(1e5).optional(),
|
|
@@ -19201,11 +19871,18 @@ var OUTCOME_TOOLS = {
|
|
|
19201
19871
|
},
|
|
19202
19872
|
gtm_build_list: {
|
|
19203
19873
|
title: "Build a lead list",
|
|
19204
|
-
description: `People by titles and
|
|
19874
|
+
description: `People by titles, location, company industry and size (${price("people-search")} cr per 100); decision-makers at company domains (${price("icp")} cr each); local businesses (${price("local-leads")} cr). Empty lists free.`,
|
|
19205
19875
|
paid: true,
|
|
19206
19876
|
capabilities: ["people-search", "icp", "local-leads"],
|
|
19207
19877
|
input: buildListInput
|
|
19208
19878
|
},
|
|
19879
|
+
gtm_find_leads: {
|
|
19880
|
+
title: "Find leads",
|
|
19881
|
+
description: "Finds a target number of new leads with emails and why each fits, from your ICP and one optional signal. Normal tool prices, never past max_credits.",
|
|
19882
|
+
paid: true,
|
|
19883
|
+
capabilities: ["people-search", "signals", "funding-signals", "lookalike-companies", "post-engagers", "icp", "email-finder"],
|
|
19884
|
+
input: findLeadsInput
|
|
19885
|
+
},
|
|
19209
19886
|
gtm_research_company: {
|
|
19210
19887
|
title: "Research a company",
|
|
19211
19888
|
description: `Company profile and website sales brief for one domain. Up to ${price("company") + price("website")} credits; misses free.`,
|
|
@@ -19215,7 +19892,7 @@ var OUTCOME_TOOLS = {
|
|
|
19215
19892
|
},
|
|
19216
19893
|
gtm_find_signals: {
|
|
19217
19894
|
title: "Find hiring signals",
|
|
19218
|
-
description: `Companies hiring for a role in the past 30 days,
|
|
19895
|
+
description: `Companies hiring for a role in the past 30 days, with website and size. ${price("signals")} credit per nonempty search.`,
|
|
19219
19896
|
paid: true,
|
|
19220
19897
|
capabilities: ["signals"],
|
|
19221
19898
|
input: findSignalsInput
|
|
@@ -19234,6 +19911,13 @@ var OUTCOME_TOOLS = {
|
|
|
19234
19911
|
capabilities: CAPABILITY_IDS,
|
|
19235
19912
|
input: toolsInput
|
|
19236
19913
|
},
|
|
19914
|
+
gtm_workspace: {
|
|
19915
|
+
title: "Workspace memory",
|
|
19916
|
+
description: "Free: saved ICP and exclusions gtm_find_leads uses; it also skips people already found.",
|
|
19917
|
+
paid: false,
|
|
19918
|
+
capabilities: [],
|
|
19919
|
+
input: workspaceInput
|
|
19920
|
+
},
|
|
19237
19921
|
gtm_account: {
|
|
19238
19922
|
title: "Account",
|
|
19239
19923
|
description: "Free: balance, agent cap, recent spend or batch quote.",
|
|
@@ -19274,9 +19958,13 @@ var agentAnswerSchema = external_exports.object({
|
|
|
19274
19958
|
next: agentNextSchema,
|
|
19275
19959
|
/** Refusals: the fields the call does accept. */
|
|
19276
19960
|
fields: external_exports.array(external_exports.string().max(40)).max(12).optional(),
|
|
19277
|
-
/**
|
|
19961
|
+
/** Related link, e.g. a run's CSV or the public record behind a quote. */
|
|
19278
19962
|
link: external_exports.string().max(512).optional(),
|
|
19279
|
-
|
|
19963
|
+
/** Out of credits, and the owner lets this agent pay from its own wallet: where to buy them, and how many it needs. */
|
|
19964
|
+
top_up: external_exports.object({ url: external_exports.string().max(256), credits: external_exports.number().int().positive() }).optional(),
|
|
19965
|
+
replayed: external_exports.literal(true).optional(),
|
|
19966
|
+
/** Lead searches: what was rejected and why the search stopped. */
|
|
19967
|
+
report: external_exports.string().max(240).optional()
|
|
19280
19968
|
}).strict();
|
|
19281
19969
|
var byteLength = (value) => new TextEncoder().encode(value).length;
|
|
19282
19970
|
var DEFAULT_NEXT = { tool: "gtm_account", args: {} };
|
|
@@ -19315,7 +20003,9 @@ function build(draft, rowCount, columnCount, cellMax) {
|
|
|
19315
20003
|
next: draft.next ?? DEFAULT_NEXT,
|
|
19316
20004
|
...draft.fields?.length ? { fields: draft.fields.slice(0, 12).map((field) => field.slice(0, 40)) } : {},
|
|
19317
20005
|
...draft.link ? { link: draft.link } : {},
|
|
19318
|
-
...draft.
|
|
20006
|
+
...draft.top_up ? { top_up: draft.top_up } : {},
|
|
20007
|
+
...draft.replayed ? { replayed: true } : {},
|
|
20008
|
+
...draft.report ? { report: draft.report.slice(0, 240) } : {}
|
|
19319
20009
|
};
|
|
19320
20010
|
}
|
|
19321
20011
|
var fits = (answer) => byteLength(JSON.stringify(answer)) <= AGENT_ANSWER_MAX_BYTES && byteLength(answerText(answer)) <= AGENT_ANSWER_MAX_BYTES;
|
|
@@ -19351,6 +20041,7 @@ function answerText(answer) {
|
|
|
19351
20041
|
if (answer.balance !== null) lines.push(`balance: ${answer.balance}`);
|
|
19352
20042
|
if (answer.quote !== void 0) lines.push(`quote: ${answer.quote}`);
|
|
19353
20043
|
if (answer.replayed) lines.push("replayed: true");
|
|
20044
|
+
if (answer.report) lines.push(`report: ${answer.report}`);
|
|
19354
20045
|
if (answer.total || answer.rows.length) lines.push(`total: ${answer.total}`);
|
|
19355
20046
|
if (answer.rows.length) {
|
|
19356
20047
|
lines.push(`${answer.label}[${answer.rows.length}]{${answer.columns.join(",")}}:`);
|
|
@@ -19358,6 +20049,7 @@ function answerText(answer) {
|
|
|
19358
20049
|
}
|
|
19359
20050
|
if (answer.fields?.length) lines.push(`fields[${answer.fields.length}]: ${answer.fields.join(",")}`);
|
|
19360
20051
|
if (answer.link) lines.push(`link: ${answer.link}`);
|
|
20052
|
+
if (answer.top_up) lines.push(`top_up: ${answer.top_up.credits} credits at ${answer.top_up.url}`);
|
|
19361
20053
|
if (answer.next) lines.push(`next: ${answer.next.tool}(${JSON.stringify(answer.next.args)})`);
|
|
19362
20054
|
return lines.join("\n");
|
|
19363
20055
|
}
|
|
@@ -19369,6 +20061,13 @@ var agentScopeSchema = external_exports.enum(AGENT_SCOPES);
|
|
|
19369
20061
|
var agentKindSchema = external_exports.enum(["connector", "cli", "token"]);
|
|
19370
20062
|
var capPeriodSchema = external_exports.enum(["day", "week", "month"]);
|
|
19371
20063
|
var creditCapSchema = external_exports.number().int().min(1).max(1e6);
|
|
20064
|
+
var agentEnsSchema = external_exports.object({
|
|
20065
|
+
name: external_exports.string(),
|
|
20066
|
+
/** active: the record names this agent. stopped: it does not. unknown: the chain has been unreadable too long to say. */
|
|
20067
|
+
status: external_exports.enum(["active", "stopped", "unknown"])
|
|
20068
|
+
});
|
|
20069
|
+
var agentEnsLinkSchema = external_exports.object({ name: external_exports.string().trim().min(3).max(255) }).strict();
|
|
20070
|
+
var agentEnsMismatchSchema = external_exports.object({ error: external_exports.literal("ens_record_mismatch"), name: external_exports.string(), key: external_exports.string(), value: external_exports.string() });
|
|
19372
20071
|
var agentSummarySchema = external_exports.object({
|
|
19373
20072
|
id: external_exports.string(),
|
|
19374
20073
|
name: external_exports.string(),
|
|
@@ -19382,6 +20081,10 @@ var agentSummarySchema = external_exports.object({
|
|
|
19382
20081
|
spent: external_exports.number().int().nonnegative(),
|
|
19383
20082
|
/** The owner lets this agent use code mode (gtm_execute); off by default. */
|
|
19384
20083
|
allow_execute: external_exports.boolean(),
|
|
20084
|
+
/** The ENS name this agent answers to, when the owner linked one. */
|
|
20085
|
+
ens: agentEnsSchema.nullable(),
|
|
20086
|
+
/** The owner lets this agent buy credits from its own wallet; off by default. */
|
|
20087
|
+
allow_topup: external_exports.boolean(),
|
|
19385
20088
|
created_at: external_exports.number().int(),
|
|
19386
20089
|
last_used_at: external_exports.number().int().nullable()
|
|
19387
20090
|
});
|
|
@@ -19397,7 +20100,8 @@ var agentUpdateSchema = external_exports.object({
|
|
|
19397
20100
|
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
19398
20101
|
credit_cap: creditCapSchema.optional(),
|
|
19399
20102
|
cap_period: capPeriodSchema.optional(),
|
|
19400
|
-
allow_execute: external_exports.boolean().optional()
|
|
20103
|
+
allow_execute: external_exports.boolean().optional(),
|
|
20104
|
+
allow_topup: external_exports.boolean().optional()
|
|
19401
20105
|
}).strict().refine((value) => Object.keys(value).length > 0, "Nothing to update");
|
|
19402
20106
|
var connectorConsentSchema = external_exports.object({
|
|
19403
20107
|
id: external_exports.string(),
|
|
@@ -19446,6 +20150,45 @@ var clientMetadataDocumentSchema = external_exports.object({
|
|
|
19446
20150
|
(document) => (document.token_endpoint_auth_method ?? "none") === "none" || document.token_endpoint_auth_methods_supported?.includes("none") === true,
|
|
19447
20151
|
{ message: "Client must support token_endpoint_auth_method none", path: ["token_endpoint_auth_method"] }
|
|
19448
20152
|
);
|
|
20153
|
+
var agentApprovalStatusSchema = external_exports.enum(["pending", "approved", "denied", "used", "expired"]);
|
|
20154
|
+
var worldVerifyFailureSchema = external_exports.enum([
|
|
20155
|
+
"cancelled",
|
|
20156
|
+
"issuer_mismatch",
|
|
20157
|
+
"exchange_failed",
|
|
20158
|
+
"invalid_token",
|
|
20159
|
+
"stale_authentication",
|
|
20160
|
+
"insufficient_assurance",
|
|
20161
|
+
"unavailable",
|
|
20162
|
+
"identity_mismatch",
|
|
20163
|
+
"identity_in_use",
|
|
20164
|
+
"expired",
|
|
20165
|
+
"unknown_attempt"
|
|
20166
|
+
]);
|
|
20167
|
+
var agentApprovalSchema = external_exports.object({
|
|
20168
|
+
id: external_exports.string(),
|
|
20169
|
+
agent: external_exports.object({ id: external_exports.string(), name: external_exports.string() }),
|
|
20170
|
+
tool: external_exports.string(),
|
|
20171
|
+
description: external_exports.string(),
|
|
20172
|
+
credits: external_exports.number().int(),
|
|
20173
|
+
cap_credits: external_exports.number().int(),
|
|
20174
|
+
cap_period: capPeriodSchema,
|
|
20175
|
+
spent_credits: external_exports.number().int(),
|
|
20176
|
+
status: agentApprovalStatusSchema,
|
|
20177
|
+
created_at: external_exports.number().int(),
|
|
20178
|
+
expires_at: external_exports.number().int(),
|
|
20179
|
+
decided_at: external_exports.number().int().nullable(),
|
|
20180
|
+
/** World ID checks for this request: whether one passed, until when it can approve, and how. */
|
|
20181
|
+
world: external_exports.object({
|
|
20182
|
+
linked: external_exports.boolean(),
|
|
20183
|
+
verified: external_exports.boolean(),
|
|
20184
|
+
fresh_until: external_exports.number().int().nullable(),
|
|
20185
|
+
method: external_exports.enum(["proof", "passkey"]).nullable(),
|
|
20186
|
+
level: external_exports.string().nullable(),
|
|
20187
|
+
last_error: worldVerifyFailureSchema.nullable()
|
|
20188
|
+
})
|
|
20189
|
+
});
|
|
20190
|
+
var agentApprovalResponseSchema = external_exports.object({ approval: agentApprovalSchema });
|
|
20191
|
+
var worldStartResponseSchema = external_exports.object({ authorize_url: external_exports.string().url() });
|
|
19449
20192
|
|
|
19450
20193
|
// ../contracts/src/agent-account.ts
|
|
19451
20194
|
var agentAccessSchema = external_exports.object({
|
|
@@ -19459,6 +20202,8 @@ var CODE_MODE_METHODS = {
|
|
|
19459
20202
|
build_list: "gtm_build_list",
|
|
19460
20203
|
research_company: "gtm_research_company",
|
|
19461
20204
|
find_signals: "gtm_find_signals",
|
|
20205
|
+
find_leads: "gtm_find_leads",
|
|
20206
|
+
workspace: "gtm_workspace",
|
|
19462
20207
|
tools: "gtm_tools",
|
|
19463
20208
|
results: "gtm_results",
|
|
19464
20209
|
account: "gtm_account"
|
|
@@ -19493,6 +20238,110 @@ var tableRowsPageSchema = external_exports.object({
|
|
|
19493
20238
|
run_cost: external_exports.number().int().nonnegative()
|
|
19494
20239
|
}).strict();
|
|
19495
20240
|
|
|
20241
|
+
// ../contracts/src/topups.ts
|
|
20242
|
+
var address = external_exports.string().regex(/^0x[0-9a-fA-F]{40}$/);
|
|
20243
|
+
var txHashSchema = external_exports.string().regex(/^0x[0-9a-fA-F]{64}$/);
|
|
20244
|
+
var topupRailSchema = external_exports.enum(["usdc", "swap", "jar"]);
|
|
20245
|
+
var topupTokenSchema = external_exports.object({ symbol: external_exports.string(), address, decimals: external_exports.number().int(), jar: external_exports.boolean().optional() });
|
|
20246
|
+
var topupChainSchema = external_exports.object({ id: external_exports.number().int(), name: external_exports.string(), tokens: external_exports.array(topupTokenSchema) });
|
|
20247
|
+
var topupOptionsSchema = external_exports.object({
|
|
20248
|
+
enabled: external_exports.boolean(),
|
|
20249
|
+
micros_per_credit: external_exports.number().int().optional(),
|
|
20250
|
+
min_micros: external_exports.number().int().optional(),
|
|
20251
|
+
max_micros: external_exports.number().int().optional(),
|
|
20252
|
+
chains: external_exports.array(topupChainSchema).optional(),
|
|
20253
|
+
jar: external_exports.object({ chain_id: external_exports.number().int(), address, max_micros: external_exports.number().int(), available_micros: external_exports.number().int(), haircut_bps: external_exports.number().int() }).nullable().optional()
|
|
20254
|
+
});
|
|
20255
|
+
var topupCreateSchema = external_exports.object({
|
|
20256
|
+
wallet: address,
|
|
20257
|
+
signature: external_exports.string().regex(/^0x[0-9a-fA-F]+$/).max(2048),
|
|
20258
|
+
issued_at: external_exports.number().int(),
|
|
20259
|
+
chain_id: external_exports.number().int().positive(),
|
|
20260
|
+
token: address,
|
|
20261
|
+
amount: external_exports.string().regex(/^[1-9][0-9]{0,77}$/),
|
|
20262
|
+
/** `auto` uses the jar when the payment fits it, and a swap otherwise. */
|
|
20263
|
+
rail: external_exports.enum(["usdc", "swap", "jar", "auto"]).optional(),
|
|
20264
|
+
/** A plan such as `growth-annual`. The server sizes the payment, so `amount` only prices the token: send one whole unit. */
|
|
20265
|
+
plan: external_exports.string().max(40).optional()
|
|
20266
|
+
});
|
|
20267
|
+
var topupProofSchema = external_exports.object({ tx_hash: txHashSchema.optional(), signature: external_exports.string().regex(/^0x[0-9a-fA-F]+$/).max(4096).optional() });
|
|
20268
|
+
var walletTxSchema = external_exports.object({ chain_id: external_exports.number().int(), to: address, data: external_exports.string(), value: external_exports.string() });
|
|
20269
|
+
var topupActionSchema = external_exports.discriminatedUnion("kind", [
|
|
20270
|
+
external_exports.object({ kind: external_exports.literal("send_tx"), label: external_exports.string(), tx: walletTxSchema }),
|
|
20271
|
+
external_exports.object({ kind: external_exports.literal("sign_typed_data"), label: external_exports.string(), chain_id: external_exports.number().int(), typed_data: external_exports.record(external_exports.string(), external_exports.unknown()) }),
|
|
20272
|
+
external_exports.object({ kind: external_exports.literal("wait"), label: external_exports.string() }),
|
|
20273
|
+
external_exports.object({ kind: external_exports.literal("none") })
|
|
20274
|
+
]);
|
|
20275
|
+
var topupViewSchema = external_exports.object({
|
|
20276
|
+
id: external_exports.string(),
|
|
20277
|
+
rail: topupRailSchema,
|
|
20278
|
+
routing: external_exports.string().nullable(),
|
|
20279
|
+
/** The plan being bought, such as `growth-annual`; null for a plain top-up. */
|
|
20280
|
+
plan: external_exports.string().nullable(),
|
|
20281
|
+
/** What the wallet pays, in the token's smallest unit. */
|
|
20282
|
+
amount_in: external_exports.string(),
|
|
20283
|
+
status: external_exports.enum(["open", "credited", "failed", "expired"]),
|
|
20284
|
+
estimated_credits: external_exports.number().int(),
|
|
20285
|
+
minimum_credits: external_exports.number().int(),
|
|
20286
|
+
credits: external_exports.number().int().nullable(),
|
|
20287
|
+
settlement_tx: external_exports.string().nullable(),
|
|
20288
|
+
action: topupActionSchema,
|
|
20289
|
+
error: external_exports.string().nullable()
|
|
20290
|
+
});
|
|
20291
|
+
var topupResponseSchema = external_exports.object({ topup: topupViewSchema });
|
|
20292
|
+
var agentTopupOptionsSchema = topupOptionsSchema.extend({ allowed: external_exports.boolean(), account: external_exports.string(), max_micros_per_payment: external_exports.number().int() });
|
|
20293
|
+
|
|
20294
|
+
// ../contracts/src/coverage.ts
|
|
20295
|
+
var coverageRowSchema = external_exports.object({
|
|
20296
|
+
capability: external_exports.string(),
|
|
20297
|
+
title: external_exports.string(),
|
|
20298
|
+
credits: external_exports.number().int().nonnegative(),
|
|
20299
|
+
unit: external_exports.string(),
|
|
20300
|
+
/** Finished runs in the window; 0 when the sample was too small to publish. */
|
|
20301
|
+
runs: external_exports.number().int().nonnegative(),
|
|
20302
|
+
succeeded: external_exports.number().int().nonnegative(),
|
|
20303
|
+
empty: external_exports.number().int().nonnegative(),
|
|
20304
|
+
failed: external_exports.number().int().nonnegative(),
|
|
20305
|
+
/** Share of finished runs that returned a result, 0 to 1; null when the sample was too small. */
|
|
20306
|
+
successRate: external_exports.number().min(0).max(1).nullable(),
|
|
20307
|
+
entityKey: external_exports.string(),
|
|
20308
|
+
entityUrl: external_exports.string()
|
|
20309
|
+
});
|
|
20310
|
+
var publicCoverageSchema = external_exports.object({
|
|
20311
|
+
/** UTC date of the snapshot, YYYY-MM-DD. */
|
|
20312
|
+
snapshotDay: external_exports.string(),
|
|
20313
|
+
windowDays: external_exports.number().int().positive(),
|
|
20314
|
+
/** The only wallet whose entities are read; anyone can write look-alike entities. */
|
|
20315
|
+
publisher: external_exports.string(),
|
|
20316
|
+
network: external_exports.object({ name: external_exports.string(), chainId: external_exports.number().int(), explorerUrl: external_exports.string() }),
|
|
20317
|
+
rows: external_exports.array(coverageRowSchema),
|
|
20318
|
+
/** This snapshot as a CSV on Swarm; null until its upload succeeds. */
|
|
20319
|
+
export: external_exports.object({ swarmRef: external_exports.string(), url: external_exports.string(), sha256: external_exports.string(), rows: external_exports.number().int().nonnegative() }).nullable()
|
|
20320
|
+
});
|
|
20321
|
+
|
|
20322
|
+
// ../contracts/src/arc.ts
|
|
20323
|
+
var arcOptionsSchema = external_exports.object({
|
|
20324
|
+
enabled: external_exports.boolean(),
|
|
20325
|
+
chain_id: external_exports.number().int().optional(),
|
|
20326
|
+
chain_name: external_exports.string().optional(),
|
|
20327
|
+
rpc_url: external_exports.string().optional(),
|
|
20328
|
+
explorer_url: external_exports.string().optional(),
|
|
20329
|
+
faucet_url: external_exports.string().optional(),
|
|
20330
|
+
usdc: external_exports.string().optional(),
|
|
20331
|
+
treasury: external_exports.string().optional()
|
|
20332
|
+
});
|
|
20333
|
+
var arcConfirmSchema = external_exports.object({ tx_hash: txHashSchema }).strict();
|
|
20334
|
+
var arcPaymentSchema = external_exports.object({
|
|
20335
|
+
tx_hash: txHashSchema,
|
|
20336
|
+
wallet: external_exports.string(),
|
|
20337
|
+
micros: external_exports.number().int(),
|
|
20338
|
+
/** What the same amount would buy in real USDC, shown for comparison only. */
|
|
20339
|
+
credits_equivalent: external_exports.number().int(),
|
|
20340
|
+
credits_granted: external_exports.literal(0),
|
|
20341
|
+
explorer_url: external_exports.string()
|
|
20342
|
+
});
|
|
20343
|
+
var arcPaymentResponseSchema = external_exports.object({ payment: arcPaymentSchema });
|
|
20344
|
+
|
|
19496
20345
|
// ../contracts/src/index.ts
|
|
19497
20346
|
var lookupStatusSchema = external_exports.enum(["found", "not_found", "error"]);
|
|
19498
20347
|
var deliverabilitySchema = external_exports.enum(["verified", "unverified"]).nullable().transform((value) => value === "verified" ? value : null);
|
|
@@ -19524,6 +20373,7 @@ var lookupErrorSchema = external_exports.object({
|
|
|
19524
20373
|
credits: external_exports.object({ remaining: external_exports.number().int().nonnegative() }).optional()
|
|
19525
20374
|
});
|
|
19526
20375
|
var lookupEventSchema = external_exports.union([lookupResultSchema, lookupSummarySchema]);
|
|
20376
|
+
var historySourceSchema = external_exports.enum(["web", "agent"]);
|
|
19527
20377
|
var historyEntrySchema = external_exports.object({
|
|
19528
20378
|
url: external_exports.string(),
|
|
19529
20379
|
status: lookupStatusSchema,
|
|
@@ -19533,8 +20383,65 @@ var historyEntrySchema = external_exports.object({
|
|
|
19533
20383
|
deliverability: deliverabilitySchema,
|
|
19534
20384
|
lookedUpAt: external_exports.number().int().nonnegative()
|
|
19535
20385
|
});
|
|
20386
|
+
var lookupRunItemSchema = external_exports.object({
|
|
20387
|
+
position: external_exports.number().int().nonnegative(),
|
|
20388
|
+
url: external_exports.string(),
|
|
20389
|
+
status: lookupStatusSchema,
|
|
20390
|
+
name: external_exports.string().nullable(),
|
|
20391
|
+
title: external_exports.string().nullable(),
|
|
20392
|
+
email: external_exports.string().nullable(),
|
|
20393
|
+
deliverability: deliverabilitySchema,
|
|
20394
|
+
/** Credits this run charged for the profile; 0 for misses and repeats already paid for. */
|
|
20395
|
+
credits: external_exports.number().int().nonnegative()
|
|
20396
|
+
});
|
|
20397
|
+
var historyItemSchema = external_exports.discriminatedUnion("kind", [
|
|
20398
|
+
external_exports.object({
|
|
20399
|
+
kind: external_exports.literal("lookup"),
|
|
20400
|
+
id: external_exports.string(),
|
|
20401
|
+
/** "stopped" is a run that ended before every profile had a result (for example, the tab closed). */
|
|
20402
|
+
status: external_exports.enum(["running", "completed", "stopped"]),
|
|
20403
|
+
total: external_exports.number().int().nonnegative(),
|
|
20404
|
+
found: external_exports.number().int().nonnegative(),
|
|
20405
|
+
credits: external_exports.number().int().nonnegative(),
|
|
20406
|
+
source: historySourceSchema,
|
|
20407
|
+
/** The first few profiles, enough to name the run; the rest load with GET /history/runs/:id. */
|
|
20408
|
+
preview: external_exports.array(lookupRunItemSchema).max(3),
|
|
20409
|
+
lookedUpAt: external_exports.number().int().nonnegative()
|
|
20410
|
+
}),
|
|
20411
|
+
external_exports.object({
|
|
20412
|
+
kind: external_exports.literal("tool"),
|
|
20413
|
+
/** The saved run, reopened with GET /tool-runs/:id. */
|
|
20414
|
+
id: external_exports.string(),
|
|
20415
|
+
tool: toolIdSchema,
|
|
20416
|
+
status: toolRunSchema.shape.status,
|
|
20417
|
+
input: toolRequestSchema,
|
|
20418
|
+
rowCount: external_exports.number().int().nonnegative(),
|
|
20419
|
+
credits: external_exports.number().int().nonnegative(),
|
|
20420
|
+
source: historySourceSchema,
|
|
20421
|
+
lookedUpAt: external_exports.number().int().nonnegative()
|
|
20422
|
+
})
|
|
20423
|
+
]);
|
|
20424
|
+
var historyFilterSchema = external_exports.object({
|
|
20425
|
+
kind: external_exports.enum(["lookup", "tool"]).optional(),
|
|
20426
|
+
source: historySourceSchema.optional(),
|
|
20427
|
+
/** Matches names, titles, emails and profile URLs in lookups, and tool inputs and names. */
|
|
20428
|
+
q: external_exports.string().trim().max(100).optional()
|
|
20429
|
+
});
|
|
19536
20430
|
var historyResponseSchema = external_exports.object({
|
|
19537
|
-
|
|
20431
|
+
items: external_exports.array(historyItemSchema),
|
|
20432
|
+
/** Pass as `cursor` for the next page; null when this page is the last. */
|
|
20433
|
+
nextCursor: external_exports.string().nullable(),
|
|
20434
|
+
/** Totals across the whole history for the current search, ignoring kind and source; first page only. */
|
|
20435
|
+
counts: external_exports.object({
|
|
20436
|
+
all: external_exports.number().int().nonnegative(),
|
|
20437
|
+
lookup: external_exports.number().int().nonnegative(),
|
|
20438
|
+
tool: external_exports.number().int().nonnegative(),
|
|
20439
|
+
agent: external_exports.number().int().nonnegative()
|
|
20440
|
+
}).nullable()
|
|
20441
|
+
});
|
|
20442
|
+
var historyRunResponseSchema = external_exports.object({
|
|
20443
|
+
run: historyItemSchema,
|
|
20444
|
+
items: external_exports.array(lookupRunItemSchema)
|
|
19538
20445
|
});
|
|
19539
20446
|
var usageResponseSchema = external_exports.object({
|
|
19540
20447
|
tools: external_exports.object({ total: external_exports.number().int().nonnegative(), completed: external_exports.number().int().nonnegative(), pending: external_exports.number().int().nonnegative(), creditsUsed: external_exports.number().int().nonnegative() }).optional(),
|
|
@@ -19572,6 +20479,8 @@ var TOOL_COMMANDS = {
|
|
|
19572
20479
|
gtm_find_signals: "signals",
|
|
19573
20480
|
gtm_results: "results",
|
|
19574
20481
|
gtm_tools: "tools",
|
|
20482
|
+
gtm_find_leads: "leads",
|
|
20483
|
+
gtm_workspace: "workspace",
|
|
19575
20484
|
gtm_account: "account"
|
|
19576
20485
|
};
|
|
19577
20486
|
var GLOBAL = {
|
|
@@ -19583,14 +20492,18 @@ var GLOBAL = {
|
|
|
19583
20492
|
version: { type: "boolean", short: "v" }
|
|
19584
20493
|
};
|
|
19585
20494
|
var PAID = { "max-credits": { type: "string" }, "dry-run": { type: "boolean" }, "idempotency-key": { type: "string" } };
|
|
20495
|
+
var FILTERS = { industry: { type: "string", multiple: true }, size: { type: "string", multiple: true } };
|
|
19586
20496
|
var SPECS = {
|
|
19587
20497
|
login: { "no-browser": { type: "boolean" } },
|
|
19588
20498
|
logout: {},
|
|
19589
20499
|
whoami: {},
|
|
20500
|
+
"auth-header": {},
|
|
19590
20501
|
contacts: { file: { type: "string" }, column: { type: "string" }, out: { type: "string" }, "run-id": { type: "string" }, find: { type: "string", multiple: true }, verify: { type: "boolean" }, ...PAID },
|
|
19591
|
-
list: { titles: { type: "string", multiple: true }, company: { type: "string" }, location: { type: "string" }, "business-type": { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
20502
|
+
list: { titles: { type: "string", multiple: true }, company: { type: "string", multiple: true }, location: { type: "string" }, "business-type": { type: "string" }, ...FILTERS, keywords: { type: "string", multiple: true }, page: { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
20503
|
+
leads: { titles: { type: "string", multiple: true }, location: { type: "string" }, ...FILTERS, keywords: { type: "string", multiple: true }, "hiring-role": { type: "string", multiple: true }, funded: { type: "boolean" }, like: { type: "string", multiple: true }, post: { type: "string", multiple: true }, target: { type: "string" }, "max-per-company": { type: "string" }, ...PAID },
|
|
20504
|
+
workspace: { titles: { type: "string", multiple: true }, location: { type: "string" }, ...FILTERS, keywords: { type: "string", multiple: true }, notes: { type: "string" }, domain: { type: "string", multiple: true }, profile: { type: "string", multiple: true } },
|
|
19592
20505
|
research: { ...PAID },
|
|
19593
|
-
signals: { location: { type: "string" }, company: { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
20506
|
+
signals: { location: { type: "string" }, company: { type: "string" }, ...FILTERS, page: { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
19594
20507
|
results: { offset: { type: "string" }, csv: { type: "boolean" }, link: { type: "boolean" } },
|
|
19595
20508
|
tools: { input: { type: "string" }, file: { type: "string" }, column: { type: "string" }, out: { type: "string" }, ...PAID },
|
|
19596
20509
|
account: { count: { type: "string" }, file: { type: "string" }, column: { type: "string" } }
|
|
@@ -19660,6 +20573,9 @@ function build2(name, values, positionals) {
|
|
|
19660
20573
|
case "whoami":
|
|
19661
20574
|
none("gtm whoami takes no arguments.");
|
|
19662
20575
|
return { kind: "whoami" };
|
|
20576
|
+
case "auth-header":
|
|
20577
|
+
none("gtm auth-header takes no arguments.");
|
|
20578
|
+
return { kind: "auth-header" };
|
|
19663
20579
|
case "contacts": {
|
|
19664
20580
|
const file2 = str(values, "file");
|
|
19665
20581
|
const runId = str(values, "run-id");
|
|
@@ -19681,7 +20597,21 @@ function build2(name, values, positionals) {
|
|
|
19681
20597
|
case "list": {
|
|
19682
20598
|
none("gtm list takes flags only, like --titles 'VP Sales'.");
|
|
19683
20599
|
const limit2 = int2(values, "limit", name);
|
|
19684
|
-
|
|
20600
|
+
const page = int2(values, "page", name);
|
|
20601
|
+
const companies = Array.isArray(values.company) ? values.company : [];
|
|
20602
|
+
return { kind: "tool", tool: "gtm_build_list", args: { ...pick2(values, { titles: "titles", location: "location", "business-type": "business_type", industry: "industries", size: "company_sizes", keywords: "keywords" }), ...companies.length === 1 ? { company: companies[0] } : companies.length ? { companies } : {}, ...page !== void 0 ? { page } : {}, ...limit2 !== void 0 ? { limit: limit2 } : {}, ...paid(values, name) } };
|
|
20603
|
+
}
|
|
20604
|
+
case "leads": {
|
|
20605
|
+
none("gtm leads takes flags only, like --titles 'Head of Sales' --target 25.");
|
|
20606
|
+
const target = int2(values, "target", name);
|
|
20607
|
+
const perCompany = int2(values, "max-per-company", name);
|
|
20608
|
+
return { kind: "tool", tool: "gtm_find_leads", args: { ...pick2(values, { titles: "titles", location: "location", industry: "industries", size: "company_sizes", keywords: "keywords", "hiring-role": "hiring_roles", like: "like_companies", post: "post_urls" }), ...values.funded ? { recently_funded: true } : {}, ...target !== void 0 ? { target } : {}, ...perCompany !== void 0 ? { max_per_company: perCompany } : {}, ...paid(values, name) } };
|
|
20609
|
+
}
|
|
20610
|
+
case "workspace": {
|
|
20611
|
+
const action = positionals[0] ?? "get";
|
|
20612
|
+
if (!["get", "set-icp", "exclude", "forget-seen"].includes(action) || positionals.length > 1) throw new UsageError("Use gtm workspace, gtm workspace set-icp, gtm workspace exclude or gtm workspace forget-seen.", name);
|
|
20613
|
+
const icp = pick2(values, { titles: "titles", location: "location", industry: "industries", size: "company_sizes", keywords: "keywords", notes: "notes" });
|
|
20614
|
+
return { kind: "tool", tool: "gtm_workspace", args: { action: action.replace("-", "_"), ...action === "set-icp" ? { icp } : {}, ...pick2(values, { domain: "domains", profile: "profiles" }) } };
|
|
19685
20615
|
}
|
|
19686
20616
|
case "research":
|
|
19687
20617
|
if (positionals.length !== 1) throw new UsageError("Give one company domain, like vercel.com.", name);
|
|
@@ -19689,7 +20619,8 @@ function build2(name, values, positionals) {
|
|
|
19689
20619
|
case "signals": {
|
|
19690
20620
|
if (!positionals.length) throw new UsageError("Give the role being hired, like 'Account Executive'.", name);
|
|
19691
20621
|
const limit2 = int2(values, "limit", name);
|
|
19692
|
-
|
|
20622
|
+
const page = int2(values, "page", name);
|
|
20623
|
+
return { kind: "tool", tool: "gtm_find_signals", args: { role: positionals.join(" "), ...pick2(values, { location: "location", company: "company", industry: "industries", size: "company_sizes" }), ...page !== void 0 ? { page } : {}, ...limit2 !== void 0 ? { limit: limit2 } : {}, ...paid(values, name) } };
|
|
19693
20624
|
}
|
|
19694
20625
|
case "results": {
|
|
19695
20626
|
if (!positionals.length) throw new UsageError("Give a run id, like gtm results run_abc.", name);
|
|
@@ -20374,7 +21305,7 @@ async function toolFile(session, command) {
|
|
|
20374
21305
|
import { randomUUID } from "node:crypto";
|
|
20375
21306
|
|
|
20376
21307
|
// src/version.ts
|
|
20377
|
-
var VERSION = "0.1.
|
|
21308
|
+
var VERSION = "0.1.5";
|
|
20378
21309
|
|
|
20379
21310
|
// src/gateway.ts
|
|
20380
21311
|
var CliError = class extends Error {
|
|
@@ -20562,6 +21493,17 @@ var TOPICS = {
|
|
|
20562
21493
|
},
|
|
20563
21494
|
logout: { summary: "Delete the saved sign-in", lines: ["Usage: gtm logout", "", "Deletes the saved token. Revoke the agent on your GTMMAXING account page to end its access everywhere."] },
|
|
20564
21495
|
whoami: { summary: "Show the server, balance and this agent's credit cap", lines: ["Usage: gtm whoami"] },
|
|
21496
|
+
"auth-header": {
|
|
21497
|
+
summary: "Print this login as an MCP Authorization header",
|
|
21498
|
+
lines: [
|
|
21499
|
+
"Usage: gtm auth-header",
|
|
21500
|
+
"",
|
|
21501
|
+
`Prints {"Authorization":"Bearer <token>"} for an MCP client's header helper, so the GTMMAXING MCP connection`,
|
|
21502
|
+
"reuses this CLI login (same agent, same credit cap) instead of a second sign-in. For Claude Code:",
|
|
21503
|
+
` claude mcp add-json --scope user gtmmaxing '{"type":"http","url":"https://gtmmaxing.com/mcp","headersHelper":"gtm auth-header"}'`,
|
|
21504
|
+
"When run as a helper, the token is printed only for a GTMMAXING server. Exits 1 when signed out."
|
|
21505
|
+
]
|
|
21506
|
+
},
|
|
20565
21507
|
contacts: {
|
|
20566
21508
|
summary: "Work emails or mobiles for LinkedIn profiles, a CSV, or a list run",
|
|
20567
21509
|
lines: [
|
|
@@ -20600,13 +21542,54 @@ var TOPICS = {
|
|
|
20600
21542
|
"",
|
|
20601
21543
|
"Options:",
|
|
20602
21544
|
" --titles TITLE One job title, no commas; repeat for up to 5",
|
|
20603
|
-
" --company DOMAIN Decision-makers at
|
|
20604
|
-
" --location PLACE
|
|
21545
|
+
" --company DOMAIN Decision-makers at a company domain; repeat for up to 100",
|
|
21546
|
+
" --location PLACE Where the people live: country or city",
|
|
21547
|
+
" --industry NAME Company industry, like SaaS; repeat for several",
|
|
21548
|
+
" --size RANGE Company employees, like 20-99; repeat for several",
|
|
21549
|
+
" --keywords WORD A word in the company's description; repeat for several",
|
|
20605
21550
|
" --business-type TYPE Local businesses, with --location",
|
|
21551
|
+
" --page N Results page, from 1",
|
|
20606
21552
|
" --limit N Most rows",
|
|
20607
21553
|
...PAID2
|
|
20608
21554
|
]
|
|
20609
21555
|
},
|
|
21556
|
+
leads: {
|
|
21557
|
+
summary: "Find a target number of new leads with emails and why each fits",
|
|
21558
|
+
lines: [
|
|
21559
|
+
"Usage:",
|
|
21560
|
+
" gtm leads --titles 'Head of Sales' --industry SaaS --size 20-99 --location 'United States' --target 25 --max-credits N",
|
|
21561
|
+
" gtm leads --hiring-role 'Founding SDR' --industry SaaS --size 5-99 --target 25 --max-credits N",
|
|
21562
|
+
" gtm leads --funded | --like vercel.com | --post <linkedin post url> ... --target 25 --max-credits N",
|
|
21563
|
+
"",
|
|
21564
|
+
tool("gtm_find_leads"),
|
|
21565
|
+
"",
|
|
21566
|
+
"Options:",
|
|
21567
|
+
" --titles TITLE Job titles of the people to reach; repeat for up to 5",
|
|
21568
|
+
" --location PLACE Where they live: country or city",
|
|
21569
|
+
" --industry NAME Company industry, like SaaS; repeat for several",
|
|
21570
|
+
" --size RANGE Company employees, like 20-99; repeat for several",
|
|
21571
|
+
" --keywords WORD A word in the company's description; repeat for several",
|
|
21572
|
+
" --hiring-role ROLE Signal: companies hiring this role; repeat for up to 5",
|
|
21573
|
+
" --funded Signal: companies that just raised",
|
|
21574
|
+
" --like DOMAIN Signal: companies similar to this one; repeat for up to 5",
|
|
21575
|
+
" --post URL Signal: people engaging with this LinkedIn post; repeat for up to 5",
|
|
21576
|
+
" --target N Leads with emails to find (default 25)",
|
|
21577
|
+
" --max-per-company N Default 2",
|
|
21578
|
+
...PAID2
|
|
21579
|
+
]
|
|
21580
|
+
},
|
|
21581
|
+
workspace: {
|
|
21582
|
+
summary: "Free: the ICP and exclusions saved for this account's agents",
|
|
21583
|
+
lines: [
|
|
21584
|
+
"Usage:",
|
|
21585
|
+
" gtm workspace",
|
|
21586
|
+
" gtm workspace set-icp --titles 'Head of Sales' --industry SaaS --size 20-99 --notes 'We sell ...'",
|
|
21587
|
+
" gtm workspace exclude --domain customer.com --profile https://www.linkedin.com/in/someone",
|
|
21588
|
+
" gtm workspace forget-seen",
|
|
21589
|
+
"",
|
|
21590
|
+
tool("gtm_workspace")
|
|
21591
|
+
]
|
|
21592
|
+
},
|
|
20610
21593
|
research: {
|
|
20611
21594
|
summary: "Company profile and website sales brief for one domain",
|
|
20612
21595
|
lines: ["Usage: gtm research <domain> --max-credits N", "", tool("gtm_research_company"), "", "Options:", ...PAID2]
|
|
@@ -20614,13 +21597,16 @@ var TOPICS = {
|
|
|
20614
21597
|
signals: {
|
|
20615
21598
|
summary: "Companies hiring for a role in the past 30 days",
|
|
20616
21599
|
lines: [
|
|
20617
|
-
"Usage: gtm signals <role> [--location PLACE] [--company DOMAIN] [--limit N] --max-credits N",
|
|
21600
|
+
"Usage: gtm signals <role> [--location PLACE] [--company DOMAIN] [--industry NAME] [--size RANGE] [--page N] [--limit N] --max-credits N",
|
|
20618
21601
|
"",
|
|
20619
21602
|
tool("gtm_find_signals"),
|
|
20620
21603
|
"",
|
|
20621
21604
|
"Options:",
|
|
20622
21605
|
" --location PLACE Where the role is",
|
|
20623
21606
|
" --company DOMAIN Watch one company",
|
|
21607
|
+
" --industry NAME Company industry, like SaaS; repeat for several",
|
|
21608
|
+
" --size RANGE Company employees, like 20-99; repeat for several",
|
|
21609
|
+
" --page N Results page, from 1",
|
|
20624
21610
|
" --limit N Most rows",
|
|
20625
21611
|
...PAID2
|
|
20626
21612
|
]
|
|
@@ -20676,7 +21662,7 @@ var TOPICS = {
|
|
|
20676
21662
|
]
|
|
20677
21663
|
}
|
|
20678
21664
|
};
|
|
20679
|
-
var ORDER = ["login", "logout", "whoami", ...Object.values(TOOL_COMMANDS)];
|
|
21665
|
+
var ORDER = ["login", "logout", "whoami", "auth-header", ...Object.values(TOOL_COMMANDS)];
|
|
20680
21666
|
function helpText(topic) {
|
|
20681
21667
|
const entry = topic ? TOPICS[topic] : void 0;
|
|
20682
21668
|
if (entry) return `gtm ${topic}: ${entry.summary}
|
|
@@ -20689,7 +21675,7 @@ ${[...entry.lines, "", "Common options:", ...COMMON].join("\n")}
|
|
|
20689
21675
|
"Usage: gtm <command> [options]",
|
|
20690
21676
|
"",
|
|
20691
21677
|
"Commands:",
|
|
20692
|
-
...ORDER.map((name) => ` ${name.padEnd(
|
|
21678
|
+
...ORDER.map((name) => ` ${name.padEnd(12)}${TOPICS[name].summary}`),
|
|
20693
21679
|
"",
|
|
20694
21680
|
"Start with gtm login. Paid commands need --max-credits N; add --dry-run to see the quote first.",
|
|
20695
21681
|
"Answers are TOON text: a one-sentence summary, cost, balance, up to 5 rows and the next command. Add --json for JSON.",
|
|
@@ -20770,6 +21756,35 @@ async function logout(session) {
|
|
|
20770
21756
|
function failed(reason, summary) {
|
|
20771
21757
|
return shapeAnswer({ status: "error", reason, summary, next: LOGIN_NEXT });
|
|
20772
21758
|
}
|
|
21759
|
+
async function authHeader(session) {
|
|
21760
|
+
const { io, token, apiUrl } = session;
|
|
21761
|
+
if (!token) {
|
|
21762
|
+
io.stderr("Not signed in; run gtm login.\n");
|
|
21763
|
+
return 1;
|
|
21764
|
+
}
|
|
21765
|
+
const target = io.env.CLAUDE_CODE_MCP_SERVER_URL;
|
|
21766
|
+
if (target && !sameService(target, apiUrl)) {
|
|
21767
|
+
io.stderr(`Refusing to send this login to ${target}; it belongs to ${apiUrl}.
|
|
21768
|
+
`);
|
|
21769
|
+
return 1;
|
|
21770
|
+
}
|
|
21771
|
+
io.stdout(`${JSON.stringify({ Authorization: `Bearer ${token}` })}
|
|
21772
|
+
`);
|
|
21773
|
+
return 0;
|
|
21774
|
+
}
|
|
21775
|
+
function sameService(target, apiUrl) {
|
|
21776
|
+
let url2;
|
|
21777
|
+
let api;
|
|
21778
|
+
try {
|
|
21779
|
+
url2 = new URL(target);
|
|
21780
|
+
api = new URL(apiUrl);
|
|
21781
|
+
} catch {
|
|
21782
|
+
return false;
|
|
21783
|
+
}
|
|
21784
|
+
if (url2.protocol !== api.protocol) return false;
|
|
21785
|
+
const site = api.hostname.replace(/^api\./, "");
|
|
21786
|
+
return url2.host === api.host || url2.hostname === site && url2.port === api.port;
|
|
21787
|
+
}
|
|
20773
21788
|
|
|
20774
21789
|
// src/credentials.ts
|
|
20775
21790
|
import { chmod, mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
@@ -20966,6 +21981,8 @@ async function dispatch(session, command) {
|
|
|
20966
21981
|
return logout(session);
|
|
20967
21982
|
case "whoami":
|
|
20968
21983
|
return whoami(session);
|
|
21984
|
+
case "auth-header":
|
|
21985
|
+
return authHeader(session);
|
|
20969
21986
|
case "contacts":
|
|
20970
21987
|
return contacts(session, command);
|
|
20971
21988
|
case "tool-file":
|