@hol-org/rb-client 0.1.162 → 0.1.164
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/index.cjs +577 -1
- package/dist/index.d.cts +14745 -1971
- package/dist/index.d.ts +14745 -1971
- package/dist/index.js +577 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1074,6 +1074,26 @@ var verificationVerifySenderResponseSchema = z2.object({
|
|
|
1074
1074
|
ownerType: z2.string(),
|
|
1075
1075
|
ownerId: z2.string()
|
|
1076
1076
|
}).passthrough();
|
|
1077
|
+
var verificationDnsErrorSchema = z2.object({
|
|
1078
|
+
code: z2.string(),
|
|
1079
|
+
message: z2.string(),
|
|
1080
|
+
details: z2.record(jsonValueSchema).optional()
|
|
1081
|
+
}).passthrough();
|
|
1082
|
+
var verificationDnsStatusResponseSchema = z2.object({
|
|
1083
|
+
uaid: z2.string(),
|
|
1084
|
+
verified: z2.boolean(),
|
|
1085
|
+
profileId: z2.string(),
|
|
1086
|
+
checkedAt: z2.string(),
|
|
1087
|
+
nativeId: z2.string().optional(),
|
|
1088
|
+
dnsName: z2.string().optional(),
|
|
1089
|
+
verificationLevel: z2.string().optional(),
|
|
1090
|
+
resolutionMode: z2.string().optional(),
|
|
1091
|
+
reconstructedUaid: z2.string().optional(),
|
|
1092
|
+
selectedFollowupProfile: z2.string().optional(),
|
|
1093
|
+
error: verificationDnsErrorSchema.optional(),
|
|
1094
|
+
source: z2.string().optional(),
|
|
1095
|
+
persisted: z2.boolean().optional()
|
|
1096
|
+
}).passthrough();
|
|
1077
1097
|
var registerStatusResponseSchema = z2.object({
|
|
1078
1098
|
registered: z2.boolean(),
|
|
1079
1099
|
agent: jsonValueSchema.optional()
|
|
@@ -1150,6 +1170,94 @@ var skillRegistryListResponseSchema = z2.object({
|
|
|
1150
1170
|
items: z2.array(skillRegistryPublishSummarySchema),
|
|
1151
1171
|
nextCursor: z2.string().nullable()
|
|
1152
1172
|
}).passthrough();
|
|
1173
|
+
var skillCatalogChannelSchema = z2.enum([
|
|
1174
|
+
"stable",
|
|
1175
|
+
"prerelease",
|
|
1176
|
+
"all"
|
|
1177
|
+
]);
|
|
1178
|
+
var skillCatalogSortBySchema = z2.enum([
|
|
1179
|
+
"trending",
|
|
1180
|
+
"upvotes",
|
|
1181
|
+
"updated",
|
|
1182
|
+
"name"
|
|
1183
|
+
]);
|
|
1184
|
+
var skillCatalogVersionSummarySchema = z2.object({
|
|
1185
|
+
version: z2.string(),
|
|
1186
|
+
publishedAt: z2.string(),
|
|
1187
|
+
verified: z2.boolean().optional()
|
|
1188
|
+
}).passthrough();
|
|
1189
|
+
var skillCatalogItemSchema = z2.object({
|
|
1190
|
+
name: z2.string(),
|
|
1191
|
+
description: z2.string().optional(),
|
|
1192
|
+
iconHcs1: z2.string().optional(),
|
|
1193
|
+
category: z2.string().optional(),
|
|
1194
|
+
tags: z2.array(z2.string()).optional(),
|
|
1195
|
+
latest: skillCatalogVersionSummarySchema,
|
|
1196
|
+
latestStable: skillCatalogVersionSummarySchema.optional(),
|
|
1197
|
+
recommended: skillCatalogVersionSummarySchema,
|
|
1198
|
+
upvotes: z2.number().int(),
|
|
1199
|
+
verified: z2.boolean(),
|
|
1200
|
+
repoStamped: z2.boolean(),
|
|
1201
|
+
trustScore: z2.number().optional(),
|
|
1202
|
+
safetyScore: z2.number().optional()
|
|
1203
|
+
}).passthrough();
|
|
1204
|
+
var skillCatalogResponseSchema = z2.object({
|
|
1205
|
+
items: z2.array(skillCatalogItemSchema),
|
|
1206
|
+
nextCursor: z2.string().nullable()
|
|
1207
|
+
}).passthrough();
|
|
1208
|
+
var skillRecommendedVersionResponseSchema = z2.object({
|
|
1209
|
+
name: z2.string(),
|
|
1210
|
+
version: z2.string(),
|
|
1211
|
+
updatedAt: z2.string(),
|
|
1212
|
+
setBy: z2.string()
|
|
1213
|
+
}).passthrough();
|
|
1214
|
+
var skillDeprecationRecordSchema = z2.object({
|
|
1215
|
+
name: z2.string(),
|
|
1216
|
+
version: z2.string().optional(),
|
|
1217
|
+
reason: z2.string(),
|
|
1218
|
+
replacementRef: z2.string().optional(),
|
|
1219
|
+
deprecatedAt: z2.string(),
|
|
1220
|
+
deprecatedBy: z2.string()
|
|
1221
|
+
}).passthrough();
|
|
1222
|
+
var skillDeprecationsResponseSchema = z2.object({
|
|
1223
|
+
name: z2.string(),
|
|
1224
|
+
items: z2.array(skillDeprecationRecordSchema)
|
|
1225
|
+
}).passthrough();
|
|
1226
|
+
var skillBadgeMetricSchema = z2.enum([
|
|
1227
|
+
"version",
|
|
1228
|
+
"status",
|
|
1229
|
+
"verification",
|
|
1230
|
+
"repo_commit",
|
|
1231
|
+
"manifest",
|
|
1232
|
+
"domain",
|
|
1233
|
+
"trust",
|
|
1234
|
+
"safety",
|
|
1235
|
+
"upvotes",
|
|
1236
|
+
"updated"
|
|
1237
|
+
]);
|
|
1238
|
+
var skillBadgeStyleSchema = z2.enum([
|
|
1239
|
+
"flat",
|
|
1240
|
+
"flat-square",
|
|
1241
|
+
"for-the-badge",
|
|
1242
|
+
"plastic",
|
|
1243
|
+
"social"
|
|
1244
|
+
]);
|
|
1245
|
+
var skillBadgeResponseSchema = z2.object({
|
|
1246
|
+
schemaVersion: z2.number().int(),
|
|
1247
|
+
label: z2.string(),
|
|
1248
|
+
message: z2.string(),
|
|
1249
|
+
color: z2.string(),
|
|
1250
|
+
style: skillBadgeStyleSchema.optional(),
|
|
1251
|
+
isError: z2.boolean().optional(),
|
|
1252
|
+
cacheSeconds: z2.number().int().optional()
|
|
1253
|
+
}).passthrough();
|
|
1254
|
+
var skillRegistryTagsResponseSchema = z2.object({
|
|
1255
|
+
tags: z2.array(z2.string())
|
|
1256
|
+
}).passthrough();
|
|
1257
|
+
var skillRegistryCategoriesResponseSchema = z2.object({
|
|
1258
|
+
categories: z2.array(z2.string())
|
|
1259
|
+
}).passthrough();
|
|
1260
|
+
var skillResolverManifestResponseSchema = z2.record(jsonValueSchema);
|
|
1153
1261
|
var skillRegistryQuoteFileBreakdownSchema = z2.object({
|
|
1154
1262
|
name: z2.string(),
|
|
1155
1263
|
mimeType: z2.string(),
|
|
@@ -1258,6 +1366,81 @@ var skillVerificationStatusSchema = z2.enum([
|
|
|
1258
1366
|
"approved",
|
|
1259
1367
|
"rejected"
|
|
1260
1368
|
]);
|
|
1369
|
+
var skillVerificationStatusLabelSchema = z2.enum([
|
|
1370
|
+
"not_requested",
|
|
1371
|
+
"pending",
|
|
1372
|
+
"approved",
|
|
1373
|
+
"rejected"
|
|
1374
|
+
]);
|
|
1375
|
+
var skillVerificationSignalFailureReasonSchema = z2.enum([
|
|
1376
|
+
"missing_owner",
|
|
1377
|
+
"missing_repo_or_commit",
|
|
1378
|
+
"unsupported_repo",
|
|
1379
|
+
"repo_fetch_failed",
|
|
1380
|
+
"manifest_pointer_missing",
|
|
1381
|
+
"manifest_fetch_failed",
|
|
1382
|
+
"manifest_parse_failed",
|
|
1383
|
+
"missing_file_hashes",
|
|
1384
|
+
"missing_domain",
|
|
1385
|
+
"challenge_invalid",
|
|
1386
|
+
"challenge_expired",
|
|
1387
|
+
"dns_lookup_failed",
|
|
1388
|
+
"dns_record_missing",
|
|
1389
|
+
"mismatch"
|
|
1390
|
+
]);
|
|
1391
|
+
var skillVerificationPublisherBoundSignalSchema = z2.object({
|
|
1392
|
+
ok: z2.boolean(),
|
|
1393
|
+
ownerAccountId: z2.string().nullable(),
|
|
1394
|
+
ownerUserId: z2.string().nullable(),
|
|
1395
|
+
checkedAt: z2.string(),
|
|
1396
|
+
reason: skillVerificationSignalFailureReasonSchema.optional()
|
|
1397
|
+
}).passthrough();
|
|
1398
|
+
var skillVerificationRepoCommitIntegrityMismatchSchema = z2.object({
|
|
1399
|
+
path: z2.string(),
|
|
1400
|
+
expectedSha256: z2.string(),
|
|
1401
|
+
actualSha256: z2.string().optional(),
|
|
1402
|
+
error: z2.string().optional()
|
|
1403
|
+
}).passthrough();
|
|
1404
|
+
var skillVerificationRepoCommitIntegritySignalSchema = z2.object({
|
|
1405
|
+
ok: z2.boolean(),
|
|
1406
|
+
repo: z2.string().nullable(),
|
|
1407
|
+
commit: z2.string().nullable(),
|
|
1408
|
+
checkedAt: z2.string(),
|
|
1409
|
+
filesChecked: z2.number().int().min(0),
|
|
1410
|
+
mismatches: z2.array(skillVerificationRepoCommitIntegrityMismatchSchema),
|
|
1411
|
+
partial: z2.boolean().optional(),
|
|
1412
|
+
reason: skillVerificationSignalFailureReasonSchema.optional()
|
|
1413
|
+
}).passthrough();
|
|
1414
|
+
var skillVerificationManifestIntegrityShaMismatchSchema = z2.object({
|
|
1415
|
+
path: z2.string(),
|
|
1416
|
+
expectedSha256: z2.string(),
|
|
1417
|
+
actualSha256: z2.string().optional()
|
|
1418
|
+
}).passthrough();
|
|
1419
|
+
var skillVerificationManifestIntegritySignalSchema = z2.object({
|
|
1420
|
+
ok: z2.boolean(),
|
|
1421
|
+
manifestHrl: z2.string().nullable(),
|
|
1422
|
+
manifestSha256: z2.string().nullable(),
|
|
1423
|
+
checkedAt: z2.string(),
|
|
1424
|
+
missingFiles: z2.array(z2.string()),
|
|
1425
|
+
shaMismatches: z2.array(skillVerificationManifestIntegrityShaMismatchSchema),
|
|
1426
|
+
extraFiles: z2.array(z2.string()).optional(),
|
|
1427
|
+
reason: skillVerificationSignalFailureReasonSchema.optional()
|
|
1428
|
+
}).passthrough();
|
|
1429
|
+
var skillVerificationDomainProofSignalSchema = z2.object({
|
|
1430
|
+
ok: z2.boolean(),
|
|
1431
|
+
domain: z2.string().optional(),
|
|
1432
|
+
method: z2.literal("dns_txt").optional(),
|
|
1433
|
+
checkedAt: z2.string().optional(),
|
|
1434
|
+
details: z2.string().optional(),
|
|
1435
|
+
txtRecordName: z2.string().optional(),
|
|
1436
|
+
reason: skillVerificationSignalFailureReasonSchema.optional()
|
|
1437
|
+
}).passthrough();
|
|
1438
|
+
var skillVerificationSignalsSchema = z2.object({
|
|
1439
|
+
publisherBound: skillVerificationPublisherBoundSignalSchema,
|
|
1440
|
+
repoCommitIntegrity: skillVerificationRepoCommitIntegritySignalSchema,
|
|
1441
|
+
manifestIntegrity: skillVerificationManifestIntegritySignalSchema,
|
|
1442
|
+
domainProof: skillVerificationDomainProofSignalSchema.optional()
|
|
1443
|
+
}).passthrough();
|
|
1261
1444
|
var skillVerificationRequestSchema = z2.object({
|
|
1262
1445
|
id: z2.string(),
|
|
1263
1446
|
network: z2.union([z2.literal("mainnet"), z2.literal("testnet")]),
|
|
@@ -1268,6 +1451,8 @@ var skillVerificationRequestSchema = z2.object({
|
|
|
1268
1451
|
usdCents: z2.number(),
|
|
1269
1452
|
creditsCharged: z2.number(),
|
|
1270
1453
|
creditAccountId: z2.string().optional(),
|
|
1454
|
+
signals: skillVerificationSignalsSchema.optional(),
|
|
1455
|
+
reviewNotes: z2.string().optional(),
|
|
1271
1456
|
requestedBy: z2.object({
|
|
1272
1457
|
userId: z2.string().optional(),
|
|
1273
1458
|
accountId: z2.string().optional(),
|
|
@@ -1278,6 +1463,11 @@ var skillVerificationRequestSchema = z2.object({
|
|
|
1278
1463
|
email: z2.string().optional()
|
|
1279
1464
|
}).optional(),
|
|
1280
1465
|
approvedAt: z2.string().optional(),
|
|
1466
|
+
rejectedBy: z2.object({
|
|
1467
|
+
userId: z2.string().optional(),
|
|
1468
|
+
email: z2.string().optional()
|
|
1469
|
+
}).optional(),
|
|
1470
|
+
rejectedAt: z2.string().optional(),
|
|
1281
1471
|
createdAt: z2.string(),
|
|
1282
1472
|
updatedAt: z2.string()
|
|
1283
1473
|
}).passthrough();
|
|
@@ -1286,10 +1476,40 @@ var skillVerificationRequestCreateResponseSchema = z2.object({
|
|
|
1286
1476
|
}).passthrough();
|
|
1287
1477
|
var skillVerificationStatusResponseSchema = z2.object({
|
|
1288
1478
|
name: z2.string(),
|
|
1479
|
+
version: z2.string(),
|
|
1480
|
+
status: skillVerificationStatusLabelSchema,
|
|
1289
1481
|
verified: z2.boolean(),
|
|
1290
1482
|
previouslyVerified: z2.boolean(),
|
|
1483
|
+
signals: skillVerificationSignalsSchema.nullable().optional(),
|
|
1484
|
+
reviewNotes: z2.string().nullable().optional(),
|
|
1291
1485
|
pendingRequest: skillVerificationRequestSchema.nullable().optional()
|
|
1292
1486
|
}).passthrough();
|
|
1487
|
+
var skillVerificationDomainProofChallengeRequestSchema = z2.object({
|
|
1488
|
+
name: z2.string().min(1),
|
|
1489
|
+
version: z2.string().min(1).optional(),
|
|
1490
|
+
domain: z2.string().min(1).optional()
|
|
1491
|
+
}).passthrough();
|
|
1492
|
+
var skillVerificationDomainProofChallengeResponseSchema = z2.object({
|
|
1493
|
+
challengeId: z2.string().min(1),
|
|
1494
|
+
name: z2.string().min(1),
|
|
1495
|
+
version: z2.string().min(1),
|
|
1496
|
+
domain: z2.string().min(1),
|
|
1497
|
+
method: z2.literal("dns_txt"),
|
|
1498
|
+
txtRecordName: z2.string().min(1),
|
|
1499
|
+
txtRecordValue: z2.string().min(1),
|
|
1500
|
+
expiresAt: z2.string().min(1)
|
|
1501
|
+
}).passthrough();
|
|
1502
|
+
var skillVerificationDomainProofVerifyRequestSchema = z2.object({
|
|
1503
|
+
name: z2.string().min(1),
|
|
1504
|
+
version: z2.string().min(1).optional(),
|
|
1505
|
+
domain: z2.string().min(1).optional(),
|
|
1506
|
+
challengeToken: z2.string().min(1)
|
|
1507
|
+
}).passthrough();
|
|
1508
|
+
var skillVerificationDomainProofVerifyResponseSchema = z2.object({
|
|
1509
|
+
name: z2.string().min(1),
|
|
1510
|
+
version: z2.string().min(1),
|
|
1511
|
+
signal: skillVerificationDomainProofSignalSchema
|
|
1512
|
+
}).passthrough();
|
|
1293
1513
|
|
|
1294
1514
|
// ../../src/utils/is-browser.ts
|
|
1295
1515
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
@@ -3511,6 +3731,40 @@ async function verifySenderOwnership(client, uaid) {
|
|
|
3511
3731
|
"verification sender response"
|
|
3512
3732
|
);
|
|
3513
3733
|
}
|
|
3734
|
+
async function verifyUaidDnsTxt(client, payload) {
|
|
3735
|
+
const raw = await client.requestJson("/verification/dns/verify", {
|
|
3736
|
+
method: "POST",
|
|
3737
|
+
headers: { "content-type": "application/json" },
|
|
3738
|
+
body: {
|
|
3739
|
+
uaid: payload.uaid,
|
|
3740
|
+
...payload.persist !== void 0 ? { persist: payload.persist } : {}
|
|
3741
|
+
}
|
|
3742
|
+
});
|
|
3743
|
+
return client.parseWithSchema(
|
|
3744
|
+
raw,
|
|
3745
|
+
verificationDnsStatusResponseSchema,
|
|
3746
|
+
"verification dns verify response"
|
|
3747
|
+
);
|
|
3748
|
+
}
|
|
3749
|
+
async function getVerificationDnsStatus(client, uaid, query) {
|
|
3750
|
+
const params = new URLSearchParams();
|
|
3751
|
+
if (query?.refresh !== void 0) {
|
|
3752
|
+
params.set("refresh", String(query.refresh));
|
|
3753
|
+
}
|
|
3754
|
+
if (query?.persist !== void 0) {
|
|
3755
|
+
params.set("persist", String(query.persist));
|
|
3756
|
+
}
|
|
3757
|
+
const queryString = params.toString();
|
|
3758
|
+
const path2 = `/verification/dns/status/${encodeURIComponent(uaid)}${queryString ? `?${queryString}` : ""}`;
|
|
3759
|
+
const raw = await client.requestJson(path2, {
|
|
3760
|
+
method: "GET"
|
|
3761
|
+
});
|
|
3762
|
+
return client.parseWithSchema(
|
|
3763
|
+
raw,
|
|
3764
|
+
verificationDnsStatusResponseSchema,
|
|
3765
|
+
"verification dns status response"
|
|
3766
|
+
);
|
|
3767
|
+
}
|
|
3514
3768
|
async function getRegisterStatus(client, uaid) {
|
|
3515
3769
|
const raw = await client.requestJson(
|
|
3516
3770
|
`/register/status/${encodeURIComponent(uaid)}`,
|
|
@@ -3575,6 +3829,24 @@ async function listSkills(client, params = {}) {
|
|
|
3575
3829
|
if (params.accountId) {
|
|
3576
3830
|
query.set("accountId", params.accountId);
|
|
3577
3831
|
}
|
|
3832
|
+
if (params.q) {
|
|
3833
|
+
query.set("q", params.q);
|
|
3834
|
+
}
|
|
3835
|
+
if (params.tag) {
|
|
3836
|
+
query.set("tag", params.tag);
|
|
3837
|
+
}
|
|
3838
|
+
if (params.category) {
|
|
3839
|
+
query.set("category", params.category);
|
|
3840
|
+
}
|
|
3841
|
+
if (typeof params.featured === "boolean") {
|
|
3842
|
+
query.set("featured", params.featured ? "true" : "false");
|
|
3843
|
+
}
|
|
3844
|
+
if (typeof params.verified === "boolean") {
|
|
3845
|
+
query.set("verified", params.verified ? "true" : "false");
|
|
3846
|
+
}
|
|
3847
|
+
if (params.view) {
|
|
3848
|
+
query.set("view", params.view);
|
|
3849
|
+
}
|
|
3578
3850
|
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3579
3851
|
const raw = await client.requestJson(`/skills${suffix}`, {
|
|
3580
3852
|
method: "GET"
|
|
@@ -3585,6 +3857,47 @@ async function listSkills(client, params = {}) {
|
|
|
3585
3857
|
"skill registry list response"
|
|
3586
3858
|
);
|
|
3587
3859
|
}
|
|
3860
|
+
async function getSkillsCatalog(client, params = {}) {
|
|
3861
|
+
const query = new URLSearchParams();
|
|
3862
|
+
if (params.q) {
|
|
3863
|
+
query.set("q", params.q);
|
|
3864
|
+
}
|
|
3865
|
+
if (params.category) {
|
|
3866
|
+
query.set("category", params.category);
|
|
3867
|
+
}
|
|
3868
|
+
params.tags?.forEach((tag) => {
|
|
3869
|
+
if (tag.trim()) {
|
|
3870
|
+
query.append("tag", tag.trim());
|
|
3871
|
+
}
|
|
3872
|
+
});
|
|
3873
|
+
if (typeof params.featured === "boolean") {
|
|
3874
|
+
query.set("featured", params.featured ? "true" : "false");
|
|
3875
|
+
}
|
|
3876
|
+
if (typeof params.verified === "boolean") {
|
|
3877
|
+
query.set("verified", params.verified ? "true" : "false");
|
|
3878
|
+
}
|
|
3879
|
+
if (params.channel) {
|
|
3880
|
+
query.set("channel", params.channel);
|
|
3881
|
+
}
|
|
3882
|
+
if (params.sortBy) {
|
|
3883
|
+
query.set("sortBy", params.sortBy);
|
|
3884
|
+
}
|
|
3885
|
+
if (typeof params.limit === "number" && Number.isFinite(params.limit)) {
|
|
3886
|
+
query.set("limit", String(Math.trunc(params.limit)));
|
|
3887
|
+
}
|
|
3888
|
+
if (params.cursor) {
|
|
3889
|
+
query.set("cursor", params.cursor);
|
|
3890
|
+
}
|
|
3891
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3892
|
+
const raw = await client.requestJson(`/skills/catalog${suffix}`, {
|
|
3893
|
+
method: "GET"
|
|
3894
|
+
});
|
|
3895
|
+
return client.parseWithSchema(
|
|
3896
|
+
raw,
|
|
3897
|
+
skillCatalogResponseSchema,
|
|
3898
|
+
"skill catalog response"
|
|
3899
|
+
);
|
|
3900
|
+
}
|
|
3588
3901
|
async function listSkillVersions(client, params) {
|
|
3589
3902
|
const normalizedName = params.name.trim();
|
|
3590
3903
|
if (!normalizedName) {
|
|
@@ -3704,6 +4017,169 @@ async function getSkillOwnership(client, params) {
|
|
|
3704
4017
|
"skill registry ownership response"
|
|
3705
4018
|
);
|
|
3706
4019
|
}
|
|
4020
|
+
async function getRecommendedSkillVersion(client, params) {
|
|
4021
|
+
const normalizedName = params.name.trim();
|
|
4022
|
+
if (!normalizedName) {
|
|
4023
|
+
throw new Error("name is required");
|
|
4024
|
+
}
|
|
4025
|
+
const query = new URLSearchParams();
|
|
4026
|
+
query.set("name", normalizedName);
|
|
4027
|
+
const raw = await client.requestJson(
|
|
4028
|
+
`/skills/recommended?${query.toString()}`,
|
|
4029
|
+
{ method: "GET" }
|
|
4030
|
+
);
|
|
4031
|
+
return client.parseWithSchema(
|
|
4032
|
+
raw,
|
|
4033
|
+
skillRecommendedVersionResponseSchema,
|
|
4034
|
+
"skill recommended version response"
|
|
4035
|
+
);
|
|
4036
|
+
}
|
|
4037
|
+
async function setRecommendedSkillVersion(client, payload) {
|
|
4038
|
+
const normalizedName = payload.name.trim();
|
|
4039
|
+
const normalizedVersion = payload.version.trim();
|
|
4040
|
+
if (!normalizedName) {
|
|
4041
|
+
throw new Error("name is required");
|
|
4042
|
+
}
|
|
4043
|
+
if (!normalizedVersion) {
|
|
4044
|
+
throw new Error("version is required");
|
|
4045
|
+
}
|
|
4046
|
+
const raw = await client.requestJson("/skills/recommended", {
|
|
4047
|
+
method: "POST",
|
|
4048
|
+
body: {
|
|
4049
|
+
name: normalizedName,
|
|
4050
|
+
version: normalizedVersion
|
|
4051
|
+
},
|
|
4052
|
+
headers: { "content-type": "application/json" }
|
|
4053
|
+
});
|
|
4054
|
+
return client.parseWithSchema(
|
|
4055
|
+
raw,
|
|
4056
|
+
skillRecommendedVersionResponseSchema,
|
|
4057
|
+
"skill recommended version response"
|
|
4058
|
+
);
|
|
4059
|
+
}
|
|
4060
|
+
async function getSkillDeprecations(client, params) {
|
|
4061
|
+
const normalizedName = params.name.trim();
|
|
4062
|
+
if (!normalizedName) {
|
|
4063
|
+
throw new Error("name is required");
|
|
4064
|
+
}
|
|
4065
|
+
const query = new URLSearchParams();
|
|
4066
|
+
query.set("name", normalizedName);
|
|
4067
|
+
const raw = await client.requestJson(
|
|
4068
|
+
`/skills/deprecations?${query.toString()}`,
|
|
4069
|
+
{ method: "GET" }
|
|
4070
|
+
);
|
|
4071
|
+
return client.parseWithSchema(
|
|
4072
|
+
raw,
|
|
4073
|
+
skillDeprecationsResponseSchema,
|
|
4074
|
+
"skill deprecations response"
|
|
4075
|
+
);
|
|
4076
|
+
}
|
|
4077
|
+
async function setSkillDeprecation(client, payload) {
|
|
4078
|
+
const normalizedName = payload.name.trim();
|
|
4079
|
+
if (!normalizedName) {
|
|
4080
|
+
throw new Error("name is required");
|
|
4081
|
+
}
|
|
4082
|
+
const version = payload.version?.trim();
|
|
4083
|
+
const reason = payload.reason.trim();
|
|
4084
|
+
if (!reason) {
|
|
4085
|
+
throw new Error("reason is required");
|
|
4086
|
+
}
|
|
4087
|
+
const replacementRef = payload.replacementRef?.trim();
|
|
4088
|
+
const raw = await client.requestJson("/skills/deprecate", {
|
|
4089
|
+
method: "POST",
|
|
4090
|
+
body: {
|
|
4091
|
+
name: normalizedName,
|
|
4092
|
+
version,
|
|
4093
|
+
reason,
|
|
4094
|
+
replacementRef
|
|
4095
|
+
},
|
|
4096
|
+
headers: { "content-type": "application/json" }
|
|
4097
|
+
});
|
|
4098
|
+
return client.parseWithSchema(
|
|
4099
|
+
raw,
|
|
4100
|
+
skillDeprecationRecordSchema,
|
|
4101
|
+
"skill deprecation response"
|
|
4102
|
+
);
|
|
4103
|
+
}
|
|
4104
|
+
async function getSkillBadge(client, params) {
|
|
4105
|
+
const normalizedName = params.name.trim();
|
|
4106
|
+
if (!normalizedName) {
|
|
4107
|
+
throw new Error("name is required");
|
|
4108
|
+
}
|
|
4109
|
+
const query = new URLSearchParams();
|
|
4110
|
+
query.set("name", normalizedName);
|
|
4111
|
+
if (params.metric) {
|
|
4112
|
+
query.set("metric", params.metric);
|
|
4113
|
+
}
|
|
4114
|
+
if (params.label?.trim()) {
|
|
4115
|
+
query.set("label", params.label.trim());
|
|
4116
|
+
}
|
|
4117
|
+
if (params.style) {
|
|
4118
|
+
query.set("style", params.style);
|
|
4119
|
+
}
|
|
4120
|
+
const raw = await client.requestJson(
|
|
4121
|
+
`/skills/badge?${query.toString()}`,
|
|
4122
|
+
{ method: "GET" }
|
|
4123
|
+
);
|
|
4124
|
+
return client.parseWithSchema(
|
|
4125
|
+
raw,
|
|
4126
|
+
skillBadgeResponseSchema,
|
|
4127
|
+
"skill badge response"
|
|
4128
|
+
);
|
|
4129
|
+
}
|
|
4130
|
+
async function listSkillTags(client) {
|
|
4131
|
+
const raw = await client.requestJson("/skills/tags", {
|
|
4132
|
+
method: "GET"
|
|
4133
|
+
});
|
|
4134
|
+
return client.parseWithSchema(
|
|
4135
|
+
raw,
|
|
4136
|
+
skillRegistryTagsResponseSchema,
|
|
4137
|
+
"skill tags response"
|
|
4138
|
+
);
|
|
4139
|
+
}
|
|
4140
|
+
async function listSkillCategories(client) {
|
|
4141
|
+
const raw = await client.requestJson("/skills/categories", {
|
|
4142
|
+
method: "GET"
|
|
4143
|
+
});
|
|
4144
|
+
return client.parseWithSchema(
|
|
4145
|
+
raw,
|
|
4146
|
+
skillRegistryCategoriesResponseSchema,
|
|
4147
|
+
"skill categories response"
|
|
4148
|
+
);
|
|
4149
|
+
}
|
|
4150
|
+
async function resolveSkillMarkdown(client, skillRef) {
|
|
4151
|
+
const normalizedSkillRef = skillRef.trim();
|
|
4152
|
+
if (!normalizedSkillRef) {
|
|
4153
|
+
throw new Error("skillRef is required");
|
|
4154
|
+
}
|
|
4155
|
+
const response = await client.request(
|
|
4156
|
+
`/skills/${encodeURIComponent(normalizedSkillRef)}/SKILL.md`,
|
|
4157
|
+
{
|
|
4158
|
+
method: "GET",
|
|
4159
|
+
headers: {
|
|
4160
|
+
accept: "text/markdown, text/plain;q=0.9, */*;q=0.8"
|
|
4161
|
+
}
|
|
4162
|
+
}
|
|
4163
|
+
);
|
|
4164
|
+
return response.text();
|
|
4165
|
+
}
|
|
4166
|
+
async function resolveSkillManifest(client, skillRef) {
|
|
4167
|
+
const normalizedSkillRef = skillRef.trim();
|
|
4168
|
+
if (!normalizedSkillRef) {
|
|
4169
|
+
throw new Error("skillRef is required");
|
|
4170
|
+
}
|
|
4171
|
+
const raw = await client.requestJson(
|
|
4172
|
+
`/skills/${encodeURIComponent(normalizedSkillRef)}/manifest`,
|
|
4173
|
+
{
|
|
4174
|
+
method: "GET"
|
|
4175
|
+
}
|
|
4176
|
+
);
|
|
4177
|
+
return client.parseWithSchema(
|
|
4178
|
+
raw,
|
|
4179
|
+
skillResolverManifestResponseSchema,
|
|
4180
|
+
"skill resolver manifest response"
|
|
4181
|
+
);
|
|
4182
|
+
}
|
|
3707
4183
|
async function getSkillVoteStatus(client, params) {
|
|
3708
4184
|
const normalizedName = params.name.trim();
|
|
3709
4185
|
if (!normalizedName) {
|
|
@@ -3746,7 +4222,11 @@ async function requestSkillVerification(client, payload) {
|
|
|
3746
4222
|
"/skills/verification/request",
|
|
3747
4223
|
{
|
|
3748
4224
|
method: "POST",
|
|
3749
|
-
body: {
|
|
4225
|
+
body: {
|
|
4226
|
+
name: normalizedName,
|
|
4227
|
+
version: payload.version,
|
|
4228
|
+
tier: payload.tier
|
|
4229
|
+
},
|
|
3750
4230
|
headers: { "content-type": "application/json" }
|
|
3751
4231
|
}
|
|
3752
4232
|
);
|
|
@@ -3763,6 +4243,9 @@ async function getSkillVerificationStatus(client, params) {
|
|
|
3763
4243
|
}
|
|
3764
4244
|
const query = new URLSearchParams();
|
|
3765
4245
|
query.set("name", normalizedName);
|
|
4246
|
+
if (params.version) {
|
|
4247
|
+
query.set("version", params.version);
|
|
4248
|
+
}
|
|
3766
4249
|
const raw = await client.requestJson(
|
|
3767
4250
|
`/skills/verification/status?${query.toString()}`,
|
|
3768
4251
|
{ method: "GET" }
|
|
@@ -3773,6 +4256,57 @@ async function getSkillVerificationStatus(client, params) {
|
|
|
3773
4256
|
"skill verification status response"
|
|
3774
4257
|
);
|
|
3775
4258
|
}
|
|
4259
|
+
async function createSkillDomainProofChallenge(client, payload) {
|
|
4260
|
+
const normalizedName = payload.name.trim();
|
|
4261
|
+
if (!normalizedName) {
|
|
4262
|
+
throw new Error("name is required");
|
|
4263
|
+
}
|
|
4264
|
+
const raw = await client.requestJson(
|
|
4265
|
+
"/skills/verification/domain/challenge",
|
|
4266
|
+
{
|
|
4267
|
+
method: "POST",
|
|
4268
|
+
body: {
|
|
4269
|
+
name: normalizedName,
|
|
4270
|
+
version: payload.version,
|
|
4271
|
+
domain: payload.domain
|
|
4272
|
+
},
|
|
4273
|
+
headers: { "content-type": "application/json" }
|
|
4274
|
+
}
|
|
4275
|
+
);
|
|
4276
|
+
return client.parseWithSchema(
|
|
4277
|
+
raw,
|
|
4278
|
+
skillVerificationDomainProofChallengeResponseSchema,
|
|
4279
|
+
"skill domain proof challenge response"
|
|
4280
|
+
);
|
|
4281
|
+
}
|
|
4282
|
+
async function verifySkillDomainProof(client, payload) {
|
|
4283
|
+
const normalizedName = payload.name.trim();
|
|
4284
|
+
const challengeToken = payload.challengeToken.trim();
|
|
4285
|
+
if (!normalizedName) {
|
|
4286
|
+
throw new Error("name is required");
|
|
4287
|
+
}
|
|
4288
|
+
if (!challengeToken) {
|
|
4289
|
+
throw new Error("challengeToken is required");
|
|
4290
|
+
}
|
|
4291
|
+
const raw = await client.requestJson(
|
|
4292
|
+
"/skills/verification/domain/verify",
|
|
4293
|
+
{
|
|
4294
|
+
method: "POST",
|
|
4295
|
+
body: {
|
|
4296
|
+
name: normalizedName,
|
|
4297
|
+
version: payload.version,
|
|
4298
|
+
domain: payload.domain,
|
|
4299
|
+
challengeToken
|
|
4300
|
+
},
|
|
4301
|
+
headers: { "content-type": "application/json" }
|
|
4302
|
+
}
|
|
4303
|
+
);
|
|
4304
|
+
return client.parseWithSchema(
|
|
4305
|
+
raw,
|
|
4306
|
+
skillVerificationDomainProofVerifyResponseSchema,
|
|
4307
|
+
"skill domain proof verify response"
|
|
4308
|
+
);
|
|
4309
|
+
}
|
|
3776
4310
|
|
|
3777
4311
|
// ../../src/services/registry-broker/client/base-client.ts
|
|
3778
4312
|
import { Buffer as Buffer5 } from "buffer";
|
|
@@ -4121,6 +4655,9 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
4121
4655
|
async listSkills(options) {
|
|
4122
4656
|
return listSkills(this, options);
|
|
4123
4657
|
}
|
|
4658
|
+
async getSkillsCatalog(options) {
|
|
4659
|
+
return getSkillsCatalog(this, options);
|
|
4660
|
+
}
|
|
4124
4661
|
async listSkillVersions(params) {
|
|
4125
4662
|
return listSkillVersions(this, params);
|
|
4126
4663
|
}
|
|
@@ -4142,6 +4679,33 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
4142
4679
|
async getSkillOwnership(params) {
|
|
4143
4680
|
return getSkillOwnership(this, params);
|
|
4144
4681
|
}
|
|
4682
|
+
async getRecommendedSkillVersion(params) {
|
|
4683
|
+
return getRecommendedSkillVersion(this, params);
|
|
4684
|
+
}
|
|
4685
|
+
async setRecommendedSkillVersion(payload) {
|
|
4686
|
+
return setRecommendedSkillVersion(this, payload);
|
|
4687
|
+
}
|
|
4688
|
+
async getSkillDeprecations(params) {
|
|
4689
|
+
return getSkillDeprecations(this, params);
|
|
4690
|
+
}
|
|
4691
|
+
async setSkillDeprecation(payload) {
|
|
4692
|
+
return setSkillDeprecation(this, payload);
|
|
4693
|
+
}
|
|
4694
|
+
async getSkillBadge(params) {
|
|
4695
|
+
return getSkillBadge(this, params);
|
|
4696
|
+
}
|
|
4697
|
+
async listSkillTags() {
|
|
4698
|
+
return listSkillTags(this);
|
|
4699
|
+
}
|
|
4700
|
+
async listSkillCategories() {
|
|
4701
|
+
return listSkillCategories(this);
|
|
4702
|
+
}
|
|
4703
|
+
async resolveSkillMarkdown(skillRef) {
|
|
4704
|
+
return resolveSkillMarkdown(this, skillRef);
|
|
4705
|
+
}
|
|
4706
|
+
async resolveSkillManifest(skillRef) {
|
|
4707
|
+
return resolveSkillManifest(this, skillRef);
|
|
4708
|
+
}
|
|
4145
4709
|
async getSkillVoteStatus(params) {
|
|
4146
4710
|
return getSkillVoteStatus(this, params);
|
|
4147
4711
|
}
|
|
@@ -4154,6 +4718,12 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
4154
4718
|
async getSkillVerificationStatus(params) {
|
|
4155
4719
|
return getSkillVerificationStatus(this, params);
|
|
4156
4720
|
}
|
|
4721
|
+
async createSkillDomainProofChallenge(payload) {
|
|
4722
|
+
return createSkillDomainProofChallenge(this, payload);
|
|
4723
|
+
}
|
|
4724
|
+
async verifySkillDomainProof(payload) {
|
|
4725
|
+
return verifySkillDomainProof(this, payload);
|
|
4726
|
+
}
|
|
4157
4727
|
async adaptersDetailed() {
|
|
4158
4728
|
return adaptersDetailed(this);
|
|
4159
4729
|
}
|
|
@@ -4349,6 +4919,12 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
4349
4919
|
async verifySenderOwnership(uaid) {
|
|
4350
4920
|
return verifySenderOwnership(this, uaid);
|
|
4351
4921
|
}
|
|
4922
|
+
async verifyUaidDnsTxt(payload) {
|
|
4923
|
+
return verifyUaidDnsTxt(this, payload);
|
|
4924
|
+
}
|
|
4925
|
+
async getVerificationDnsStatus(uaid, query) {
|
|
4926
|
+
return getVerificationDnsStatus(this, uaid, query);
|
|
4927
|
+
}
|
|
4352
4928
|
async fetchHistorySnapshot(sessionId, options) {
|
|
4353
4929
|
return fetchHistorySnapshot(
|
|
4354
4930
|
this.conversationContexts,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hol-org/rb-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.164",
|
|
4
4
|
"description": "Lightweight Registry Broker client for HOL registries.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@hashgraph/hedera-wallet-connect": "^2.0.4",
|
|
55
55
|
"@hashgraph/sdk": "^2.77.0",
|
|
56
|
-
"axios": "
|
|
56
|
+
"axios": ">=1.13.6",
|
|
57
57
|
"viem": "*",
|
|
58
58
|
"x402": "*",
|
|
59
59
|
"x402-axios": "*"
|