@glasser-ai/cli 0.1.111 → 0.1.115
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/glasser.js +145 -16
- package/package.json +1 -1
package/dist/glasser.js
CHANGED
|
@@ -65470,12 +65470,16 @@ var WebResearchRequest = Schema_exports.Struct({
|
|
|
65470
65470
|
|
|
65471
65471
|
// ../../packages/contract/src/solutions-company-intelligence.ts
|
|
65472
65472
|
var COMPANY_INTELLIGENCE_ACTIONS = [
|
|
65473
|
+
"search",
|
|
65474
|
+
"lookup",
|
|
65473
65475
|
"enrich",
|
|
65474
65476
|
"tech_stack",
|
|
65475
65477
|
"traffic",
|
|
65476
65478
|
"competitors",
|
|
65477
65479
|
"funding",
|
|
65478
|
-
"news"
|
|
65480
|
+
"news",
|
|
65481
|
+
"jobs",
|
|
65482
|
+
"ads"
|
|
65479
65483
|
];
|
|
65480
65484
|
var COMPANY_INTELLIGENCE_PROVIDERS = [
|
|
65481
65485
|
"apollo",
|
|
@@ -65489,11 +65493,34 @@ var COMPANY_INTELLIGENCE_PROVIDERS = [
|
|
|
65489
65493
|
"ahrefs",
|
|
65490
65494
|
"apify",
|
|
65491
65495
|
"exa",
|
|
65492
|
-
"serper"
|
|
65496
|
+
"serper",
|
|
65497
|
+
"scrapecreators"
|
|
65493
65498
|
];
|
|
65494
65499
|
var CiS = Schema_exports.NullOr(Schema_exports.String);
|
|
65495
65500
|
var CiN = Schema_exports.NullOr(Schema_exports.Number);
|
|
65496
65501
|
var CiI = Schema_exports.NullOr(Schema_exports.Int);
|
|
65502
|
+
var COMPANY_HEADCOUNTS = [
|
|
65503
|
+
"1-10",
|
|
65504
|
+
"11-50",
|
|
65505
|
+
"51-200",
|
|
65506
|
+
"201-500",
|
|
65507
|
+
"501-1000",
|
|
65508
|
+
"1001-5000",
|
|
65509
|
+
"5001-10000",
|
|
65510
|
+
"10001+"
|
|
65511
|
+
];
|
|
65512
|
+
var COMPANY_TYPES = [
|
|
65513
|
+
"educational",
|
|
65514
|
+
"educational institution",
|
|
65515
|
+
"government agency",
|
|
65516
|
+
"non profit",
|
|
65517
|
+
"partnership",
|
|
65518
|
+
"privately held",
|
|
65519
|
+
"public company",
|
|
65520
|
+
"self employed",
|
|
65521
|
+
"self owned",
|
|
65522
|
+
"sole proprietorship"
|
|
65523
|
+
];
|
|
65497
65524
|
var ciList = (fields) => Schema_exports.Struct({ items: Schema_exports.Array(Schema_exports.Struct(fields)) });
|
|
65498
65525
|
var d = (schema2, description) => schema2.annotate({ description });
|
|
65499
65526
|
var COMPANY_OWNERSHIP = [
|
|
@@ -65545,6 +65572,12 @@ var CompanyEnrichOutput = Schema_exports.Struct({
|
|
|
65545
65572
|
ticker: d(CiS, "Stock ticker or public symbol, for public companies."),
|
|
65546
65573
|
latest_funding_date: d(CiS, "Date of the latest funding round, YYYY-MM-DD.")
|
|
65547
65574
|
});
|
|
65575
|
+
var CompanySearchOutput = Schema_exports.Struct({
|
|
65576
|
+
total_matches: Schema_exports.NullOr(Schema_exports.Number).annotate({
|
|
65577
|
+
description: "Dataset-wide match count when the Provider reports it; never the current page length."
|
|
65578
|
+
}),
|
|
65579
|
+
items: Schema_exports.Array(Schema_exports.Struct({ ...CompanyEnrichOutput.fields, domain: CiS }))
|
|
65580
|
+
});
|
|
65548
65581
|
var CompanyTechStackOutput = ciList({
|
|
65549
65582
|
name: d(Schema_exports.String, "Technology name."),
|
|
65550
65583
|
categories: d(
|
|
@@ -65629,13 +65662,58 @@ var CompanyNewsOutput = ciList({
|
|
|
65629
65662
|
category: d(CiS, "Event category in the Provider's vocabulary (PredictLeads)."),
|
|
65630
65663
|
snippet: d(CiS, "Short excerpt.")
|
|
65631
65664
|
});
|
|
65665
|
+
var CompanyJobsOutput = ciList({
|
|
65666
|
+
title: d(CiS, "Job title as posted."),
|
|
65667
|
+
url: d(CiS, "The posting URL on the company's careers page."),
|
|
65668
|
+
location: d(CiS, "Location text as the Provider reports it."),
|
|
65669
|
+
seniority: d(CiS, "Seniority in the answering Provider's vocabulary (PredictLeads)."),
|
|
65670
|
+
categories: d(
|
|
65671
|
+
Schema_exports.Array(Schema_exports.String),
|
|
65672
|
+
"Job functions in the answering Provider's vocabulary. Empty when the Provider gives none."
|
|
65673
|
+
),
|
|
65674
|
+
contract_types: d(
|
|
65675
|
+
Schema_exports.Array(Schema_exports.String),
|
|
65676
|
+
"Contract types such as full time, in the Provider's vocabulary. Empty when the Provider gives none."
|
|
65677
|
+
),
|
|
65678
|
+
salary_min_usd: d(CiN, "Lower end of the posted salary, USD. Null when not posted."),
|
|
65679
|
+
salary_max_usd: d(CiN, "Upper end of the posted salary, USD. Null when not posted."),
|
|
65680
|
+
salary_period: d(
|
|
65681
|
+
CiS,
|
|
65682
|
+
"The period the salary figures cover, in the Provider's vocabulary (year, hour, ...)."
|
|
65683
|
+
),
|
|
65684
|
+
posted_at: d(CiS, "Posting time stated by the company, ISO 8601 UTC. Often null."),
|
|
65685
|
+
first_seen_at: d(CiS, "When the Provider first saw the posting, ISO 8601 UTC."),
|
|
65686
|
+
last_seen_at: d(CiS, "When the Provider last saw the posting, ISO 8601 UTC.")
|
|
65687
|
+
});
|
|
65688
|
+
var CompanyAdsOutput = Schema_exports.Struct({
|
|
65689
|
+
total_ads: d(
|
|
65690
|
+
CiI,
|
|
65691
|
+
"The advertiser's total number of ads, as estimated by Google's Ads Transparency Center. Not the number of items returned."
|
|
65692
|
+
),
|
|
65693
|
+
items: Schema_exports.Array(
|
|
65694
|
+
Schema_exports.Struct({
|
|
65695
|
+
creative_id: d(CiS, "Google Ads Transparency creative id."),
|
|
65696
|
+
advertiser_id: d(CiS, "Google Ads Transparency advertiser id."),
|
|
65697
|
+
advertiser_name: d(CiS, "The verified advertiser's legal name."),
|
|
65698
|
+
format: d(CiS, "Ad format in Google's vocabulary: text, image or video."),
|
|
65699
|
+
ad_url: d(CiS, "The creative's page in the Ads Transparency Center."),
|
|
65700
|
+
image_url: d(CiS, "A rendered preview image of the creative."),
|
|
65701
|
+
first_shown_at: d(CiS, "First time the ad was shown, ISO 8601 UTC."),
|
|
65702
|
+
last_shown_at: d(CiS, "Latest time the ad was shown, ISO 8601 UTC.")
|
|
65703
|
+
})
|
|
65704
|
+
)
|
|
65705
|
+
});
|
|
65632
65706
|
var COMPANY_INTELLIGENCE_OUTPUT_FIELDS = {
|
|
65707
|
+
search: "total_matches, items[]: domain and the company profile fields; fields not reported by the Provider are null",
|
|
65708
|
+
lookup: "total_matches, items[]: domain and the company profile fields; ambiguous names return candidates",
|
|
65633
65709
|
enrich: "name, website, description, industry, employees, employee_range_min, employee_range_max, founded_year, city, region, country, country_code, linkedin_url, phone, total_funding_usd, revenue_usd, revenue_range_min_usd, revenue_range_max_usd, ownership, ticker, latest_funding_date",
|
|
65634
65710
|
tech_stack: "items[]: name, categories[], detection_source, predictleads_confidence, first_detected_date, last_detected_date",
|
|
65635
65711
|
traffic: "monthly_visits, organic_traffic, paid_traffic, organic_keywords, paid_keywords, organic_traffic_value_usd, similarweb_global_rank, bounce_rate, pages_per_visit, avg_visit_duration_seconds",
|
|
65636
65712
|
competitors: "items[]: domain, name, page_title, position, predictleads_similarity_score, exa_similarity_score, reason",
|
|
65637
65713
|
funding: "total_funding_usd, items[]: round_date, round, amount_usd, investors[], source_url",
|
|
65638
|
-
news: "items[]: title, url, source, published_at, event_date, date_text, category, snippet"
|
|
65714
|
+
news: "items[]: title, url, source, published_at, event_date, date_text, category, snippet",
|
|
65715
|
+
jobs: "items[]: title, url, location, seniority, categories[], contract_types[], salary_min_usd, salary_max_usd, salary_period, posted_at, first_seen_at, last_seen_at",
|
|
65716
|
+
ads: "total_ads, items[]: creative_id, advertiser_id, advertiser_name, format, ad_url, image_url, first_shown_at, last_shown_at"
|
|
65639
65717
|
};
|
|
65640
65718
|
var CompanyIntelligenceResult = Schema_exports.Struct({
|
|
65641
65719
|
...Run.fields,
|
|
@@ -65644,12 +65722,15 @@ var CompanyIntelligenceResult = Schema_exports.Struct({
|
|
|
65644
65722
|
// 顺序有意义:编码取第一个匹配的成员,只有 items 的列表形状会吞掉 funding 的
|
|
65645
65723
|
// total_funding_usd(items 为空时),所以带顶层字段的形状排在前面。
|
|
65646
65724
|
Schema_exports.Union([
|
|
65725
|
+
CompanySearchOutput,
|
|
65647
65726
|
CompanyEnrichOutput,
|
|
65648
65727
|
CompanyTrafficOutput,
|
|
65649
65728
|
CompanyFundingOutput,
|
|
65729
|
+
CompanyAdsOutput,
|
|
65650
65730
|
CompanyTechStackOutput,
|
|
65651
65731
|
CompanyCompetitorsOutput,
|
|
65652
|
-
CompanyNewsOutput
|
|
65732
|
+
CompanyNewsOutput,
|
|
65733
|
+
CompanyJobsOutput
|
|
65653
65734
|
])
|
|
65654
65735
|
).annotate({
|
|
65655
65736
|
description: `Normalized fields per action. The Provider's native output is not repeated here; it stays on the Run (GET /v1/runs/:id). Values a Provider does not report are null; an empty answer is the action's shape with every field null, or items: [], with result_status no_result. Money is USD. Employees and revenue are the Provider's own estimates; *_range_min / *_range_max are the edges of the Provider's bucket. A score from a Provider's own model is named after the Provider (exa_similarity_score) and is null for the others. Labels such as industry, categories, round and category are in the answering Provider's vocabulary.
|
|
@@ -65667,16 +65748,33 @@ var CompanyIntelligenceResultQuery = SolutionResultQuery;
|
|
|
65667
65748
|
var CompanyIntelligenceRequest = Schema_exports.Struct({
|
|
65668
65749
|
action: Schema_exports.optional(
|
|
65669
65750
|
Schema_exports.Literals(COMPANY_INTELLIGENCE_ACTIONS).annotate({
|
|
65670
|
-
description: "Default: enrich.
|
|
65751
|
+
description: "Default: enrich. search requires query or a structured filter; lookup requires query (company name). Every other action requires domain.\n\n- search: company discovery by industry, headcount band, country or company type; offset paginates. Structured filters use Hunter vocabulary; use query only for criteria representable by these filters. Other ICP conditions must be checked separately.\n- lookup: company-name candidates with page pagination; do not guess between ambiguous names.\n\n- enrich: company profile and firmographics.\n- tech_stack, traffic, funding, news: the corresponding company data.\n- jobs: open job postings found on the company's own careers pages; limit caps the rows (default and maximum 25), so the row count is not the company's total.\n- ads: Google Ads Transparency Center creatives of the advertiser behind the domain; country narrows them to one region; without it every region is included.\n- competitors: similar businesses. For competing domains in Google results, use SEO research with organic_competitors."
|
|
65671
65752
|
})
|
|
65672
65753
|
),
|
|
65673
65754
|
provider: providerField(COMPANY_INTELLIGENCE_PROVIDERS),
|
|
65674
|
-
domain: Domain,
|
|
65755
|
+
domain: Schema_exports.optional(Domain),
|
|
65756
|
+
industries: Schema_exports.optional(
|
|
65757
|
+
Schema_exports.Array(NonEmpty).check(Schema_exports.isMinLength(1), Schema_exports.isMaxLength(20))
|
|
65758
|
+
),
|
|
65759
|
+
headcounts: Schema_exports.optional(
|
|
65760
|
+
Schema_exports.Array(Schema_exports.Literals(COMPANY_HEADCOUNTS)).check(
|
|
65761
|
+
Schema_exports.isMinLength(1),
|
|
65762
|
+
Schema_exports.isMaxLength(8)
|
|
65763
|
+
)
|
|
65764
|
+
),
|
|
65765
|
+
company_types: Schema_exports.optional(
|
|
65766
|
+
Schema_exports.Array(Schema_exports.Literals(COMPANY_TYPES)).check(
|
|
65767
|
+
Schema_exports.isMinLength(1),
|
|
65768
|
+
Schema_exports.isMaxLength(10)
|
|
65769
|
+
)
|
|
65770
|
+
),
|
|
65771
|
+
offset: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 0, maximum: 1e4 }))),
|
|
65772
|
+
page: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 1, maximum: 500 }))),
|
|
65675
65773
|
country: Schema_exports.optional(CountryCode),
|
|
65676
65774
|
/** 只有 news + serper 读它:用公司名而不是域名搜新闻。 */
|
|
65677
65775
|
query: Schema_exports.optional(
|
|
65678
65776
|
NonEmpty.check(Schema_exports.isMaxLength(200)).annotate({
|
|
65679
|
-
description: "
|
|
65777
|
+
description: "search: a company discovery prompt. lookup: a company name. news via Serper: company name instead of domain."
|
|
65680
65778
|
})
|
|
65681
65779
|
),
|
|
65682
65780
|
...commonFields
|
|
@@ -65852,7 +65950,14 @@ var MarketDataRequest = Schema_exports.Struct({
|
|
|
65852
65950
|
});
|
|
65853
65951
|
|
|
65854
65952
|
// ../../packages/contract/src/solutions-people-search.ts
|
|
65855
|
-
var PEOPLE_SEARCH_ACTIONS = [
|
|
65953
|
+
var PEOPLE_SEARCH_ACTIONS = [
|
|
65954
|
+
"search",
|
|
65955
|
+
"list_employees",
|
|
65956
|
+
"enrich",
|
|
65957
|
+
"find_email",
|
|
65958
|
+
"verify_email",
|
|
65959
|
+
"find_phone"
|
|
65960
|
+
];
|
|
65856
65961
|
var SENIORITIES = [
|
|
65857
65962
|
"owner",
|
|
65858
65963
|
"founder",
|
|
@@ -65947,18 +66052,41 @@ var PeopleSearchListOutput = Schema_exports.Struct({
|
|
|
65947
66052
|
),
|
|
65948
66053
|
items: Schema_exports.Array(PersonOutput)
|
|
65949
66054
|
});
|
|
66055
|
+
var EmailVerificationOutput = Schema_exports.Struct({
|
|
66056
|
+
email: d2(PsS, "Email address returned by the Provider."),
|
|
66057
|
+
email_status: d2(
|
|
66058
|
+
PsS,
|
|
66059
|
+
"The Provider's own deliverability verdict. Unknown and catch-all are not verified deliverable addresses."
|
|
66060
|
+
),
|
|
66061
|
+
email_catch_all: d2(
|
|
66062
|
+
Schema_exports.NullOr(Schema_exports.Boolean),
|
|
66063
|
+
"Whether the Provider reports a catch-all domain."
|
|
66064
|
+
),
|
|
66065
|
+
email_disposable: d2(
|
|
66066
|
+
Schema_exports.NullOr(Schema_exports.Boolean),
|
|
66067
|
+
"Whether the Provider reports a disposable address."
|
|
66068
|
+
),
|
|
66069
|
+
email_webmail: d2(
|
|
66070
|
+
Schema_exports.NullOr(Schema_exports.Boolean),
|
|
66071
|
+
"Whether the Provider reports a free webmail address."
|
|
66072
|
+
),
|
|
66073
|
+
hunter_email_score: d2(PsN, "Hunter's own 0-100 confidence score; null for other Providers.")
|
|
66074
|
+
});
|
|
65950
66075
|
var PERSON_FIELDS = "name, first_name, last_name, job_title, seniority, department, headline, linkedin_url, city, region, country, country_code, email, email_status, email_catch_all, email_source, phone, company_name, company_domain, company_linkedin_url, apollo_match_confidence, pdl_likelihood, hunter_email_score, zoominfo_accuracy_score";
|
|
65951
66076
|
var PEOPLE_SEARCH_OUTPUT_FIELDS = {
|
|
65952
66077
|
search: `total_matches, items[]: ${PERSON_FIELDS}`,
|
|
66078
|
+
list_employees: `total_matches, items[]: ${PERSON_FIELDS}`,
|
|
65953
66079
|
enrich: PERSON_FIELDS,
|
|
65954
|
-
find_email: PERSON_FIELDS
|
|
66080
|
+
find_email: PERSON_FIELDS,
|
|
66081
|
+
find_phone: PERSON_FIELDS,
|
|
66082
|
+
verify_email: "email, email_status, email_catch_all, email_disposable, email_webmail, hunter_email_score"
|
|
65955
66083
|
};
|
|
65956
66084
|
var PeopleSearchResult = Schema_exports.Struct({
|
|
65957
66085
|
...Run.fields,
|
|
65958
66086
|
action: Schema_exports.Literals(PEOPLE_SEARCH_ACTIONS),
|
|
65959
66087
|
output: Schema_exports.NullOr(
|
|
65960
66088
|
// 列表形状在前:单人形状没有 items,编码不会误配到列表上。
|
|
65961
|
-
Schema_exports.Union([PeopleSearchListOutput, PersonOutput])
|
|
66089
|
+
Schema_exports.Union([PeopleSearchListOutput, EmailVerificationOutput, PersonOutput])
|
|
65962
66090
|
).annotate({
|
|
65963
66091
|
description: `Normalized fields per action; enrich and find_email return one person with the same fields as a search row. The Provider's native output is not repeated here; it stays on the Run (GET /v1/runs/:id). Values a Provider does not report are null; an empty answer is the action's shape with every field null, or items: [], with result_status no_result. Names, titles and labels are as the Provider reports them. A score from a Provider's own model is named after the Provider (pdl_likelihood) and is null for the others.
|
|
65964
66092
|
|
|
@@ -65975,7 +66103,7 @@ var PeopleSearchResultQuery = SolutionResultQuery;
|
|
|
65975
66103
|
var PeopleSearchRequest = Schema_exports.Struct({
|
|
65976
66104
|
action: Schema_exports.optional(
|
|
65977
66105
|
Schema_exports.Literals(PEOPLE_SEARCH_ACTIONS).annotate({
|
|
65978
|
-
description: "Default: search.\n\n- search: supply at least one of job_titles, seniorities, locations, company_domain, or keywords. Apollo and ZoomInfo rows carry no email or phone; PDL rows are full records; Hunter lists the personal addresses at company_domain.\n- enrich: supply linkedin_url, email, or full_name plus company_domain. Prospeo returns only people it holds a verified work email for.\n- find_email: supply full_name and company_domain. Apollo also accepts linkedin_url alone; an Apollo match without a real email is a miss and is not charged.\n\nFilters are never silently dropped. With auto, Providers that cannot apply them are skipped; a named Provider that cannot apply them returns 400."
|
|
66106
|
+
description: "Default: search.\n\n- search: supply at least one of job_titles, seniorities, locations, company_domain, or keywords. Apollo and ZoomInfo rows carry no email or phone; PDL rows are full records; Hunter lists the personal addresses at company_domain.\n- list_employees: supply company_domain. Read up to 100 employee profiles and their actual titles from LeadMagic; this is a sample, not a complete company roster. No title or location filters apply.\n- enrich: supply linkedin_url, email, or full_name plus company_domain. Prospeo returns only people it holds a verified work email for.\n- find_email: supply full_name and company_domain. Apollo also accepts linkedin_url alone; an Apollo match without a real email is a miss and is not charged.\n- verify_email: supply email. Invalid, catch-all, disposable and unknown verdicts are successful answers, not no-result outcomes. Use the final Run's completed_at as the check time.\n- find_phone: LeadMagic requires linkedin_url; Prospeo also accepts email, or full_name plus company_domain. Finds a mobile number; it does not send a message or place a call.\n\nFilters are never silently dropped. With auto, Providers that cannot apply them are skipped; a named Provider that cannot apply them returns 400."
|
|
65979
66107
|
})
|
|
65980
66108
|
),
|
|
65981
66109
|
provider: providerField(PEOPLE_SEARCH_PROVIDERS),
|
|
@@ -66206,7 +66334,8 @@ var SocialResearchRequest = Schema_exports.Struct({
|
|
|
66206
66334
|
),
|
|
66207
66335
|
url: Schema_exports.optional(NonEmpty.check(Schema_exports.isMaxLength(2048))),
|
|
66208
66336
|
// 没有 limit:社交端点按游标翻页,没有一个收行数;收下又不读是撒谎。
|
|
66209
|
-
// 不用 commonFields(没有 limit),metadata
|
|
66337
|
+
// 不用 commonFields(没有 limit),task_id 与 metadata 单独加。
|
|
66338
|
+
task_id: commonFields.task_id,
|
|
66210
66339
|
metadata: commonFields.metadata
|
|
66211
66340
|
});
|
|
66212
66341
|
|
|
@@ -66411,7 +66540,7 @@ var solutions = HttpApiGroup_exports.make("Solutions").add(
|
|
|
66411
66540
|
operation(
|
|
66412
66541
|
"gtm-company-intelligence",
|
|
66413
66542
|
"Company intelligence",
|
|
66414
|
-
"
|
|
66543
|
+
"Search target companies by industry, headcount, headquarters or type; look up company-name candidates; or research one domain for its profile, technology stack, traffic, similar businesses, funding, news, open job postings and Google ads. search needs a prompt or structured filters, lookup needs query (name), and other actions need domain.\n\nEvery action returns normalized output with the last Run's id, provider and lifecycle status: search and lookup give total_matches plus output.items[] of companies (an unavailable match total is null, never the page length); enrich and traffic give fixed top-level fields, tech_stack / competitors / news / jobs give output.items[] with fixed fields per row, funding gives total_funding_usd plus items[], ads gives total_ads plus items[]. The Provider's native output is not repeated in output; it stays on the Run and is readable with GET /v1/runs/:id. A value the selected Provider does not report is null; money is always USD.\n\nRead result_status separately from status: success, no_result, error or pending. charge_usd is the total of this response's runs and is null until every listed Run settles; runs[] carries each Run's charge. provider=auto selects the first eligible Provider and tries the next only on PROVIDER_ERROR, TIMED_OUT, or a 503 at admission; a named Provider never falls back. For QUEUED/RUNNING (HTTP 202, today only traffic via Apify), poll the authenticated result_url on the API origin. Reuse the same Idempotency-Key and execution parameters for an intentional retry."
|
|
66415
66544
|
)
|
|
66416
66545
|
)
|
|
66417
66546
|
).add(
|
|
@@ -66440,7 +66569,7 @@ var solutions = HttpApiGroup_exports.make("Solutions").add(
|
|
|
66440
66569
|
operation(
|
|
66441
66570
|
"gtm-people-search",
|
|
66442
66571
|
"People search",
|
|
66443
|
-
"Find people by job title, seniority, location, or employer. You can also enrich a known person's profile
|
|
66572
|
+
"Find people by job title, seniority, location, or employer. You can also enrich a known person's profile, find their work email, independently verify a mailbox, read employee profiles and their actual titles at one company, or find a mobile number from a LinkedIn profile, email, or name and employer where supported. Choose an action and supply its required fields below.\n\nEvery action returns normalized output with the last Run's id, provider and lifecycle status: search and list_employees give total_matches plus output.items[] of people, enrich, find_email and find_phone give one person with the same fields at the top level; verify_email gives a mailbox verdict with Provider-native status and flags. Invalid, catch-all, disposable and unknown verdicts are valid verification results, not misses. The Provider's native output is not repeated in output; it stays on the Run and is readable with GET /v1/runs/:id. A value the selected Provider does not report is null.\n\nRead result_status separately from status: success, no_result, error or pending. charge_usd is the total of this response's runs and is null until every listed Run settles; runs[] carries each Run's charge. provider=auto selects the first eligible Provider and tries the next only on PROVIDER_ERROR, TIMED_OUT, or a 503 at admission; a named Provider never falls back. Reuse the same Idempotency-Key and execution parameters for an intentional retry."
|
|
66444
66573
|
)
|
|
66445
66574
|
)
|
|
66446
66575
|
).add(
|
|
@@ -68117,7 +68246,7 @@ import os3 from "node:os";
|
|
|
68117
68246
|
import { existsSync as existsSync2, mkdirSync as mkdirSync3, writeFileSync as writeFileSync4 } from "node:fs";
|
|
68118
68247
|
import os2 from "node:os";
|
|
68119
68248
|
import path8 from "node:path";
|
|
68120
|
-
var SKILL_MARKDOWN = true ? "---\nname: glasser\nversion: 0.1.111\ndescription: >\n Reach for this when a task needs external or paid data \u2014 person or company\n enrichment and search, contact unlock, job postings, social media profiles,\n posts and comments (TikTok, Douyin, Instagram, YouTube, X, Reddit and\n more), SEO keywords and backlinks, web,\n news, image, video, maps, places, scholar or shopping search, US property\n and rental data, SEC filings, company financials and stock prices, vehicle\n history and car listings, software reviews, AI model benchmarks, customs\n trade records, US statutes, compliance and KYC checks, movie, TV and game\n data, Chinese e-commerce listings and reviews, creator audience analytics,\n phone number checks, webpage scraping, or\n any other paid data API \u2014 and check the data sources before writing a\n scraper or telling the user something is inaccessible. 2,000+ paid\n endpoints across 80+ providers behind one Key: search, inspect\n the price, run, pay per call, no signup at each vendor. Works through the\n glasser CLI, or through the Glasser MCP server where the runtime cannot\n shell out. If the user already has their own key or integration for a\n specific provider, use that first.\n---\n\n# Glasser\n\nGlasser is a broker: it sells runnable third-party API operations\n(\"Endpoints\") under a single Key. You search the data sources, inspect an\nEndpoint's contract and Price, and run it \u2014 the response is the provider's\nown output, nothing renamed or reshaped.\n\n## Identify your surface FIRST\n\nDecide by the actual execution environment, not the product name and not\nwhether a terminal exists. The wrong setup cannot work.\n\n- **`glasser` MCP tools already loaded** (`search`, `inspect`, `run`,\n `runs_get`, `runs_list`, `runs_stop`, `balance`): nothing to install. The\n verbs map one to one onto the CLI commands below; only `run` differs, in\n that it needs an `idempotency_key` you generate (a UUID). Call `balance`;\n if it succeeds, skip to **First run**. The rules in this file apply either\n way.\n\n- **Hosted assistant** (claude.ai, Claude Desktop chat, Cowork, ChatGPT,\n Gemini \u2014 even with a code sandbox: it runs in the provider's cloud, not on\n the human's machine, and resets between tasks): do NOT install anything.\n Tell the human to add Glasser as a custom MCP connector, then stop. In\n Claude, give them this link; it opens the Add custom connector dialog\n with the name and URL filled in:\n https://api.glasser.ai/connect/claude\n Then Continue \u2192 Add \u2192 sign in to Glasser, choose the Workspace, Allow.\n Glasser is on in the next chat. Other products: the server URL is\n `https://api.glasser.ai/mcp`; steps per client at\n https://glasser.ai/docs/mcp-server.md. If the product has no custom\n connectors, say so and point to the same account's coding agent\n (ChatGPT \u2192 Codex, Gemini \u2192 Gemini CLI, Claude \u2192 Claude Code).\n\n- **Local coding agent** (Claude Code, Codex, Cursor, Copilot, Gemini CLI,\n OpenClaw, Hermes on the user's machine; Grok Bot on its own persistent\n cloud computer): the human authorized the whole flow by pasting this. If\n your runtime asks permission for shell commands, request it ONCE and work\n straight through. Continue to **Setup**.\n\n- **Sandboxed agent** (cloud container, restricted egress): run\n `curl -sI https://api.glasser.ai/health` first. A proxy 403, DNS failure\n or timeout means an egress allowlist. Do not retry, do not try other\n hosts. Tell the human `api.glasser.ai` is blocked by the environment's\n network policy, offer the MCP connector or an allowlist for `glasser.ai`\n and `api.glasser.ai` on 443, then stop.\n\nNever ask the human to paste a Key into chat.\n\n## Setup\n\n```sh\nglasser --version 2>/dev/null || npm install -g @glasser-ai/cli@latest\n```\n\nOne command when the CLI is missing, and it installs the current version.\nWithout npm, `curl -fsSL https://glasser.ai/install.sh | sh` does the same\njob. A fresh install selects the latest version, so no separate registry\nversion check is needed. The installer reports what it needs and where it\nwrote the binary \u2014 read its output rather than guessing. If the CLI was\nalready installed, the server tells you when to upgrade (see **Upgrading**).\n\nFor agents with persistent skills, run `glasser skill install`. It saves\nthis file for every coding agent it finds (Claude Code, Codex, Cursor, Gemini\nCLI, Copilot and others), so future sessions load it; the installer already\nran it. For any other agent, save the complete file from\nhttps://glasser.ai/SKILL.md in your user-level skill directory and enable it\nfor future sessions. Do this only during setup or CLI upgrades.\n\n## Authentication\n\nRun `glasser balance`. Exit 0 means authentication works; continue to\n**First run**. A missing or rejected Key needs one. Handle other failures\nfrom the error message instead of starting another login.\n\n**Where a Key comes from.** Two sources, and the environment takes precedence\nover the local store. `GLASSER_API_KEY` needs no file on disk, so it is what\nCI, scripts and scheduled jobs use, and it is the source that still works on a\nmachine whose own store will not outlive the session \u2014 a cloud session, a\ncontainer. Mint that Key in the console. The local store is what `glasser\nlogin` writes and what `glasser keys add --label <l> --key <k>` fills by hand;\nit lives on the machine the CLI ran on, and lasts as long as that machine does.\n\n**With a user present**, in this order:\n\n1. Run `glasser login` with your shell tool's background execution support.\n The CLI opens the sign-in page when possible and prints a fallback URL and\n a matching code.\n2. Relay that URL and code exactly as printed \u2014 a plain URL, readable in a\n terminal \u2014 with a brief explanation of the next step. Nothing else starts\n until this message is out.\n3. Wait for that same command to finish, using the shell tool's wait or output\n operation with short waits. A pending result means wait again, not return\n a final reply. Browser approval needs no further chat message. Give brief\n progress updates during the wait; the CLI polls for up to 15 minutes.\n Stop waiting when login succeeds, fails, expires, or the user cancels.\n\nOnce login succeeds, use the available balance in its output and continue to\n**First run**, unless login warns that `GLASSER_API_KEY` overrides the saved\nKey or the summary has no available balance. In either case, run\n`glasser balance` in the environment subsequent commands will use. Login's\nsummary uses the new Key directly; it does not verify an environment Key.\n\nIf that check rejects an environment Key, another login will not fix it.\nPreserve runtime-managed authentication: changing the variable or bypassing\nit for a command needs the user's authorization. When the user requires it\nto stay unchanged, report the blocker and the runtime correction needed.\nFor other failures, report the actual error; a network failure does not show\nthat a Key is invalid. If authorization expires, a new login needs a new\nURL and code relayed before waiting again.\nNever ask the user to paste a Key. `glasser login --json` is a usage error by\ndesign \u2014 that flow needs a human.\n\n## First run\n\nSetup is finished when login succeeds and reports the available balance\nwithout an environment Key override, or `glasser balance` exits 0 in the\nenvironment subsequent commands will use \u2014 with the MCP tools, when\n`balance` succeeds.\nIf setup is blocked, give a brief status, the confirmed cause, and the next\nstep needed to resolve it. You may state which steps succeeded, but do not\nclaim readiness or offer task prompts while authentication is blocked.\nLogin's balance is not usable evidence for commands that use a rejected Key.\n\nOnce setup is finished, if the user already gave you a task, continue it.\nFor a setup-only request, reply briefly in the user's language: confirm\nGlasser is ready, report the available balance from login or the balance\ncheck, then offer three ready-to-send task prompts, one per bullet.\nUse a conversational lead-in that explains how the suggestions can help\nthe user, rather than a generic list heading. Connect it to their goals\nwhen known, or briefly describe what they could accomplish with Glasser.\n\nBase the prompts on the user's project, interests or goals when that context\nis available. Otherwise, choose three varied examples from Glasser's\ncapabilities. Give each prompt a concrete subject and a clear result the\nuser can ask for.\n\nFor both completed and blocked setup, omit Workspace names/slugs, Key\nlabels/values/prefixes, and installation details such as versions, paths or\npackage-manager output. Name a configuration variable when it explains the\nblocker. Report useful status, not a transcript of the setup commands.\nSetup is not approval to spend: wait for the user to choose before starting\na paid Run.\n\n## Upgrading\n\nThe server tells you when to upgrade \u2014 you do not have to compare versions\nby hand. Upgrade when any of these appears:\n\n- a response carries a `client` block. It is present only when this CLI is\n behind, and it says everything needed to act: `client_version`,\n `minimum_version`, `latest_version`, a runnable `upgrade_command`, and a\n `reason`. It rides in the response body,\n so it reaches `-j` output like any other field;\n- a command fails with `control: \"client.version_unsupported\"`. This CLI is\n too old to read part of the catalog, and `search` and `inspect` are refused\n rather than answered with a shortened list \u2014 a missing row would be\n invisible to you. Run the `upgrade_command` from `details`, then retry;\n- a command printed an `Update available` notice \u2014 the CLI asks the npm\n registry at most once every three hours and prints this on stderr. This one\n never\n appears in `-j` mode, because both streams stay machine-clean; the `client`\n block above is the `-j` signal.\n\nAfter upgrading, refresh the installed Skill as described in **Setup**.\nThe Skill and the CLI update together. Never downgrade. An available update\nnever interrupts work: finish the task at hand, then upgrade before the\nnext one. If the registry is unreachable, proceed with the installed\nversion \u2014 do not block the task on an upgrade check.\n\n## When to use\n\n- The task needs a capability (enrich a person or company, search the web,\n etc.) and no key or integration for it exists in the environment.\n- Workflow, in order:\n 0. Every search needs `--use-case \"<what they asked for>\"`, a browse with no\n query included: the user's own request, in their words, with the subject\n in it. Search refuses to run without it. One piece of the user's work is\n one **task**. Search prints a task id; pass it back\n with `--task <id>` on every later search, inspect and run for that same\n piece of work. Run that first search on its own and wait for the id:\n searches started in parallel before you have it each open a separate\n task. After that, search in parallel as much as you like, each with\n `--task <id>`. Every command that prints a follow-up command already\n carries the id in it, so working from what you are given keeps a task\n together with no bookkeeping.\n\n The use case and the task id cost nothing. The task id lets you list one\n task's Runs together with `glasser runs list --task <id>`.\n 1. `glasser search \"<capability>\" --use-case \"<what they asked for>\"` \u2014 find candidate Endpoints. The\n Provider column reads `pdl (People Data Labs)`: the first word is the\n slug every `-p` flag takes, the name in parentheses is who the data\n comes from \u2014 use it when the user names a vendor, and when you report\n the source back. Several Providers may sell the same capability: the\n list is ranked by relevance only, the Price sits beside each row, and\n the choice is yours.\n - A page holds 5 rows and the footer says how many matches there are in\n total. Pass the printed cursor with `--cursor` to see the rest.\n - The Score column is the cosine similarity between your words and that\n Endpoint's description, in [-1, 1], shown as `-` when semantic scoring\n did not run. It is a similarity signal for comparing rows on one page,\n not a verdict: the row order comes from fusing a keyword and a semantic\n ranking, and the ranking always returns its nearest candidates.\n - **Neither a page of low scores nor reaching the last page shows that\n the catalog lacks a capability.** Before you tell the user something is\n unavailable: read the total, page through with `--cursor`, search again\n with different words (the catalog is indexed on how each Endpoint\n describes itself, which may not be your phrasing), and inspect every\n candidate whose name is close to the task \u2014 `inspect` is free.\n 2. `glasser inspect -p <provider> -e <endpoint>` \u2014 **read the Price and\n the charge clauses BEFORE running.** The Price is what a normal\n COMPLETED call costs; the charge clauses list the exceptions (e.g.\n `NO_RESULT $0.00` means an empty answer is free). For any given\n endpoint the clauses are authoritative. Also identify which input\n fields control result volume (`num`, `size`, `limit`, arrays of\n queries) \u2014 the charge rule may read the input, so volume parameters\n can change what a call costs. Start small; raise only when the user\n needs more.\n 3. `glasser run -p <provider> -e <endpoint> -i '<json>'` \u2014 execute.\n 4. Report the result AND the charge to the user (run output includes the\n charged amount). Every Run also prints a `Run URL` (the `run_url` field\n in `-j`; absent from the `-o` file): the Workspace console page holding\n that Run's records exactly as the Provider returned them, private to\n Workspace members. When your answer relies on a Run, cite that URL as\n its source \u2014 the Run id alone opens nothing for the user.\n\n## When NOT to use\n\n- **Precedence: an explicit user instruction > the user's own integrations\n and keys > Glasser.** If the user has their own key, client, or\n integration for the capability, use that instead.\n- **Runs spend the Workspace balance.** Do not run Endpoints speculatively,\n in loops, or for bulk operations without telling the user the per-call\n Price and getting their go-ahead.\n- Do not use it for capabilities the environment already provides for free.\n- **The catalog changes often** \u2014 Endpoints and Providers are added weekly.\n Search every time you need one; never cache or reuse a listing from an\n earlier session, and never answer \"what can Glasser do\" from memory.\n\n## Adding funds\n\nOnly the user can add funds, in the console at https://app.glasser.ai/balance \u2014\nno command or tool does it. Raise this only when a Run fails with\n`insufficient balance` or the user asks.\n\n- **Top up** on the Balance page.\n- **Grants** are free balance; users often call them \"credits\". The Balance\n page lists the Grants a Workspace can receive and their terms. Send the\n user there.\n\n## Commands\n\n| Command | Purpose |\n|---|---|\n| `glasser login` | Browser device authorization; stores a Key |\n| `glasser search [\"<query>\"] --use-case \"<sentence>\" [--limit N] [--cursor C] [--task T]` | Search Endpoints, 5 per page (max 20); `--use-case` is required on every search; `-q`/`--query` takes the same query; use `--query=<query>` when it starts with `-`; the footer prints the match total, the task id, the next-page cursor for `--cursor`, and a search-again command that carries the task and the use case |\n| `glasser inspect -p <provider> -e <endpoint> [--endpoint-version N] [--task T]` | Schemas, current Price, charge clauses, supported version |\n| `glasser run -p <provider> -e <endpoint> [-i '<json>' \\| -f <file>] [--idempotency-key K] [--task T] [--wait] [--wait-timeout s] [-o file]` | Execute an Endpoint |\n| `glasser runs list [--limit --cursor --status --provider --endpoint --task]` | List past Runs; `--task` is an exact match |\n| `glasser runs get -r <runId> [--wait] [-o file]` | Fetch one Run |\n| `glasser runs stop -r <runId>` | Stop a queued/running Run |\n| `glasser balance` | Balance, held and available; doubles as the auth probe |\n| `glasser balance history [--limit --cursor --kind]` | Ledger of charges, refunds, top-ups and Grants |\n| `glasser keys add/list/activate/remove` | Manage Keys stored on this machine |\n\nGlobal flags: `-j/--json` (raw JSON to stdout, errors as a single JSON\nobject on stderr), `--help`, `--version`.\n\nFacts that matter when scripting:\n\n- Exit codes: `0` success, `1` runtime failure, `2` usage error, `130`\n interrupted.\n- In `-j` mode, stdout is data only; parse stderr for the error object.\n- For large outputs, prefer `-o <file>` and read the file selectively \u2014\n dumping a full provider payload into your context wastes it.\n- Money is always an **exact decimal string** (e.g. `\"0.0125\"`), never a\n float. Do not do float arithmetic on it.\n- Env: `GLASSER_API_KEY`, `GLASSER_API_BASE_URL` (default\n `https://api.glasser.ai`; point it elsewhere and that stack's Workspace\n is what gets billed), `NO_COLOR`.\n\n## Run statuses and waiting\n\n| Status | Meaning |\n|---|---|\n| `QUEUED` | Accepted, not yet dispatched to the provider |\n| `RUNNING` | Dispatched, provider has not answered yet |\n| `COMPLETED` | Terminal \u2014 the provider answered (its answer may still be a \"not found\") |\n| `FAILED` | Terminal \u2014 no usable provider answer; the failure block says why |\n| `STOPPED` | Terminal \u2014 stopped via `runs stop`. Dispatch wins the race: a Run already sent to the provider completes and is charged |\n\nInspect shows each Endpoint's run mode: a `sync` Endpoint returns the\nfinished Run in the same response (its timeout is printed next to the\nmode) \u2014 `--wait` on those adds nothing. For anything still `QUEUED` or\n`RUNNING`, either pass `--wait` up front or poll with\n`glasser runs get -r <runId> --wait`; interactive sessions that want to\nkeep talking can fire without `--wait` and poll between replies.\n\n## Troubleshooting\n\n| Symptom | Meaning / action |\n|---|---|\n| `Invalid or missing API key` | Check the Key source. If `GLASSER_API_KEY` is set, correct it through its owner; login does not replace it. With no environment Key, use `glasser login` to replace a missing or rejected local Key |\n| Exit `2` | Your command line is wrong \u2014 fix it from the message; nothing reached the API and nothing was charged |\n| `Input does not match the endpoint's input schema` | Read the `issues:` lines under the error \u2014 they name the exact field and constraint. No Run was created and nothing was charged; fix the input and run again |\n| `insufficient balance` | The Workspace cannot cover the Price. Tell the user to add funds in the console (see **Adding funds**) \u2014 do not retry |\n| `rate_limited` | The Workspace or the endpoint is at its limit. Wait `retry_after_ms` (the error carries it; the hint prints it), then retry the same command once \u2014 do not loop |\n| Transport error / timeout with a retry hint | Outcome unknown \u2014 a Run may exist. Retry with the SAME Idempotency-Key exactly as the hint prints it |\n| `COMPLETED` but the provider answered 4xx / 5xx (`provider_response.http_status`) | The provider's own error; `charge_basis.clause` says what it cost: PROVIDER_ERROR, or NO_RESULT when the Endpoint reads that status (often 404) as a miss. Read the provider's message: run the same input once more with a NEW Idempotency-Key when it says so (the same key only replays this Run), then try another Endpoint \u2014 the same text can mean a bad input or a provider outage |\n| `FAILED` with a charge shown | Legitimate when the charge clauses say so \u2014 report both the failure and the charge |\n| `Update available` notice | Finish the current task, re-run the installer, then update the installed skill as described in **Upgrading** |\n\n## Running safely\n\n- `run` prints `Charge: $X (rule)` \u2014 the amount billed under the\n endpoint's charge rule. Report that number to the user.\n- `run` prints the Idempotency-Key it used (auto-generated when omitted;\n `--json` mode requires an explicit `--idempotency-key`). On an ambiguous\n failure \u2014 timeout, dropped connection, nonzero exit with no clear answer \u2014\n **retry with the SAME key**: it returns the original Run instead of\n charging again.\n- **Two indicators, not one.** A Run's status and the provider's response\n are separate. `COMPLETED` means the provider answered \u2014 a `COMPLETED` Run\n whose payload is a provider 404 (\"person not found\") is a normal outcome,\n not an error. Whether it is charged follows the endpoint's charge clauses\n from inspect. Report both the Run status and what the provider actually\n said.\n- Use `--wait` to block until the Run settles; without it, poll with\n `glasser runs get -r <runId> --wait`.\n\n## Rules for agents\n\n1. The user's own keys, integrations and explicit instructions outrank\n Glasser \u2014 it fills gaps, never routes around what the user has.\n2. Always inspect before running; never guess input parameters \u2014 the input\n schema and charge clauses from `inspect` are the source of truth.\n3. Runs spend the Workspace balance: no speculative, looped, or bulk runs\n without naming the per-call Price and getting the user's go-ahead.\n4. Start with small volume parameters; raise them only on request.\n5. Interactive auth is `glasser login` \u2014 never ask the user to paste a Key.\n6. On an ambiguous failure, retry with the SAME Idempotency-Key.\n7. Carry the SAME `--task` through one piece of work, the way you carry that\n key \u2014 search prints it, inspect and run take it.\n8. Report two indicators after every run \u2014 the Run status and what the\n provider said \u2014 plus the printed `Charge:` amount; cite the `Run URL`,\n never the bare Run id, as the source of what your answer used.\n9. Money is an exact decimal string; never do float arithmetic on it.\n10. Prefer `-o <file>` for large outputs; `-j` when you parse.\n11. When any command prints an `Update available` notice: finish the task,\n re-run the installer, then update the installed skill as described in\n **Upgrading**.\n12. The CLI is the source of truth for flags \u2014 run `glasser <command>\n --help` when unsure.\n13. `rate_limited` means back off: wait `retry_after_ms`, then retry the\n same command once; never loop on it.\n\n`--endpoint-version` selects a supported compatible contract. It does not lock Price.\nCompatible updates keep the version; older versions work until explicitly retired.\nNew Runs use the selected version's Price at admission. Accepted Runs keep their original Price.\n" : readFileSync4(new URL("../../api/src/http/skill/SKILL.md", import.meta.url), "utf8");
|
|
68249
|
+
var SKILL_MARKDOWN = true ? "---\nname: glasser\nversion: 0.1.115\ndescription: >\n Reach for this when a task needs external or paid data \u2014 person or company\n enrichment and search, contact unlock, job postings, social media profiles,\n posts and comments (TikTok, Douyin, Instagram, YouTube, X, Reddit and\n more), SEO keywords and backlinks, web,\n news, image, video, maps, places, scholar or shopping search, US property\n and rental data, SEC filings, company financials and stock prices, vehicle\n history and car listings, software reviews, AI model benchmarks, customs\n trade records, US statutes, compliance and KYC checks, movie, TV and game\n data, Chinese e-commerce listings and reviews, creator audience analytics,\n phone number checks, webpage scraping, or\n any other paid data API \u2014 and check the data sources before writing a\n scraper or telling the user something is inaccessible. 2,000+ paid\n endpoints across 80+ providers behind one Key: search, inspect\n the price, run, pay per call, no signup at each vendor. Works through the\n glasser CLI, or through the Glasser MCP server where the runtime cannot\n shell out. If the user already has their own key or integration for a\n specific provider, use that first.\n---\n\n# Glasser\n\nGlasser is a broker: it sells runnable third-party API operations\n(\"Endpoints\") under a single Key. You search the data sources, inspect an\nEndpoint's contract and Price, and run it \u2014 the response is the provider's\nown output, nothing renamed or reshaped.\n\n## Identify your surface FIRST\n\nDecide by the actual execution environment, not the product name and not\nwhether a terminal exists. The wrong setup cannot work.\n\n- **`glasser` MCP tools already loaded** (`search`, `inspect`, `run`,\n `runs_get`, `runs_list`, `runs_stop`, `balance`): nothing to install. The\n verbs map one to one onto the CLI commands below; only `run` differs, in\n that it needs an `idempotency_key` you generate (a UUID). Call `balance`;\n if it succeeds, skip to **First run**. The rules in this file apply either\n way.\n\n- **Hosted assistant** (claude.ai, Claude Desktop chat, Cowork, ChatGPT,\n Gemini \u2014 even with a code sandbox: it runs in the provider's cloud, not on\n the human's machine, and resets between tasks): do NOT install anything.\n Tell the human to add Glasser as a custom MCP connector, then stop. In\n Claude, give them this link; it opens the Add custom connector dialog\n with the name and URL filled in:\n https://api.glasser.ai/connect/claude\n Then Continue \u2192 Add \u2192 sign in to Glasser, choose the Workspace, Allow.\n Glasser is on in the next chat. Other products: the server URL is\n `https://api.glasser.ai/mcp`; steps per client at\n https://glasser.ai/docs/mcp-server.md. If the product has no custom\n connectors, say so and point to the same account's coding agent\n (ChatGPT \u2192 Codex, Gemini \u2192 Gemini CLI, Claude \u2192 Claude Code).\n\n- **Local coding agent** (Claude Code, Codex, Cursor, Copilot, Gemini CLI,\n OpenClaw, Hermes on the user's machine; Grok Bot on its own persistent\n cloud computer): the human authorized the whole flow by pasting this. If\n your runtime asks permission for shell commands, request it ONCE and work\n straight through. Continue to **Setup**.\n\n- **Sandboxed agent** (cloud container, restricted egress): run\n `curl -sI https://api.glasser.ai/health` first. A proxy 403, DNS failure\n or timeout means an egress allowlist. Do not retry, do not try other\n hosts. Tell the human `api.glasser.ai` is blocked by the environment's\n network policy, offer the MCP connector or an allowlist for `glasser.ai`\n and `api.glasser.ai` on 443, then stop.\n\nNever ask the human to paste a Key into chat.\n\n## Setup\n\n```sh\nglasser --version 2>/dev/null || npm install -g @glasser-ai/cli@latest\n```\n\nOne command when the CLI is missing, and it installs the current version.\nWithout npm, `curl -fsSL https://glasser.ai/install.sh | sh` does the same\njob. A fresh install selects the latest version, so no separate registry\nversion check is needed. The installer reports what it needs and where it\nwrote the binary \u2014 read its output rather than guessing. If the CLI was\nalready installed, the server tells you when to upgrade (see **Upgrading**).\n\nFor agents with persistent skills, run `glasser skill install`. It saves\nthis file for every coding agent it finds (Claude Code, Codex, Cursor, Gemini\nCLI, Copilot and others), so future sessions load it; the installer already\nran it. For any other agent, save the complete file from\nhttps://glasser.ai/SKILL.md in your user-level skill directory and enable it\nfor future sessions. Do this only during setup or CLI upgrades.\n\n## Authentication\n\nRun `glasser balance`. Exit 0 means authentication works; continue to\n**First run**. A missing or rejected Key needs one. Handle other failures\nfrom the error message instead of starting another login.\n\n**Where a Key comes from.** Two sources, and the environment takes precedence\nover the local store. `GLASSER_API_KEY` needs no file on disk, so it is what\nCI, scripts and scheduled jobs use, and it is the source that still works on a\nmachine whose own store will not outlive the session \u2014 a cloud session, a\ncontainer. Mint that Key in the console. The local store is what `glasser\nlogin` writes and what `glasser keys add --label <l> --key <k>` fills by hand;\nit lives on the machine the CLI ran on, and lasts as long as that machine does.\n\n**With a user present**, in this order:\n\n1. Run `glasser login` with your shell tool's background execution support.\n The CLI opens the sign-in page when possible and prints a fallback URL and\n a matching code.\n2. Relay that URL and code exactly as printed \u2014 a plain URL, readable in a\n terminal \u2014 with a brief explanation of the next step. Nothing else starts\n until this message is out.\n3. Wait for that same command to finish, using the shell tool's wait or output\n operation with short waits. A pending result means wait again, not return\n a final reply. Browser approval needs no further chat message. Give brief\n progress updates during the wait; the CLI polls for up to 15 minutes.\n Stop waiting when login succeeds, fails, expires, or the user cancels.\n\nOnce login succeeds, use the available balance in its output and continue to\n**First run**, unless login warns that `GLASSER_API_KEY` overrides the saved\nKey or the summary has no available balance. In either case, run\n`glasser balance` in the environment subsequent commands will use. Login's\nsummary uses the new Key directly; it does not verify an environment Key.\n\nIf that check rejects an environment Key, another login will not fix it.\nPreserve runtime-managed authentication: changing the variable or bypassing\nit for a command needs the user's authorization. When the user requires it\nto stay unchanged, report the blocker and the runtime correction needed.\nFor other failures, report the actual error; a network failure does not show\nthat a Key is invalid. If authorization expires, a new login needs a new\nURL and code relayed before waiting again.\nNever ask the user to paste a Key. `glasser login --json` is a usage error by\ndesign \u2014 that flow needs a human.\n\n## First run\n\nSetup is finished when login succeeds and reports the available balance\nwithout an environment Key override, or `glasser balance` exits 0 in the\nenvironment subsequent commands will use \u2014 with the MCP tools, when\n`balance` succeeds.\nIf setup is blocked, give a brief status, the confirmed cause, and the next\nstep needed to resolve it. You may state which steps succeeded, but do not\nclaim readiness or offer task prompts while authentication is blocked.\nLogin's balance is not usable evidence for commands that use a rejected Key.\n\nOnce setup is finished, if the user already gave you a task, continue it.\nFor a setup-only request, reply briefly in the user's language: confirm\nGlasser is ready, report the available balance from login or the balance\ncheck, then offer three ready-to-send task prompts, one per bullet.\nUse a conversational lead-in that explains how the suggestions can help\nthe user, rather than a generic list heading. Connect it to their goals\nwhen known, or briefly describe what they could accomplish with Glasser.\n\nBase the prompts on the user's project, interests or goals when that context\nis available. Otherwise, choose three varied examples from Glasser's\ncapabilities. Give each prompt a concrete subject and a clear result the\nuser can ask for.\n\nFor both completed and blocked setup, omit Workspace names/slugs, Key\nlabels/values/prefixes, and installation details such as versions, paths or\npackage-manager output. Name a configuration variable when it explains the\nblocker. Report useful status, not a transcript of the setup commands.\nSetup is not approval to spend: wait for the user to choose before starting\na paid Run.\n\n## Upgrading\n\nThe server tells you when to upgrade \u2014 you do not have to compare versions\nby hand. Upgrade when any of these appears:\n\n- a response carries a `client` block. It is present only when this CLI is\n behind, and it says everything needed to act: `client_version`,\n `minimum_version`, `latest_version`, a runnable `upgrade_command`, and a\n `reason`. It rides in the response body,\n so it reaches `-j` output like any other field;\n- a command fails with `control: \"client.version_unsupported\"`. This CLI is\n too old to read part of the catalog, and `search` and `inspect` are refused\n rather than answered with a shortened list \u2014 a missing row would be\n invisible to you. Run the `upgrade_command` from `details`, then retry;\n- a command printed an `Update available` notice \u2014 the CLI asks the npm\n registry at most once every three hours and prints this on stderr. This one\n never\n appears in `-j` mode, because both streams stay machine-clean; the `client`\n block above is the `-j` signal.\n\nAfter upgrading, refresh the installed Skill as described in **Setup**.\nThe Skill and the CLI update together. Never downgrade. An available update\nnever interrupts work: finish the task at hand, then upgrade before the\nnext one. If the registry is unreachable, proceed with the installed\nversion \u2014 do not block the task on an upgrade check.\n\n## When to use\n\n- The task needs a capability (enrich a person or company, search the web,\n etc.) and no key or integration for it exists in the environment.\n- Workflow, in order:\n 0. Every search needs `--use-case \"<what they asked for>\"`, a browse with no\n query included: the user's own request, in their words, with the subject\n in it. Search refuses to run without it. One piece of the user's work is\n one **task**. Search prints a task id; pass it back\n with `--task <id>` on every later search, inspect and run for that same\n piece of work. Run that first search on its own and wait for the id:\n searches started in parallel before you have it each open a separate\n task. After that, search in parallel as much as you like, each with\n `--task <id>`. Every command that prints a follow-up command already\n carries the id in it, so working from what you are given keeps a task\n together with no bookkeeping.\n\n The use case and the task id cost nothing. The task id lets you list one\n task's Runs together with `glasser runs list --task <id>`.\n 1. `glasser search \"<capability>\" --use-case \"<what they asked for>\"` \u2014 find candidate Endpoints. The\n Provider column reads `pdl (People Data Labs)`: the first word is the\n slug every `-p` flag takes, the name in parentheses is who the data\n comes from \u2014 use it when the user names a vendor, and when you report\n the source back. Several Providers may sell the same capability: the\n list is ranked by relevance only, the Price sits beside each row, and\n the choice is yours.\n - A page holds 5 rows and the footer says how many matches there are in\n total. Pass the printed cursor with `--cursor` to see the rest.\n - The Score column is the cosine similarity between your words and that\n Endpoint's description, in [-1, 1], shown as `-` when semantic scoring\n did not run. It is a similarity signal for comparing rows on one page,\n not a verdict: the row order comes from fusing a keyword and a semantic\n ranking, and the ranking always returns its nearest candidates.\n - **Neither a page of low scores nor reaching the last page shows that\n the catalog lacks a capability.** Before you tell the user something is\n unavailable: read the total, page through with `--cursor`, search again\n with different words (the catalog is indexed on how each Endpoint\n describes itself, which may not be your phrasing), and inspect every\n candidate whose name is close to the task \u2014 `inspect` is free.\n 2. `glasser inspect -p <provider> -e <endpoint>` \u2014 **read the Price and\n the charge clauses BEFORE running.** The Price is what a normal\n COMPLETED call costs; the charge clauses list the exceptions (e.g.\n `NO_RESULT $0.00` means an empty answer is free). For any given\n endpoint the clauses are authoritative. Also identify which input\n fields control result volume (`num`, `size`, `limit`, arrays of\n queries) \u2014 the charge rule may read the input, so volume parameters\n can change what a call costs. Start small; raise only when the user\n needs more.\n 3. `glasser run -p <provider> -e <endpoint> -i '<json>'` \u2014 execute.\n 4. Report the result AND the charge to the user (run output includes the\n charged amount). Every Run also prints a `Run URL` (the `run_url` field\n in `-j`; absent from the `-o` file): the Workspace console page holding\n that Run's records exactly as the Provider returned them, private to\n Workspace members. When your answer relies on a Run, cite that URL as\n its source \u2014 the Run id alone opens nothing for the user.\n\n## When NOT to use\n\n- **Precedence: an explicit user instruction > the user's own integrations\n and keys > Glasser.** If the user has their own key, client, or\n integration for the capability, use that instead.\n- **Runs spend the Workspace balance.** Do not run Endpoints speculatively,\n in loops, or for bulk operations without telling the user the per-call\n Price and getting their go-ahead.\n- Do not use it for capabilities the environment already provides for free.\n- **The catalog changes often** \u2014 Endpoints and Providers are added weekly.\n Search every time you need one; never cache or reuse a listing from an\n earlier session, and never answer \"what can Glasser do\" from memory.\n\n## Adding funds\n\nOnly the user can add funds, in the console at https://app.glasser.ai/balance \u2014\nno command or tool does it. Raise this only when a Run fails with\n`insufficient balance` or the user asks.\n\n- **Top up** on the Balance page.\n- **Grants** are free balance; users often call them \"credits\". The Balance\n page lists the Grants a Workspace can receive and their terms. Send the\n user there.\n\n## Commands\n\n| Command | Purpose |\n|---|---|\n| `glasser login` | Browser device authorization; stores a Key |\n| `glasser search [\"<query>\"] --use-case \"<sentence>\" [--limit N] [--cursor C] [--task T]` | Search Endpoints, 5 per page (max 20); `--use-case` is required on every search; `-q`/`--query` takes the same query; use `--query=<query>` when it starts with `-`; the footer prints the match total, the task id, the next-page cursor for `--cursor`, and a search-again command that carries the task and the use case |\n| `glasser inspect -p <provider> -e <endpoint> [--endpoint-version N] [--task T]` | Schemas, current Price, charge clauses, supported version |\n| `glasser run -p <provider> -e <endpoint> [-i '<json>' \\| -f <file>] [--idempotency-key K] [--task T] [--wait] [--wait-timeout s] [-o file]` | Execute an Endpoint |\n| `glasser runs list [--limit --cursor --status --provider --endpoint --task]` | List past Runs; `--task` is an exact match |\n| `glasser runs get -r <runId> [--wait] [-o file]` | Fetch one Run |\n| `glasser runs stop -r <runId>` | Stop a queued/running Run |\n| `glasser balance` | Balance, held and available; doubles as the auth probe |\n| `glasser balance history [--limit --cursor --kind]` | Ledger of charges, refunds, top-ups and Grants |\n| `glasser keys add/list/activate/remove` | Manage Keys stored on this machine |\n\nGlobal flags: `-j/--json` (raw JSON to stdout, errors as a single JSON\nobject on stderr), `--help`, `--version`.\n\nFacts that matter when scripting:\n\n- Exit codes: `0` success, `1` runtime failure, `2` usage error, `130`\n interrupted.\n- In `-j` mode, stdout is data only; parse stderr for the error object.\n- For large outputs, prefer `-o <file>` and read the file selectively \u2014\n dumping a full provider payload into your context wastes it.\n- Money is always an **exact decimal string** (e.g. `\"0.0125\"`), never a\n float. Do not do float arithmetic on it.\n- Env: `GLASSER_API_KEY`, `GLASSER_API_BASE_URL` (default\n `https://api.glasser.ai`; point it elsewhere and that stack's Workspace\n is what gets billed), `NO_COLOR`.\n\n## Run statuses and waiting\n\n| Status | Meaning |\n|---|---|\n| `QUEUED` | Accepted, not yet dispatched to the provider |\n| `RUNNING` | Dispatched, provider has not answered yet |\n| `COMPLETED` | Terminal \u2014 the provider answered (its answer may still be a \"not found\") |\n| `FAILED` | Terminal \u2014 no usable provider answer; the failure block says why |\n| `STOPPED` | Terminal \u2014 stopped via `runs stop`. Dispatch wins the race: a Run already sent to the provider completes and is charged |\n\nInspect shows each Endpoint's run mode: a `sync` Endpoint returns the\nfinished Run in the same response (its timeout is printed next to the\nmode) \u2014 `--wait` on those adds nothing. For anything still `QUEUED` or\n`RUNNING`, either pass `--wait` up front or poll with\n`glasser runs get -r <runId> --wait`; interactive sessions that want to\nkeep talking can fire without `--wait` and poll between replies.\n\n## Troubleshooting\n\n| Symptom | Meaning / action |\n|---|---|\n| `Invalid or missing API key` | Check the Key source. If `GLASSER_API_KEY` is set, correct it through its owner; login does not replace it. With no environment Key, use `glasser login` to replace a missing or rejected local Key |\n| Exit `2` | Your command line is wrong \u2014 fix it from the message; nothing reached the API and nothing was charged |\n| `Input does not match the endpoint's input schema` | Read the `issues:` lines under the error \u2014 they name the exact field and constraint. No Run was created and nothing was charged; fix the input and run again |\n| `insufficient balance` | The Workspace cannot cover the Price. Tell the user to add funds in the console (see **Adding funds**) \u2014 do not retry |\n| `rate_limited` | The Workspace or the endpoint is at its limit. Wait `retry_after_ms` (the error carries it; the hint prints it), then retry the same command once \u2014 do not loop |\n| Transport error / timeout with a retry hint | Outcome unknown \u2014 a Run may exist. Retry with the SAME Idempotency-Key exactly as the hint prints it |\n| `COMPLETED` but the provider answered 4xx / 5xx (`provider_response.http_status`) | The provider's own error; `charge_basis.clause` says what it cost: PROVIDER_ERROR, or NO_RESULT when the Endpoint reads that status (often 404) as a miss. Read the provider's message: run the same input once more with a NEW Idempotency-Key when it says so (the same key only replays this Run), then try another Endpoint \u2014 the same text can mean a bad input or a provider outage |\n| `FAILED` with a charge shown | Legitimate when the charge clauses say so \u2014 report both the failure and the charge |\n| `Update available` notice | Finish the current task, re-run the installer, then update the installed skill as described in **Upgrading** |\n\n## Running safely\n\n- `run` prints `Charge: $X (rule)` \u2014 the amount billed under the\n endpoint's charge rule. Report that number to the user.\n- `run` prints the Idempotency-Key it used (auto-generated when omitted;\n `--json` mode requires an explicit `--idempotency-key`). On an ambiguous\n failure \u2014 timeout, dropped connection, nonzero exit with no clear answer \u2014\n **retry with the SAME key**: it returns the original Run instead of\n charging again.\n- **Two indicators, not one.** A Run's status and the provider's response\n are separate. `COMPLETED` means the provider answered \u2014 a `COMPLETED` Run\n whose payload is a provider 404 (\"person not found\") is a normal outcome,\n not an error. Whether it is charged follows the endpoint's charge clauses\n from inspect. Report both the Run status and what the provider actually\n said.\n- Use `--wait` to block until the Run settles; without it, poll with\n `glasser runs get -r <runId> --wait`.\n\n## Rules for agents\n\n1. The user's own keys, integrations and explicit instructions outrank\n Glasser \u2014 it fills gaps, never routes around what the user has.\n2. Always inspect before running; never guess input parameters \u2014 the input\n schema and charge clauses from `inspect` are the source of truth.\n3. Runs spend the Workspace balance: no speculative, looped, or bulk runs\n without naming the per-call Price and getting the user's go-ahead.\n4. Start with small volume parameters; raise them only on request.\n5. Interactive auth is `glasser login` \u2014 never ask the user to paste a Key.\n6. On an ambiguous failure, retry with the SAME Idempotency-Key.\n7. Carry the SAME `--task` through one piece of work, the way you carry that\n key \u2014 search prints it, inspect and run take it.\n8. Report two indicators after every run \u2014 the Run status and what the\n provider said \u2014 plus the printed `Charge:` amount; cite the `Run URL`,\n never the bare Run id, as the source of what your answer used.\n9. Money is an exact decimal string; never do float arithmetic on it.\n10. Prefer `-o <file>` for large outputs; `-j` when you parse.\n11. When any command prints an `Update available` notice: finish the task,\n re-run the installer, then update the installed skill as described in\n **Upgrading**.\n12. The CLI is the source of truth for flags \u2014 run `glasser <command>\n --help` when unsure.\n13. `rate_limited` means back off: wait `retry_after_ms`, then retry the\n same command once; never loop on it.\n\n`--endpoint-version` selects a supported compatible contract. It does not lock Price.\nCompatible updates keep the version; older versions work until explicitly retired.\nNew Runs use the selected version's Price at admission. Accepted Runs keep their original Price.\n" : readFileSync4(new URL("../../api/src/http/skill/SKILL.md", import.meta.url), "utf8");
|
|
68121
68250
|
var SKILL_NAME = "glasser";
|
|
68122
68251
|
var absolute = (value3, fallback) => value3 !== void 0 && path8.isAbsolute(value3) ? value3 : fallback;
|
|
68123
68252
|
function agents(env) {
|
|
@@ -68227,7 +68356,7 @@ var skill = Command_exports.make("skill").pipe(
|
|
|
68227
68356
|
// package.json
|
|
68228
68357
|
var package_default = {
|
|
68229
68358
|
name: "@glasser-ai/cli",
|
|
68230
|
-
version: "0.1.
|
|
68359
|
+
version: "0.1.115",
|
|
68231
68360
|
description: "Search, inspect and run paid API endpoints with one Key \u2014 the Glasser CLI",
|
|
68232
68361
|
license: "MIT",
|
|
68233
68362
|
type: "module",
|