@glasser-ai/cli 0.1.90 → 0.1.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/glasser.js +171 -56
  2. package/package.json +1 -1
package/dist/glasser.js CHANGED
@@ -27586,7 +27586,7 @@ function format(input, options4) {
27586
27586
  const space = options4?.space ?? 0;
27587
27587
  const ancestors = /* @__PURE__ */ new WeakSet();
27588
27588
  const gap = !space ? "" : typeof space === "number" ? " ".repeat(space) : space;
27589
- const ind = (d3) => gap.repeat(d3);
27589
+ const ind = (d4) => gap.repeat(d4);
27590
27590
  const wrap = (v, body) => {
27591
27591
  const ctor = v?.constructor;
27592
27592
  return ctor && ctor !== Object.prototype.constructor && ctor.name ? `${ctor.name}(${body})` : body;
@@ -27598,7 +27598,7 @@ function format(input, options4) {
27598
27598
  return ["[ownKeys threw]"];
27599
27599
  }
27600
27600
  };
27601
- function recur3(v, d3 = 0) {
27601
+ function recur3(v, d4 = 0) {
27602
27602
  if (typeof v === "string") return JSON.stringify(v);
27603
27603
  if (typeof v === "number" || v == null || typeof v === "boolean" || typeof v === "symbol") return String(v);
27604
27604
  if (typeof v === "bigint") return String(v) + "n";
@@ -27607,27 +27607,27 @@ function format(input, options4) {
27607
27607
  ancestors.add(v);
27608
27608
  let output;
27609
27609
  if (symbolRedactable in v) {
27610
- output = recur3(getRedacted(v), d3);
27610
+ output = recur3(getRedacted(v), d4);
27611
27611
  } else if (Array.isArray(v)) {
27612
- output = !gap || v.length <= 1 ? `[${v.map((x) => recur3(x, d3)).join(",")}]` : `[
27613
- ${ind(d3 + 1)}${v.map((x) => recur3(x, d3 + 1)).join(",\n" + ind(d3 + 1))}
27614
- ${ind(d3)}]`;
27612
+ output = !gap || v.length <= 1 ? `[${v.map((x) => recur3(x, d4)).join(",")}]` : `[
27613
+ ${ind(d4 + 1)}${v.map((x) => recur3(x, d4 + 1)).join(",\n" + ind(d4 + 1))}
27614
+ ${ind(d4)}]`;
27615
27615
  } else if (v instanceof Date) {
27616
27616
  output = formatDate(v);
27617
27617
  } else if (!options4?.ignoreToString && hasProperty(v, "toString") && typeof v["toString"] === "function" && v["toString"] !== Object.prototype.toString && v["toString"] !== Array.prototype.toString) {
27618
27618
  const s = safeToString(v);
27619
- output = v instanceof Error && v.cause ? `${s} (cause: ${recur3(v.cause, d3)})` : s;
27619
+ output = v instanceof Error && v.cause ? `${s} (cause: ${recur3(v.cause, d4)})` : s;
27620
27620
  } else if (Symbol.iterator in v) {
27621
- output = `${v.constructor.name}(${recur3(Array.from(v), d3)})`;
27621
+ output = `${v.constructor.name}(${recur3(Array.from(v), d4)})`;
27622
27622
  } else {
27623
27623
  const keys4 = ownKeys(v);
27624
27624
  if (!gap || keys4.length <= 1) {
27625
- const body = `{${keys4.map((k) => `${formatPropertyKey(k)}:${recur3(v[k], d3)}`).join(",")}}`;
27625
+ const body = `{${keys4.map((k) => `${formatPropertyKey(k)}:${recur3(v[k], d4)}`).join(",")}}`;
27626
27626
  output = wrap(v, body);
27627
27627
  } else {
27628
27628
  const body = `{
27629
- ${keys4.map((k) => `${ind(d3 + 1)}${formatPropertyKey(k)}: ${recur3(v[k], d3 + 1)}`).join(",\n")}
27630
- ${ind(d3)}}`;
27629
+ ${keys4.map((k) => `${ind(d4 + 1)}${formatPropertyKey(k)}: ${recur3(v[k], d4 + 1)}`).join(",\n")}
27630
+ ${ind(d4)}}`;
27631
27631
  output = wrap(v, body);
27632
27632
  }
27633
27633
  }
@@ -29691,10 +29691,10 @@ var parts = (self) => {
29691
29691
  const sec = ms / bigint1e3;
29692
29692
  const min6 = sec / bigint60;
29693
29693
  const hr = min6 / bigint60;
29694
- const d3 = hr / bigint24;
29694
+ const d4 = hr / bigint24;
29695
29695
  const sign2 = neg ? -1 : 1;
29696
29696
  return {
29697
- days: sign2 * Number(d3),
29697
+ days: sign2 * Number(d4),
29698
29698
  hours: sign2 * Number(hr % bigint24),
29699
29699
  minutes: sign2 * Number(min6 % bigint60),
29700
29700
  seconds: sign2 * Number(sec % bigint60),
@@ -39411,9 +39411,9 @@ function isPattern(regExp, annotations2) {
39411
39411
  });
39412
39412
  }
39413
39413
  function modifyOwnPropertyDescriptors(ast, f) {
39414
- const d3 = Object.getOwnPropertyDescriptors(ast);
39415
- f(d3);
39416
- return Object.create(Object.getPrototypeOf(ast), d3);
39414
+ const d4 = Object.getOwnPropertyDescriptors(ast);
39415
+ f(d4);
39416
+ return Object.create(Object.getPrototypeOf(ast), d4);
39417
39417
  }
39418
39418
  var contextOwners = /* @__PURE__ */ new WeakMap();
39419
39419
  function getContextOwner(ast) {
@@ -39423,8 +39423,8 @@ function replaceEncoding(ast, encoding) {
39423
39423
  if (ast.encoding === encoding) {
39424
39424
  return ast;
39425
39425
  }
39426
- return modifyOwnPropertyDescriptors(ast, (d3) => {
39427
- d3.encoding.value = encoding;
39426
+ return modifyOwnPropertyDescriptors(ast, (d4) => {
39427
+ d4.encoding.value = encoding;
39428
39428
  });
39429
39429
  }
39430
39430
  function replaceContext(ast, context3) {
@@ -39435,8 +39435,8 @@ function replaceContext(ast, context3) {
39435
39435
  if (owner.context === context3) {
39436
39436
  return owner;
39437
39437
  }
39438
- const out = modifyOwnPropertyDescriptors(ast, (d3) => {
39439
- d3.context.value = context3;
39438
+ const out = modifyOwnPropertyDescriptors(ast, (d4) => {
39439
+ d4.context.value = context3;
39440
39440
  });
39441
39441
  contextOwners.set(out, owner);
39442
39442
  return out;
@@ -39449,9 +39449,9 @@ function annotate(ast, annotations2) {
39449
39449
  const last = ast.checks[ast.checks.length - 1];
39450
39450
  return replaceChecks(ast, append(ast.checks.slice(0, -1), last.annotate(annotations2)));
39451
39451
  }
39452
- return modifyOwnPropertyDescriptors(ast, (d3) => {
39453
- d3.annotations.value = {
39454
- ...d3.annotations.value,
39452
+ return modifyOwnPropertyDescriptors(ast, (d4) => {
39453
+ d4.annotations.value = {
39454
+ ...d4.annotations.value,
39455
39455
  ...annotations2
39456
39456
  };
39457
39457
  });
@@ -39463,8 +39463,8 @@ function replaceChecks(ast, checks) {
39463
39463
  if (ast.checks === checks) {
39464
39464
  return ast;
39465
39465
  }
39466
- return modifyOwnPropertyDescriptors(ast, (d3) => {
39467
- d3.checks.value = checks;
39466
+ return modifyOwnPropertyDescriptors(ast, (d4) => {
39467
+ d4.checks.value = checks;
39468
39468
  });
39469
39469
  }
39470
39470
  function appendChecks(ast, checks) {
@@ -39622,9 +39622,9 @@ var toType = /* @__PURE__ */ memoizeIdempotent((ast) => {
39622
39622
  const encodingChecks = type.encodingChecks;
39623
39623
  if (encodingChecks) {
39624
39624
  const checks = type === ast ? encodingChecks : isArrays(type) || isObjects(type) || isDeclaration(type) && type.typeParameters.length > 0 ? extractStructuralChecks(encodingChecks) : void 0;
39625
- return modifyOwnPropertyDescriptors(type, (d3) => {
39626
- d3.encodingChecks.value = void 0;
39627
- d3.checks.value = combineChecks(type.checks, checks);
39625
+ return modifyOwnPropertyDescriptors(type, (d4) => {
39626
+ d4.encodingChecks.value = void 0;
39627
+ d4.checks.value = combineChecks(type.checks, checks);
39628
39628
  });
39629
39629
  }
39630
39630
  return type;
@@ -47595,7 +47595,7 @@ function causeReasonToArbitrary(error2, defect) {
47595
47595
  const terminal = fc.constant(makeInterruptReason2());
47596
47596
  const arbitrary = fc.oneof(terminal, fc.integer({
47597
47597
  min: 1
47598
- }).map(makeInterruptReason2), error2.arbitrary.map((e) => makeFailReason(e)), defect.arbitrary.map((d3) => makeDieReason(d3)));
47598
+ }).map(makeInterruptReason2), error2.arbitrary.map((e) => makeFailReason(e)), defect.arbitrary.map((d4) => makeDieReason(d4)));
47599
47599
  return withRecursion(fc, ctx, terminal, arbitrary);
47600
47600
  };
47601
47601
  }
@@ -60436,10 +60436,10 @@ var levenshtein = (a, b) => {
60436
60436
  return dp[m][n];
60437
60437
  };
60438
60438
  var suggest = (input, candidates) => {
60439
- const distances = candidates.map((c) => [levenshtein(input, c), c]).filter(([d3]) => d3 <= 2).sort(([a], [b]) => a - b);
60439
+ const distances = candidates.map((c) => [levenshtein(input, c), c]).filter(([d4]) => d4 <= 2).sort(([a], [b]) => a - b);
60440
60440
  if (distances.length === 0) return [];
60441
60441
  const minDistance = distances[0][0];
60442
- return distances.filter(([d3]) => d3 === minDistance).map(([, c]) => c);
60442
+ return distances.filter(([d4]) => d4 === minDistance).map(([, c]) => c);
60443
60443
  };
60444
60444
 
60445
60445
  // ../../node_modules/effect/dist/unstable/cli/internal/parser.js
@@ -65847,10 +65847,107 @@ var PEOPLE_SEARCH_PROVIDERS = [
65847
65847
  "hunter",
65848
65848
  "prospeo"
65849
65849
  ];
65850
+ var PsS = Schema_exports.NullOr(Schema_exports.String);
65851
+ var PsN = Schema_exports.NullOr(Schema_exports.Number);
65852
+ var d2 = (schema2, description) => schema2.annotate({ description });
65853
+ var PersonOutput = Schema_exports.Struct({
65854
+ name: d2(
65855
+ PsS,
65856
+ "Full name exactly as the Provider reports it (PDL is lower case). Null when the Provider gives only first and last name; never joined."
65857
+ ),
65858
+ first_name: d2(PsS, "First name as the Provider reports it."),
65859
+ last_name: d2(
65860
+ PsS,
65861
+ "Last name as the Provider reports it. Null when the Provider masks it (Apollo search)."
65862
+ ),
65863
+ job_title: d2(PsS, "Current job title as the Provider reports it."),
65864
+ seniority: d2(
65865
+ PsS,
65866
+ "Seniority label in the answering Provider's own vocabulary (Apollo founder, PDL cxo, LeadMagic C-Team, Hunter executive). Not the request's seniorities vocabulary and not comparable across Providers; check provider. When the Provider lists several, the first."
65867
+ ),
65868
+ department: d2(
65869
+ PsS,
65870
+ "Department or job function in the answering Provider's own vocabulary. When the Provider lists several, the first."
65871
+ ),
65872
+ headline: d2(PsS, "Profile headline (the LinkedIn job-title line)."),
65873
+ linkedin_url: d2(PsS, "LinkedIn profile URL. https:// is added when the Provider omits a scheme."),
65874
+ city: d2(PsS, "City of the person's location."),
65875
+ region: d2(PsS, "State or region of the person's location."),
65876
+ country: d2(PsS, "Country of the person's location as an English display name (never a code)."),
65877
+ country_code: d2(PsS, "Country of the person's location as an ISO 3166-1 alpha-2 code."),
65878
+ email: d2(
65879
+ PsS,
65880
+ "Work email as the Provider reports it. PDL: work_email only; its other addresses stay on the Run."
65881
+ ),
65882
+ email_status: d2(
65883
+ PsS,
65884
+ "The answering Provider's own verification label for email (Apollo verified, Prospeo VERIFIED, Hunter and LeadMagic valid). Providers verify differently, so the labels are not comparable; read it with email_catch_all and email_source."
65885
+ ),
65886
+ email_catch_all: d2(
65887
+ Schema_exports.NullOr(Schema_exports.Boolean),
65888
+ "True when the Provider reports that the email's domain accepts every address, so a mailbox check cannot confirm this one (Hunter accept_all, Apollo email_domain_catchall)."
65889
+ ),
65890
+ email_source: d2(
65891
+ PsS,
65892
+ "How Hunter got the email: found (seen on the web) or generated (built from the domain's address pattern). Null for other Providers."
65893
+ ),
65894
+ phone: d2(PsS, "Phone number as the Provider reports it. Masked numbers are left out."),
65895
+ company_name: d2(PsS, "Current employer as the Provider reports it."),
65896
+ company_domain: d2(PsS, "Current employer's domain (hostname without www. or port)."),
65897
+ company_linkedin_url: d2(PsS, "Current employer's LinkedIn company page URL."),
65898
+ apollo_match_confidence: d2(
65899
+ PsS,
65900
+ "Apollo's confidence that the record matches the input: high, medium, low or none. Null for other Providers."
65901
+ ),
65902
+ pdl_likelihood: d2(
65903
+ PsN,
65904
+ "People Data Labs' 1-10 score for how well the record matches the input. Null for other Providers."
65905
+ ),
65906
+ hunter_email_score: d2(
65907
+ PsN,
65908
+ "Hunter's 0-100 confidence in email (email-finder score, domain-search confidence). Null for other Providers."
65909
+ ),
65910
+ zoominfo_accuracy_score: d2(
65911
+ PsN,
65912
+ "ZoomInfo's 0-100 contact accuracy score. Null for other Providers."
65913
+ )
65914
+ });
65915
+ var PeopleSearchListOutput = Schema_exports.Struct({
65916
+ total_matches: d2(
65917
+ PsN,
65918
+ "People matching the filters in the Provider's whole dataset, not only this page. Null when the Provider gives only the page count (LeadMagic)."
65919
+ ),
65920
+ items: Schema_exports.Array(PersonOutput)
65921
+ });
65922
+ 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";
65923
+ var PEOPLE_SEARCH_OUTPUT_FIELDS = {
65924
+ search: `total_matches, items[]: ${PERSON_FIELDS}`,
65925
+ enrich: PERSON_FIELDS,
65926
+ find_email: PERSON_FIELDS
65927
+ };
65928
+ var PeopleSearchResult = Schema_exports.Struct({
65929
+ ...Run.fields,
65930
+ action: Schema_exports.Literals(PEOPLE_SEARCH_ACTIONS),
65931
+ output: Schema_exports.NullOr(
65932
+ // 列表形状在前:单人形状没有 items,编码不会误配到列表上。
65933
+ Schema_exports.Union([PeopleSearchListOutput, PersonOutput])
65934
+ ).annotate({
65935
+ 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.
65936
+
65937
+ ${Object.entries(
65938
+ PEOPLE_SEARCH_OUTPUT_FIELDS
65939
+ ).map(([action2, fields]) => `- ${action2}: ${fields}`).join("\n")}`
65940
+ }),
65941
+ result_status: Schema_exports.Literals(["success", "no_result", "error", "pending"]).annotate({
65942
+ description: "Business delivery status, independent of the final Run lifecycle in status. no_result is an empty but valid answer; error means the Provider output could not be delivered."
65943
+ }),
65944
+ ...solutionResultFields
65945
+ }).annotate({ identifier: "PeopleSearchResult" });
65946
+ var PeopleSearchResultQuery = SolutionResultQuery;
65850
65947
  var PeopleSearchRequest = Schema_exports.Struct({
65851
65948
  action: Schema_exports.optional(
65852
65949
  Schema_exports.Literals(PEOPLE_SEARCH_ACTIONS).annotate({
65853
- 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.\n\nThe output is the answering Provider's native body, so its shape differs per Provider: read run.provider before parsing it."
65950
+ 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."
65854
65951
  })
65855
65952
  ),
65856
65953
  provider: providerField(PEOPLE_SEARCH_PROVIDERS),
@@ -65964,34 +66061,34 @@ var SOCIAL_MODES = ["search", "profile", "feed", "post", "find"];
65964
66061
  var SOCIAL_RESEARCH_PROVIDERS = ["scrapecreators", "apify", "tikhub", "pdl"];
65965
66062
  var SoS = Schema_exports.NullOr(Schema_exports.String);
65966
66063
  var SoI = Schema_exports.NullOr(Schema_exports.Int);
65967
- var d2 = (schema2, description) => schema2.annotate({ description });
66064
+ var d3 = (schema2, description) => schema2.annotate({ description });
65968
66065
  var socialPost = {
65969
- id: d2(
66066
+ id: d3(
65970
66067
  SoS,
65971
66068
  "The platform's post id. LinkedIn: the bare activity id (no urn:li:activity: prefix)."
65972
66069
  ),
65973
66070
  url: SoS,
65974
- title: d2(SoS, "Reddit and YouTube title; null on other platforms."),
65975
- text: d2(
66071
+ title: d3(SoS, "Reddit and YouTube title; null on other platforms."),
66072
+ text: d3(
65976
66073
  SoS,
65977
66074
  "The post body: Reddit self-text, YouTube description, the tweet, caption or post text. Null when the Provider returns no body (a Reddit link post, a YouTube search result)."
65978
66075
  ),
65979
- author: d2(
66076
+ author: d3(
65980
66077
  SoS,
65981
66078
  "Display name, or the handle where the platform shows no other name (X, TikTok, Instagram, Reddit)."
65982
66079
  ),
65983
66080
  author_url: SoS,
65984
- published_at: d2(SoS, "ISO 8601 UTC publish time; null when the Provider gives no exact time."),
65985
- likes: d2(
66081
+ published_at: d3(SoS, "ISO 8601 UTC publish time; null when the Provider gives no exact time."),
66082
+ likes: d3(
65986
66083
  SoI,
65987
66084
  "Reddit: net score (upvotes minus downvotes, can be negative). X: favorites. TikTok: diggs. Others: likes or reactions."
65988
66085
  ),
65989
66086
  comments: SoI,
65990
- shares: d2(
66087
+ shares: d3(
65991
66088
  SoI,
65992
66089
  "X: retweets. TikTok: share count (share-sheet sends, not reposts). LinkedIn: reposts. Null on Reddit, YouTube and Instagram."
65993
66090
  ),
65994
- views: d2(
66091
+ views: d3(
65995
66092
  SoI,
65996
66093
  "X: impressions. TikTok: plays. YouTube: views. Instagram: video views. Null on Reddit and LinkedIn."
65997
66094
  )
@@ -66001,14 +66098,14 @@ var SocialProfileOutput = Schema_exports.Struct({
66001
66098
  handle: SoS,
66002
66099
  name: SoS,
66003
66100
  url: SoS,
66004
- bio: d2(SoS, "Free-text description (LinkedIn: the About section)."),
66005
- headline: d2(SoS, "LinkedIn person headline (job title line); null on other platforms."),
66006
- website: d2(
66101
+ bio: d3(SoS, "Free-text description (LinkedIn: the About section)."),
66102
+ headline: d3(SoS, "LinkedIn person headline (job title line); null on other platforms."),
66103
+ website: d3(
66007
66104
  SoS,
66008
66105
  "The account's own website: LinkedIn company website, X profile link (expanded, never t.co); null elsewhere."
66009
66106
  ),
66010
- followers: d2(SoI, "Followers; Reddit: subreddit subscribers; YouTube: subscribers."),
66011
- following: d2(SoI, "Accounts this account follows. Null on Reddit, YouTube and LinkedIn."),
66107
+ followers: d3(SoI, "Followers; Reddit: subreddit subscribers; YouTube: subscribers."),
66108
+ following: d3(SoI, "Accounts this account follows. Null on Reddit, YouTube and LinkedIn."),
66012
66109
  posts: SoI,
66013
66110
  verified: Schema_exports.NullOr(Schema_exports.Boolean)
66014
66111
  });
@@ -66017,23 +66114,23 @@ var SocialPostOutput = Schema_exports.Struct(socialPost);
66017
66114
  var SocialProfilesOutput = Schema_exports.Struct({
66018
66115
  profiles: Schema_exports.Array(
66019
66116
  Schema_exports.Struct({
66020
- platform: d2(
66117
+ platform: d3(
66021
66118
  SoS,
66022
66119
  "Lower-case network name. The six social_research platforms use their request names (twitter is x); other networks (facebook, github, \u2026) pass through."
66023
66120
  ),
66024
66121
  url: SoS,
66025
- handle: d2(
66122
+ handle: d3(
66026
66123
  SoS,
66027
66124
  "The username on that network, usable as social_research `handle`; null when the Provider has none."
66028
66125
  ),
66029
- scrapecreators_confidence: d2(
66126
+ scrapecreators_confidence: d3(
66030
66127
  Schema_exports.NullOr(Schema_exports.Number),
66031
66128
  "ScrapeCreators' 0\u20131 confidence that this profile belongs to the account. Null on other Providers."
66032
66129
  ),
66033
- followers: d2(SoI, "reddit.find: subreddit subscribers. Null on other platforms.")
66130
+ followers: d3(SoI, "reddit.find: subreddit subscribers. Null on other platforms.")
66034
66131
  })
66035
66132
  ),
66036
- pdl_likelihood: d2(
66133
+ pdl_likelihood: d3(
66037
66134
  SoI,
66038
66135
  "People Data Labs' 1\u201310 score for how well the person record matches the input; it covers the whole person, not one profile. linkedin.find only; null elsewhere."
66039
66136
  )
@@ -66137,6 +66234,13 @@ var SocialResearchTerminal = SocialResearchResponse.check(
66137
66234
  var SocialResearchInFlight = SocialResearchResponse.check(
66138
66235
  Schema_exports.makeFilter((result3) => !isTerminalRunStatus(result3.status))
66139
66236
  ).pipe(HttpApiSchema_exports.status(202));
66237
+ var PeopleSearchResponse = Schema_exports.Union([PeopleSearchResult]);
66238
+ var PeopleSearchTerminal = PeopleSearchResponse.check(
66239
+ Schema_exports.makeFilter((result3) => isTerminalRunStatus(result3.status))
66240
+ ).pipe(HttpApiSchema_exports.status(200));
66241
+ var PeopleSearchInFlight = PeopleSearchResponse.check(
66242
+ Schema_exports.makeFilter((result3) => !isTerminalRunStatus(result3.status))
66243
+ ).pipe(HttpApiSchema_exports.status(202));
66140
66244
  var SeoResearchResponse = Schema_exports.Union([SeoResearchResult]);
66141
66245
  var SeoResearchTerminal = SeoResearchResponse.check(
66142
66246
  Schema_exports.makeFilter((result3) => isTerminalRunStatus(result3.status))
@@ -66244,7 +66348,6 @@ var solutionRunErrors = [
66244
66348
  ERROR_WIRE.InsufficientBalance,
66245
66349
  ERROR_WIRE.ServiceUnavailable
66246
66350
  ];
66247
- var SOLUTION_RUN_TAIL = "\n\nMaps Glasser fields to a Provider Endpoint and returns a Run with Provider-native output.\n- provider=auto selects the first eligible Provider and tries the next only on PROVIDER_ERROR, TIMED_OUT, or a 503 at admission. No-result and in-flight Runs do not trigger fallback. A named Provider never falls back.\n- Each admitted fallback creates a separate Run with its own charge; the response contains the last Run. Use task_id to find related Runs.\n- Reuse the same Idempotency-Key and execution parameters when retrying. For a QUEUED or RUNNING result, poll Get Run. Check status, provider_response, and charge_usd independently.";
66248
66351
  var solutions = HttpApiGroup_exports.make("Solutions").add(
66249
66352
  HttpApiEndpoint_exports.post("gtm-web-research", "/v1/solutions/gtm/web_research", {
66250
66353
  payload: WebResearchRequest,
@@ -66303,13 +66406,25 @@ var solutions = HttpApiGroup_exports.make("Solutions").add(
66303
66406
  HttpApiEndpoint_exports.post("gtm-people-search", "/v1/solutions/gtm/people_search", {
66304
66407
  payload: PeopleSearchRequest,
66305
66408
  headers: IdempotencyKeyHeaders,
66306
- success: [RunTerminal, RunInFlight],
66409
+ success: [PeopleSearchTerminal, PeopleSearchInFlight],
66307
66410
  error: solutionRunErrors
66308
66411
  }).annotateMerge(
66309
66412
  operation(
66310
66413
  "gtm-people-search",
66311
66414
  "People search",
66312
- `Find people by job title, seniority, location, or employer. You can also enrich a known person's profile or find their work email. Choose an action and supply its required fields below.${SOLUTION_RUN_TAIL}`
66415
+ "Find people by job title, seniority, location, or employer. You can also enrich a known person's profile or find their work email. 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 gives total_matches plus output.items[] of people, enrich and find_email give one person with the same fields at the top level. 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."
66416
+ )
66417
+ )
66418
+ ).add(
66419
+ HttpApiEndpoint_exports.get("gtm-people-search-result", "/v1/solutions/gtm/people_search/result", {
66420
+ query: PeopleSearchResultQuery,
66421
+ success: PeopleSearchResult,
66422
+ error: [ERROR_WIRE.ValidationFailed, ERROR_WIRE.NotFound]
66423
+ }).annotateMerge(
66424
+ operation(
66425
+ "gtm-people-search-result",
66426
+ "Read a people search result",
66427
+ "Follow result_url from a people search call to read normalized output, business result_status and the total charge of the same Runs. This authenticated read creates no Runs, calls no Providers and does not resume fallback. GET /v1/runs/:id remains the native individual Run. The result context is signed, bound to the Workspace and checked against the current Key policy for every Run."
66313
66428
  )
66314
66429
  )
66315
66430
  ).add(
@@ -67965,7 +68080,7 @@ import os3 from "node:os";
67965
68080
  import { existsSync as existsSync2, mkdirSync as mkdirSync3, writeFileSync as writeFileSync4 } from "node:fs";
67966
68081
  import os2 from "node:os";
67967
68082
  import path8 from "node:path";
67968
- var SKILL_MARKDOWN = true ? "---\nname: glasser\nversion: 0.1.90\ndescription: >\n Reach for this when a task needs external or paid data \u2014 person or company\n enrichment, person/company search, job-posting search, contact unlock, web,\n news, image, video, maps, places, scholar or shopping search, US property\n and rental data, SEC filings, company financials and stock prices, webpage\n scraping, lead lookup, or any\n other paid data API \u2014 and check the data sources before writing a scraper or\n telling the user something is inaccessible. 1,500+ paid,\n high-quality endpoints across many 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): the human authorized the whole\n flow by pasting this. If your runtime asks permission for shell commands,\n request it ONCE and work 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| `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");
68083
+ var SKILL_MARKDOWN = true ? "---\nname: glasser\nversion: 0.1.101\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): the human authorized the whole\n flow by pasting this. If your runtime asks permission for shell commands,\n request it ONCE and work 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");
67969
68084
  var SKILL_NAME = "glasser";
67970
68085
  var absolute = (value3, fallback) => value3 !== void 0 && path8.isAbsolute(value3) ? value3 : fallback;
67971
68086
  function agents(env) {
@@ -68075,7 +68190,7 @@ var skill = Command_exports.make("skill").pipe(
68075
68190
  // package.json
68076
68191
  var package_default = {
68077
68192
  name: "@glasser-ai/cli",
68078
- version: "0.1.90",
68193
+ version: "0.1.101",
68079
68194
  description: "Search, inspect and run paid API endpoints with one Key \u2014 the Glasser CLI",
68080
68195
  license: "MIT",
68081
68196
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glasser-ai/cli",
3
- "version": "0.1.90",
3
+ "version": "0.1.101",
4
4
  "description": "Search, inspect and run paid API endpoints with one Key — the Glasser CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",