@hol-org/rb-client 0.1.177 → 0.1.179

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 CHANGED
@@ -946,6 +946,339 @@ var creditPurchaseResponseSchema = import_zod2.z.object({
946
946
  transactionId: import_zod2.z.string(),
947
947
  consensusTimestamp: import_zod2.z.string().nullable().optional()
948
948
  });
949
+ var creditProviderSummarySchema = import_zod2.z.object({
950
+ name: import_zod2.z.string(),
951
+ publishableKey: import_zod2.z.string().optional(),
952
+ currency: import_zod2.z.string().optional(),
953
+ centsPerHbar: import_zod2.z.number().nullable().optional()
954
+ });
955
+ var creditProvidersResponseSchema = import_zod2.z.object({
956
+ providers: import_zod2.z.array(creditProviderSummarySchema)
957
+ });
958
+ var creditBalanceResponseSchema = import_zod2.z.object({
959
+ accountId: import_zod2.z.string(),
960
+ balance: import_zod2.z.number(),
961
+ balanceRecord: jsonValueSchema.optional(),
962
+ timestamp: import_zod2.z.string().optional()
963
+ });
964
+ var guardPlanIdSchema = import_zod2.z.enum(["free", "pro", "team", "enterprise"]);
965
+ var guardBucketBalanceSchema = import_zod2.z.object({
966
+ bucketId: import_zod2.z.enum([
967
+ "registry_credits",
968
+ "chat_credits",
969
+ "guard_credits",
970
+ "org_policy_credits"
971
+ ]),
972
+ label: import_zod2.z.string(),
973
+ availableCredits: import_zod2.z.number(),
974
+ includedMonthlyCredits: import_zod2.z.number().nullable().optional()
975
+ });
976
+ var guardPrincipalSchema = import_zod2.z.object({
977
+ signedIn: import_zod2.z.boolean(),
978
+ userId: import_zod2.z.string().optional(),
979
+ email: import_zod2.z.string().optional(),
980
+ accountId: import_zod2.z.string().optional(),
981
+ stripeCustomerId: import_zod2.z.string().optional(),
982
+ roles: import_zod2.z.array(import_zod2.z.string())
983
+ });
984
+ var guardEntitlementsSchema = import_zod2.z.object({
985
+ planId: guardPlanIdSchema,
986
+ includedMonthlyCredits: import_zod2.z.number(),
987
+ deviceLimit: import_zod2.z.number(),
988
+ retentionDays: import_zod2.z.number(),
989
+ syncEnabled: import_zod2.z.boolean(),
990
+ premiumFeedsEnabled: import_zod2.z.boolean(),
991
+ teamPolicyEnabled: import_zod2.z.boolean()
992
+ });
993
+ var guardSessionResponseSchema = import_zod2.z.object({
994
+ principal: guardPrincipalSchema,
995
+ entitlements: guardEntitlementsSchema,
996
+ balance: import_zod2.z.object({
997
+ accountId: import_zod2.z.string(),
998
+ availableCredits: import_zod2.z.number()
999
+ }).nullable(),
1000
+ bucketingMode: import_zod2.z.enum(["shared-ledger", "product-bucketed"]),
1001
+ buckets: import_zod2.z.array(guardBucketBalanceSchema)
1002
+ });
1003
+ var guardBalanceResponseSchema = import_zod2.z.object({
1004
+ generatedAt: import_zod2.z.string(),
1005
+ bucketingMode: import_zod2.z.enum(["shared-ledger", "product-bucketed"]),
1006
+ buckets: import_zod2.z.array(guardBucketBalanceSchema)
1007
+ });
1008
+ var guardTrustMatchSchema = import_zod2.z.object({
1009
+ artifactId: import_zod2.z.string(),
1010
+ artifactName: import_zod2.z.string(),
1011
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1012
+ artifactSlug: import_zod2.z.string(),
1013
+ recommendation: import_zod2.z.enum(["monitor", "review", "block"]),
1014
+ verified: import_zod2.z.boolean(),
1015
+ safetyScore: import_zod2.z.number().nullable().optional(),
1016
+ trustScore: import_zod2.z.number().nullable().optional(),
1017
+ href: import_zod2.z.string().optional(),
1018
+ ecosystem: import_zod2.z.string().optional()
1019
+ });
1020
+ var guardTrustByHashResponseSchema = import_zod2.z.object({
1021
+ generatedAt: import_zod2.z.string(),
1022
+ query: import_zod2.z.object({
1023
+ sha256: import_zod2.z.string()
1024
+ }),
1025
+ match: guardTrustMatchSchema.nullable(),
1026
+ evidence: import_zod2.z.array(import_zod2.z.string())
1027
+ });
1028
+ var guardTrustResolveResponseSchema = import_zod2.z.object({
1029
+ generatedAt: import_zod2.z.string(),
1030
+ query: import_zod2.z.object({
1031
+ ecosystem: import_zod2.z.string().optional(),
1032
+ name: import_zod2.z.string().optional(),
1033
+ version: import_zod2.z.string().optional()
1034
+ }),
1035
+ items: import_zod2.z.array(guardTrustMatchSchema)
1036
+ });
1037
+ var guardRevocationSchema = import_zod2.z.object({
1038
+ id: import_zod2.z.string(),
1039
+ artifactId: import_zod2.z.string(),
1040
+ artifactName: import_zod2.z.string(),
1041
+ reason: import_zod2.z.string(),
1042
+ severity: import_zod2.z.enum(["low", "medium", "high"]),
1043
+ publishedAt: import_zod2.z.string()
1044
+ });
1045
+ var guardRevocationResponseSchema = import_zod2.z.object({
1046
+ generatedAt: import_zod2.z.string(),
1047
+ items: import_zod2.z.array(guardRevocationSchema)
1048
+ });
1049
+ var guardReceiptSchema = import_zod2.z.object({
1050
+ receiptId: import_zod2.z.string(),
1051
+ capturedAt: import_zod2.z.string(),
1052
+ harness: import_zod2.z.string(),
1053
+ deviceId: import_zod2.z.string(),
1054
+ deviceName: import_zod2.z.string(),
1055
+ artifactId: import_zod2.z.string(),
1056
+ artifactName: import_zod2.z.string(),
1057
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1058
+ artifactSlug: import_zod2.z.string(),
1059
+ artifactHash: import_zod2.z.string(),
1060
+ policyDecision: import_zod2.z.enum([
1061
+ "allow",
1062
+ "warn",
1063
+ "block",
1064
+ "review",
1065
+ "require-reapproval",
1066
+ "sandbox-required"
1067
+ ]),
1068
+ recommendation: import_zod2.z.enum(["monitor", "review", "block"]),
1069
+ changedSinceLastApproval: import_zod2.z.boolean(),
1070
+ publisher: import_zod2.z.string().optional(),
1071
+ capabilities: import_zod2.z.array(import_zod2.z.string()),
1072
+ summary: import_zod2.z.string()
1073
+ });
1074
+ var guardHistoryArtifactSchema = import_zod2.z.object({
1075
+ artifactId: import_zod2.z.string(),
1076
+ artifactName: import_zod2.z.string(),
1077
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1078
+ artifactSlug: import_zod2.z.string(),
1079
+ publisher: import_zod2.z.string().optional(),
1080
+ harnesses: import_zod2.z.array(import_zod2.z.string()),
1081
+ eventCount: import_zod2.z.number(),
1082
+ firstSeenAt: import_zod2.z.string(),
1083
+ lastSeenAt: import_zod2.z.string(),
1084
+ latestDecision: import_zod2.z.enum([
1085
+ "allow",
1086
+ "warn",
1087
+ "block",
1088
+ "review",
1089
+ "require-reapproval",
1090
+ "sandbox-required"
1091
+ ]),
1092
+ latestRecommendation: import_zod2.z.enum(["monitor", "review", "block"])
1093
+ });
1094
+ var guardReceiptHistoryResponseSchema = import_zod2.z.object({
1095
+ generatedAt: import_zod2.z.string(),
1096
+ artifacts: import_zod2.z.array(guardHistoryArtifactSchema)
1097
+ });
1098
+ var guardInventoryArtifactSchema = import_zod2.z.object({
1099
+ artifactId: import_zod2.z.string(),
1100
+ artifactName: import_zod2.z.string(),
1101
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1102
+ artifactSlug: import_zod2.z.string(),
1103
+ publisher: import_zod2.z.string().optional(),
1104
+ harnesses: import_zod2.z.array(import_zod2.z.string()),
1105
+ devices: import_zod2.z.array(import_zod2.z.string()),
1106
+ eventCount: import_zod2.z.number(),
1107
+ firstSeenAt: import_zod2.z.string(),
1108
+ lastSeenAt: import_zod2.z.string(),
1109
+ latestDecision: import_zod2.z.enum([
1110
+ "allow",
1111
+ "warn",
1112
+ "block",
1113
+ "review",
1114
+ "require-reapproval",
1115
+ "sandbox-required"
1116
+ ]),
1117
+ latestRecommendation: import_zod2.z.enum(["monitor", "review", "block"]),
1118
+ latestHash: import_zod2.z.string(),
1119
+ latestSummary: import_zod2.z.string()
1120
+ });
1121
+ var guardInventoryDiffEntrySchema = import_zod2.z.object({
1122
+ artifactId: import_zod2.z.string(),
1123
+ artifactName: import_zod2.z.string(),
1124
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1125
+ changeType: import_zod2.z.enum(["new", "changed", "removed"]),
1126
+ previousHash: import_zod2.z.string().nullable(),
1127
+ currentHash: import_zod2.z.string().nullable()
1128
+ });
1129
+ var guardInventoryDiffResponseSchema = import_zod2.z.object({
1130
+ generatedAt: import_zod2.z.string(),
1131
+ items: import_zod2.z.array(guardInventoryDiffEntrySchema)
1132
+ });
1133
+ var guardReceiptSyncResponseSchema = import_zod2.z.object({
1134
+ syncedAt: import_zod2.z.string(),
1135
+ receiptsStored: import_zod2.z.number(),
1136
+ inventoryStored: import_zod2.z.number().optional(),
1137
+ inventoryDiff: guardInventoryDiffResponseSchema.optional()
1138
+ });
1139
+ var guardInventoryResponseSchema = import_zod2.z.object({
1140
+ generatedAt: import_zod2.z.string(),
1141
+ items: import_zod2.z.array(guardInventoryArtifactSchema)
1142
+ });
1143
+ var guardAbomSummarySchema = import_zod2.z.object({
1144
+ totalArtifacts: import_zod2.z.number(),
1145
+ totalDevices: import_zod2.z.number(),
1146
+ totalHarnesses: import_zod2.z.number(),
1147
+ blockedArtifacts: import_zod2.z.number(),
1148
+ reviewArtifacts: import_zod2.z.number()
1149
+ });
1150
+ var guardAbomResponseSchema = import_zod2.z.object({
1151
+ generatedAt: import_zod2.z.string(),
1152
+ summary: guardAbomSummarySchema,
1153
+ items: import_zod2.z.array(guardInventoryArtifactSchema)
1154
+ });
1155
+ var guardTimelineEventSchema = import_zod2.z.object({
1156
+ receiptId: import_zod2.z.string(),
1157
+ capturedAt: import_zod2.z.string(),
1158
+ harness: import_zod2.z.string(),
1159
+ deviceId: import_zod2.z.string(),
1160
+ deviceName: import_zod2.z.string(),
1161
+ artifactHash: import_zod2.z.string(),
1162
+ policyDecision: import_zod2.z.enum([
1163
+ "allow",
1164
+ "warn",
1165
+ "block",
1166
+ "review",
1167
+ "require-reapproval",
1168
+ "sandbox-required"
1169
+ ]),
1170
+ recommendation: import_zod2.z.enum(["monitor", "review", "block"]),
1171
+ changedSinceLastApproval: import_zod2.z.boolean(),
1172
+ summary: import_zod2.z.string(),
1173
+ capabilities: import_zod2.z.array(import_zod2.z.string()),
1174
+ publisher: import_zod2.z.string().optional()
1175
+ });
1176
+ var guardArtifactTimelineResponseSchema = import_zod2.z.object({
1177
+ generatedAt: import_zod2.z.string(),
1178
+ artifactId: import_zod2.z.string(),
1179
+ artifactName: import_zod2.z.string(),
1180
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1181
+ artifactSlug: import_zod2.z.string(),
1182
+ events: import_zod2.z.array(guardTimelineEventSchema)
1183
+ });
1184
+ var guardReceiptExportSummarySchema = import_zod2.z.object({
1185
+ totalReceipts: import_zod2.z.number(),
1186
+ blockedCount: import_zod2.z.number(),
1187
+ reviewCount: import_zod2.z.number(),
1188
+ approvedCount: import_zod2.z.number()
1189
+ });
1190
+ var guardExportSignatureSchema = import_zod2.z.object({
1191
+ algorithm: import_zod2.z.enum(["hmac-sha256", "none"]),
1192
+ digest: import_zod2.z.string()
1193
+ });
1194
+ var guardReceiptExportResponseSchema = import_zod2.z.object({
1195
+ generatedAt: import_zod2.z.string(),
1196
+ summary: guardReceiptExportSummarySchema,
1197
+ provenanceSummary: import_zod2.z.array(import_zod2.z.string()),
1198
+ items: import_zod2.z.array(guardReceiptSchema),
1199
+ signature: guardExportSignatureSchema
1200
+ });
1201
+ var guardAlertPreferencesSchema = import_zod2.z.object({
1202
+ emailEnabled: import_zod2.z.boolean(),
1203
+ digestMode: import_zod2.z.enum(["immediate", "daily", "weekly"]),
1204
+ watchlistEnabled: import_zod2.z.boolean(),
1205
+ advisoriesEnabled: import_zod2.z.boolean(),
1206
+ repeatedWarningsEnabled: import_zod2.z.boolean(),
1207
+ teamAlertsEnabled: import_zod2.z.boolean(),
1208
+ updatedAt: import_zod2.z.string()
1209
+ });
1210
+ var guardWatchlistItemSchema = import_zod2.z.object({
1211
+ artifactId: import_zod2.z.string(),
1212
+ artifactName: import_zod2.z.string(),
1213
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1214
+ artifactSlug: import_zod2.z.string(),
1215
+ reason: import_zod2.z.string(),
1216
+ source: import_zod2.z.enum(["manual", "synced", "team-policy"]),
1217
+ createdAt: import_zod2.z.string()
1218
+ });
1219
+ var guardWatchlistResponseSchema = import_zod2.z.object({
1220
+ generatedAt: import_zod2.z.string(),
1221
+ items: import_zod2.z.array(guardWatchlistItemSchema)
1222
+ });
1223
+ var guardExceptionItemSchema = import_zod2.z.object({
1224
+ exceptionId: import_zod2.z.string(),
1225
+ scope: import_zod2.z.enum(["artifact", "publisher", "harness", "global"]),
1226
+ harness: import_zod2.z.string().nullable(),
1227
+ artifactId: import_zod2.z.string().nullable(),
1228
+ publisher: import_zod2.z.string().nullable(),
1229
+ reason: import_zod2.z.string(),
1230
+ owner: import_zod2.z.string(),
1231
+ source: import_zod2.z.enum(["manual", "team-policy"]),
1232
+ expiresAt: import_zod2.z.string(),
1233
+ createdAt: import_zod2.z.string(),
1234
+ updatedAt: import_zod2.z.string()
1235
+ });
1236
+ var guardExceptionListResponseSchema = import_zod2.z.object({
1237
+ generatedAt: import_zod2.z.string(),
1238
+ items: import_zod2.z.array(guardExceptionItemSchema)
1239
+ });
1240
+ var guardTeamPolicyAuditItemSchema = import_zod2.z.object({
1241
+ changedAt: import_zod2.z.string(),
1242
+ actor: import_zod2.z.string(),
1243
+ change: import_zod2.z.enum(["created", "updated"]),
1244
+ summary: import_zod2.z.string()
1245
+ });
1246
+ var guardTeamPolicyPackSchema = import_zod2.z.object({
1247
+ name: import_zod2.z.string(),
1248
+ sharedHarnessDefaults: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.enum(["observe", "prompt", "enforce"])),
1249
+ allowedPublishers: import_zod2.z.array(import_zod2.z.string()),
1250
+ blockedArtifacts: import_zod2.z.array(import_zod2.z.string()),
1251
+ alertChannel: import_zod2.z.enum(["email", "slack", "teams", "webhook"]),
1252
+ updatedAt: import_zod2.z.string(),
1253
+ auditTrail: import_zod2.z.array(guardTeamPolicyAuditItemSchema)
1254
+ });
1255
+ var guardDeviceSchema = import_zod2.z.object({
1256
+ deviceId: import_zod2.z.string(),
1257
+ deviceName: import_zod2.z.string(),
1258
+ harnesses: import_zod2.z.array(import_zod2.z.string()),
1259
+ receiptCount: import_zod2.z.number(),
1260
+ lastSeenAt: import_zod2.z.string()
1261
+ });
1262
+ var guardDeviceListResponseSchema = import_zod2.z.object({
1263
+ generatedAt: import_zod2.z.string(),
1264
+ items: import_zod2.z.array(guardDeviceSchema)
1265
+ });
1266
+ var hbarPurchaseIntentResponseSchema = import_zod2.z.object({
1267
+ transaction: import_zod2.z.string(),
1268
+ transactionId: import_zod2.z.string(),
1269
+ network: import_zod2.z.enum(["mainnet", "testnet"]),
1270
+ accountId: import_zod2.z.string(),
1271
+ treasuryAccountId: import_zod2.z.string(),
1272
+ hbarAmount: import_zod2.z.number(),
1273
+ credits: import_zod2.z.number(),
1274
+ tinybarAmount: import_zod2.z.number(),
1275
+ memo: import_zod2.z.string(),
1276
+ centsPerHbar: import_zod2.z.number(),
1277
+ validStart: import_zod2.z.string(),
1278
+ validDurationSeconds: import_zod2.z.number(),
1279
+ requiresManualSubmit: import_zod2.z.literal(true),
1280
+ purchaseId: import_zod2.z.string()
1281
+ });
949
1282
  var x402SettlementSchema = import_zod2.z.object({
950
1283
  success: import_zod2.z.boolean().optional(),
951
1284
  transaction: import_zod2.z.string().optional(),
@@ -1328,11 +1661,13 @@ var skillDeprecationsResponseSchema = import_zod2.z.object({
1328
1661
  name: import_zod2.z.string(),
1329
1662
  items: import_zod2.z.array(skillDeprecationRecordSchema)
1330
1663
  }).passthrough();
1664
+ var skillSecurityBreakdownFindingSchema = import_zod2.z.record(jsonValueSchema);
1665
+ var skillSecurityBreakdownSummarySchema = import_zod2.z.record(jsonValueSchema);
1331
1666
  var skillSecurityBreakdownResponseSchema = import_zod2.z.object({
1332
1667
  jobId: import_zod2.z.string(),
1333
1668
  score: import_zod2.z.number().nullable().optional(),
1334
- findings: import_zod2.z.array(import_zod2.z.unknown()).optional(),
1335
- summary: import_zod2.z.unknown().optional(),
1669
+ findings: import_zod2.z.array(skillSecurityBreakdownFindingSchema).optional(),
1670
+ summary: skillSecurityBreakdownSummarySchema.optional(),
1336
1671
  generatedAt: import_zod2.z.string().nullable().optional(),
1337
1672
  scannerVersion: import_zod2.z.string().nullable().optional()
1338
1673
  }).passthrough();
@@ -2797,9 +3132,16 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
2797
3132
  var import_meta = {};
2798
3133
  var nodeRequire;
2799
3134
  var isNodeRuntime = () => typeof process !== "undefined" && Boolean(process.versions?.node);
3135
+ function resolveBuiltinModuleLoader() {
3136
+ if (typeof process === "undefined") {
3137
+ return void 0;
3138
+ }
3139
+ return process.getBuiltinModule;
3140
+ }
2800
3141
  function getNodeRequireSync() {
2801
3142
  try {
2802
- const moduleNamespace = process.getBuiltinModule?.("module");
3143
+ const builtinModuleLoader = resolveBuiltinModuleLoader();
3144
+ const moduleNamespace = builtinModuleLoader?.("module");
2803
3145
  if (typeof moduleNamespace?.createRequire === "function") {
2804
3146
  const requireFromModule = moduleNamespace.createRequire(import_meta.url);
2805
3147
  if (typeof requireFromModule.resolve === "function") {
@@ -3199,6 +3541,61 @@ async function adapterRegistrySubmissionStatus(client, submissionId) {
3199
3541
  }
3200
3542
 
3201
3543
  // ../../src/services/registry-broker/client/credits.ts
3544
+ async function getCreditsBalance(client, params = {}) {
3545
+ const query = new URLSearchParams();
3546
+ const normalizedAccountId = params.accountId?.trim();
3547
+ if (normalizedAccountId) {
3548
+ query.set("accountId", normalizedAccountId);
3549
+ }
3550
+ const suffix = query.size > 0 ? `?${query.toString()}` : "";
3551
+ const raw = await client.requestJson(`/credits/balance${suffix}`, {
3552
+ method: "GET"
3553
+ });
3554
+ return client.parseWithSchema(
3555
+ raw,
3556
+ creditBalanceResponseSchema,
3557
+ "credit balance response"
3558
+ );
3559
+ }
3560
+ async function getCreditProviders(client) {
3561
+ const raw = await client.requestJson("/credits/providers", {
3562
+ method: "GET"
3563
+ });
3564
+ return client.parseWithSchema(
3565
+ raw,
3566
+ creditProvidersResponseSchema,
3567
+ "credit providers response"
3568
+ );
3569
+ }
3570
+ async function createHbarPurchaseIntent(client, payload) {
3571
+ const body = {};
3572
+ const normalizedAccountId = payload.accountId?.trim();
3573
+ if (normalizedAccountId) {
3574
+ body.accountId = normalizedAccountId;
3575
+ }
3576
+ if (payload.credits !== void 0) {
3577
+ body.credits = payload.credits;
3578
+ }
3579
+ if (payload.hbarAmount !== void 0) {
3580
+ body.hbarAmount = payload.hbarAmount;
3581
+ }
3582
+ if (payload.memo?.trim()) {
3583
+ body.memo = payload.memo.trim();
3584
+ }
3585
+ const raw = await client.requestJson(
3586
+ "/credits/payments/hbar/intent",
3587
+ {
3588
+ method: "POST",
3589
+ headers: { "content-type": "application/json" },
3590
+ body
3591
+ }
3592
+ );
3593
+ return client.parseWithSchema(
3594
+ raw,
3595
+ hbarPurchaseIntentResponseSchema,
3596
+ "hbar purchase intent response"
3597
+ );
3598
+ }
3202
3599
  async function loadX402Dependencies(client) {
3203
3600
  const [{ default: axios }, x402Axios, x402Types] = await Promise.all([
3204
3601
  import("axios"),
@@ -3726,6 +4123,285 @@ async function registerOwnedMoltbookAgent(client, uaid, request) {
3726
4123
  );
3727
4124
  }
3728
4125
 
4126
+ // ../../src/services/registry-broker/client/guard.ts
4127
+ async function getGuardSession(client) {
4128
+ const raw = await client.requestJson("/guard/auth/session", {
4129
+ method: "GET"
4130
+ });
4131
+ return client.parseWithSchema(
4132
+ raw,
4133
+ guardSessionResponseSchema,
4134
+ "guard session response"
4135
+ );
4136
+ }
4137
+ async function getGuardEntitlements(client) {
4138
+ const raw = await client.requestJson("/guard/entitlements", {
4139
+ method: "GET"
4140
+ });
4141
+ return client.parseWithSchema(
4142
+ raw,
4143
+ guardSessionResponseSchema,
4144
+ "guard entitlements response"
4145
+ );
4146
+ }
4147
+ async function getGuardBillingBalance(client) {
4148
+ const raw = await client.requestJson("/guard/billing/balance", {
4149
+ method: "GET"
4150
+ });
4151
+ return client.parseWithSchema(
4152
+ raw,
4153
+ guardBalanceResponseSchema,
4154
+ "guard billing balance response"
4155
+ );
4156
+ }
4157
+ async function getGuardTrustByHash(client, sha256) {
4158
+ const normalizedHash = sha256.trim();
4159
+ if (!normalizedHash) {
4160
+ throw new Error("sha256 is required");
4161
+ }
4162
+ const raw = await client.requestJson(
4163
+ `/guard/trust/by-hash/${encodeURIComponent(normalizedHash)}`,
4164
+ { method: "GET" }
4165
+ );
4166
+ return client.parseWithSchema(
4167
+ raw,
4168
+ guardTrustByHashResponseSchema,
4169
+ "guard trust by hash response"
4170
+ );
4171
+ }
4172
+ async function resolveGuardTrust(client, query) {
4173
+ const params = new URLSearchParams();
4174
+ if (query.ecosystem?.trim()) {
4175
+ params.set("ecosystem", query.ecosystem.trim());
4176
+ }
4177
+ if (query.name?.trim()) {
4178
+ params.set("name", query.name.trim());
4179
+ }
4180
+ if (query.version?.trim()) {
4181
+ params.set("version", query.version.trim());
4182
+ }
4183
+ const suffix = params.size > 0 ? `?${params.toString()}` : "";
4184
+ const raw = await client.requestJson(
4185
+ `/guard/trust/resolve${suffix}`,
4186
+ { method: "GET" }
4187
+ );
4188
+ return client.parseWithSchema(
4189
+ raw,
4190
+ guardTrustResolveResponseSchema,
4191
+ "guard trust resolve response"
4192
+ );
4193
+ }
4194
+ async function getGuardRevocations(client) {
4195
+ const raw = await client.requestJson("/guard/revocations", {
4196
+ method: "GET"
4197
+ });
4198
+ return client.parseWithSchema(
4199
+ raw,
4200
+ guardRevocationResponseSchema,
4201
+ "guard revocations response"
4202
+ );
4203
+ }
4204
+ async function getGuardInventory(client) {
4205
+ const raw = await client.requestJson("/guard/inventory", {
4206
+ method: "GET"
4207
+ });
4208
+ return client.parseWithSchema(
4209
+ raw,
4210
+ guardInventoryResponseSchema,
4211
+ "guard inventory response"
4212
+ );
4213
+ }
4214
+ async function getGuardReceiptHistory(client) {
4215
+ const raw = await client.requestJson("/guard/history", {
4216
+ method: "GET"
4217
+ });
4218
+ return client.parseWithSchema(
4219
+ raw,
4220
+ guardReceiptHistoryResponseSchema,
4221
+ "guard receipt history response"
4222
+ );
4223
+ }
4224
+ async function getGuardArtifactTimeline(client, artifactId) {
4225
+ const normalizedArtifactId = artifactId.trim();
4226
+ if (!normalizedArtifactId) {
4227
+ throw new Error("artifactId is required");
4228
+ }
4229
+ const raw = await client.requestJson(
4230
+ `/guard/history/${encodeURIComponent(normalizedArtifactId)}`,
4231
+ { method: "GET" }
4232
+ );
4233
+ return client.parseWithSchema(
4234
+ raw,
4235
+ guardArtifactTimelineResponseSchema,
4236
+ "guard artifact timeline response"
4237
+ );
4238
+ }
4239
+ async function exportGuardAbom(client) {
4240
+ const raw = await client.requestJson("/guard/abom", {
4241
+ method: "GET"
4242
+ });
4243
+ return client.parseWithSchema(
4244
+ raw,
4245
+ guardAbomResponseSchema,
4246
+ "guard abom response"
4247
+ );
4248
+ }
4249
+ async function exportGuardReceipts(client) {
4250
+ const raw = await client.requestJson("/guard/receipts/export", {
4251
+ method: "GET"
4252
+ });
4253
+ return client.parseWithSchema(
4254
+ raw,
4255
+ guardReceiptExportResponseSchema,
4256
+ "guard receipt export response"
4257
+ );
4258
+ }
4259
+ async function getGuardInventoryDiff(client) {
4260
+ const raw = await client.requestJson("/guard/inventory/diff", {
4261
+ method: "GET"
4262
+ });
4263
+ return client.parseWithSchema(
4264
+ raw,
4265
+ guardInventoryDiffResponseSchema,
4266
+ "guard inventory diff response"
4267
+ );
4268
+ }
4269
+ async function getGuardDevices(client) {
4270
+ const raw = await client.requestJson("/guard/devices", {
4271
+ method: "GET"
4272
+ });
4273
+ return client.parseWithSchema(
4274
+ raw,
4275
+ guardDeviceListResponseSchema,
4276
+ "guard devices response"
4277
+ );
4278
+ }
4279
+ async function getGuardAlertPreferences(client) {
4280
+ const raw = await client.requestJson("/guard/alerts/preferences", {
4281
+ method: "GET"
4282
+ });
4283
+ return client.parseWithSchema(
4284
+ raw,
4285
+ guardAlertPreferencesSchema,
4286
+ "guard alert preferences response"
4287
+ );
4288
+ }
4289
+ async function updateGuardAlertPreferences(client, payload) {
4290
+ const raw = await client.requestJson("/guard/alerts/preferences", {
4291
+ method: "PUT",
4292
+ body: payload
4293
+ });
4294
+ return client.parseWithSchema(
4295
+ raw,
4296
+ guardAlertPreferencesSchema,
4297
+ "guard alert preferences response"
4298
+ );
4299
+ }
4300
+ async function getGuardExceptions(client) {
4301
+ const raw = await client.requestJson("/guard/exceptions", {
4302
+ method: "GET"
4303
+ });
4304
+ return client.parseWithSchema(
4305
+ raw,
4306
+ guardExceptionListResponseSchema,
4307
+ "guard exceptions response"
4308
+ );
4309
+ }
4310
+ async function getGuardWatchlist(client) {
4311
+ const raw = await client.requestJson("/guard/watchlist", {
4312
+ method: "GET"
4313
+ });
4314
+ return client.parseWithSchema(
4315
+ raw,
4316
+ guardWatchlistResponseSchema,
4317
+ "guard watchlist response"
4318
+ );
4319
+ }
4320
+ async function addGuardWatchlistItem(client, payload) {
4321
+ const raw = await client.requestJson("/guard/watchlist", {
4322
+ method: "POST",
4323
+ body: payload
4324
+ });
4325
+ return client.parseWithSchema(
4326
+ raw,
4327
+ guardWatchlistResponseSchema,
4328
+ "guard watchlist response"
4329
+ );
4330
+ }
4331
+ async function removeGuardWatchlistItem(client, artifactId) {
4332
+ const normalizedArtifactId = artifactId.trim();
4333
+ if (!normalizedArtifactId) {
4334
+ throw new Error("artifactId is required");
4335
+ }
4336
+ const raw = await client.requestJson(
4337
+ `/guard/watchlist/${encodeURIComponent(normalizedArtifactId)}`,
4338
+ { method: "DELETE" }
4339
+ );
4340
+ return client.parseWithSchema(
4341
+ raw,
4342
+ guardWatchlistResponseSchema,
4343
+ "guard watchlist response"
4344
+ );
4345
+ }
4346
+ async function addGuardException(client, payload) {
4347
+ const raw = await client.requestJson("/guard/exceptions", {
4348
+ method: "POST",
4349
+ body: payload
4350
+ });
4351
+ return client.parseWithSchema(
4352
+ raw,
4353
+ guardExceptionListResponseSchema,
4354
+ "guard exceptions response"
4355
+ );
4356
+ }
4357
+ async function removeGuardException(client, exceptionId) {
4358
+ const normalizedExceptionId = exceptionId.trim();
4359
+ if (!normalizedExceptionId) {
4360
+ throw new Error("exceptionId is required");
4361
+ }
4362
+ const raw = await client.requestJson(
4363
+ `/guard/exceptions/${encodeURIComponent(normalizedExceptionId)}`,
4364
+ { method: "DELETE" }
4365
+ );
4366
+ return client.parseWithSchema(
4367
+ raw,
4368
+ guardExceptionListResponseSchema,
4369
+ "guard exceptions response"
4370
+ );
4371
+ }
4372
+ async function getGuardTeamPolicyPack(client) {
4373
+ const raw = await client.requestJson("/guard/team/policy-pack", {
4374
+ method: "GET"
4375
+ });
4376
+ return client.parseWithSchema(
4377
+ raw,
4378
+ guardTeamPolicyPackSchema,
4379
+ "guard team policy pack response"
4380
+ );
4381
+ }
4382
+ async function updateGuardTeamPolicyPack(client, payload) {
4383
+ const raw = await client.requestJson("/guard/team/policy-pack", {
4384
+ method: "PUT",
4385
+ body: payload
4386
+ });
4387
+ return client.parseWithSchema(
4388
+ raw,
4389
+ guardTeamPolicyPackSchema,
4390
+ "guard team policy pack response"
4391
+ );
4392
+ }
4393
+ async function syncGuardReceipts(client, payload) {
4394
+ const raw = await client.requestJson("/guard/receipts/sync", {
4395
+ method: "POST",
4396
+ body: payload
4397
+ });
4398
+ return client.parseWithSchema(
4399
+ raw,
4400
+ guardReceiptSyncResponseSchema,
4401
+ "guard receipt sync response"
4402
+ );
4403
+ }
4404
+
3729
4405
  // ../../src/services/registry-broker/client/ledger-auth.ts
3730
4406
  var import_buffer3 = require("buffer");
3731
4407
 
@@ -4297,6 +4973,13 @@ async function facets(client, adapter) {
4297
4973
  }
4298
4974
 
4299
4975
  // ../../src/services/registry-broker/client/skills.ts
4976
+ function requireTrimmedString(value, fieldName) {
4977
+ const normalizedValue = value.trim();
4978
+ if (!normalizedValue) {
4979
+ throw new Error(`${fieldName} is required`);
4980
+ }
4981
+ return normalizedValue;
4982
+ }
4300
4983
  async function skillsConfig(client) {
4301
4984
  const raw = await client.requestJson("/skills/config", {
4302
4985
  method: "GET"
@@ -4356,10 +5039,7 @@ async function listSkills(client, params = {}) {
4356
5039
  );
4357
5040
  }
4358
5041
  async function getSkillSecurityBreakdown(client, params) {
4359
- const normalizedJobId = params.jobId.trim();
4360
- if (!normalizedJobId) {
4361
- throw new Error("jobId is required");
4362
- }
5042
+ const normalizedJobId = requireTrimmedString(params.jobId, "jobId");
4363
5043
  const raw = await client.requestJson(
4364
5044
  `/skills/${encodeURIComponent(normalizedJobId)}/security-breakdown`,
4365
5045
  { method: "GET" }
@@ -4412,10 +5092,7 @@ async function getSkillsCatalog(client, params = {}) {
4412
5092
  );
4413
5093
  }
4414
5094
  async function listSkillVersions(client, params) {
4415
- const normalizedName = params.name.trim();
4416
- if (!normalizedName) {
4417
- throw new Error("name is required");
4418
- }
5095
+ const normalizedName = requireTrimmedString(params.name, "name");
4419
5096
  const query = new URLSearchParams();
4420
5097
  query.set("name", normalizedName);
4421
5098
  const raw = await client.requestJson(
@@ -4501,10 +5178,7 @@ async function publishSkill(client, payload) {
4501
5178
  );
4502
5179
  }
4503
5180
  async function getSkillPublishJob(client, jobId, params = {}) {
4504
- const normalized = jobId.trim();
4505
- if (!normalized) {
4506
- throw new Error("jobId is required");
4507
- }
5181
+ const normalized = requireTrimmedString(jobId, "jobId");
4508
5182
  const query = new URLSearchParams();
4509
5183
  if (params.accountId) {
4510
5184
  query.set("accountId", params.accountId);
@@ -4521,10 +5195,7 @@ async function getSkillPublishJob(client, jobId, params = {}) {
4521
5195
  );
4522
5196
  }
4523
5197
  async function getSkillOwnership(client, params) {
4524
- const normalizedName = params.name.trim();
4525
- if (!normalizedName) {
4526
- throw new Error("name is required");
4527
- }
5198
+ const normalizedName = requireTrimmedString(params.name, "name");
4528
5199
  const query = new URLSearchParams();
4529
5200
  query.set("name", normalizedName);
4530
5201
  if (params.accountId) {
@@ -4543,10 +5214,7 @@ async function getSkillOwnership(client, params) {
4543
5214
  );
4544
5215
  }
4545
5216
  async function getRecommendedSkillVersion(client, params) {
4546
- const normalizedName = params.name.trim();
4547
- if (!normalizedName) {
4548
- throw new Error("name is required");
4549
- }
5217
+ const normalizedName = requireTrimmedString(params.name, "name");
4550
5218
  const query = new URLSearchParams();
4551
5219
  query.set("name", normalizedName);
4552
5220
  const raw = await client.requestJson(
@@ -4560,14 +5228,8 @@ async function getRecommendedSkillVersion(client, params) {
4560
5228
  );
4561
5229
  }
4562
5230
  async function setRecommendedSkillVersion(client, payload) {
4563
- const normalizedName = payload.name.trim();
4564
- const normalizedVersion = payload.version.trim();
4565
- if (!normalizedName) {
4566
- throw new Error("name is required");
4567
- }
4568
- if (!normalizedVersion) {
4569
- throw new Error("version is required");
4570
- }
5231
+ const normalizedName = requireTrimmedString(payload.name, "name");
5232
+ const normalizedVersion = requireTrimmedString(payload.version, "version");
4571
5233
  const raw = await client.requestJson("/skills/recommended", {
4572
5234
  method: "POST",
4573
5235
  body: {
@@ -4583,10 +5245,7 @@ async function setRecommendedSkillVersion(client, payload) {
4583
5245
  );
4584
5246
  }
4585
5247
  async function getSkillDeprecations(client, params) {
4586
- const normalizedName = params.name.trim();
4587
- if (!normalizedName) {
4588
- throw new Error("name is required");
4589
- }
5248
+ const normalizedName = requireTrimmedString(params.name, "name");
4590
5249
  const query = new URLSearchParams();
4591
5250
  query.set("name", normalizedName);
4592
5251
  const raw = await client.requestJson(
@@ -4600,15 +5259,9 @@ async function getSkillDeprecations(client, params) {
4600
5259
  );
4601
5260
  }
4602
5261
  async function setSkillDeprecation(client, payload) {
4603
- const normalizedName = payload.name.trim();
4604
- if (!normalizedName) {
4605
- throw new Error("name is required");
4606
- }
5262
+ const normalizedName = requireTrimmedString(payload.name, "name");
4607
5263
  const version = payload.version?.trim();
4608
- const reason = payload.reason.trim();
4609
- if (!reason) {
4610
- throw new Error("reason is required");
4611
- }
5264
+ const reason = requireTrimmedString(payload.reason, "reason");
4612
5265
  const replacementRef = payload.replacementRef?.trim();
4613
5266
  const raw = await client.requestJson("/skills/deprecate", {
4614
5267
  method: "POST",
@@ -4627,10 +5280,7 @@ async function setSkillDeprecation(client, payload) {
4627
5280
  );
4628
5281
  }
4629
5282
  async function getSkillBadge(client, params) {
4630
- const normalizedName = params.name.trim();
4631
- if (!normalizedName) {
4632
- throw new Error("name is required");
4633
- }
5283
+ const normalizedName = requireTrimmedString(params.name, "name");
4634
5284
  const query = new URLSearchParams();
4635
5285
  query.set("name", normalizedName);
4636
5286
  if (params.metric) {
@@ -4653,10 +5303,7 @@ async function getSkillBadge(client, params) {
4653
5303
  );
4654
5304
  }
4655
5305
  async function getSkillStatus(client, params) {
4656
- const normalizedName = params.name.trim();
4657
- if (!normalizedName) {
4658
- throw new Error("name is required");
4659
- }
5306
+ const normalizedName = requireTrimmedString(params.name, "name");
4660
5307
  const query = new URLSearchParams();
4661
5308
  query.set("name", normalizedName);
4662
5309
  if (params.version?.trim()) {
@@ -4673,14 +5320,8 @@ async function getSkillStatus(client, params) {
4673
5320
  );
4674
5321
  }
4675
5322
  async function getSkillStatusByRepo(client, params) {
4676
- const repo = params.repo.trim();
4677
- const skillDir = params.skillDir.trim();
4678
- if (!repo) {
4679
- throw new Error("repo is required");
4680
- }
4681
- if (!skillDir) {
4682
- throw new Error("skillDir is required");
4683
- }
5323
+ const repo = requireTrimmedString(params.repo, "repo");
5324
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4684
5325
  const query = new URLSearchParams();
4685
5326
  query.set("repo", repo);
4686
5327
  query.set("skillDir", skillDir);
@@ -4698,14 +5339,8 @@ async function getSkillStatusByRepo(client, params) {
4698
5339
  );
4699
5340
  }
4700
5341
  async function getSkillConversionSignalsByRepo(client, params) {
4701
- const repo = params.repo.trim();
4702
- const skillDir = params.skillDir.trim();
4703
- if (!repo) {
4704
- throw new Error("repo is required");
4705
- }
4706
- if (!skillDir) {
4707
- throw new Error("skillDir is required");
4708
- }
5342
+ const repo = requireTrimmedString(params.repo, "repo");
5343
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4709
5344
  const query = new URLSearchParams();
4710
5345
  query.set("repo", repo);
4711
5346
  query.set("skillDir", skillDir);
@@ -4723,10 +5358,7 @@ async function getSkillConversionSignalsByRepo(client, params) {
4723
5358
  );
4724
5359
  }
4725
5360
  async function uploadSkillPreviewFromGithubOidc(client, payload) {
4726
- const token = payload.token.trim();
4727
- if (!token) {
4728
- throw new Error("token is required");
4729
- }
5361
+ const token = requireTrimmedString(payload.token, "token");
4730
5362
  const raw = await client.requestJson(
4731
5363
  "/skills/preview/github-oidc",
4732
5364
  {
@@ -4745,10 +5377,7 @@ async function uploadSkillPreviewFromGithubOidc(client, payload) {
4745
5377
  );
4746
5378
  }
4747
5379
  async function getSkillPreview(client, params) {
4748
- const normalizedName = params.name.trim();
4749
- if (!normalizedName) {
4750
- throw new Error("name is required");
4751
- }
5380
+ const normalizedName = requireTrimmedString(params.name, "name");
4752
5381
  const query = new URLSearchParams();
4753
5382
  query.set("name", normalizedName);
4754
5383
  if (params.version?.trim()) {
@@ -4765,14 +5394,8 @@ async function getSkillPreview(client, params) {
4765
5394
  );
4766
5395
  }
4767
5396
  async function getSkillPreviewByRepo(client, params) {
4768
- const repo = params.repo.trim();
4769
- const skillDir = params.skillDir.trim();
4770
- if (!repo) {
4771
- throw new Error("repo is required");
4772
- }
4773
- if (!skillDir) {
4774
- throw new Error("skillDir is required");
4775
- }
5397
+ const repo = requireTrimmedString(params.repo, "repo");
5398
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4776
5399
  const query = new URLSearchParams();
4777
5400
  query.set("repo", repo);
4778
5401
  query.set("skillDir", skillDir);
@@ -4790,10 +5413,7 @@ async function getSkillPreviewByRepo(client, params) {
4790
5413
  );
4791
5414
  }
4792
5415
  async function getSkillPreviewById(client, previewId) {
4793
- const normalizedPreviewId = previewId.trim();
4794
- if (!normalizedPreviewId) {
4795
- throw new Error("previewId is required");
4796
- }
5416
+ const normalizedPreviewId = requireTrimmedString(previewId, "previewId");
4797
5417
  const raw = await client.requestJson(
4798
5418
  `/skills/preview/${encodeURIComponent(normalizedPreviewId)}`,
4799
5419
  { method: "GET" }
@@ -4805,10 +5425,7 @@ async function getSkillPreviewById(client, previewId) {
4805
5425
  );
4806
5426
  }
4807
5427
  async function getSkillInstall(client, skillRef) {
4808
- const normalizedSkillRef = skillRef.trim();
4809
- if (!normalizedSkillRef) {
4810
- throw new Error("skillRef is required");
4811
- }
5428
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4812
5429
  const raw = await client.requestJson(
4813
5430
  `/skills/${encodeURIComponent(normalizedSkillRef)}/install`,
4814
5431
  { method: "GET" }
@@ -4820,10 +5437,7 @@ async function getSkillInstall(client, skillRef) {
4820
5437
  );
4821
5438
  }
4822
5439
  async function recordSkillInstallCopy(client, skillRef, payload = {}) {
4823
- const normalizedSkillRef = skillRef.trim();
4824
- if (!normalizedSkillRef) {
4825
- throw new Error("skillRef is required");
4826
- }
5440
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4827
5441
  const raw = await client.requestJson(
4828
5442
  `/skills/${encodeURIComponent(normalizedSkillRef)}/telemetry/install-copy`,
4829
5443
  {
@@ -4859,10 +5473,7 @@ async function listSkillCategories(client) {
4859
5473
  );
4860
5474
  }
4861
5475
  async function resolveSkillMarkdown(client, skillRef) {
4862
- const normalizedSkillRef = skillRef.trim();
4863
- if (!normalizedSkillRef) {
4864
- throw new Error("skillRef is required");
4865
- }
5476
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4866
5477
  const response = await client.request(
4867
5478
  `/skills/${encodeURIComponent(normalizedSkillRef)}/SKILL.md`,
4868
5479
  {
@@ -4875,10 +5486,7 @@ async function resolveSkillMarkdown(client, skillRef) {
4875
5486
  return response.text();
4876
5487
  }
4877
5488
  async function resolveSkillManifest(client, skillRef) {
4878
- const normalizedSkillRef = skillRef.trim();
4879
- if (!normalizedSkillRef) {
4880
- throw new Error("skillRef is required");
4881
- }
5489
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4882
5490
  const raw = await client.requestJson(
4883
5491
  `/skills/${encodeURIComponent(normalizedSkillRef)}/manifest`,
4884
5492
  {
@@ -4892,10 +5500,7 @@ async function resolveSkillManifest(client, skillRef) {
4892
5500
  );
4893
5501
  }
4894
5502
  async function getSkillVoteStatus(client, params) {
4895
- const normalizedName = params.name.trim();
4896
- if (!normalizedName) {
4897
- throw new Error("name is required");
4898
- }
5503
+ const normalizedName = requireTrimmedString(params.name, "name");
4899
5504
  const query = new URLSearchParams();
4900
5505
  query.set("name", normalizedName);
4901
5506
  const raw = await client.requestJson(
@@ -4909,10 +5514,7 @@ async function getSkillVoteStatus(client, params) {
4909
5514
  );
4910
5515
  }
4911
5516
  async function setSkillVote(client, payload) {
4912
- const normalizedName = payload.name.trim();
4913
- if (!normalizedName) {
4914
- throw new Error("name is required");
4915
- }
5517
+ const normalizedName = requireTrimmedString(payload.name, "name");
4916
5518
  const raw = await client.requestJson("/skills/vote", {
4917
5519
  method: "POST",
4918
5520
  body: { name: normalizedName, upvoted: payload.upvoted },
@@ -4925,10 +5527,7 @@ async function setSkillVote(client, payload) {
4925
5527
  );
4926
5528
  }
4927
5529
  async function requestSkillVerification(client, payload) {
4928
- const normalizedName = payload.name.trim();
4929
- if (!normalizedName) {
4930
- throw new Error("name is required");
4931
- }
5530
+ const normalizedName = requireTrimmedString(payload.name, "name");
4932
5531
  const raw = await client.requestJson(
4933
5532
  "/skills/verification/request",
4934
5533
  {
@@ -4948,10 +5547,7 @@ async function requestSkillVerification(client, payload) {
4948
5547
  );
4949
5548
  }
4950
5549
  async function getSkillVerificationStatus(client, params) {
4951
- const normalizedName = params.name.trim();
4952
- if (!normalizedName) {
4953
- throw new Error("name is required");
4954
- }
5550
+ const normalizedName = requireTrimmedString(params.name, "name");
4955
5551
  const query = new URLSearchParams();
4956
5552
  query.set("name", normalizedName);
4957
5553
  if (params.version) {
@@ -4968,10 +5564,7 @@ async function getSkillVerificationStatus(client, params) {
4968
5564
  );
4969
5565
  }
4970
5566
  async function createSkillDomainProofChallenge(client, payload) {
4971
- const normalizedName = payload.name.trim();
4972
- if (!normalizedName) {
4973
- throw new Error("name is required");
4974
- }
5567
+ const normalizedName = requireTrimmedString(payload.name, "name");
4975
5568
  const raw = await client.requestJson(
4976
5569
  "/skills/verification/domain/challenge",
4977
5570
  {
@@ -4991,14 +5584,11 @@ async function createSkillDomainProofChallenge(client, payload) {
4991
5584
  );
4992
5585
  }
4993
5586
  async function verifySkillDomainProof(client, payload) {
4994
- const normalizedName = payload.name.trim();
4995
- const challengeToken = payload.challengeToken.trim();
4996
- if (!normalizedName) {
4997
- throw new Error("name is required");
4998
- }
4999
- if (!challengeToken) {
5000
- throw new Error("challengeToken is required");
5001
- }
5587
+ const normalizedName = requireTrimmedString(payload.name, "name");
5588
+ const challengeToken = requireTrimmedString(
5589
+ payload.challengeToken,
5590
+ "challengeToken"
5591
+ );
5002
5592
  const raw = await client.requestJson(
5003
5593
  "/skills/verification/domain/verify",
5004
5594
  {
@@ -5612,6 +6202,87 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5612
6202
  async dashboardStats() {
5613
6203
  return dashboardStats(this);
5614
6204
  }
6205
+ async getCreditsBalance(params = {}) {
6206
+ return getCreditsBalance(this, params);
6207
+ }
6208
+ async getCreditProviders() {
6209
+ return getCreditProviders(this);
6210
+ }
6211
+ async getGuardSession() {
6212
+ return getGuardSession(this);
6213
+ }
6214
+ async getGuardEntitlements() {
6215
+ return getGuardEntitlements(this);
6216
+ }
6217
+ async getGuardBillingBalance() {
6218
+ return getGuardBillingBalance(this);
6219
+ }
6220
+ async getGuardTrustByHash(sha256) {
6221
+ return getGuardTrustByHash(this, sha256);
6222
+ }
6223
+ async resolveGuardTrust(query) {
6224
+ return resolveGuardTrust(this, query);
6225
+ }
6226
+ async getGuardRevocations() {
6227
+ return getGuardRevocations(this);
6228
+ }
6229
+ async getGuardInventory() {
6230
+ return getGuardInventory(this);
6231
+ }
6232
+ async getGuardReceiptHistory() {
6233
+ return getGuardReceiptHistory(this);
6234
+ }
6235
+ async getGuardArtifactTimeline(artifactId) {
6236
+ return getGuardArtifactTimeline(this, artifactId);
6237
+ }
6238
+ async getGuardInventoryDiff() {
6239
+ return getGuardInventoryDiff(this);
6240
+ }
6241
+ async exportGuardAbom() {
6242
+ return exportGuardAbom(this);
6243
+ }
6244
+ async exportGuardReceipts() {
6245
+ return exportGuardReceipts(this);
6246
+ }
6247
+ async getGuardDevices() {
6248
+ return getGuardDevices(this);
6249
+ }
6250
+ async getGuardAlertPreferences() {
6251
+ return getGuardAlertPreferences(this);
6252
+ }
6253
+ async updateGuardAlertPreferences(payload) {
6254
+ return updateGuardAlertPreferences(this, payload);
6255
+ }
6256
+ async getGuardExceptions() {
6257
+ return getGuardExceptions(this);
6258
+ }
6259
+ async getGuardWatchlist() {
6260
+ return getGuardWatchlist(this);
6261
+ }
6262
+ async addGuardWatchlistItem(payload) {
6263
+ return addGuardWatchlistItem(this, payload);
6264
+ }
6265
+ async removeGuardWatchlistItem(artifactId) {
6266
+ return removeGuardWatchlistItem(this, artifactId);
6267
+ }
6268
+ async addGuardException(payload) {
6269
+ return addGuardException(this, payload);
6270
+ }
6271
+ async removeGuardException(exceptionId) {
6272
+ return removeGuardException(this, exceptionId);
6273
+ }
6274
+ async syncGuardReceipts(payload) {
6275
+ return syncGuardReceipts(this, payload);
6276
+ }
6277
+ async getGuardTeamPolicyPack() {
6278
+ return getGuardTeamPolicyPack(this);
6279
+ }
6280
+ async updateGuardTeamPolicyPack(payload) {
6281
+ return updateGuardTeamPolicyPack(this, payload);
6282
+ }
6283
+ async createHbarPurchaseIntent(payload) {
6284
+ return createHbarPurchaseIntent(this, payload);
6285
+ }
5615
6286
  async purchaseCreditsWithHbar(params) {
5616
6287
  return purchaseCreditsWithHbar(this, params);
5617
6288
  }