gtmmaxing 0.1.4 → 0.1.6
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 +1175 -61
- package/package.json +1 -1
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);
|
|
@@ -18871,6 +18871,19 @@ function date4(params) {
|
|
|
18871
18871
|
return _coercedDate(ZodDate, params);
|
|
18872
18872
|
}
|
|
18873
18873
|
|
|
18874
|
+
// ../contracts/src/lifecycle.ts
|
|
18875
|
+
function defineLifecycle({ states, transitions }) {
|
|
18876
|
+
const can = (from, to) => transitions[from].includes(to);
|
|
18877
|
+
return {
|
|
18878
|
+
states,
|
|
18879
|
+
transitions,
|
|
18880
|
+
can,
|
|
18881
|
+
before: (to) => states.filter((from) => can(from, to)),
|
|
18882
|
+
isTerminal: (state) => transitions[state].length === 0
|
|
18883
|
+
};
|
|
18884
|
+
}
|
|
18885
|
+
var AGENT_RUN_STATUSES = ["running", "completed", "not_found", "error"];
|
|
18886
|
+
|
|
18874
18887
|
// ../contracts/src/tools.ts
|
|
18875
18888
|
var TOOL_CATALOG = {
|
|
18876
18889
|
"seo-aeo-audit": { name: "SEO/AEO audit", credits: 35, unit: "completed audit", limit: 1 },
|
|
@@ -18878,10 +18891,10 @@ var TOOL_CATALOG = {
|
|
|
18878
18891
|
"local-leads": { name: "Local business leads", credits: 1, unit: "search (up to 20 businesses)", limit: 20 },
|
|
18879
18892
|
website: { name: "Website brief", credits: 1, unit: "brief", limit: 1 },
|
|
18880
18893
|
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
|
|
18894
|
+
signals: { name: "Hiring signals", credits: 1, unit: "search (up to 50 companies)", limit: 50 },
|
|
18882
18895
|
"verify-email": { name: "Email verification", credits: 2, unit: "definitive verification", limit: 1 },
|
|
18883
18896
|
"phone-pilot": { name: "Mobile enrichment", credits: 5, unit: "returned number", limit: 1 },
|
|
18884
|
-
"people-search": { name: "People search", credits: 2, unit: "search (up to
|
|
18897
|
+
"people-search": { name: "People search", credits: 2, unit: "search (up to 100 people)", limit: 100 },
|
|
18885
18898
|
"google-search": { name: "Google search", credits: 1, unit: "search (up to 20 results)", limit: 20 },
|
|
18886
18899
|
"linkedin-profile": { name: "LinkedIn profile", credits: 1, unit: "profile", limit: 1 },
|
|
18887
18900
|
"linkedin-activity": { name: "LinkedIn activity", credits: 1, unit: "profile with posts", limit: 1 },
|
|
@@ -18889,7 +18902,10 @@ var TOOL_CATALOG = {
|
|
|
18889
18902
|
"page-content": { name: "Web page content", credits: 1, unit: "page", limit: 1 },
|
|
18890
18903
|
"instagram-profile": { name: "Instagram profile", credits: 1, unit: "profile", limit: 1 },
|
|
18891
18904
|
"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 }
|
|
18905
|
+
"reddit-search": { name: "Reddit post search", credits: 1, unit: "search (up to 20 posts)", limit: 20 },
|
|
18906
|
+
"funding-signals": { name: "Funding signals", credits: 1, unit: "search (up to 50 companies)", limit: 50 },
|
|
18907
|
+
"lookalike-companies": { name: "Lookalike companies", credits: 2, unit: "search", limit: 50 },
|
|
18908
|
+
"post-engagers": { name: "LinkedIn post engagers", credits: 1, unit: "post (up to 100 people)", limit: 100 }
|
|
18893
18909
|
};
|
|
18894
18910
|
var toolIdSchema = external_exports.enum(Object.keys(TOOL_CATALOG));
|
|
18895
18911
|
function publicWebsite(value) {
|
|
@@ -18922,27 +18938,60 @@ var toolRequestSchema = external_exports.object({
|
|
|
18922
18938
|
keywords: external_exports.string().trim().max(300).optional(),
|
|
18923
18939
|
/** X and Reddit search: how far back to look. Optional so older saved requests keep their hash. */
|
|
18924
18940
|
within: external_exports.enum(SEARCH_WINDOWS).optional(),
|
|
18925
|
-
|
|
18941
|
+
/** People search and hiring signals: exact directory labels from filters.ts. Optional so older saved requests keep their hash. */
|
|
18942
|
+
industries: external_exports.array(external_exports.string().trim().min(1).max(400)).max(20).optional(),
|
|
18943
|
+
companySizes: external_exports.array(external_exports.string().trim().min(1).max(20)).max(9).optional(),
|
|
18944
|
+
/** People search: words in the company's own description. */
|
|
18945
|
+
companyWords: external_exports.array(external_exports.string().trim().min(1).max(60)).max(10).optional(),
|
|
18946
|
+
/** Funding signals: announced on or after this date. */
|
|
18947
|
+
since: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
18948
|
+
/** Results page, from 1. */
|
|
18949
|
+
page: external_exports.number().int().min(1).max(100).optional(),
|
|
18950
|
+
limit: external_exports.number().int().min(1).max(100).default(10)
|
|
18926
18951
|
}).strict().superRefine((v, c) => {
|
|
18927
18952
|
const reject = (message) => c.addIssue({ code: "custom", path: ["query"], message });
|
|
18928
18953
|
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.");
|
|
18929
18954
|
if (["website", "page-content", "seo-aeo-audit"].includes(v.tool) && !publicWebsite(websiteUrl(v.query))) reject("Enter a company website, like vercel.com.");
|
|
18930
|
-
if (["company", "icp"].includes(v.tool) && !publicWebsite(`https://${v.query.replace(/^https?:\/\//, "").replace(/\/$/, "")}`)) reject("Enter a public company domain.");
|
|
18955
|
+
if (["company", "icp", "lookalike-companies"].includes(v.tool) && !publicWebsite(`https://${v.query.replace(/^https?:\/\//, "").replace(/\/$/, "")}`)) reject("Enter a public company domain.");
|
|
18931
18956
|
if (v.tool === "local-leads" && !v.location) reject("Add a city or region.");
|
|
18932
18957
|
if (v.tool === "profile-finder" && !v.company) c.addIssue({ code: "custom", path: ["company"], message: "Add the person's company." });
|
|
18933
18958
|
if (v.tool === "verify-email" && !external_exports.string().email().safeParse(v.query).success) reject("Enter an email address.");
|
|
18934
18959
|
if (v.tool === "instagram-profile" && !INSTAGRAM_HANDLE.test(v.query)) reject("Enter an Instagram username, like gymshark.");
|
|
18960
|
+
const badFilter = v.industries?.find((industry) => industry.startsWith("invalid:"));
|
|
18961
|
+
if (badFilter) c.addIssue({ code: "custom", path: ["industries"], message: badFilter.slice(8) });
|
|
18935
18962
|
if (v.within && !["x-search", "reddit-search"].includes(v.tool)) c.addIssue({ code: "custom", path: ["within"], message: "Only post searches take a time window." });
|
|
18963
|
+
if (v.tool === "post-engagers" && !/^https:\/\/([a-z]{2,3}\.)?linkedin\.com\/(posts|feed\/update)\//.test(v.query)) reject("Enter a LinkedIn post URL.");
|
|
18936
18964
|
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.");
|
|
18937
18965
|
});
|
|
18938
18966
|
var toolResultSchema = external_exports.object({
|
|
18939
|
-
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(
|
|
18940
|
-
notes: external_exports.array(external_exports.string().max(500)).max(10)
|
|
18967
|
+
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),
|
|
18968
|
+
notes: external_exports.array(external_exports.string().max(500)).max(10),
|
|
18969
|
+
/** There are more results: the next page and, when the source says, how many match in all. */
|
|
18970
|
+
more: external_exports.object({ page: external_exports.number().int().positive(), total: external_exports.number().int().nonnegative().optional() }).optional(),
|
|
18971
|
+
/** Companies dropped before the rows, by why. */
|
|
18972
|
+
left: external_exports.record(external_exports.string(), external_exports.number().int().nonnegative()).optional()
|
|
18941
18973
|
});
|
|
18974
|
+
var TOOL_RUN_STATUSES = ["queued", "running", "completed", "not_found", "error", "reconciliation_needed"];
|
|
18975
|
+
var TOOL_RUN_TRANSITIONS = {
|
|
18976
|
+
queued: ["running", "completed", "not_found", "error", "reconciliation_needed"],
|
|
18977
|
+
running: ["completed", "not_found", "error", "reconciliation_needed"],
|
|
18978
|
+
completed: [],
|
|
18979
|
+
not_found: [],
|
|
18980
|
+
error: [],
|
|
18981
|
+
reconciliation_needed: ["error"]
|
|
18982
|
+
};
|
|
18983
|
+
var toolRunLifecycle = defineLifecycle({ states: TOOL_RUN_STATUSES, transitions: TOOL_RUN_TRANSITIONS });
|
|
18984
|
+
var TOOL_CALL_STATUSES = ["submitted", "completed", "expired"];
|
|
18985
|
+
var TOOL_CALL_TRANSITIONS = {
|
|
18986
|
+
submitted: ["completed", "expired"],
|
|
18987
|
+
completed: [],
|
|
18988
|
+
expired: []
|
|
18989
|
+
};
|
|
18990
|
+
var toolCallLifecycle = defineLifecycle({ states: TOOL_CALL_STATUSES, transitions: TOOL_CALL_TRANSITIONS });
|
|
18942
18991
|
var toolRunSchema = external_exports.object({
|
|
18943
18992
|
id: external_exports.string(),
|
|
18944
18993
|
tool: toolIdSchema,
|
|
18945
|
-
status: external_exports.enum(
|
|
18994
|
+
status: external_exports.enum(TOOL_RUN_STATUSES),
|
|
18946
18995
|
input: toolRequestSchema,
|
|
18947
18996
|
result: toolResultSchema.nullable(),
|
|
18948
18997
|
creditsCharged: external_exports.number().int().nonnegative(),
|
|
@@ -18953,12 +19002,582 @@ var toolRunSchema = external_exports.object({
|
|
|
18953
19002
|
var toolRunResponseSchema = external_exports.object({ run: toolRunSchema, credits: external_exports.number().int().nonnegative() });
|
|
18954
19003
|
var toolRunsResponseSchema = external_exports.object({ runs: external_exports.array(toolRunSchema), credits: external_exports.number().int().nonnegative() });
|
|
18955
19004
|
|
|
19005
|
+
// ../contracts/src/plans.ts
|
|
19006
|
+
var CREDIT_PLANS = [
|
|
19007
|
+
{
|
|
19008
|
+
id: "starter",
|
|
19009
|
+
name: "Starter",
|
|
19010
|
+
monthlyCredits: 2e3,
|
|
19011
|
+
unlimited: false,
|
|
19012
|
+
prices: {
|
|
19013
|
+
monthly: { usd: 30, url: "https://buy.stripe.com/8x214o9aobNr7Tx85v5gc02", linkId: "plink_1UVzDYLFFDNJNkHJJ4fWmieL" },
|
|
19014
|
+
annual: { usd: 300, url: "https://buy.stripe.com/00w5kE4U84kZflZfxX5gc03", linkId: "plink_1UVzFmLFFDNJNkHJbQW9Dy7X" }
|
|
19015
|
+
}
|
|
19016
|
+
},
|
|
19017
|
+
{
|
|
19018
|
+
id: "growth",
|
|
19019
|
+
name: "Growth",
|
|
19020
|
+
monthlyCredits: 4500,
|
|
19021
|
+
unlimited: false,
|
|
19022
|
+
prices: {
|
|
19023
|
+
monthly: { usd: 60, url: "https://buy.stripe.com/3cI28s4U818N6PtbhH5gc04", linkId: "plink_1UVzGELFFDNJNkHJnlfjOxwk" },
|
|
19024
|
+
annual: { usd: 600, url: "https://buy.stripe.com/14A4gAbiw6t78XBadD5gc05", linkId: "plink_1UVzGgLFFDNJNkHJtvftWZKw" }
|
|
19025
|
+
}
|
|
19026
|
+
},
|
|
19027
|
+
{
|
|
19028
|
+
id: "unlimited",
|
|
19029
|
+
name: "Unlimited",
|
|
19030
|
+
monthlyCredits: 1e4,
|
|
19031
|
+
unlimited: true,
|
|
19032
|
+
prices: {
|
|
19033
|
+
monthly: { usd: 129, url: "https://buy.stripe.com/3cI5kEbiw4kZddRetT5gc08", linkId: "plink_1UVzxYLFFDNJNkHJoG37CnPv" },
|
|
19034
|
+
annual: { usd: 1290, url: "https://buy.stripe.com/00w14o3Q4eZDehV4Tj5gc09", linkId: "plink_1UVzyVLFFDNJNkHJbNAsT6il" }
|
|
19035
|
+
}
|
|
19036
|
+
}
|
|
19037
|
+
];
|
|
19038
|
+
|
|
19039
|
+
// ../contracts/src/filters.ts
|
|
19040
|
+
var COMPANY_SIZES = ["< 5", "5 - 19", "20 - 99", "100 - 249", "250 - 499", "500 - 999", "1000 - 4999", "5000 - 9999", ">10000"];
|
|
19041
|
+
var INDUSTRIES = [
|
|
19042
|
+
"Abrasives and Nonmetallic Minerals Manufacturing",
|
|
19043
|
+
"Accessible Architecture and Design",
|
|
19044
|
+
"Accessible Hardware Manufacturing",
|
|
19045
|
+
"Accommodation",
|
|
19046
|
+
"Accommodation and Food Services",
|
|
19047
|
+
"Accounting",
|
|
19048
|
+
"Administration of Justice",
|
|
19049
|
+
"Administrative and Support Services",
|
|
19050
|
+
"Advertising Services",
|
|
19051
|
+
"Agricultural Chemical Manufacturing",
|
|
19052
|
+
"Agriculture",
|
|
19053
|
+
"Agriculture, Construction, Mining Machinery Manufacturing",
|
|
19054
|
+
"Air, Water, and Waste Program Management",
|
|
19055
|
+
"Airlines and Aviation",
|
|
19056
|
+
"Alternative Dispute Resolution",
|
|
19057
|
+
"Alternative Fuel Vehicle Manufacturing",
|
|
19058
|
+
"Alternative Medicine",
|
|
19059
|
+
"Ambulance Services",
|
|
19060
|
+
"Amusement Parks and Arcades",
|
|
19061
|
+
"Animal Feed Manufacturing",
|
|
19062
|
+
"Animation and Post-production",
|
|
19063
|
+
"Apparel Manufacturing",
|
|
19064
|
+
"Appliances, Electrical, and Electronics Manufacturing",
|
|
19065
|
+
"Architectural and Structural Metal Manufacturing",
|
|
19066
|
+
"Architecture and Planning",
|
|
19067
|
+
"Armed Forces",
|
|
19068
|
+
"Artificial Rubber and Synthetic Fiber Manufacturing",
|
|
19069
|
+
"Artists and Writers",
|
|
19070
|
+
"Arts & Crafts",
|
|
19071
|
+
"Audio and Video Equipment Manufacturing",
|
|
19072
|
+
"Automation Machinery Manufacturing",
|
|
19073
|
+
"Aviation and Aerospace Component Manufacturing",
|
|
19074
|
+
"Baked Goods Manufacturing",
|
|
19075
|
+
"Banking",
|
|
19076
|
+
"Bars, Taverns, and Nightclubs",
|
|
19077
|
+
"Beverage Manufacturing",
|
|
19078
|
+
"Biomass Electric Power Generation",
|
|
19079
|
+
"Biotechnology Research",
|
|
19080
|
+
"Blockchain Services",
|
|
19081
|
+
"Blogs",
|
|
19082
|
+
"Boilers, Tanks, and Shipping Container Manufacturing",
|
|
19083
|
+
"Book and Periodical Publishing",
|
|
19084
|
+
"Book Publishing",
|
|
19085
|
+
"Breweries",
|
|
19086
|
+
"Broadcast Media Production and Distribution",
|
|
19087
|
+
"Building Construction",
|
|
19088
|
+
"Building Equipment Contractors",
|
|
19089
|
+
"Building Finishing Contractors",
|
|
19090
|
+
"Building Materials",
|
|
19091
|
+
"Building Structure and Exterior Contractors",
|
|
19092
|
+
"Business Consulting and Services",
|
|
19093
|
+
"Business Content",
|
|
19094
|
+
"Business Intelligence Platforms",
|
|
19095
|
+
"Business Supplies & Equipment",
|
|
19096
|
+
"Business Supplies and Equipment",
|
|
19097
|
+
"Cable and Satellite Programming",
|
|
19098
|
+
"Capital Markets",
|
|
19099
|
+
"Caterers",
|
|
19100
|
+
"Chemical Manufacturing",
|
|
19101
|
+
"Chemical Raw Materials Manufacturing",
|
|
19102
|
+
"Child Day Care Services",
|
|
19103
|
+
"Chiropractors",
|
|
19104
|
+
"Circuses and Magic Shows",
|
|
19105
|
+
"Civic and Social Organizations",
|
|
19106
|
+
"Civil Engineering",
|
|
19107
|
+
"Claims Adjusting, Actuarial Services",
|
|
19108
|
+
"Clay and Refractory Products Manufacturing",
|
|
19109
|
+
"Climate Data and Analytics",
|
|
19110
|
+
"Climate Technology Product Manufacturing",
|
|
19111
|
+
"Coal Mining",
|
|
19112
|
+
"Collection Agencies",
|
|
19113
|
+
"Commercial and Industrial Equipment Rental",
|
|
19114
|
+
"Commercial and Industrial Machinery Maintenance",
|
|
19115
|
+
"Commercial and Service Industry Machinery Manufacturing",
|
|
19116
|
+
"Communications Equipment Manufacturing",
|
|
19117
|
+
"Community Development and Urban Planning",
|
|
19118
|
+
"Community Services",
|
|
19119
|
+
"Computer and Network Security",
|
|
19120
|
+
"Computer Games",
|
|
19121
|
+
"Computer Hardware Manufacturing",
|
|
19122
|
+
"Computer Networking Products",
|
|
19123
|
+
"Computers and Electronics Manufacturing",
|
|
19124
|
+
"Conservation Programs",
|
|
19125
|
+
"Construction",
|
|
19126
|
+
"Construction Hardware Manufacturing",
|
|
19127
|
+
"Consumer Goods Rental",
|
|
19128
|
+
"Consumer Services",
|
|
19129
|
+
"Correctional Institutions",
|
|
19130
|
+
"Cosmetology and Barber Schools",
|
|
19131
|
+
"Courts of Law",
|
|
19132
|
+
"Credit Intermediation",
|
|
19133
|
+
"Cutlery and Handtool Manufacturing",
|
|
19134
|
+
"Dairy Product Manufacturing",
|
|
19135
|
+
"Dance Companies",
|
|
19136
|
+
"Data Infrastructure and Analytics",
|
|
19137
|
+
"Data Security Software Products",
|
|
19138
|
+
"Defense and Space Manufacturing",
|
|
19139
|
+
"Dentists",
|
|
19140
|
+
"Design Services",
|
|
19141
|
+
"Desktop Computing Software Products",
|
|
19142
|
+
"Digital Accessibility Services",
|
|
19143
|
+
"Distilleries",
|
|
19144
|
+
"E-Learning Providers",
|
|
19145
|
+
"Economic Programs",
|
|
19146
|
+
"Education",
|
|
19147
|
+
"Education Administration Programs",
|
|
19148
|
+
"Electric Lighting Equipment Manufacturing",
|
|
19149
|
+
"Electric Power Generation",
|
|
19150
|
+
"Electric Power Transmission, Control, and Distribution",
|
|
19151
|
+
"Electrical Equipment Manufacturing",
|
|
19152
|
+
"Electronic and Precision Equipment Maintenance",
|
|
19153
|
+
"Embedded Software Products",
|
|
19154
|
+
"Emergency and Relief Services",
|
|
19155
|
+
"Engineering Services",
|
|
19156
|
+
"Engines and Power Transmission Equipment Manufacturing",
|
|
19157
|
+
"Entertainment Providers",
|
|
19158
|
+
"Environmental Quality Programs",
|
|
19159
|
+
"Environmental Services",
|
|
19160
|
+
"Equipment Rental Services",
|
|
19161
|
+
"Events Services",
|
|
19162
|
+
"Executive Offices",
|
|
19163
|
+
"Executive Search Services",
|
|
19164
|
+
"Fabricated Metal Products",
|
|
19165
|
+
"Facilities Services",
|
|
19166
|
+
"Family Planning Centers",
|
|
19167
|
+
"Farming",
|
|
19168
|
+
"Farming, Ranching, Forestry",
|
|
19169
|
+
"Fashion Accessories Manufacturing",
|
|
19170
|
+
"Financial Services",
|
|
19171
|
+
"Fine Art",
|
|
19172
|
+
"Fine Arts Schools",
|
|
19173
|
+
"Fire Protection",
|
|
19174
|
+
"Fisheries",
|
|
19175
|
+
"Flight Training",
|
|
19176
|
+
"Food and Beverage Manufacturing",
|
|
19177
|
+
"Food and Beverage Retail",
|
|
19178
|
+
"Food and Beverage Services",
|
|
19179
|
+
"Food Production",
|
|
19180
|
+
"Footwear and Leather Goods Repair",
|
|
19181
|
+
"Footwear Manufacturing",
|
|
19182
|
+
"Forestry and Logging",
|
|
19183
|
+
"Fossil Fuel Electric Power Generation",
|
|
19184
|
+
"Freight and Package Transportation",
|
|
19185
|
+
"Fruit and Vegetable Preserves Manufacturing",
|
|
19186
|
+
"Fuel Cell Manufacturing",
|
|
19187
|
+
"Fundraising",
|
|
19188
|
+
"Funds and Trusts",
|
|
19189
|
+
"Furniture and Home Furnishings Manufacturing",
|
|
19190
|
+
"Gambling Facilities and Casinos",
|
|
19191
|
+
"Geothermal Electric Power Generation",
|
|
19192
|
+
"Glass Product Manufacturing",
|
|
19193
|
+
"Glass, Ceramics and Concrete Manufacturing",
|
|
19194
|
+
"Golf Courses and Country Clubs",
|
|
19195
|
+
"Government Administration",
|
|
19196
|
+
"Government Relations Services",
|
|
19197
|
+
"Graphic Design",
|
|
19198
|
+
"Ground Passenger Transportation",
|
|
19199
|
+
"Health and Human Services",
|
|
19200
|
+
"Health, Wellness & Fitness",
|
|
19201
|
+
"Higher Education",
|
|
19202
|
+
"Highway, Street, and Bridge Construction",
|
|
19203
|
+
"Historical Sites",
|
|
19204
|
+
"Holding Companies",
|
|
19205
|
+
"Home Health Care Services",
|
|
19206
|
+
"Horticulture",
|
|
19207
|
+
"Hospitality",
|
|
19208
|
+
"Hospitals",
|
|
19209
|
+
"Hospitals and Health Care",
|
|
19210
|
+
"Hotels and Motels",
|
|
19211
|
+
"Household and Institutional Furniture Manufacturing",
|
|
19212
|
+
"Household Appliance Manufacturing",
|
|
19213
|
+
"Household Services",
|
|
19214
|
+
"Housing and Community Development",
|
|
19215
|
+
"Housing Programs",
|
|
19216
|
+
"Human Resources Services",
|
|
19217
|
+
"HVAC and Refrigeration Equipment Manufacturing",
|
|
19218
|
+
"Hydroelectric Power Generation",
|
|
19219
|
+
"Import & Export",
|
|
19220
|
+
"Individual and Family Services",
|
|
19221
|
+
"Industrial Machinery Manufacturing",
|
|
19222
|
+
"Industry Associations",
|
|
19223
|
+
"Information Services",
|
|
19224
|
+
"Information Technology & Services",
|
|
19225
|
+
"Insurance",
|
|
19226
|
+
"Insurance Agencies and Brokerages",
|
|
19227
|
+
"Insurance and Employee Benefit Funds",
|
|
19228
|
+
"Insurance Carriers",
|
|
19229
|
+
"Interior Design",
|
|
19230
|
+
"International Affairs",
|
|
19231
|
+
"International Trade and Development",
|
|
19232
|
+
"Internet Marketplace Platforms",
|
|
19233
|
+
"Internet News",
|
|
19234
|
+
"Internet Publishing",
|
|
19235
|
+
"Interurban and Rural Bus Services",
|
|
19236
|
+
"Investment Advice",
|
|
19237
|
+
"Investment Banking",
|
|
19238
|
+
"Investment Management",
|
|
19239
|
+
"IT Services and IT Consulting",
|
|
19240
|
+
"IT System Custom Software Development",
|
|
19241
|
+
"IT System Data Services",
|
|
19242
|
+
"IT System Design Services",
|
|
19243
|
+
"IT System Installation and Disposal",
|
|
19244
|
+
"IT System Operations and Maintenance",
|
|
19245
|
+
"IT System Testing and Evaluation",
|
|
19246
|
+
"IT System Training and Support",
|
|
19247
|
+
"Janitorial Services",
|
|
19248
|
+
"Landscaping Services",
|
|
19249
|
+
"Language Schools",
|
|
19250
|
+
"Laundry and Drycleaning Services",
|
|
19251
|
+
"Law Enforcement",
|
|
19252
|
+
"Law Practice",
|
|
19253
|
+
"Leasing Non-residential Real Estate",
|
|
19254
|
+
"Leasing Residential Real Estate",
|
|
19255
|
+
"Leather Product Manufacturing",
|
|
19256
|
+
"Legal Services",
|
|
19257
|
+
"Legislative Offices",
|
|
19258
|
+
"Libraries",
|
|
19259
|
+
"Lime and Gypsum Products Manufacturing",
|
|
19260
|
+
"Loan Brokers",
|
|
19261
|
+
"Machinery Manufacturing",
|
|
19262
|
+
"Magnetic and Optical Media Manufacturing",
|
|
19263
|
+
"Manufacturing",
|
|
19264
|
+
"Maritime Transportation",
|
|
19265
|
+
"Market Research",
|
|
19266
|
+
"Marketing Services",
|
|
19267
|
+
"Mattress and Blinds Manufacturing",
|
|
19268
|
+
"Measuring and Control Instrument Manufacturing",
|
|
19269
|
+
"Meat Products Manufacturing",
|
|
19270
|
+
"Media and Telecommunications",
|
|
19271
|
+
"Media Production",
|
|
19272
|
+
"Medical and Diagnostic Laboratories",
|
|
19273
|
+
"Medical Device",
|
|
19274
|
+
"Medical Equipment Manufacturing",
|
|
19275
|
+
"Medical Practices",
|
|
19276
|
+
"Mental Health Care",
|
|
19277
|
+
"Metal Ore Mining",
|
|
19278
|
+
"Metal Treatments",
|
|
19279
|
+
"Metal Valve, Ball, and Roller Manufacturing",
|
|
19280
|
+
"Metalworking Machinery Manufacturing",
|
|
19281
|
+
"Military and International Affairs",
|
|
19282
|
+
"Mining",
|
|
19283
|
+
"Mobile Computing Software Products",
|
|
19284
|
+
"Mobile Food Services",
|
|
19285
|
+
"Mobile Gaming Apps",
|
|
19286
|
+
"Motor Vehicle Manufacturing",
|
|
19287
|
+
"Motor Vehicle Parts Manufacturing",
|
|
19288
|
+
"Movies and Sound Recording",
|
|
19289
|
+
"Movies, Videos, and Sound",
|
|
19290
|
+
"Museums",
|
|
19291
|
+
"Museums, Historical Sites, and Zoos",
|
|
19292
|
+
"Musicians",
|
|
19293
|
+
"Nanotechnology Research",
|
|
19294
|
+
"Natural Gas Distribution",
|
|
19295
|
+
"Natural Gas Extraction",
|
|
19296
|
+
"Newspaper Publishing",
|
|
19297
|
+
"Non-profit Organization Management",
|
|
19298
|
+
"Non-profit Organizations",
|
|
19299
|
+
"Nonmetallic Mineral Mining",
|
|
19300
|
+
"Nonresidential Building Construction",
|
|
19301
|
+
"Nuclear Electric Power Generation",
|
|
19302
|
+
"Nursing Homes and Residential Care Facilities",
|
|
19303
|
+
"Office Administration",
|
|
19304
|
+
"Office Furniture and Fixtures Manufacturing",
|
|
19305
|
+
"Oil and Coal Product Manufacturing",
|
|
19306
|
+
"Oil and Gas",
|
|
19307
|
+
"Oil Extraction",
|
|
19308
|
+
"Oil, Gas, and Mining",
|
|
19309
|
+
"Online and Mail Order Retail",
|
|
19310
|
+
"Online Audio and Video Media",
|
|
19311
|
+
"Operations Consulting",
|
|
19312
|
+
"Optometrists",
|
|
19313
|
+
"Outpatient Care Centers",
|
|
19314
|
+
"Outsourcing and Offshoring Consulting",
|
|
19315
|
+
"Packaging & Containers",
|
|
19316
|
+
"Packaging and Containers Manufacturing",
|
|
19317
|
+
"Paint, Coating, and Adhesive Manufacturing",
|
|
19318
|
+
"Paper and Forest Product Manufacturing",
|
|
19319
|
+
"Pension Funds",
|
|
19320
|
+
"Performing Arts",
|
|
19321
|
+
"Performing Arts and Spectator Sports",
|
|
19322
|
+
"Periodical Publishing",
|
|
19323
|
+
"Personal and Laundry Services",
|
|
19324
|
+
"Personal Care Product Manufacturing",
|
|
19325
|
+
"Personal Care Services",
|
|
19326
|
+
"Pet Services",
|
|
19327
|
+
"Pharmaceutical Manufacturing",
|
|
19328
|
+
"Philanthropic Fundraising Services",
|
|
19329
|
+
"Photography",
|
|
19330
|
+
"Physical, Occupational and Speech Therapists",
|
|
19331
|
+
"Physicians",
|
|
19332
|
+
"Pipeline Transportation",
|
|
19333
|
+
"Plastics and Rubber Product Manufacturing",
|
|
19334
|
+
"Plastics Manufacturing",
|
|
19335
|
+
"Political Organizations",
|
|
19336
|
+
"Postal Services",
|
|
19337
|
+
"Primary and Secondary Education",
|
|
19338
|
+
"Primary Metal Manufacturing",
|
|
19339
|
+
"Primary/Secondary Education",
|
|
19340
|
+
"Printing Services",
|
|
19341
|
+
"Professional Organizations",
|
|
19342
|
+
"Professional Services",
|
|
19343
|
+
"Professional Training & Coaching",
|
|
19344
|
+
"Professional Training and Coaching",
|
|
19345
|
+
"Public Assistance Programs",
|
|
19346
|
+
"Public Health",
|
|
19347
|
+
"Public Policy Offices",
|
|
19348
|
+
"Public Relations and Communications Services",
|
|
19349
|
+
"Public Safety",
|
|
19350
|
+
"Racetracks",
|
|
19351
|
+
"Radio and Television Broadcasting",
|
|
19352
|
+
"Rail Transportation",
|
|
19353
|
+
"Railroad Equipment Manufacturing",
|
|
19354
|
+
"Ranching",
|
|
19355
|
+
"Ranching and Fisheries",
|
|
19356
|
+
"Real Estate",
|
|
19357
|
+
"Real Estate Agents and Brokers",
|
|
19358
|
+
"Real Estate and Equipment Rental Services",
|
|
19359
|
+
"Recreational Facilities",
|
|
19360
|
+
"Regenerative Design",
|
|
19361
|
+
"Religious Institutions",
|
|
19362
|
+
"Renewable Energy Equipment Manufacturing",
|
|
19363
|
+
"Renewable Energy Power Generation",
|
|
19364
|
+
"Renewables & Environment",
|
|
19365
|
+
"Repair and Maintenance",
|
|
19366
|
+
"Research Services",
|
|
19367
|
+
"Residential Building Construction",
|
|
19368
|
+
"Restaurants",
|
|
19369
|
+
"Retail",
|
|
19370
|
+
"Retail Apparel and Fashion",
|
|
19371
|
+
"Retail Appliances, Electrical, and Electronic Equipment",
|
|
19372
|
+
"Retail Art Dealers",
|
|
19373
|
+
"Retail Art Supplies",
|
|
19374
|
+
"Retail Books and Printed News",
|
|
19375
|
+
"Retail Building Materials and Garden Equipment",
|
|
19376
|
+
"Retail Florists",
|
|
19377
|
+
"Retail Furniture and Home Furnishings",
|
|
19378
|
+
"Retail Gasoline",
|
|
19379
|
+
"Retail Groceries",
|
|
19380
|
+
"Retail Health and Personal Care Products",
|
|
19381
|
+
"Retail Luxury Goods and Jewelry",
|
|
19382
|
+
"Retail Motor Vehicles",
|
|
19383
|
+
"Retail Musical Instruments",
|
|
19384
|
+
"Retail Office Equipment",
|
|
19385
|
+
"Retail Office Supplies and Gifts",
|
|
19386
|
+
"Retail Pharmacies",
|
|
19387
|
+
"Retail Recyclable Materials & Used Merchandise",
|
|
19388
|
+
"Reupholstery and Furniture Repair",
|
|
19389
|
+
"Robot Manufacturing",
|
|
19390
|
+
"Robotics Engineering",
|
|
19391
|
+
"Rubber Products Manufacturing",
|
|
19392
|
+
"Satellite Telecommunications",
|
|
19393
|
+
"Savings Institutions",
|
|
19394
|
+
"School and Employee Bus Services",
|
|
19395
|
+
"Seafood Product Manufacturing",
|
|
19396
|
+
"Secretarial Schools",
|
|
19397
|
+
"Securities and Commodity Exchanges",
|
|
19398
|
+
"Security and Investigations",
|
|
19399
|
+
"Security Guards and Patrol Services",
|
|
19400
|
+
"Security Systems Services",
|
|
19401
|
+
"Semiconductor Manufacturing",
|
|
19402
|
+
"Services for Renewable Energy",
|
|
19403
|
+
"Services for the Elderly and Disabled",
|
|
19404
|
+
"Sheet Music Publishing",
|
|
19405
|
+
"Shipbuilding",
|
|
19406
|
+
"Shuttles and Special Needs Transportation Services",
|
|
19407
|
+
"Sightseeing Transportation",
|
|
19408
|
+
"Skiing Facilities",
|
|
19409
|
+
"Smart Meter Manufacturing",
|
|
19410
|
+
"Soap and Cleaning Product Manufacturing",
|
|
19411
|
+
"Social Networking Platforms",
|
|
19412
|
+
"Software Development",
|
|
19413
|
+
"Solar Electric Power Generation",
|
|
19414
|
+
"Sound Recording",
|
|
19415
|
+
"Space Research and Technology",
|
|
19416
|
+
"Specialty Trade Contractors",
|
|
19417
|
+
"Spectator Sports",
|
|
19418
|
+
"Sporting Goods Manufacturing",
|
|
19419
|
+
"Sports and Recreation Instruction",
|
|
19420
|
+
"Sports Teams and Clubs",
|
|
19421
|
+
"Spring and Wire Product Manufacturing",
|
|
19422
|
+
"Staffing and Recruiting",
|
|
19423
|
+
"Steam and Air-Conditioning Supply",
|
|
19424
|
+
"Strategic Management Services",
|
|
19425
|
+
"Subdivision of Land",
|
|
19426
|
+
"Sugar and Confectionery Product Manufacturing",
|
|
19427
|
+
"Surveying and Mapping Services",
|
|
19428
|
+
"Taxi and Limousine Services",
|
|
19429
|
+
"Technical and Vocational Training",
|
|
19430
|
+
"Technology, Information and Internet",
|
|
19431
|
+
"Technology, Information and Media",
|
|
19432
|
+
"Telecommunications",
|
|
19433
|
+
"Telecommunications Carriers",
|
|
19434
|
+
"Telephone Call Centers",
|
|
19435
|
+
"Temporary Help Services",
|
|
19436
|
+
"Textile Manufacturing",
|
|
19437
|
+
"Theater Companies",
|
|
19438
|
+
"Think Tanks",
|
|
19439
|
+
"Tobacco Manufacturing",
|
|
19440
|
+
"Translation and Localization",
|
|
19441
|
+
"Transportation Equipment Manufacturing",
|
|
19442
|
+
"Transportation Programs",
|
|
19443
|
+
"Transportation, Logistics, Supply Chain and Storage",
|
|
19444
|
+
"Travel Arrangements",
|
|
19445
|
+
"Truck Transportation",
|
|
19446
|
+
"Trusts and Estates",
|
|
19447
|
+
"Turned Products and Fastener Manufacturing",
|
|
19448
|
+
"Urban Transit Services",
|
|
19449
|
+
"Utilities",
|
|
19450
|
+
"Utilities Administration",
|
|
19451
|
+
"Utility System Construction",
|
|
19452
|
+
"Vehicle Repair and Maintenance",
|
|
19453
|
+
"Venture Capital & Private Equity",
|
|
19454
|
+
"Venture Capital and Private Equity Principals",
|
|
19455
|
+
"Veterinary",
|
|
19456
|
+
"Veterinary Services",
|
|
19457
|
+
"Vocational Rehabilitation Services",
|
|
19458
|
+
"Warehousing and Storage",
|
|
19459
|
+
"Waste Collection",
|
|
19460
|
+
"Waste Treatment and Disposal",
|
|
19461
|
+
"Water Supply and Irrigation Systems",
|
|
19462
|
+
"Water, Waste, Steam, and Air Conditioning Services",
|
|
19463
|
+
"Wellness and Fitness Services",
|
|
19464
|
+
"Wholesale",
|
|
19465
|
+
"Wholesale Alcoholic Beverages",
|
|
19466
|
+
"Wholesale Apparel and Sewing Supplies",
|
|
19467
|
+
"Wholesale Appliances, Electrical, and Electronics",
|
|
19468
|
+
"Wholesale Building Materials",
|
|
19469
|
+
"Wholesale Chemical and Allied Products",
|
|
19470
|
+
"Wholesale Computer Equipment",
|
|
19471
|
+
"Wholesale Drugs and Sundries",
|
|
19472
|
+
"Wholesale Food and Beverage",
|
|
19473
|
+
"Wholesale Footwear",
|
|
19474
|
+
"Wholesale Furniture and Home Furnishings",
|
|
19475
|
+
"Wholesale Hardware, Plumbing, Heating Equipment",
|
|
19476
|
+
"Wholesale Import and Export",
|
|
19477
|
+
"Wholesale Luxury Goods and Jewelry",
|
|
19478
|
+
"Wholesale Machinery",
|
|
19479
|
+
"Wholesale Metals and Minerals",
|
|
19480
|
+
"Wholesale Motor Vehicles and Parts",
|
|
19481
|
+
"Wholesale Paper Products",
|
|
19482
|
+
"Wholesale Petroleum and Petroleum Products",
|
|
19483
|
+
"Wholesale Photography Equipment and Supplies",
|
|
19484
|
+
"Wholesale Raw Farm Products",
|
|
19485
|
+
"Wholesale Recyclable Materials",
|
|
19486
|
+
"Wind Electric Power Generation",
|
|
19487
|
+
"Wine & Spirits",
|
|
19488
|
+
"Wineries",
|
|
19489
|
+
"Wireless Services",
|
|
19490
|
+
"Women's Handbag Manufacturing",
|
|
19491
|
+
"Wood Product Manufacturing",
|
|
19492
|
+
"Writing and Editing",
|
|
19493
|
+
"Zoos and Botanical Gardens"
|
|
19494
|
+
];
|
|
19495
|
+
var INDUSTRY_ALIASES = {
|
|
19496
|
+
saas: ["Software Development"],
|
|
19497
|
+
"b2b saas": ["Software Development"],
|
|
19498
|
+
software: ["Software Development"],
|
|
19499
|
+
ai: ["Software Development", "Technology, Information and Internet"],
|
|
19500
|
+
fintech: ["Financial Services"],
|
|
19501
|
+
devtools: ["Software Development"],
|
|
19502
|
+
cybersecurity: ["Computer and Network Security"],
|
|
19503
|
+
security: ["Computer and Network Security"],
|
|
19504
|
+
it: ["Information Technology & Services"],
|
|
19505
|
+
marketing: ["Marketing Services", "Advertising Services"],
|
|
19506
|
+
recruiting: ["Staffing and Recruiting"]
|
|
19507
|
+
};
|
|
19508
|
+
var LOWER = new Map(INDUSTRIES.map((name) => [name.toLowerCase(), name]));
|
|
19509
|
+
function industryLabels(value) {
|
|
19510
|
+
const wanted = value.trim().toLowerCase();
|
|
19511
|
+
const exact = LOWER.get(wanted);
|
|
19512
|
+
if (exact) return [exact];
|
|
19513
|
+
return INDUSTRY_ALIASES[wanted] ?? null;
|
|
19514
|
+
}
|
|
19515
|
+
function industrySuggestions(value) {
|
|
19516
|
+
const words = value.toLowerCase().split(/[^a-z0-9]+/).filter((word) => word.length > 2);
|
|
19517
|
+
return INDUSTRIES.filter((name) => words.some((word) => name.toLowerCase().includes(word))).slice(0, 3);
|
|
19518
|
+
}
|
|
19519
|
+
var SIZE_PLAIN = /^(\d+)\s*[-–to]+\s*(\d+)$/i;
|
|
19520
|
+
function companySizeLabels(value) {
|
|
19521
|
+
const plain = value.trim().toLowerCase().replace(/,/g, "");
|
|
19522
|
+
const exact = COMPANY_SIZES.find((size) => size === value.trim());
|
|
19523
|
+
if (exact) return [exact];
|
|
19524
|
+
const over = /^(?:>|over |more than )\s*(\d+)$|^(\d+)\+$/.exec(plain);
|
|
19525
|
+
if (over) return bands(Number(over[1] ?? over[2]), Number.MAX_SAFE_INTEGER);
|
|
19526
|
+
const under = /^(?:<|under |less than )\s*(\d+)$/.exec(plain);
|
|
19527
|
+
if (under) return bands(1, Number(under[1]) - 1);
|
|
19528
|
+
const range = SIZE_PLAIN.exec(plain);
|
|
19529
|
+
if (!range) return null;
|
|
19530
|
+
const low = Number(range[1]);
|
|
19531
|
+
const high = Number(range[2]);
|
|
19532
|
+
return low <= high ? bands(low, high) : null;
|
|
19533
|
+
}
|
|
19534
|
+
var BAND_EDGES = [[1, 4], [5, 19], [20, 99], [100, 249], [250, 499], [500, 999], [1e3, 4999], [5e3, 9999], [1e4, Number.MAX_SAFE_INTEGER]];
|
|
19535
|
+
function bands(low, high) {
|
|
19536
|
+
const hits = COMPANY_SIZES.filter((_, index) => {
|
|
19537
|
+
const [from, to] = BAND_EDGES[index];
|
|
19538
|
+
return from <= high && to >= low;
|
|
19539
|
+
});
|
|
19540
|
+
return hits.length ? hits : null;
|
|
19541
|
+
}
|
|
19542
|
+
function directoryFilters(input2) {
|
|
19543
|
+
const industries = [];
|
|
19544
|
+
for (const word of input2.industries ?? []) {
|
|
19545
|
+
const labels = industryLabels(word);
|
|
19546
|
+
if (!labels) {
|
|
19547
|
+
const near = industrySuggestions(word);
|
|
19548
|
+
return { ok: false, field: "industries", message: `"${word}" is not a known industry${near.length ? `; try ${near.join(" or ")}` : ""}` };
|
|
19549
|
+
}
|
|
19550
|
+
industries.push(...labels);
|
|
19551
|
+
}
|
|
19552
|
+
const sizes = [];
|
|
19553
|
+
for (const word of input2.company_sizes ?? []) {
|
|
19554
|
+
const labels = companySizeLabels(word);
|
|
19555
|
+
if (!labels) return { ok: false, field: "company_sizes", message: `"${word}" is not a size; use a range like 20-99` };
|
|
19556
|
+
sizes.push(...labels);
|
|
19557
|
+
}
|
|
19558
|
+
return { ok: true, industries: [...new Set(industries)], sizes: [...new Set(sizes)] };
|
|
19559
|
+
}
|
|
19560
|
+
|
|
18956
19561
|
// ../contracts/src/capabilities.ts
|
|
18957
19562
|
var text = (max) => external_exports.string().trim().min(1).max(max);
|
|
18958
19563
|
var optionalText = (max) => external_exports.string().trim().max(max).optional();
|
|
18959
19564
|
var limit = (id) => external_exports.number().int().min(1).max(TOOL_CATALOG[id].limit).optional();
|
|
18960
19565
|
var s = external_exports.string();
|
|
18961
19566
|
var n = external_exports.number().nullable();
|
|
19567
|
+
var companyFilters = {
|
|
19568
|
+
industries: external_exports.array(text(100)).min(1).max(10).optional().describe("Like SaaS"),
|
|
19569
|
+
company_sizes: external_exports.array(text(20)).min(1).max(9).optional().describe("Like 20-99")
|
|
19570
|
+
};
|
|
19571
|
+
var keywordsField = external_exports.array(text(60)).min(1).max(10).optional().describe("In company description");
|
|
19572
|
+
var pageField = external_exports.number().int().min(1).max(100).optional();
|
|
19573
|
+
function directoryRequest(input2) {
|
|
19574
|
+
const filters = directoryFilters(input2);
|
|
19575
|
+
return {
|
|
19576
|
+
...filters.ok ? { ...filters.industries.length ? { industries: filters.industries } : {}, ...filters.sizes.length ? { companySizes: filters.sizes } : {} } : { industries: [`invalid:${filters.message}`] },
|
|
19577
|
+
...input2.keywords?.length ? { companyWords: input2.keywords } : {},
|
|
19578
|
+
...input2.page ? { page: input2.page } : {}
|
|
19579
|
+
};
|
|
19580
|
+
}
|
|
18962
19581
|
var MAX_BATCH_PEOPLE = 100;
|
|
18963
19582
|
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`);
|
|
18964
19583
|
var toolPrice = (id, free = "Empty results are free.") => ({
|
|
@@ -19048,14 +19667,14 @@ var CAPABILITIES = {
|
|
|
19048
19667
|
}),
|
|
19049
19668
|
signals: capability({
|
|
19050
19669
|
title: "Hiring signals",
|
|
19051
|
-
description: "Companies hiring for a role in the past 30 days,
|
|
19052
|
-
input: external_exports.object({ role: text(200), location: optionalText(100), company: optionalText(100), limit: limit("signals") }).strict(),
|
|
19053
|
-
row: external_exports.object({ company: s, role: s, location: s, posted: s, url: s }),
|
|
19054
|
-
preview: ["company", "
|
|
19670
|
+
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.",
|
|
19671
|
+
input: external_exports.object({ role: text(200), location: optionalText(100), company: optionalText(100), ...companyFilters, page: pageField, limit: limit("signals") }).strict(),
|
|
19672
|
+
row: external_exports.object({ company: s, role: s, location: s, posted: s, domain: s, industry: s, employees: s, url: s }),
|
|
19673
|
+
preview: ["company", "domain", "role", "posted"],
|
|
19055
19674
|
noun: "signals",
|
|
19056
19675
|
price: toolPrice("signals"),
|
|
19057
19676
|
example: { role: "Sales Development Representative", location: "United States" },
|
|
19058
|
-
toolRequest: (input2) => ({ tool: "signals", query: input2.role, location: input2.location ?? "", company: input2.company ?? "", ...input2
|
|
19677
|
+
toolRequest: (input2) => ({ tool: "signals", query: input2.role, location: input2.location ?? "", company: input2.company ?? "", ...directoryRequest(input2), limit: input2.limit ?? TOOL_CATALOG.signals.limit })
|
|
19059
19678
|
}),
|
|
19060
19679
|
"verify-email": capability({
|
|
19061
19680
|
title: "Email verification",
|
|
@@ -19081,14 +19700,50 @@ var CAPABILITIES = {
|
|
|
19081
19700
|
}),
|
|
19082
19701
|
"people-search": capability({
|
|
19083
19702
|
title: "People search",
|
|
19084
|
-
description: "People by job titles and
|
|
19085
|
-
input: external_exports.object({ titles: external_exports.array(text(60)).min(1).max(5), location: optionalText(100), limit: limit("people-search") }).strict(),
|
|
19703
|
+
description: "People by job titles, where they live, and company industry, size or description. Up to 100 per page.",
|
|
19704
|
+
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(),
|
|
19086
19705
|
row: external_exports.object({ name: s, title: s, company: s, domain: s, industry: s, employees: s, location: s, url: s }),
|
|
19087
19706
|
preview: ["name", "title", "company", "location"],
|
|
19088
19707
|
noun: "people",
|
|
19089
19708
|
price: toolPrice("people-search"),
|
|
19090
|
-
example: { titles: ["VP Sales"], location: "United States" },
|
|
19091
|
-
toolRequest: (input2) => ({ tool: "people-search", query: input2.titles.join(", "), location: input2.location ?? "", ...input2
|
|
19709
|
+
example: { titles: ["VP Sales"], location: "United States", industries: ["SaaS"], company_sizes: ["20-99"] },
|
|
19710
|
+
toolRequest: (input2) => ({ tool: "people-search", query: input2.titles.join(", "), location: input2.location ?? "", ...directoryRequest(input2), limit: input2.limit ?? TOOL_CATALOG["people-search"].limit })
|
|
19711
|
+
}),
|
|
19712
|
+
"funding-signals": capability({
|
|
19713
|
+
title: "Funding signals",
|
|
19714
|
+
description: "Companies that announced a funding round recently, from news feeds, with amount, date and source.",
|
|
19715
|
+
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(),
|
|
19716
|
+
row: external_exports.object({ company: s, amount: n, currency: s, round: s, announced: s, domain: s, industry: s, employees: s, source: s }),
|
|
19717
|
+
preview: ["company", "domain", "amount", "announced"],
|
|
19718
|
+
noun: "companies",
|
|
19719
|
+
price: toolPrice("funding-signals"),
|
|
19720
|
+
example: { region: "US" },
|
|
19721
|
+
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 }),
|
|
19722
|
+
searchWords: "raised round series seed investors recently funded startup"
|
|
19723
|
+
}),
|
|
19724
|
+
"lookalike-companies": capability({
|
|
19725
|
+
title: "Lookalike companies",
|
|
19726
|
+
description: "Companies similar to one you name, from its domain, for finding more accounts like your best customers.",
|
|
19727
|
+
input: external_exports.object({ company: text(100).describe("Company domain, like vercel.com"), limit: limit("lookalike-companies") }).strict(),
|
|
19728
|
+
row: external_exports.object({ company: s, domain: s, industry: s }),
|
|
19729
|
+
preview: ["company", "domain", "industry"],
|
|
19730
|
+
noun: "companies",
|
|
19731
|
+
price: toolPrice("lookalike-companies"),
|
|
19732
|
+
example: { company: "vercel.com" },
|
|
19733
|
+
toolRequest: (input2) => ({ tool: "lookalike-companies", query: input2.company, limit: input2.limit ?? TOOL_CATALOG["lookalike-companies"].limit }),
|
|
19734
|
+
searchWords: "similar competitors like customers accounts"
|
|
19735
|
+
}),
|
|
19736
|
+
"post-engagers": capability({
|
|
19737
|
+
title: "Post engagers",
|
|
19738
|
+
description: "Who commented on or reacted to one post URL; a competitor's post finds warm leads.",
|
|
19739
|
+
input: external_exports.object({ post: text(500).describe("LinkedIn post URL"), page: pageField, limit: limit("post-engagers") }).strict(),
|
|
19740
|
+
row: external_exports.object({ name: s, headline: s, engagement: s, comment: s, url: s }),
|
|
19741
|
+
preview: ["name", "headline", "engagement"],
|
|
19742
|
+
noun: "people",
|
|
19743
|
+
price: toolPrice("post-engagers"),
|
|
19744
|
+
example: { post: "https://www.linkedin.com/posts/williamhgates_example-activity-7503320303024926720-1t50" },
|
|
19745
|
+
toolRequest: (input2) => ({ tool: "post-engagers", query: input2.post, ...input2.page ? { page: input2.page } : {}, limit: input2.limit ?? TOOL_CATALOG["post-engagers"].limit }),
|
|
19746
|
+
searchWords: "commented reacted liked warm competitor influencer"
|
|
19092
19747
|
}),
|
|
19093
19748
|
"google-search": capability({
|
|
19094
19749
|
title: "Google search",
|
|
@@ -19196,10 +19851,10 @@ var CAPABILITIES = {
|
|
|
19196
19851
|
var CAPABILITY_IDS = Object.keys(CAPABILITIES);
|
|
19197
19852
|
var capabilityIdSchema = external_exports.enum(CAPABILITY_IDS);
|
|
19198
19853
|
var paidArgs = {
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
idempotency_key: external_exports.string().pipe(external_exports.string().regex(/^[\x21-\x7e]{8,128}$/)).optional()
|
|
19202
|
-
dry_run: external_exports.boolean().optional()
|
|
19854
|
+
// No descriptions: these three repeat on every paid tool, and every agent tool list has a 2k-token budget. The server instructions explain them.
|
|
19855
|
+
max_credits: external_exports.number().int().min(0).max(1e5).optional(),
|
|
19856
|
+
idempotency_key: external_exports.string().pipe(external_exports.string().regex(/^[\x21-\x7e]{8,128}$/)).optional(),
|
|
19857
|
+
dry_run: external_exports.boolean().optional()
|
|
19203
19858
|
};
|
|
19204
19859
|
var price = (id) => TOOL_CATALOG[id].credits;
|
|
19205
19860
|
var findContactsInput = external_exports.object({
|
|
@@ -19213,9 +19868,13 @@ var findContactsInput = external_exports.object({
|
|
|
19213
19868
|
var buildListInput = external_exports.object({
|
|
19214
19869
|
titles: external_exports.array(text(60)).min(1).max(5).optional(),
|
|
19215
19870
|
company: text(100).optional().describe("Company domain: decision-makers there"),
|
|
19871
|
+
companies: external_exports.array(text(100)).min(1).max(100).optional().describe("Many domains"),
|
|
19216
19872
|
location: text(100).optional().describe("Country or city"),
|
|
19873
|
+
...companyFilters,
|
|
19874
|
+
keywords: keywordsField,
|
|
19217
19875
|
business_type: text(100).optional().describe("Local businesses, with location"),
|
|
19218
|
-
|
|
19876
|
+
page: pageField,
|
|
19877
|
+
limit: external_exports.number().int().min(1).max(100).optional(),
|
|
19219
19878
|
...paidArgs
|
|
19220
19879
|
}).strict();
|
|
19221
19880
|
var researchCompanyInput = external_exports.object({ company: text(100).describe("Company domain, like vercel.com"), ...paidArgs }).strict();
|
|
@@ -19223,9 +19882,34 @@ var findSignalsInput = external_exports.object({
|
|
|
19223
19882
|
role: text(200).describe("Role being hired"),
|
|
19224
19883
|
location: text(100).optional(),
|
|
19225
19884
|
company: text(100).optional().describe("Watch one company"),
|
|
19226
|
-
|
|
19885
|
+
...companyFilters,
|
|
19886
|
+
page: pageField,
|
|
19887
|
+
limit: external_exports.number().int().min(1).max(50).optional(),
|
|
19227
19888
|
...paidArgs
|
|
19228
19889
|
}).strict();
|
|
19890
|
+
var icpFields = {
|
|
19891
|
+
titles: external_exports.array(text(60)).min(1).max(5).optional(),
|
|
19892
|
+
location: text(100).optional(),
|
|
19893
|
+
...companyFilters,
|
|
19894
|
+
keywords: keywordsField
|
|
19895
|
+
};
|
|
19896
|
+
var findLeadsInput = external_exports.object({
|
|
19897
|
+
...icpFields,
|
|
19898
|
+
hiring_roles: external_exports.array(text(100)).min(1).max(5).optional().describe("Signal; a tool's name finds its users"),
|
|
19899
|
+
recently_funded: external_exports.boolean().optional().describe("Signal"),
|
|
19900
|
+
like_companies: external_exports.array(text(100)).min(1).max(5).optional().describe("Signal: domains"),
|
|
19901
|
+
post_urls: external_exports.array(text(500)).min(1).max(5).optional().describe("Signal: LinkedIn posts"),
|
|
19902
|
+
target: external_exports.number().int().min(1).max(500).optional().describe("Default 25"),
|
|
19903
|
+
max_per_company: external_exports.number().int().min(1).max(5).optional().describe("Default 2"),
|
|
19904
|
+
...paidArgs
|
|
19905
|
+
}).strict();
|
|
19906
|
+
var workspaceIcpInput = external_exports.object({ ...icpFields, notes: external_exports.string().trim().max(2e3).optional() }).strict();
|
|
19907
|
+
var workspaceInput = external_exports.object({
|
|
19908
|
+
action: external_exports.enum(["get", "set_icp", "exclude", "forget_seen"]),
|
|
19909
|
+
icp: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Fields of gtm_find_leads, plus notes"),
|
|
19910
|
+
domains: external_exports.array(text(100)).min(1).max(500).optional(),
|
|
19911
|
+
profiles: external_exports.array(text(300)).min(1).max(500).optional()
|
|
19912
|
+
}).strict();
|
|
19229
19913
|
var resultsInput = external_exports.object({
|
|
19230
19914
|
run_id: external_exports.string().min(1).max(64),
|
|
19231
19915
|
offset: external_exports.number().int().min(0).max(1e5).optional(),
|
|
@@ -19251,11 +19935,18 @@ var OUTCOME_TOOLS = {
|
|
|
19251
19935
|
},
|
|
19252
19936
|
gtm_build_list: {
|
|
19253
19937
|
title: "Build a lead list",
|
|
19254
|
-
description: `People by titles and
|
|
19938
|
+
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.`,
|
|
19255
19939
|
paid: true,
|
|
19256
19940
|
capabilities: ["people-search", "icp", "local-leads"],
|
|
19257
19941
|
input: buildListInput
|
|
19258
19942
|
},
|
|
19943
|
+
gtm_find_leads: {
|
|
19944
|
+
title: "Find leads",
|
|
19945
|
+
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.",
|
|
19946
|
+
paid: true,
|
|
19947
|
+
capabilities: ["people-search", "signals", "funding-signals", "lookalike-companies", "post-engagers", "icp", "email-finder"],
|
|
19948
|
+
input: findLeadsInput
|
|
19949
|
+
},
|
|
19259
19950
|
gtm_research_company: {
|
|
19260
19951
|
title: "Research a company",
|
|
19261
19952
|
description: `Company profile and website sales brief for one domain. Up to ${price("company") + price("website")} credits; misses free.`,
|
|
@@ -19265,7 +19956,7 @@ var OUTCOME_TOOLS = {
|
|
|
19265
19956
|
},
|
|
19266
19957
|
gtm_find_signals: {
|
|
19267
19958
|
title: "Find hiring signals",
|
|
19268
|
-
description: `Companies hiring for a role in the past 30 days,
|
|
19959
|
+
description: `Companies hiring for a role in the past 30 days, with website and size. ${price("signals")} credit per nonempty search.`,
|
|
19269
19960
|
paid: true,
|
|
19270
19961
|
capabilities: ["signals"],
|
|
19271
19962
|
input: findSignalsInput
|
|
@@ -19284,6 +19975,13 @@ var OUTCOME_TOOLS = {
|
|
|
19284
19975
|
capabilities: CAPABILITY_IDS,
|
|
19285
19976
|
input: toolsInput
|
|
19286
19977
|
},
|
|
19978
|
+
gtm_workspace: {
|
|
19979
|
+
title: "Workspace memory",
|
|
19980
|
+
description: "Free: saved ICP and exclusions gtm_find_leads uses; it also skips people already found.",
|
|
19981
|
+
paid: false,
|
|
19982
|
+
capabilities: [],
|
|
19983
|
+
input: workspaceInput
|
|
19984
|
+
},
|
|
19287
19985
|
gtm_account: {
|
|
19288
19986
|
title: "Account",
|
|
19289
19987
|
description: "Free: balance, agent cap, recent spend or batch quote.",
|
|
@@ -19324,9 +20022,13 @@ var agentAnswerSchema = external_exports.object({
|
|
|
19324
20022
|
next: agentNextSchema,
|
|
19325
20023
|
/** Refusals: the fields the call does accept. */
|
|
19326
20024
|
fields: external_exports.array(external_exports.string().max(40)).max(12).optional(),
|
|
19327
|
-
/**
|
|
20025
|
+
/** Related link, e.g. a run's CSV or the public record behind a quote. */
|
|
19328
20026
|
link: external_exports.string().max(512).optional(),
|
|
19329
|
-
|
|
20027
|
+
/** Out of credits, and the owner lets this agent pay from its own wallet: where to buy them, and how many it needs. */
|
|
20028
|
+
top_up: external_exports.object({ url: external_exports.string().max(256), credits: external_exports.number().int().positive() }).optional(),
|
|
20029
|
+
replayed: external_exports.literal(true).optional(),
|
|
20030
|
+
/** Lead searches: what was rejected and why the search stopped. */
|
|
20031
|
+
report: external_exports.string().max(240).optional()
|
|
19330
20032
|
}).strict();
|
|
19331
20033
|
var byteLength = (value) => new TextEncoder().encode(value).length;
|
|
19332
20034
|
var DEFAULT_NEXT = { tool: "gtm_account", args: {} };
|
|
@@ -19365,7 +20067,9 @@ function build(draft, rowCount, columnCount, cellMax) {
|
|
|
19365
20067
|
next: draft.next ?? DEFAULT_NEXT,
|
|
19366
20068
|
...draft.fields?.length ? { fields: draft.fields.slice(0, 12).map((field) => field.slice(0, 40)) } : {},
|
|
19367
20069
|
...draft.link ? { link: draft.link } : {},
|
|
19368
|
-
...draft.
|
|
20070
|
+
...draft.top_up ? { top_up: draft.top_up } : {},
|
|
20071
|
+
...draft.replayed ? { replayed: true } : {},
|
|
20072
|
+
...draft.report ? { report: draft.report.slice(0, 240) } : {}
|
|
19369
20073
|
};
|
|
19370
20074
|
}
|
|
19371
20075
|
var fits = (answer) => byteLength(JSON.stringify(answer)) <= AGENT_ANSWER_MAX_BYTES && byteLength(answerText(answer)) <= AGENT_ANSWER_MAX_BYTES;
|
|
@@ -19401,6 +20105,7 @@ function answerText(answer) {
|
|
|
19401
20105
|
if (answer.balance !== null) lines.push(`balance: ${answer.balance}`);
|
|
19402
20106
|
if (answer.quote !== void 0) lines.push(`quote: ${answer.quote}`);
|
|
19403
20107
|
if (answer.replayed) lines.push("replayed: true");
|
|
20108
|
+
if (answer.report) lines.push(`report: ${answer.report}`);
|
|
19404
20109
|
if (answer.total || answer.rows.length) lines.push(`total: ${answer.total}`);
|
|
19405
20110
|
if (answer.rows.length) {
|
|
19406
20111
|
lines.push(`${answer.label}[${answer.rows.length}]{${answer.columns.join(",")}}:`);
|
|
@@ -19408,6 +20113,7 @@ function answerText(answer) {
|
|
|
19408
20113
|
}
|
|
19409
20114
|
if (answer.fields?.length) lines.push(`fields[${answer.fields.length}]: ${answer.fields.join(",")}`);
|
|
19410
20115
|
if (answer.link) lines.push(`link: ${answer.link}`);
|
|
20116
|
+
if (answer.top_up) lines.push(`top_up: ${answer.top_up.credits} credits at ${answer.top_up.url}`);
|
|
19411
20117
|
if (answer.next) lines.push(`next: ${answer.next.tool}(${JSON.stringify(answer.next.args)})`);
|
|
19412
20118
|
return lines.join("\n");
|
|
19413
20119
|
}
|
|
@@ -19419,6 +20125,13 @@ var agentScopeSchema = external_exports.enum(AGENT_SCOPES);
|
|
|
19419
20125
|
var agentKindSchema = external_exports.enum(["connector", "cli", "token"]);
|
|
19420
20126
|
var capPeriodSchema = external_exports.enum(["day", "week", "month"]);
|
|
19421
20127
|
var creditCapSchema = external_exports.number().int().min(1).max(1e6);
|
|
20128
|
+
var agentEnsSchema = external_exports.object({
|
|
20129
|
+
name: external_exports.string(),
|
|
20130
|
+
/** active: the record names this agent. stopped: it does not. unknown: the chain has been unreadable too long to say. */
|
|
20131
|
+
status: external_exports.enum(["active", "stopped", "unknown"])
|
|
20132
|
+
});
|
|
20133
|
+
var agentEnsLinkSchema = external_exports.object({ name: external_exports.string().trim().min(3).max(255) }).strict();
|
|
20134
|
+
var agentEnsMismatchSchema = external_exports.object({ error: external_exports.literal("ens_record_mismatch"), name: external_exports.string(), key: external_exports.string(), value: external_exports.string() });
|
|
19422
20135
|
var agentSummarySchema = external_exports.object({
|
|
19423
20136
|
id: external_exports.string(),
|
|
19424
20137
|
name: external_exports.string(),
|
|
@@ -19432,6 +20145,10 @@ var agentSummarySchema = external_exports.object({
|
|
|
19432
20145
|
spent: external_exports.number().int().nonnegative(),
|
|
19433
20146
|
/** The owner lets this agent use code mode (gtm_execute); off by default. */
|
|
19434
20147
|
allow_execute: external_exports.boolean(),
|
|
20148
|
+
/** The ENS name this agent answers to, when the owner linked one. */
|
|
20149
|
+
ens: agentEnsSchema.nullable(),
|
|
20150
|
+
/** The owner lets this agent buy credits from its own wallet; off by default. */
|
|
20151
|
+
allow_topup: external_exports.boolean(),
|
|
19435
20152
|
created_at: external_exports.number().int(),
|
|
19436
20153
|
last_used_at: external_exports.number().int().nullable()
|
|
19437
20154
|
});
|
|
@@ -19447,7 +20164,8 @@ var agentUpdateSchema = external_exports.object({
|
|
|
19447
20164
|
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
19448
20165
|
credit_cap: creditCapSchema.optional(),
|
|
19449
20166
|
cap_period: capPeriodSchema.optional(),
|
|
19450
|
-
allow_execute: external_exports.boolean().optional()
|
|
20167
|
+
allow_execute: external_exports.boolean().optional(),
|
|
20168
|
+
allow_topup: external_exports.boolean().optional()
|
|
19451
20169
|
}).strict().refine((value) => Object.keys(value).length > 0, "Nothing to update");
|
|
19452
20170
|
var connectorConsentSchema = external_exports.object({
|
|
19453
20171
|
id: external_exports.string(),
|
|
@@ -19496,6 +20214,45 @@ var clientMetadataDocumentSchema = external_exports.object({
|
|
|
19496
20214
|
(document) => (document.token_endpoint_auth_method ?? "none") === "none" || document.token_endpoint_auth_methods_supported?.includes("none") === true,
|
|
19497
20215
|
{ message: "Client must support token_endpoint_auth_method none", path: ["token_endpoint_auth_method"] }
|
|
19498
20216
|
);
|
|
20217
|
+
var agentApprovalStatusSchema = external_exports.enum(["pending", "approved", "denied", "used", "expired"]);
|
|
20218
|
+
var worldVerifyFailureSchema = external_exports.enum([
|
|
20219
|
+
"cancelled",
|
|
20220
|
+
"issuer_mismatch",
|
|
20221
|
+
"exchange_failed",
|
|
20222
|
+
"invalid_token",
|
|
20223
|
+
"stale_authentication",
|
|
20224
|
+
"insufficient_assurance",
|
|
20225
|
+
"unavailable",
|
|
20226
|
+
"identity_mismatch",
|
|
20227
|
+
"identity_in_use",
|
|
20228
|
+
"expired",
|
|
20229
|
+
"unknown_attempt"
|
|
20230
|
+
]);
|
|
20231
|
+
var agentApprovalSchema = external_exports.object({
|
|
20232
|
+
id: external_exports.string(),
|
|
20233
|
+
agent: external_exports.object({ id: external_exports.string(), name: external_exports.string() }),
|
|
20234
|
+
tool: external_exports.string(),
|
|
20235
|
+
description: external_exports.string(),
|
|
20236
|
+
credits: external_exports.number().int(),
|
|
20237
|
+
cap_credits: external_exports.number().int(),
|
|
20238
|
+
cap_period: capPeriodSchema,
|
|
20239
|
+
spent_credits: external_exports.number().int(),
|
|
20240
|
+
status: agentApprovalStatusSchema,
|
|
20241
|
+
created_at: external_exports.number().int(),
|
|
20242
|
+
expires_at: external_exports.number().int(),
|
|
20243
|
+
decided_at: external_exports.number().int().nullable(),
|
|
20244
|
+
/** World ID checks for this request: whether one passed, until when it can approve, and how. */
|
|
20245
|
+
world: external_exports.object({
|
|
20246
|
+
linked: external_exports.boolean(),
|
|
20247
|
+
verified: external_exports.boolean(),
|
|
20248
|
+
fresh_until: external_exports.number().int().nullable(),
|
|
20249
|
+
method: external_exports.enum(["proof", "passkey"]).nullable(),
|
|
20250
|
+
level: external_exports.string().nullable(),
|
|
20251
|
+
last_error: worldVerifyFailureSchema.nullable()
|
|
20252
|
+
})
|
|
20253
|
+
});
|
|
20254
|
+
var agentApprovalResponseSchema = external_exports.object({ approval: agentApprovalSchema });
|
|
20255
|
+
var worldStartResponseSchema = external_exports.object({ authorize_url: external_exports.string().url() });
|
|
19499
20256
|
|
|
19500
20257
|
// ../contracts/src/agent-account.ts
|
|
19501
20258
|
var agentAccessSchema = external_exports.object({
|
|
@@ -19509,6 +20266,8 @@ var CODE_MODE_METHODS = {
|
|
|
19509
20266
|
build_list: "gtm_build_list",
|
|
19510
20267
|
research_company: "gtm_research_company",
|
|
19511
20268
|
find_signals: "gtm_find_signals",
|
|
20269
|
+
find_leads: "gtm_find_leads",
|
|
20270
|
+
workspace: "gtm_workspace",
|
|
19512
20271
|
tools: "gtm_tools",
|
|
19513
20272
|
results: "gtm_results",
|
|
19514
20273
|
account: "gtm_account"
|
|
@@ -19530,7 +20289,7 @@ var tableRowsInput = external_exports.object({
|
|
|
19530
20289
|
}).strict();
|
|
19531
20290
|
var tableRowsPageSchema = external_exports.object({
|
|
19532
20291
|
run_id: external_exports.string(),
|
|
19533
|
-
status: external_exports.enum(
|
|
20292
|
+
status: external_exports.enum(AGENT_RUN_STATUSES),
|
|
19534
20293
|
label: external_exports.string(),
|
|
19535
20294
|
/** The run's preview columns first, then every other field its rows carry. */
|
|
19536
20295
|
columns: external_exports.array(external_exports.string()),
|
|
@@ -19543,6 +20302,110 @@ var tableRowsPageSchema = external_exports.object({
|
|
|
19543
20302
|
run_cost: external_exports.number().int().nonnegative()
|
|
19544
20303
|
}).strict();
|
|
19545
20304
|
|
|
20305
|
+
// ../contracts/src/topups.ts
|
|
20306
|
+
var address = external_exports.string().regex(/^0x[0-9a-fA-F]{40}$/);
|
|
20307
|
+
var txHashSchema = external_exports.string().regex(/^0x[0-9a-fA-F]{64}$/);
|
|
20308
|
+
var topupRailSchema = external_exports.enum(["usdc", "swap", "jar"]);
|
|
20309
|
+
var topupTokenSchema = external_exports.object({ symbol: external_exports.string(), address, decimals: external_exports.number().int(), jar: external_exports.boolean().optional() });
|
|
20310
|
+
var topupChainSchema = external_exports.object({ id: external_exports.number().int(), name: external_exports.string(), tokens: external_exports.array(topupTokenSchema) });
|
|
20311
|
+
var topupOptionsSchema = external_exports.object({
|
|
20312
|
+
enabled: external_exports.boolean(),
|
|
20313
|
+
micros_per_credit: external_exports.number().int().optional(),
|
|
20314
|
+
min_micros: external_exports.number().int().optional(),
|
|
20315
|
+
max_micros: external_exports.number().int().optional(),
|
|
20316
|
+
chains: external_exports.array(topupChainSchema).optional(),
|
|
20317
|
+
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()
|
|
20318
|
+
});
|
|
20319
|
+
var topupCreateSchema = external_exports.object({
|
|
20320
|
+
wallet: address,
|
|
20321
|
+
signature: external_exports.string().regex(/^0x[0-9a-fA-F]+$/).max(2048),
|
|
20322
|
+
issued_at: external_exports.number().int(),
|
|
20323
|
+
chain_id: external_exports.number().int().positive(),
|
|
20324
|
+
token: address,
|
|
20325
|
+
amount: external_exports.string().regex(/^[1-9][0-9]{0,77}$/),
|
|
20326
|
+
/** `auto` uses the jar when the payment fits it, and a swap otherwise. */
|
|
20327
|
+
rail: external_exports.enum(["usdc", "swap", "jar", "auto"]).optional(),
|
|
20328
|
+
/** A plan such as `growth-annual`. The server sizes the payment, so `amount` only prices the token: send one whole unit. */
|
|
20329
|
+
plan: external_exports.string().max(40).optional()
|
|
20330
|
+
});
|
|
20331
|
+
var topupProofSchema = external_exports.object({ tx_hash: txHashSchema.optional(), signature: external_exports.string().regex(/^0x[0-9a-fA-F]+$/).max(4096).optional() });
|
|
20332
|
+
var walletTxSchema = external_exports.object({ chain_id: external_exports.number().int(), to: address, data: external_exports.string(), value: external_exports.string() });
|
|
20333
|
+
var topupActionSchema = external_exports.discriminatedUnion("kind", [
|
|
20334
|
+
external_exports.object({ kind: external_exports.literal("send_tx"), label: external_exports.string(), tx: walletTxSchema }),
|
|
20335
|
+
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()) }),
|
|
20336
|
+
external_exports.object({ kind: external_exports.literal("wait"), label: external_exports.string() }),
|
|
20337
|
+
external_exports.object({ kind: external_exports.literal("none") })
|
|
20338
|
+
]);
|
|
20339
|
+
var topupViewSchema = external_exports.object({
|
|
20340
|
+
id: external_exports.string(),
|
|
20341
|
+
rail: topupRailSchema,
|
|
20342
|
+
routing: external_exports.string().nullable(),
|
|
20343
|
+
/** The plan being bought, such as `growth-annual`; null for a plain top-up. */
|
|
20344
|
+
plan: external_exports.string().nullable(),
|
|
20345
|
+
/** What the wallet pays, in the token's smallest unit. */
|
|
20346
|
+
amount_in: external_exports.string(),
|
|
20347
|
+
status: external_exports.enum(["open", "credited", "failed", "expired"]),
|
|
20348
|
+
estimated_credits: external_exports.number().int(),
|
|
20349
|
+
minimum_credits: external_exports.number().int(),
|
|
20350
|
+
credits: external_exports.number().int().nullable(),
|
|
20351
|
+
settlement_tx: external_exports.string().nullable(),
|
|
20352
|
+
action: topupActionSchema,
|
|
20353
|
+
error: external_exports.string().nullable()
|
|
20354
|
+
});
|
|
20355
|
+
var topupResponseSchema = external_exports.object({ topup: topupViewSchema });
|
|
20356
|
+
var agentTopupOptionsSchema = topupOptionsSchema.extend({ allowed: external_exports.boolean(), account: external_exports.string(), max_micros_per_payment: external_exports.number().int() });
|
|
20357
|
+
|
|
20358
|
+
// ../contracts/src/coverage.ts
|
|
20359
|
+
var coverageRowSchema = external_exports.object({
|
|
20360
|
+
capability: external_exports.string(),
|
|
20361
|
+
title: external_exports.string(),
|
|
20362
|
+
credits: external_exports.number().int().nonnegative(),
|
|
20363
|
+
unit: external_exports.string(),
|
|
20364
|
+
/** Finished runs in the window; 0 when the sample was too small to publish. */
|
|
20365
|
+
runs: external_exports.number().int().nonnegative(),
|
|
20366
|
+
succeeded: external_exports.number().int().nonnegative(),
|
|
20367
|
+
empty: external_exports.number().int().nonnegative(),
|
|
20368
|
+
failed: external_exports.number().int().nonnegative(),
|
|
20369
|
+
/** Share of finished runs that returned a result, 0 to 1; null when the sample was too small. */
|
|
20370
|
+
successRate: external_exports.number().min(0).max(1).nullable(),
|
|
20371
|
+
entityKey: external_exports.string(),
|
|
20372
|
+
entityUrl: external_exports.string()
|
|
20373
|
+
});
|
|
20374
|
+
var publicCoverageSchema = external_exports.object({
|
|
20375
|
+
/** UTC date of the snapshot, YYYY-MM-DD. */
|
|
20376
|
+
snapshotDay: external_exports.string(),
|
|
20377
|
+
windowDays: external_exports.number().int().positive(),
|
|
20378
|
+
/** The only wallet whose entities are read; anyone can write look-alike entities. */
|
|
20379
|
+
publisher: external_exports.string(),
|
|
20380
|
+
network: external_exports.object({ name: external_exports.string(), chainId: external_exports.number().int(), explorerUrl: external_exports.string() }),
|
|
20381
|
+
rows: external_exports.array(coverageRowSchema),
|
|
20382
|
+
/** This snapshot as a CSV on Swarm; null until its upload succeeds. */
|
|
20383
|
+
export: external_exports.object({ swarmRef: external_exports.string(), url: external_exports.string(), sha256: external_exports.string(), rows: external_exports.number().int().nonnegative() }).nullable()
|
|
20384
|
+
});
|
|
20385
|
+
|
|
20386
|
+
// ../contracts/src/arc.ts
|
|
20387
|
+
var arcOptionsSchema = external_exports.object({
|
|
20388
|
+
enabled: external_exports.boolean(),
|
|
20389
|
+
chain_id: external_exports.number().int().optional(),
|
|
20390
|
+
chain_name: external_exports.string().optional(),
|
|
20391
|
+
rpc_url: external_exports.string().optional(),
|
|
20392
|
+
explorer_url: external_exports.string().optional(),
|
|
20393
|
+
faucet_url: external_exports.string().optional(),
|
|
20394
|
+
usdc: external_exports.string().optional(),
|
|
20395
|
+
treasury: external_exports.string().optional()
|
|
20396
|
+
});
|
|
20397
|
+
var arcConfirmSchema = external_exports.object({ tx_hash: txHashSchema }).strict();
|
|
20398
|
+
var arcPaymentSchema = external_exports.object({
|
|
20399
|
+
tx_hash: txHashSchema,
|
|
20400
|
+
wallet: external_exports.string(),
|
|
20401
|
+
micros: external_exports.number().int(),
|
|
20402
|
+
/** What the same amount would buy in real USDC, shown for comparison only. */
|
|
20403
|
+
credits_equivalent: external_exports.number().int(),
|
|
20404
|
+
credits_granted: external_exports.literal(0),
|
|
20405
|
+
explorer_url: external_exports.string()
|
|
20406
|
+
});
|
|
20407
|
+
var arcPaymentResponseSchema = external_exports.object({ payment: arcPaymentSchema });
|
|
20408
|
+
|
|
19546
20409
|
// ../contracts/src/index.ts
|
|
19547
20410
|
var lookupStatusSchema = external_exports.enum(["found", "not_found", "error"]);
|
|
19548
20411
|
var deliverabilitySchema = external_exports.enum(["verified", "unverified"]).nullable().transform((value) => value === "verified" ? value : null);
|
|
@@ -19574,6 +20437,7 @@ var lookupErrorSchema = external_exports.object({
|
|
|
19574
20437
|
credits: external_exports.object({ remaining: external_exports.number().int().nonnegative() }).optional()
|
|
19575
20438
|
});
|
|
19576
20439
|
var lookupEventSchema = external_exports.union([lookupResultSchema, lookupSummarySchema]);
|
|
20440
|
+
var historySourceSchema = external_exports.enum(["web", "agent"]);
|
|
19577
20441
|
var historyEntrySchema = external_exports.object({
|
|
19578
20442
|
url: external_exports.string(),
|
|
19579
20443
|
status: lookupStatusSchema,
|
|
@@ -19583,8 +20447,65 @@ var historyEntrySchema = external_exports.object({
|
|
|
19583
20447
|
deliverability: deliverabilitySchema,
|
|
19584
20448
|
lookedUpAt: external_exports.number().int().nonnegative()
|
|
19585
20449
|
});
|
|
20450
|
+
var lookupRunItemSchema = external_exports.object({
|
|
20451
|
+
position: external_exports.number().int().nonnegative(),
|
|
20452
|
+
url: external_exports.string(),
|
|
20453
|
+
status: lookupStatusSchema,
|
|
20454
|
+
name: external_exports.string().nullable(),
|
|
20455
|
+
title: external_exports.string().nullable(),
|
|
20456
|
+
email: external_exports.string().nullable(),
|
|
20457
|
+
deliverability: deliverabilitySchema,
|
|
20458
|
+
/** Credits this run charged for the profile; 0 for misses and repeats already paid for. */
|
|
20459
|
+
credits: external_exports.number().int().nonnegative()
|
|
20460
|
+
});
|
|
20461
|
+
var historyItemSchema = external_exports.discriminatedUnion("kind", [
|
|
20462
|
+
external_exports.object({
|
|
20463
|
+
kind: external_exports.literal("lookup"),
|
|
20464
|
+
id: external_exports.string(),
|
|
20465
|
+
/** "stopped" is a run that ended before every profile had a result (for example, the tab closed). */
|
|
20466
|
+
status: external_exports.enum(["running", "completed", "stopped"]),
|
|
20467
|
+
total: external_exports.number().int().nonnegative(),
|
|
20468
|
+
found: external_exports.number().int().nonnegative(),
|
|
20469
|
+
credits: external_exports.number().int().nonnegative(),
|
|
20470
|
+
source: historySourceSchema,
|
|
20471
|
+
/** The first few profiles, enough to name the run; the rest load with GET /history/runs/:id. */
|
|
20472
|
+
preview: external_exports.array(lookupRunItemSchema).max(3),
|
|
20473
|
+
lookedUpAt: external_exports.number().int().nonnegative()
|
|
20474
|
+
}),
|
|
20475
|
+
external_exports.object({
|
|
20476
|
+
kind: external_exports.literal("tool"),
|
|
20477
|
+
/** The saved run, reopened with GET /tool-runs/:id. */
|
|
20478
|
+
id: external_exports.string(),
|
|
20479
|
+
tool: toolIdSchema,
|
|
20480
|
+
status: toolRunSchema.shape.status,
|
|
20481
|
+
input: toolRequestSchema,
|
|
20482
|
+
rowCount: external_exports.number().int().nonnegative(),
|
|
20483
|
+
credits: external_exports.number().int().nonnegative(),
|
|
20484
|
+
source: historySourceSchema,
|
|
20485
|
+
lookedUpAt: external_exports.number().int().nonnegative()
|
|
20486
|
+
})
|
|
20487
|
+
]);
|
|
20488
|
+
var historyFilterSchema = external_exports.object({
|
|
20489
|
+
kind: external_exports.enum(["lookup", "tool"]).optional(),
|
|
20490
|
+
source: historySourceSchema.optional(),
|
|
20491
|
+
/** Matches names, titles, emails and profile URLs in lookups, and tool inputs and names. */
|
|
20492
|
+
q: external_exports.string().trim().max(100).optional()
|
|
20493
|
+
});
|
|
19586
20494
|
var historyResponseSchema = external_exports.object({
|
|
19587
|
-
|
|
20495
|
+
items: external_exports.array(historyItemSchema),
|
|
20496
|
+
/** Pass as `cursor` for the next page; null when this page is the last. */
|
|
20497
|
+
nextCursor: external_exports.string().nullable(),
|
|
20498
|
+
/** Totals across the whole history for the current search, ignoring kind and source; first page only. */
|
|
20499
|
+
counts: external_exports.object({
|
|
20500
|
+
all: external_exports.number().int().nonnegative(),
|
|
20501
|
+
lookup: external_exports.number().int().nonnegative(),
|
|
20502
|
+
tool: external_exports.number().int().nonnegative(),
|
|
20503
|
+
agent: external_exports.number().int().nonnegative()
|
|
20504
|
+
}).nullable()
|
|
20505
|
+
});
|
|
20506
|
+
var historyRunResponseSchema = external_exports.object({
|
|
20507
|
+
run: historyItemSchema,
|
|
20508
|
+
items: external_exports.array(lookupRunItemSchema)
|
|
19588
20509
|
});
|
|
19589
20510
|
var usageResponseSchema = external_exports.object({
|
|
19590
20511
|
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(),
|
|
@@ -19599,6 +20520,23 @@ var usageResponseSchema = external_exports.object({
|
|
|
19599
20520
|
errors: external_exports.number().int().nonnegative()
|
|
19600
20521
|
})
|
|
19601
20522
|
});
|
|
20523
|
+
var planIdSchema = external_exports.enum(CREDIT_PLANS.map((plan) => plan.id));
|
|
20524
|
+
var billingSchema = external_exports.enum(["monthly", "annual"]);
|
|
20525
|
+
var checkoutPurchaseQuerySchema = external_exports.object({
|
|
20526
|
+
plan: planIdSchema,
|
|
20527
|
+
billing: billingSchema,
|
|
20528
|
+
since: external_exports.coerce.number().int().nonnegative(),
|
|
20529
|
+
/** The browser's clock when it asked, so the API can read `since` on its own clock. */
|
|
20530
|
+
now: external_exports.coerce.number().int().nonnegative()
|
|
20531
|
+
});
|
|
20532
|
+
var checkoutPurchaseResponseSchema = external_exports.object({
|
|
20533
|
+
purchase: external_exports.object({
|
|
20534
|
+
plan: planIdSchema,
|
|
20535
|
+
billing: billingSchema,
|
|
20536
|
+
credits: external_exports.number().int().positive(),
|
|
20537
|
+
creditedAt: external_exports.number().int().nonnegative()
|
|
20538
|
+
}).nullable()
|
|
20539
|
+
});
|
|
19602
20540
|
var externalErrorSchema = external_exports.object({
|
|
19603
20541
|
error: external_exports.string(),
|
|
19604
20542
|
request_id: external_exports.string(),
|
|
@@ -19622,6 +20560,8 @@ var TOOL_COMMANDS = {
|
|
|
19622
20560
|
gtm_find_signals: "signals",
|
|
19623
20561
|
gtm_results: "results",
|
|
19624
20562
|
gtm_tools: "tools",
|
|
20563
|
+
gtm_find_leads: "leads",
|
|
20564
|
+
gtm_workspace: "workspace",
|
|
19625
20565
|
gtm_account: "account"
|
|
19626
20566
|
};
|
|
19627
20567
|
var GLOBAL = {
|
|
@@ -19633,15 +20573,18 @@ var GLOBAL = {
|
|
|
19633
20573
|
version: { type: "boolean", short: "v" }
|
|
19634
20574
|
};
|
|
19635
20575
|
var PAID = { "max-credits": { type: "string" }, "dry-run": { type: "boolean" }, "idempotency-key": { type: "string" } };
|
|
20576
|
+
var FILTERS = { industry: { type: "string", multiple: true }, size: { type: "string", multiple: true } };
|
|
19636
20577
|
var SPECS = {
|
|
19637
20578
|
login: { "no-browser": { type: "boolean" } },
|
|
19638
20579
|
logout: {},
|
|
19639
20580
|
whoami: {},
|
|
19640
20581
|
"auth-header": {},
|
|
19641
20582
|
contacts: { file: { type: "string" }, column: { type: "string" }, out: { type: "string" }, "run-id": { type: "string" }, find: { type: "string", multiple: true }, verify: { type: "boolean" }, ...PAID },
|
|
19642
|
-
list: { titles: { type: "string", multiple: true }, company: { type: "string" }, location: { type: "string" }, "business-type": { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
20583
|
+
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 },
|
|
20584
|
+
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 },
|
|
20585
|
+
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 } },
|
|
19643
20586
|
research: { ...PAID },
|
|
19644
|
-
signals: { location: { type: "string" }, company: { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
20587
|
+
signals: { location: { type: "string" }, company: { type: "string" }, ...FILTERS, page: { type: "string" }, limit: { type: "string" }, ...PAID },
|
|
19645
20588
|
results: { offset: { type: "string" }, csv: { type: "boolean" }, link: { type: "boolean" } },
|
|
19646
20589
|
tools: { input: { type: "string" }, file: { type: "string" }, column: { type: "string" }, out: { type: "string" }, ...PAID },
|
|
19647
20590
|
account: { count: { type: "string" }, file: { type: "string" }, column: { type: "string" } }
|
|
@@ -19735,7 +20678,21 @@ function build2(name, values, positionals) {
|
|
|
19735
20678
|
case "list": {
|
|
19736
20679
|
none("gtm list takes flags only, like --titles 'VP Sales'.");
|
|
19737
20680
|
const limit2 = int2(values, "limit", name);
|
|
19738
|
-
|
|
20681
|
+
const page = int2(values, "page", name);
|
|
20682
|
+
const companies = Array.isArray(values.company) ? values.company : [];
|
|
20683
|
+
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) } };
|
|
20684
|
+
}
|
|
20685
|
+
case "leads": {
|
|
20686
|
+
none("gtm leads takes flags only, like --titles 'Head of Sales' --target 25.");
|
|
20687
|
+
const target = int2(values, "target", name);
|
|
20688
|
+
const perCompany = int2(values, "max-per-company", name);
|
|
20689
|
+
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) } };
|
|
20690
|
+
}
|
|
20691
|
+
case "workspace": {
|
|
20692
|
+
const action = positionals[0] ?? "get";
|
|
20693
|
+
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);
|
|
20694
|
+
const icp = pick2(values, { titles: "titles", location: "location", industry: "industries", size: "company_sizes", keywords: "keywords", notes: "notes" });
|
|
20695
|
+
return { kind: "tool", tool: "gtm_workspace", args: { action: action.replace("-", "_"), ...action === "set-icp" ? { icp } : {}, ...pick2(values, { domain: "domains", profile: "profiles" }) } };
|
|
19739
20696
|
}
|
|
19740
20697
|
case "research":
|
|
19741
20698
|
if (positionals.length !== 1) throw new UsageError("Give one company domain, like vercel.com.", name);
|
|
@@ -19743,7 +20700,8 @@ function build2(name, values, positionals) {
|
|
|
19743
20700
|
case "signals": {
|
|
19744
20701
|
if (!positionals.length) throw new UsageError("Give the role being hired, like 'Account Executive'.", name);
|
|
19745
20702
|
const limit2 = int2(values, "limit", name);
|
|
19746
|
-
|
|
20703
|
+
const page = int2(values, "page", name);
|
|
20704
|
+
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) } };
|
|
19747
20705
|
}
|
|
19748
20706
|
case "results": {
|
|
19749
20707
|
if (!positionals.length) throw new UsageError("Give a run id, like gtm results run_abc.", name);
|
|
@@ -19868,6 +20826,20 @@ function commandFor(next) {
|
|
|
19868
20826
|
return commandArgv(next).map(shellQuote).join(" ");
|
|
19869
20827
|
}
|
|
19870
20828
|
|
|
20829
|
+
// src/batch-outcome.ts
|
|
20830
|
+
function batchOutcome(run, found, hasTable) {
|
|
20831
|
+
const failed2 = run.stop?.refusal?.status === "error" ? run.stop.refusal : null;
|
|
20832
|
+
return {
|
|
20833
|
+
failed: failed2,
|
|
20834
|
+
status: failed2 ? "error" : run.running ? "running" : found || !hasTable ? "completed" : "not_found",
|
|
20835
|
+
reason: run.stop && !run.running ? { reason: run.stop.reason } : {},
|
|
20836
|
+
emitOptions: run.stop && !run.running && !failed2 ? { exit: 3 } : {},
|
|
20837
|
+
cost: run.batches.reduce((sum, batch) => sum + batch.cost, run.failedCost),
|
|
20838
|
+
runCost: run.batches.reduce((sum, batch) => sum + batch.runCost, run.failedRunCost),
|
|
20839
|
+
balance: (failed2 ?? run.batches.at(-1)?.answer)?.balance ?? null
|
|
20840
|
+
};
|
|
20841
|
+
}
|
|
20842
|
+
|
|
19871
20843
|
// src/contacts.ts
|
|
19872
20844
|
import { createHash } from "node:crypto";
|
|
19873
20845
|
|
|
@@ -20249,18 +21221,16 @@ var STOP_WORDS = {
|
|
|
20249
21221
|
};
|
|
20250
21222
|
async function combined(session, command, run, total, budget, rerun, fileFields) {
|
|
20251
21223
|
const { batches, stop } = run;
|
|
20252
|
-
const failed2 = stop?.refusal?.status === "error" ? stop.refusal : null;
|
|
20253
21224
|
const sent = batches.reduce((sum, batch) => sum + batch.people.length, 0);
|
|
20254
|
-
const cost = batches.reduce((sum, batch) => sum + batch.cost, run.failedCost);
|
|
20255
|
-
const runCost = batches.reduce((sum, batch) => sum + batch.runCost, run.failedRunCost);
|
|
20256
21225
|
const runIds = batches.map((batch) => batch.answer.run_id).filter((id) => !!id);
|
|
20257
|
-
const balance = (failed2 ?? batches.at(-1)?.answer)?.balance ?? null;
|
|
20258
21226
|
const table = run.running ? null : await collectRows(session, batches);
|
|
20259
21227
|
if (table && command.out) await writeOut(session, command.out, table);
|
|
20260
21228
|
const unsent = total - sent;
|
|
20261
21229
|
const emails = table?.rows.filter((row) => row.email).length ?? 0;
|
|
20262
21230
|
const phones = table?.rows.filter((row) => row.phone).length ?? 0;
|
|
20263
21231
|
const found = table?.rows.filter((row) => row.status === "found").length ?? 0;
|
|
21232
|
+
const outcome = batchOutcome(run, found, table !== null);
|
|
21233
|
+
const { failed: failed2, status, cost, runCost, balance } = outcome;
|
|
20264
21234
|
const find = command.args.find ?? ["email"];
|
|
20265
21235
|
const wantsEmail = find.includes("email");
|
|
20266
21236
|
const wantsPhone = find.includes("phone");
|
|
@@ -20282,7 +21252,6 @@ async function combined(session, command, run, total, budget, rerun, fileFields)
|
|
|
20282
21252
|
}
|
|
20283
21253
|
const previewColumns = batches.find((batch) => batch.answer.columns.length)?.answer.columns ?? ["name", "email", "verdict"];
|
|
20284
21254
|
const rows = table?.rows ?? batches.flatMap((batch) => batch.answer.rows.map((cells) => Object.fromEntries(batch.answer.columns.map((name, i) => [name, cells[i] ?? null]))));
|
|
20285
|
-
const status = failed2 ? "error" : run.running ? "running" : found || !table ? "completed" : "not_found";
|
|
20286
21255
|
const budgetFlag = budget === null ? {} : { max_credits: budget };
|
|
20287
21256
|
const next = failed2 || run.running ? rerun(budgetFlag) : command.out && table ? ACCOUNT_NEXT : table ? rerun({ ...budgetFlag, out: `${command.file.replace(/\.csv$/i, "")}-contacts.csv` }) : { tool: "gtm_results", args: { run_id: runIds.at(-1) } };
|
|
20288
21257
|
const answer = shapeAnswer({
|
|
@@ -20297,7 +21266,7 @@ async function combined(session, command, run, total, budget, rerun, fileFields)
|
|
|
20297
21266
|
columns: previewColumns,
|
|
20298
21267
|
rows,
|
|
20299
21268
|
next,
|
|
20300
|
-
...
|
|
21269
|
+
...outcome.reason,
|
|
20301
21270
|
...batches.length && batches.every((batch) => batch.replayed) ? { replayed: true } : {}
|
|
20302
21271
|
});
|
|
20303
21272
|
const fields = {
|
|
@@ -20307,7 +21276,7 @@ async function combined(session, command, run, total, budget, rerun, fileFields)
|
|
|
20307
21276
|
unsent: unsent || void 0,
|
|
20308
21277
|
out: command.out ? table ? command.out : run.running ? NOT_WRITTEN_RUNNING : "not written: CSV links are unavailable" : void 0
|
|
20309
21278
|
};
|
|
20310
|
-
return session.emit(answer, fields,
|
|
21279
|
+
return session.emit(answer, fields, outcome.emitOptions);
|
|
20311
21280
|
}
|
|
20312
21281
|
|
|
20313
21282
|
// src/tools-file.ts
|
|
@@ -20374,8 +21343,7 @@ async function toolFile(session, command) {
|
|
|
20374
21343
|
}), fileFields);
|
|
20375
21344
|
}
|
|
20376
21345
|
const sent = run.batches.reduce((sum, batch) => sum + batch.people.length, 0);
|
|
20377
|
-
let cost = run
|
|
20378
|
-
let runCost = run.batches.reduce((sum, batch) => sum + batch.runCost, run.failedRunCost);
|
|
21346
|
+
let { cost, runCost } = batchOutcome(run, 0, false);
|
|
20379
21347
|
const runIds = run.batches.map((batch) => batch.answer.run_id).filter((id) => !!id);
|
|
20380
21348
|
const table = run.running ? null : await collectRows(session, run.batches);
|
|
20381
21349
|
const errored = table?.rows.filter((row) => row.status === "error" && row.url).map((row) => row.url) ?? [];
|
|
@@ -20393,7 +21361,8 @@ async function toolFile(session, command) {
|
|
|
20393
21361
|
const found = table?.rows.filter((row) => row.status === "found").length ?? 0;
|
|
20394
21362
|
const stillFailed = table?.rows.filter((row) => row.status === "error").length ?? 0;
|
|
20395
21363
|
const unsent = list.profiles.length - sent;
|
|
20396
|
-
const
|
|
21364
|
+
const outcome = batchOutcome(run, found, table !== null);
|
|
21365
|
+
const { failed: failed2 } = outcome;
|
|
20397
21366
|
const noun = definition.noun;
|
|
20398
21367
|
const summary = run.running ? `Batch ${run.batches.length} is still running after ${sent} of ${people}; rerun this command to wait and continue.` : failed2 ? `Stopped after ${sent} of ${people}, ${unsent} not sent: ${failed2.summary}` : run.stop ? `Stopped after ${sent} of ${people} (${run.stop.refusal?.summary ?? "budget reached"}); found ${plural2(found, noun.replace(/s$/, ""), noun)} so far.` : `Found ${found} of ${plural2(sent, noun.replace(/s$/, ""), noun)} across ${plural2(run.batches.length, "batch", "batches")}; ${cost ? `${plural2(cost, "credit")} charged` : "nothing was charged"}${sent - found - stillFailed ? `, misses free` : ""}${stillFailed ? `; ${stillFailed} failed twice, so rerun later for them` : ""}.`;
|
|
20399
21368
|
const columns = run.batches.find((batch) => batch.answer.columns.length)?.answer.columns ?? [...definition.preview, "status"];
|
|
@@ -20401,18 +21370,18 @@ async function toolFile(session, command) {
|
|
|
20401
21370
|
const budgetFlag = maxCredits === void 0 ? {} : { max_credits: maxCredits };
|
|
20402
21371
|
const next = failed2 || run.running || run.stop ? rerun(budgetFlag) : command.out && table ? ACCOUNT_NEXT : table ? rerun({ ...budgetFlag, out: `${command.file.replace(/\.csv$/i, "")}-${command.capability}.csv` }) : { tool: "gtm_results", args: { run_id: runIds.at(-1) } };
|
|
20403
21372
|
const answer = shapeAnswer({
|
|
20404
|
-
status:
|
|
21373
|
+
status: outcome.status,
|
|
20405
21374
|
summary,
|
|
20406
21375
|
run_id: runIds.length === 1 ? runIds[0] : null,
|
|
20407
21376
|
cost,
|
|
20408
21377
|
run_cost: runCost,
|
|
20409
|
-
balance:
|
|
21378
|
+
balance: outcome.balance,
|
|
20410
21379
|
total: table?.rows.length ?? sent,
|
|
20411
21380
|
label: noun,
|
|
20412
21381
|
columns,
|
|
20413
21382
|
rows,
|
|
20414
21383
|
next,
|
|
20415
|
-
...
|
|
21384
|
+
...outcome.reason,
|
|
20416
21385
|
...run.batches.every((batch) => batch.replayed) ? { replayed: true } : {}
|
|
20417
21386
|
});
|
|
20418
21387
|
return session.emit(answer, {
|
|
@@ -20421,14 +21390,14 @@ async function toolFile(session, command) {
|
|
|
20421
21390
|
run_ids: runIds.length > 1 ? runIds : void 0,
|
|
20422
21391
|
unsent: unsent || void 0,
|
|
20423
21392
|
out: command.out ? table ? command.out : "not written: still running" : void 0
|
|
20424
|
-
},
|
|
21393
|
+
}, outcome.emitOptions);
|
|
20425
21394
|
}
|
|
20426
21395
|
|
|
20427
21396
|
// src/gateway.ts
|
|
20428
21397
|
import { randomUUID } from "node:crypto";
|
|
20429
21398
|
|
|
20430
21399
|
// src/version.ts
|
|
20431
|
-
var VERSION = "0.1.
|
|
21400
|
+
var VERSION = "0.1.6";
|
|
20432
21401
|
|
|
20433
21402
|
// src/gateway.ts
|
|
20434
21403
|
var CliError = class extends Error {
|
|
@@ -20665,13 +21634,54 @@ var TOPICS = {
|
|
|
20665
21634
|
"",
|
|
20666
21635
|
"Options:",
|
|
20667
21636
|
" --titles TITLE One job title, no commas; repeat for up to 5",
|
|
20668
|
-
" --company DOMAIN Decision-makers at
|
|
20669
|
-
" --location PLACE
|
|
21637
|
+
" --company DOMAIN Decision-makers at a company domain; repeat for up to 100",
|
|
21638
|
+
" --location PLACE Where the people live: country or city",
|
|
21639
|
+
" --industry NAME Company industry, like SaaS; repeat for several",
|
|
21640
|
+
" --size RANGE Company employees, like 20-99; repeat for several",
|
|
21641
|
+
" --keywords WORD A word in the company's description; repeat for several",
|
|
20670
21642
|
" --business-type TYPE Local businesses, with --location",
|
|
21643
|
+
" --page N Results page, from 1",
|
|
20671
21644
|
" --limit N Most rows",
|
|
20672
21645
|
...PAID2
|
|
20673
21646
|
]
|
|
20674
21647
|
},
|
|
21648
|
+
leads: {
|
|
21649
|
+
summary: "Find a target number of new leads with emails and why each fits",
|
|
21650
|
+
lines: [
|
|
21651
|
+
"Usage:",
|
|
21652
|
+
" gtm leads --titles 'Head of Sales' --industry SaaS --size 20-99 --location 'United States' --target 25 --max-credits N",
|
|
21653
|
+
" gtm leads --hiring-role 'Founding SDR' --industry SaaS --size 5-99 --target 25 --max-credits N",
|
|
21654
|
+
" gtm leads --funded | --like vercel.com | --post <linkedin post url> ... --target 25 --max-credits N",
|
|
21655
|
+
"",
|
|
21656
|
+
tool("gtm_find_leads"),
|
|
21657
|
+
"",
|
|
21658
|
+
"Options:",
|
|
21659
|
+
" --titles TITLE Job titles of the people to reach; repeat for up to 5",
|
|
21660
|
+
" --location PLACE Where they live: country or city",
|
|
21661
|
+
" --industry NAME Company industry, like SaaS; repeat for several",
|
|
21662
|
+
" --size RANGE Company employees, like 20-99; repeat for several",
|
|
21663
|
+
" --keywords WORD A word in the company's description; repeat for several",
|
|
21664
|
+
" --hiring-role ROLE Signal: companies hiring this role; repeat for up to 5",
|
|
21665
|
+
" --funded Signal: companies that just raised",
|
|
21666
|
+
" --like DOMAIN Signal: companies similar to this one; repeat for up to 5",
|
|
21667
|
+
" --post URL Signal: people engaging with this LinkedIn post; repeat for up to 5",
|
|
21668
|
+
" --target N Leads with emails to find (default 25)",
|
|
21669
|
+
" --max-per-company N Default 2",
|
|
21670
|
+
...PAID2
|
|
21671
|
+
]
|
|
21672
|
+
},
|
|
21673
|
+
workspace: {
|
|
21674
|
+
summary: "Free: the ICP and exclusions saved for this account's agents",
|
|
21675
|
+
lines: [
|
|
21676
|
+
"Usage:",
|
|
21677
|
+
" gtm workspace",
|
|
21678
|
+
" gtm workspace set-icp --titles 'Head of Sales' --industry SaaS --size 20-99 --notes 'We sell ...'",
|
|
21679
|
+
" gtm workspace exclude --domain customer.com --profile https://www.linkedin.com/in/someone",
|
|
21680
|
+
" gtm workspace forget-seen",
|
|
21681
|
+
"",
|
|
21682
|
+
tool("gtm_workspace")
|
|
21683
|
+
]
|
|
21684
|
+
},
|
|
20675
21685
|
research: {
|
|
20676
21686
|
summary: "Company profile and website sales brief for one domain",
|
|
20677
21687
|
lines: ["Usage: gtm research <domain> --max-credits N", "", tool("gtm_research_company"), "", "Options:", ...PAID2]
|
|
@@ -20679,13 +21689,16 @@ var TOPICS = {
|
|
|
20679
21689
|
signals: {
|
|
20680
21690
|
summary: "Companies hiring for a role in the past 30 days",
|
|
20681
21691
|
lines: [
|
|
20682
|
-
"Usage: gtm signals <role> [--location PLACE] [--company DOMAIN] [--limit N] --max-credits N",
|
|
21692
|
+
"Usage: gtm signals <role> [--location PLACE] [--company DOMAIN] [--industry NAME] [--size RANGE] [--page N] [--limit N] --max-credits N",
|
|
20683
21693
|
"",
|
|
20684
21694
|
tool("gtm_find_signals"),
|
|
20685
21695
|
"",
|
|
20686
21696
|
"Options:",
|
|
20687
21697
|
" --location PLACE Where the role is",
|
|
20688
21698
|
" --company DOMAIN Watch one company",
|
|
21699
|
+
" --industry NAME Company industry, like SaaS; repeat for several",
|
|
21700
|
+
" --size RANGE Company employees, like 20-99; repeat for several",
|
|
21701
|
+
" --page N Results page, from 1",
|
|
20689
21702
|
" --limit N Most rows",
|
|
20690
21703
|
...PAID2
|
|
20691
21704
|
]
|
|
@@ -20865,6 +21878,102 @@ function sameService(target, apiUrl) {
|
|
|
20865
21878
|
return url2.host === api.host || url2.hostname === site && url2.port === api.port;
|
|
20866
21879
|
}
|
|
20867
21880
|
|
|
21881
|
+
// ../contracts/src/polling.ts
|
|
21882
|
+
var FOLLOW_WINDOW_MS = 10 * 6e4;
|
|
21883
|
+
var TOOL_POLL_POLICY = { delayMs: 2e3, maxDurationMs: FOLLOW_WINDOW_MS, errors: "pause" };
|
|
21884
|
+
var EVENT_POLL_POLICY = { ...TOOL_POLL_POLICY, errors: "retry", errorDelayMs: 4e3 };
|
|
21885
|
+
var CLI_POLL_POLICY = { delayMs: 4e3, errors: "pause", acceptLateRead: true };
|
|
21886
|
+
var pollDelay = (policy, attempt) => Math.min(policy.delayMs * (policy.multiplier ?? 1) ** attempt, policy.maxDelayMs ?? Infinity);
|
|
21887
|
+
var MAX_TIMER_MS = 2 ** 31 - 1;
|
|
21888
|
+
function longTimeout(callback, ms) {
|
|
21889
|
+
let timer;
|
|
21890
|
+
const arm = (remaining) => {
|
|
21891
|
+
timer = setTimeout(() => remaining > MAX_TIMER_MS ? arm(remaining - MAX_TIMER_MS) : callback(), Math.min(remaining, MAX_TIMER_MS));
|
|
21892
|
+
};
|
|
21893
|
+
arm(ms);
|
|
21894
|
+
return () => clearTimeout(timer);
|
|
21895
|
+
}
|
|
21896
|
+
async function pollUntil(options) {
|
|
21897
|
+
const { policy, signal, read, isDone } = options;
|
|
21898
|
+
if (!Number.isFinite(policy.maxDurationMs) && !Number.isFinite(policy.maxAttempts)) throw new Error("Polling requires a finite limit.");
|
|
21899
|
+
const now = options.now ?? Date.now;
|
|
21900
|
+
const deadline = now() + (policy.maxDurationMs ?? Infinity);
|
|
21901
|
+
let value = options.initial;
|
|
21902
|
+
let error61;
|
|
21903
|
+
let attempts = 0;
|
|
21904
|
+
let delayIndex = 0;
|
|
21905
|
+
let immediate = options.immediate ?? value === void 0;
|
|
21906
|
+
let failed2 = false;
|
|
21907
|
+
let stop;
|
|
21908
|
+
let cancelDeadline;
|
|
21909
|
+
let sleepTimer;
|
|
21910
|
+
let interrupt;
|
|
21911
|
+
const interrupted = new Promise((resolve) => {
|
|
21912
|
+
interrupt = () => resolve({ interrupted: true });
|
|
21913
|
+
});
|
|
21914
|
+
const abort = () => {
|
|
21915
|
+
stop = "cancelled";
|
|
21916
|
+
interrupt();
|
|
21917
|
+
};
|
|
21918
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
21919
|
+
if (signal?.aborted) abort();
|
|
21920
|
+
const acceptLate = policy.acceptLateRead === true;
|
|
21921
|
+
if (policy.maxDurationMs !== void 0 && !acceptLate) cancelDeadline = longTimeout(() => {
|
|
21922
|
+
stop = "limit";
|
|
21923
|
+
interrupt();
|
|
21924
|
+
}, policy.maxDurationMs);
|
|
21925
|
+
const result = (reason) => ({ reason, value, ...error61 === void 0 ? {} : { error: error61 } });
|
|
21926
|
+
try {
|
|
21927
|
+
for (; ; ) {
|
|
21928
|
+
if (stop) return result(stop);
|
|
21929
|
+
if (value !== void 0 && isDone(value)) return result("settled");
|
|
21930
|
+
if (policy.maxDurationMs !== void 0 && policy.maxDurationMs <= 0) return result("limit");
|
|
21931
|
+
if (attempts >= (policy.maxAttempts ?? Infinity)) return result("limit");
|
|
21932
|
+
if (!immediate) {
|
|
21933
|
+
const delay = failed2 && policy.errorDelayMs !== void 0 ? policy.errorDelayMs : pollDelay(policy, delayIndex);
|
|
21934
|
+
if (now() + delay > deadline) return result("limit");
|
|
21935
|
+
delayIndex += 1;
|
|
21936
|
+
const sleeping = options.sleep ? options.sleep(delay) : new Promise((resolve) => {
|
|
21937
|
+
sleepTimer = setTimeout(resolve, delay);
|
|
21938
|
+
});
|
|
21939
|
+
await Promise.race([sleeping, interrupted]);
|
|
21940
|
+
if (stop) return result(stop);
|
|
21941
|
+
}
|
|
21942
|
+
immediate = false;
|
|
21943
|
+
if (now() > deadline) return result("limit");
|
|
21944
|
+
attempts += 1;
|
|
21945
|
+
const readResult = await Promise.race([
|
|
21946
|
+
Promise.resolve().then(async () => {
|
|
21947
|
+
if (stop) return { kind: "interrupted" };
|
|
21948
|
+
try {
|
|
21949
|
+
return { kind: "value", value: await read() };
|
|
21950
|
+
} catch (error62) {
|
|
21951
|
+
return { kind: "error", error: error62 };
|
|
21952
|
+
}
|
|
21953
|
+
}),
|
|
21954
|
+
interrupted.then(() => ({ kind: "interrupted" }))
|
|
21955
|
+
]);
|
|
21956
|
+
if (stop) return result(stop);
|
|
21957
|
+
if (!acceptLate && now() > deadline) return result("limit");
|
|
21958
|
+
if (readResult.kind === "interrupted") return result(stop ?? "cancelled");
|
|
21959
|
+
if (readResult.kind === "error") {
|
|
21960
|
+
error61 = readResult.error;
|
|
21961
|
+
failed2 = true;
|
|
21962
|
+
if (policy.errors === "pause" || options.retryError?.(error61, value) === false) return result("error");
|
|
21963
|
+
} else {
|
|
21964
|
+
value = readResult.value;
|
|
21965
|
+
error61 = void 0;
|
|
21966
|
+
failed2 = false;
|
|
21967
|
+
options.onValue?.(value);
|
|
21968
|
+
}
|
|
21969
|
+
}
|
|
21970
|
+
} finally {
|
|
21971
|
+
cancelDeadline?.();
|
|
21972
|
+
clearTimeout(sleepTimer);
|
|
21973
|
+
signal?.removeEventListener("abort", abort);
|
|
21974
|
+
}
|
|
21975
|
+
}
|
|
21976
|
+
|
|
20868
21977
|
// src/credentials.ts
|
|
20869
21978
|
import { chmod, mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
20870
21979
|
import { join } from "node:path";
|
|
@@ -20933,7 +22042,7 @@ var CredentialStore = class {
|
|
|
20933
22042
|
|
|
20934
22043
|
// src/session.ts
|
|
20935
22044
|
var DEFAULT_API_URL = "https://api.gtmmaxing.com";
|
|
20936
|
-
var POLL_MS =
|
|
22045
|
+
var POLL_MS = CLI_POLL_POLICY.delayMs;
|
|
20937
22046
|
var LOOPBACK = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
|
|
20938
22047
|
function resolveApiUrl(flag, env, saved) {
|
|
20939
22048
|
const raw = flag ?? env ?? saved ?? DEFAULT_API_URL;
|
|
@@ -20997,11 +22106,16 @@ var Session = class _Session {
|
|
|
20997
22106
|
if (first.status !== "running" || !first.run_id) return first;
|
|
20998
22107
|
let answer = first;
|
|
20999
22108
|
if (this.options.wait) {
|
|
21000
|
-
const
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
22109
|
+
const outcome = await pollUntil({
|
|
22110
|
+
policy: { ...CLI_POLL_POLICY, maxDurationMs: this.options.timeoutSeconds * 1e3 },
|
|
22111
|
+
initial: first,
|
|
22112
|
+
read: () => this.gateway.call("gtm_results", { run_id: first.run_id }),
|
|
22113
|
+
isDone: (value) => value.status !== "running",
|
|
22114
|
+
now: () => this.io.now(),
|
|
22115
|
+
sleep: (ms) => this.io.sleep(ms)
|
|
22116
|
+
});
|
|
22117
|
+
if (outcome.reason === "error") throw outcome.error;
|
|
22118
|
+
answer = outcome.value ?? first;
|
|
21005
22119
|
}
|
|
21006
22120
|
if (answer === first) return first;
|
|
21007
22121
|
if (first.replayed) return { ...answer, replayed: true };
|