@glasser-ai/cli 0.1.56 → 0.1.57
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 +22 -10
- package/package.json +1 -1
package/dist/glasser.js
CHANGED
|
@@ -64588,6 +64588,7 @@ var SearchEndpointsRequest = Schema_exports.Struct({
|
|
|
64588
64588
|
})
|
|
64589
64589
|
)
|
|
64590
64590
|
});
|
|
64591
|
+
var LEGACY_SEARCH_FIELDS = ["user_request"];
|
|
64591
64592
|
var SearchHit = Schema_exports.Struct({
|
|
64592
64593
|
...endpointFields,
|
|
64593
64594
|
/**
|
|
@@ -65242,12 +65243,19 @@ var balance = HttpApiGroup_exports.make("Balance").add(
|
|
|
65242
65243
|
)
|
|
65243
65244
|
)
|
|
65244
65245
|
);
|
|
65246
|
+
var withoutLegacySearchFields = (document) => {
|
|
65247
|
+
const spec = document;
|
|
65248
|
+
const schema2 = spec.paths["/v1/endpoints/search"]?.post?.requestBody?.content["application/json"]?.schema;
|
|
65249
|
+
const properties = schema2?.properties;
|
|
65250
|
+
for (const field of LEGACY_SEARCH_FIELDS) delete properties?.[field];
|
|
65251
|
+
return document;
|
|
65252
|
+
};
|
|
65245
65253
|
var glasserApi = HttpApi_exports.make("glasser").add(solutions).add(endpoints).add(runs).add(balance).middleware(RateLimit).middleware(Authentication).middleware(SchemaErrors).annotateMerge(
|
|
65246
65254
|
OpenApi_exports.annotations({
|
|
65247
65255
|
title: "Glasser",
|
|
65248
65256
|
description: "One key, no contract, pay per call, across paid APIs bought wholesale. Every response carries x-request-id; every error body carries the same envelope."
|
|
65249
65257
|
})
|
|
65250
|
-
);
|
|
65258
|
+
).annotate(OpenApi_exports.Transform, withoutLegacySearchFields);
|
|
65251
65259
|
|
|
65252
65260
|
// src/config.ts
|
|
65253
65261
|
import os from "node:os";
|
|
@@ -65720,19 +65728,22 @@ var search = Command_exports.make(
|
|
|
65720
65728
|
limit: searchLimitFlag,
|
|
65721
65729
|
cursor: cursorFlag,
|
|
65722
65730
|
task: taskFlag,
|
|
65731
|
+
useCase: Flag_exports.string("use-case").pipe(
|
|
65732
|
+
Flag_exports.optional,
|
|
65733
|
+
Flag_exports.withDescription("What the user asked for, in their own words, with the subject in it")
|
|
65734
|
+
),
|
|
65723
65735
|
/*
|
|
65724
|
-
* `--user-request` 是 2026-09-24 之前的名字(契约字段改名为 `use_case`)
|
|
65736
|
+
* `--user-request` 是 2026-09-24 之前的名字(契约字段改名为 `use_case`),**照收不公示**:
|
|
65725
65737
|
* agent 装在本地的 SKILL.md 只在它自己升级后才重新拉,旧 skill 配新 CLI 是常态。
|
|
65726
|
-
*
|
|
65738
|
+
* 不收的话那样的 agent 每一次 search 都是 unknown flag —— 与 `-q` 同一条:
|
|
65727
65739
|
* 已发布的写法不能断。
|
|
65740
|
+
*
|
|
65741
|
+
* 不用 `Flag.withAlias`:help 会把别名印在新名旁边,读起来像两个现行名字。
|
|
65742
|
+
* `Flag.withHidden` 只能藏整个旗标,所以单独立一个隐藏旗标,两个都给时新名优先。
|
|
65728
65743
|
*/
|
|
65729
|
-
|
|
65730
|
-
Flag_exports.withAlias("user-request"),
|
|
65731
|
-
Flag_exports.optional,
|
|
65732
|
-
Flag_exports.withDescription("What the user asked for, in their own words, with the subject in it")
|
|
65733
|
-
)
|
|
65744
|
+
legacyUseCase: Flag_exports.string("user-request").pipe(Flag_exports.optional, Flag_exports.withHidden)
|
|
65734
65745
|
},
|
|
65735
|
-
({ queryArg, query: queryFlag, limit, cursor, task, useCase }) => Effect_exports.gen(function* () {
|
|
65746
|
+
({ queryArg, query: queryFlag, limit, cursor, task, useCase: useCaseFlag, legacyUseCase }) => Effect_exports.gen(function* () {
|
|
65736
65747
|
const json2 = yield* JsonMode;
|
|
65737
65748
|
if (Option_exports.isSome(queryArg) && Option_exports.isSome(queryFlag)) {
|
|
65738
65749
|
return yield* new UsageError({
|
|
@@ -65740,6 +65751,7 @@ var search = Command_exports.make(
|
|
|
65740
65751
|
});
|
|
65741
65752
|
}
|
|
65742
65753
|
const query = Option_exports.isSome(queryArg) ? queryArg : queryFlag;
|
|
65754
|
+
const useCase = Option_exports.orElse(useCaseFlag, () => legacyUseCase);
|
|
65743
65755
|
const { client, call } = yield* api;
|
|
65744
65756
|
const response = yield* call(
|
|
65745
65757
|
client.Endpoints["endpoints-search"]({
|
|
@@ -66603,7 +66615,7 @@ var runs2 = Command_exports.make("runs").pipe(
|
|
|
66603
66615
|
// package.json
|
|
66604
66616
|
var package_default = {
|
|
66605
66617
|
name: "@glasser-ai/cli",
|
|
66606
|
-
version: "0.1.
|
|
66618
|
+
version: "0.1.57",
|
|
66607
66619
|
description: "Search, inspect and run paid API endpoints with one Key \u2014 the Glasser CLI",
|
|
66608
66620
|
license: "MIT",
|
|
66609
66621
|
type: "module",
|