@glasser-ai/cli 0.1.6 → 0.1.7
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 +30 -3
- package/package.json +1 -1
package/dist/glasser.js
CHANGED
|
@@ -64285,6 +64285,30 @@ var RunMode = Schema_exports.Literals([RUN_MODES.SYNC, RUN_MODES.ASYNC]);
|
|
|
64285
64285
|
var endpointFields = {
|
|
64286
64286
|
/** Provider slug,如 pdl、serper。公开身份的一半。 */
|
|
64287
64287
|
provider: ProviderSlug,
|
|
64288
|
+
/**
|
|
64289
|
+
* Provider 的品牌名,如 People Data Labs。**展示用,不是身份** —— run 与 Policy
|
|
64290
|
+
* 认的永远是 `provider` 那个 slug,这个字段不进任何请求、不进幂等哈希。
|
|
64291
|
+
*
|
|
64292
|
+
* 为什么公开:调用方是 agent。`"provider": "pdl"` 单独出现时,「pdl 是谁」要么靠
|
|
64293
|
+
* 模型的先验(对 pdl 大概能猜到,对 theirstack、tikhub 没有任何理由假设),要么
|
|
64294
|
+
* 靠从 description 的散文里读出来 —— 而 5 个 pdl endpoint 里只有 1 个写了全名。
|
|
64295
|
+
* 一个人说「用 People Data Labs 查这个邮箱」,以及 agent 回头向这个人交代数据来
|
|
64296
|
+
* 自谁,都需要品牌名**在带内、且每一行都有**。
|
|
64297
|
+
*
|
|
64298
|
+
* Monid 与 Treg 都这么做(见 docs/reference/catalog-structure-comparison.md):
|
|
64299
|
+
* Monid 的 discover 同时给 `provider`(slug)与 `providerName`(display name),
|
|
64300
|
+
* 公开的 browse API 还多给一段 provider 简介;Treg 的 catalog payload 是
|
|
64301
|
+
* `provider` + `provider_display`。名字沿用控制面已经在用的 `provider_label` ——
|
|
64302
|
+
* 一个概念在两个平面上只有一种拼法(Monid 自己两个面用了两种拼法,不抄那一半)。
|
|
64303
|
+
*
|
|
64304
|
+
* ⚠️ **不进 Run**:Run 是结算过的钱,它的身份里不该有一个可变的展示字符串。
|
|
64305
|
+
* ⚠️ **不进检索语料**:`searchTextFor` 不看这个字段。品牌词进语料是有实测代价的
|
|
64306
|
+
* (catalog/defs/pdl/company-enrich.ts 记着那次跨实体碰撞),而这个字段的用途是
|
|
64307
|
+
* agent 拿到结果之后读它,不是靠它命中。
|
|
64308
|
+
*/
|
|
64309
|
+
provider_label: Schema_exports.String.annotate({
|
|
64310
|
+
description: 'The Provider\'s brand name, for display: "People Data Labs" for provider "pdl". Identity stays with `provider` \u2014 that is the value run and inspect take, and this one is never sent back.'
|
|
64311
|
+
}),
|
|
64288
64312
|
/** 不透明稳定的操作 key,如 /v5/person/enrich。 */
|
|
64289
64313
|
endpoint: EndpointKey,
|
|
64290
64314
|
endpoint_version: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
@@ -65020,7 +65044,7 @@ var search = Command_exports.make(
|
|
|
65020
65044
|
table2(
|
|
65021
65045
|
["Provider", "Endpoint", "Ver", "Price", "Mode", "Name"],
|
|
65022
65046
|
response.data.map((endpoint2) => [
|
|
65023
|
-
endpoint2
|
|
65047
|
+
providerLine(endpoint2),
|
|
65024
65048
|
endpoint2.endpoint,
|
|
65025
65049
|
String(endpoint2.endpoint_version),
|
|
65026
65050
|
priceLine(endpoint2.price),
|
|
@@ -65032,6 +65056,9 @@ var search = Command_exports.make(
|
|
|
65032
65056
|
yield* Console_exports.error("\nInspect with: glasser inspect -p <provider> -e <endpoint>");
|
|
65033
65057
|
})
|
|
65034
65058
|
).pipe(Command_exports.withDescription("Search runnable endpoints"));
|
|
65059
|
+
function providerLine(endpoint2) {
|
|
65060
|
+
return endpoint2.provider_label === endpoint2.provider ? endpoint2.provider : `${endpoint2.provider} (${endpoint2.provider_label})`;
|
|
65061
|
+
}
|
|
65035
65062
|
function priceLine(price) {
|
|
65036
65063
|
if (price.rule.type === "flat") return `$${price.rule.amount_usd}/call`;
|
|
65037
65064
|
return `$${price.rule.per_result_usd}/result (cap $${price.rule.cap_usd})`;
|
|
@@ -65060,7 +65087,7 @@ var inspect2 = Command_exports.make(
|
|
|
65060
65087
|
const charges = Object.entries(detail.price.charges).map(([clause, amount]) => `${clause} $${amount}`).join(", ");
|
|
65061
65088
|
yield* Console_exports.log(
|
|
65062
65089
|
kvBlock([
|
|
65063
|
-
["Provider", detail
|
|
65090
|
+
["Provider", providerLine(detail)],
|
|
65064
65091
|
["Endpoint", `${detail.endpoint} @ v${detail.endpoint_version}`],
|
|
65065
65092
|
["Name", detail.name],
|
|
65066
65093
|
["Mode", modeLine(detail)],
|
|
@@ -66020,7 +66047,7 @@ async function refreshLatestVersion(options4) {
|
|
|
66020
66047
|
// package.json
|
|
66021
66048
|
var package_default = {
|
|
66022
66049
|
name: "@glasser-ai/cli",
|
|
66023
|
-
version: "0.1.
|
|
66050
|
+
version: "0.1.7",
|
|
66024
66051
|
description: "Search, inspect and run paid API endpoints with one Key \u2014 the Glasser CLI",
|
|
66025
66052
|
license: "MIT",
|
|
66026
66053
|
type: "module",
|