@hol-org/rb-client 0.1.177 → 0.1.178

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,151 @@ 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 guardReceiptSyncResponseSchema = import_zod2.z.object({
1075
+ syncedAt: import_zod2.z.string(),
1076
+ receiptsStored: import_zod2.z.number()
1077
+ });
1078
+ var hbarPurchaseIntentResponseSchema = import_zod2.z.object({
1079
+ transaction: import_zod2.z.string(),
1080
+ transactionId: import_zod2.z.string(),
1081
+ network: import_zod2.z.enum(["mainnet", "testnet"]),
1082
+ accountId: import_zod2.z.string(),
1083
+ treasuryAccountId: import_zod2.z.string(),
1084
+ hbarAmount: import_zod2.z.number(),
1085
+ credits: import_zod2.z.number(),
1086
+ tinybarAmount: import_zod2.z.number(),
1087
+ memo: import_zod2.z.string(),
1088
+ centsPerHbar: import_zod2.z.number(),
1089
+ validStart: import_zod2.z.string(),
1090
+ validDurationSeconds: import_zod2.z.number(),
1091
+ requiresManualSubmit: import_zod2.z.literal(true),
1092
+ purchaseId: import_zod2.z.string()
1093
+ });
949
1094
  var x402SettlementSchema = import_zod2.z.object({
950
1095
  success: import_zod2.z.boolean().optional(),
951
1096
  transaction: import_zod2.z.string().optional(),
@@ -1328,11 +1473,13 @@ var skillDeprecationsResponseSchema = import_zod2.z.object({
1328
1473
  name: import_zod2.z.string(),
1329
1474
  items: import_zod2.z.array(skillDeprecationRecordSchema)
1330
1475
  }).passthrough();
1476
+ var skillSecurityBreakdownFindingSchema = import_zod2.z.record(jsonValueSchema);
1477
+ var skillSecurityBreakdownSummarySchema = import_zod2.z.record(jsonValueSchema);
1331
1478
  var skillSecurityBreakdownResponseSchema = import_zod2.z.object({
1332
1479
  jobId: import_zod2.z.string(),
1333
1480
  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(),
1481
+ findings: import_zod2.z.array(skillSecurityBreakdownFindingSchema).optional(),
1482
+ summary: skillSecurityBreakdownSummarySchema.optional(),
1336
1483
  generatedAt: import_zod2.z.string().nullable().optional(),
1337
1484
  scannerVersion: import_zod2.z.string().nullable().optional()
1338
1485
  }).passthrough();
@@ -2797,9 +2944,16 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
2797
2944
  var import_meta = {};
2798
2945
  var nodeRequire;
2799
2946
  var isNodeRuntime = () => typeof process !== "undefined" && Boolean(process.versions?.node);
2947
+ function resolveBuiltinModuleLoader() {
2948
+ if (typeof process === "undefined") {
2949
+ return void 0;
2950
+ }
2951
+ return process.getBuiltinModule;
2952
+ }
2800
2953
  function getNodeRequireSync() {
2801
2954
  try {
2802
- const moduleNamespace = process.getBuiltinModule?.("module");
2955
+ const builtinModuleLoader = resolveBuiltinModuleLoader();
2956
+ const moduleNamespace = builtinModuleLoader?.("module");
2803
2957
  if (typeof moduleNamespace?.createRequire === "function") {
2804
2958
  const requireFromModule = moduleNamespace.createRequire(import_meta.url);
2805
2959
  if (typeof requireFromModule.resolve === "function") {
@@ -3199,6 +3353,61 @@ async function adapterRegistrySubmissionStatus(client, submissionId) {
3199
3353
  }
3200
3354
 
3201
3355
  // ../../src/services/registry-broker/client/credits.ts
3356
+ async function getCreditsBalance(client, params = {}) {
3357
+ const query = new URLSearchParams();
3358
+ const normalizedAccountId = params.accountId?.trim();
3359
+ if (normalizedAccountId) {
3360
+ query.set("accountId", normalizedAccountId);
3361
+ }
3362
+ const suffix = query.size > 0 ? `?${query.toString()}` : "";
3363
+ const raw = await client.requestJson(`/credits/balance${suffix}`, {
3364
+ method: "GET"
3365
+ });
3366
+ return client.parseWithSchema(
3367
+ raw,
3368
+ creditBalanceResponseSchema,
3369
+ "credit balance response"
3370
+ );
3371
+ }
3372
+ async function getCreditProviders(client) {
3373
+ const raw = await client.requestJson("/credits/providers", {
3374
+ method: "GET"
3375
+ });
3376
+ return client.parseWithSchema(
3377
+ raw,
3378
+ creditProvidersResponseSchema,
3379
+ "credit providers response"
3380
+ );
3381
+ }
3382
+ async function createHbarPurchaseIntent(client, payload) {
3383
+ const body = {};
3384
+ const normalizedAccountId = payload.accountId?.trim();
3385
+ if (normalizedAccountId) {
3386
+ body.accountId = normalizedAccountId;
3387
+ }
3388
+ if (payload.credits !== void 0) {
3389
+ body.credits = payload.credits;
3390
+ }
3391
+ if (payload.hbarAmount !== void 0) {
3392
+ body.hbarAmount = payload.hbarAmount;
3393
+ }
3394
+ if (payload.memo?.trim()) {
3395
+ body.memo = payload.memo.trim();
3396
+ }
3397
+ const raw = await client.requestJson(
3398
+ "/credits/payments/hbar/intent",
3399
+ {
3400
+ method: "POST",
3401
+ headers: { "content-type": "application/json" },
3402
+ body
3403
+ }
3404
+ );
3405
+ return client.parseWithSchema(
3406
+ raw,
3407
+ hbarPurchaseIntentResponseSchema,
3408
+ "hbar purchase intent response"
3409
+ );
3410
+ }
3202
3411
  async function loadX402Dependencies(client) {
3203
3412
  const [{ default: axios }, x402Axios, x402Types] = await Promise.all([
3204
3413
  import("axios"),
@@ -3726,6 +3935,97 @@ async function registerOwnedMoltbookAgent(client, uaid, request) {
3726
3935
  );
3727
3936
  }
3728
3937
 
3938
+ // ../../src/services/registry-broker/client/guard.ts
3939
+ async function getGuardSession(client) {
3940
+ const raw = await client.requestJson("/guard/auth/session", {
3941
+ method: "GET"
3942
+ });
3943
+ return client.parseWithSchema(
3944
+ raw,
3945
+ guardSessionResponseSchema,
3946
+ "guard session response"
3947
+ );
3948
+ }
3949
+ async function getGuardEntitlements(client) {
3950
+ const raw = await client.requestJson("/guard/entitlements", {
3951
+ method: "GET"
3952
+ });
3953
+ return client.parseWithSchema(
3954
+ raw,
3955
+ guardSessionResponseSchema,
3956
+ "guard entitlements response"
3957
+ );
3958
+ }
3959
+ async function getGuardBillingBalance(client) {
3960
+ const raw = await client.requestJson("/guard/billing/balance", {
3961
+ method: "GET"
3962
+ });
3963
+ return client.parseWithSchema(
3964
+ raw,
3965
+ guardBalanceResponseSchema,
3966
+ "guard billing balance response"
3967
+ );
3968
+ }
3969
+ async function getGuardTrustByHash(client, sha256) {
3970
+ const normalizedHash = sha256.trim();
3971
+ if (!normalizedHash) {
3972
+ throw new Error("sha256 is required");
3973
+ }
3974
+ const raw = await client.requestJson(
3975
+ `/guard/trust/by-hash/${encodeURIComponent(normalizedHash)}`,
3976
+ { method: "GET" }
3977
+ );
3978
+ return client.parseWithSchema(
3979
+ raw,
3980
+ guardTrustByHashResponseSchema,
3981
+ "guard trust by hash response"
3982
+ );
3983
+ }
3984
+ async function resolveGuardTrust(client, query) {
3985
+ const params = new URLSearchParams();
3986
+ if (query.ecosystem?.trim()) {
3987
+ params.set("ecosystem", query.ecosystem.trim());
3988
+ }
3989
+ if (query.name?.trim()) {
3990
+ params.set("name", query.name.trim());
3991
+ }
3992
+ if (query.version?.trim()) {
3993
+ params.set("version", query.version.trim());
3994
+ }
3995
+ const suffix = params.size > 0 ? `?${params.toString()}` : "";
3996
+ const raw = await client.requestJson(
3997
+ `/guard/trust/resolve${suffix}`,
3998
+ { method: "GET" }
3999
+ );
4000
+ return client.parseWithSchema(
4001
+ raw,
4002
+ guardTrustResolveResponseSchema,
4003
+ "guard trust resolve response"
4004
+ );
4005
+ }
4006
+ async function getGuardRevocations(client) {
4007
+ const raw = await client.requestJson("/guard/revocations", {
4008
+ method: "GET"
4009
+ });
4010
+ return client.parseWithSchema(
4011
+ raw,
4012
+ guardRevocationResponseSchema,
4013
+ "guard revocations response"
4014
+ );
4015
+ }
4016
+ async function syncGuardReceipts(client, payload) {
4017
+ const raw = await client.requestJson("/guard/receipts/sync", {
4018
+ method: "POST",
4019
+ headers: { "content-type": "application/json" },
4020
+ body: payload
4021
+ });
4022
+ return client.parseWithSchema(
4023
+ raw,
4024
+ guardReceiptSyncResponseSchema,
4025
+ "guard receipt sync response"
4026
+ );
4027
+ }
4028
+
3729
4029
  // ../../src/services/registry-broker/client/ledger-auth.ts
3730
4030
  var import_buffer3 = require("buffer");
3731
4031
 
@@ -4297,6 +4597,13 @@ async function facets(client, adapter) {
4297
4597
  }
4298
4598
 
4299
4599
  // ../../src/services/registry-broker/client/skills.ts
4600
+ function requireTrimmedString(value, fieldName) {
4601
+ const normalizedValue = value.trim();
4602
+ if (!normalizedValue) {
4603
+ throw new Error(`${fieldName} is required`);
4604
+ }
4605
+ return normalizedValue;
4606
+ }
4300
4607
  async function skillsConfig(client) {
4301
4608
  const raw = await client.requestJson("/skills/config", {
4302
4609
  method: "GET"
@@ -4356,10 +4663,7 @@ async function listSkills(client, params = {}) {
4356
4663
  );
4357
4664
  }
4358
4665
  async function getSkillSecurityBreakdown(client, params) {
4359
- const normalizedJobId = params.jobId.trim();
4360
- if (!normalizedJobId) {
4361
- throw new Error("jobId is required");
4362
- }
4666
+ const normalizedJobId = requireTrimmedString(params.jobId, "jobId");
4363
4667
  const raw = await client.requestJson(
4364
4668
  `/skills/${encodeURIComponent(normalizedJobId)}/security-breakdown`,
4365
4669
  { method: "GET" }
@@ -4412,10 +4716,7 @@ async function getSkillsCatalog(client, params = {}) {
4412
4716
  );
4413
4717
  }
4414
4718
  async function listSkillVersions(client, params) {
4415
- const normalizedName = params.name.trim();
4416
- if (!normalizedName) {
4417
- throw new Error("name is required");
4418
- }
4719
+ const normalizedName = requireTrimmedString(params.name, "name");
4419
4720
  const query = new URLSearchParams();
4420
4721
  query.set("name", normalizedName);
4421
4722
  const raw = await client.requestJson(
@@ -4501,10 +4802,7 @@ async function publishSkill(client, payload) {
4501
4802
  );
4502
4803
  }
4503
4804
  async function getSkillPublishJob(client, jobId, params = {}) {
4504
- const normalized = jobId.trim();
4505
- if (!normalized) {
4506
- throw new Error("jobId is required");
4507
- }
4805
+ const normalized = requireTrimmedString(jobId, "jobId");
4508
4806
  const query = new URLSearchParams();
4509
4807
  if (params.accountId) {
4510
4808
  query.set("accountId", params.accountId);
@@ -4521,10 +4819,7 @@ async function getSkillPublishJob(client, jobId, params = {}) {
4521
4819
  );
4522
4820
  }
4523
4821
  async function getSkillOwnership(client, params) {
4524
- const normalizedName = params.name.trim();
4525
- if (!normalizedName) {
4526
- throw new Error("name is required");
4527
- }
4822
+ const normalizedName = requireTrimmedString(params.name, "name");
4528
4823
  const query = new URLSearchParams();
4529
4824
  query.set("name", normalizedName);
4530
4825
  if (params.accountId) {
@@ -4543,10 +4838,7 @@ async function getSkillOwnership(client, params) {
4543
4838
  );
4544
4839
  }
4545
4840
  async function getRecommendedSkillVersion(client, params) {
4546
- const normalizedName = params.name.trim();
4547
- if (!normalizedName) {
4548
- throw new Error("name is required");
4549
- }
4841
+ const normalizedName = requireTrimmedString(params.name, "name");
4550
4842
  const query = new URLSearchParams();
4551
4843
  query.set("name", normalizedName);
4552
4844
  const raw = await client.requestJson(
@@ -4560,14 +4852,8 @@ async function getRecommendedSkillVersion(client, params) {
4560
4852
  );
4561
4853
  }
4562
4854
  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
- }
4855
+ const normalizedName = requireTrimmedString(payload.name, "name");
4856
+ const normalizedVersion = requireTrimmedString(payload.version, "version");
4571
4857
  const raw = await client.requestJson("/skills/recommended", {
4572
4858
  method: "POST",
4573
4859
  body: {
@@ -4583,10 +4869,7 @@ async function setRecommendedSkillVersion(client, payload) {
4583
4869
  );
4584
4870
  }
4585
4871
  async function getSkillDeprecations(client, params) {
4586
- const normalizedName = params.name.trim();
4587
- if (!normalizedName) {
4588
- throw new Error("name is required");
4589
- }
4872
+ const normalizedName = requireTrimmedString(params.name, "name");
4590
4873
  const query = new URLSearchParams();
4591
4874
  query.set("name", normalizedName);
4592
4875
  const raw = await client.requestJson(
@@ -4600,15 +4883,9 @@ async function getSkillDeprecations(client, params) {
4600
4883
  );
4601
4884
  }
4602
4885
  async function setSkillDeprecation(client, payload) {
4603
- const normalizedName = payload.name.trim();
4604
- if (!normalizedName) {
4605
- throw new Error("name is required");
4606
- }
4886
+ const normalizedName = requireTrimmedString(payload.name, "name");
4607
4887
  const version = payload.version?.trim();
4608
- const reason = payload.reason.trim();
4609
- if (!reason) {
4610
- throw new Error("reason is required");
4611
- }
4888
+ const reason = requireTrimmedString(payload.reason, "reason");
4612
4889
  const replacementRef = payload.replacementRef?.trim();
4613
4890
  const raw = await client.requestJson("/skills/deprecate", {
4614
4891
  method: "POST",
@@ -4627,10 +4904,7 @@ async function setSkillDeprecation(client, payload) {
4627
4904
  );
4628
4905
  }
4629
4906
  async function getSkillBadge(client, params) {
4630
- const normalizedName = params.name.trim();
4631
- if (!normalizedName) {
4632
- throw new Error("name is required");
4633
- }
4907
+ const normalizedName = requireTrimmedString(params.name, "name");
4634
4908
  const query = new URLSearchParams();
4635
4909
  query.set("name", normalizedName);
4636
4910
  if (params.metric) {
@@ -4653,10 +4927,7 @@ async function getSkillBadge(client, params) {
4653
4927
  );
4654
4928
  }
4655
4929
  async function getSkillStatus(client, params) {
4656
- const normalizedName = params.name.trim();
4657
- if (!normalizedName) {
4658
- throw new Error("name is required");
4659
- }
4930
+ const normalizedName = requireTrimmedString(params.name, "name");
4660
4931
  const query = new URLSearchParams();
4661
4932
  query.set("name", normalizedName);
4662
4933
  if (params.version?.trim()) {
@@ -4673,14 +4944,8 @@ async function getSkillStatus(client, params) {
4673
4944
  );
4674
4945
  }
4675
4946
  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
- }
4947
+ const repo = requireTrimmedString(params.repo, "repo");
4948
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4684
4949
  const query = new URLSearchParams();
4685
4950
  query.set("repo", repo);
4686
4951
  query.set("skillDir", skillDir);
@@ -4698,14 +4963,8 @@ async function getSkillStatusByRepo(client, params) {
4698
4963
  );
4699
4964
  }
4700
4965
  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
- }
4966
+ const repo = requireTrimmedString(params.repo, "repo");
4967
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4709
4968
  const query = new URLSearchParams();
4710
4969
  query.set("repo", repo);
4711
4970
  query.set("skillDir", skillDir);
@@ -4723,10 +4982,7 @@ async function getSkillConversionSignalsByRepo(client, params) {
4723
4982
  );
4724
4983
  }
4725
4984
  async function uploadSkillPreviewFromGithubOidc(client, payload) {
4726
- const token = payload.token.trim();
4727
- if (!token) {
4728
- throw new Error("token is required");
4729
- }
4985
+ const token = requireTrimmedString(payload.token, "token");
4730
4986
  const raw = await client.requestJson(
4731
4987
  "/skills/preview/github-oidc",
4732
4988
  {
@@ -4745,10 +5001,7 @@ async function uploadSkillPreviewFromGithubOidc(client, payload) {
4745
5001
  );
4746
5002
  }
4747
5003
  async function getSkillPreview(client, params) {
4748
- const normalizedName = params.name.trim();
4749
- if (!normalizedName) {
4750
- throw new Error("name is required");
4751
- }
5004
+ const normalizedName = requireTrimmedString(params.name, "name");
4752
5005
  const query = new URLSearchParams();
4753
5006
  query.set("name", normalizedName);
4754
5007
  if (params.version?.trim()) {
@@ -4765,14 +5018,8 @@ async function getSkillPreview(client, params) {
4765
5018
  );
4766
5019
  }
4767
5020
  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
- }
5021
+ const repo = requireTrimmedString(params.repo, "repo");
5022
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4776
5023
  const query = new URLSearchParams();
4777
5024
  query.set("repo", repo);
4778
5025
  query.set("skillDir", skillDir);
@@ -4790,10 +5037,7 @@ async function getSkillPreviewByRepo(client, params) {
4790
5037
  );
4791
5038
  }
4792
5039
  async function getSkillPreviewById(client, previewId) {
4793
- const normalizedPreviewId = previewId.trim();
4794
- if (!normalizedPreviewId) {
4795
- throw new Error("previewId is required");
4796
- }
5040
+ const normalizedPreviewId = requireTrimmedString(previewId, "previewId");
4797
5041
  const raw = await client.requestJson(
4798
5042
  `/skills/preview/${encodeURIComponent(normalizedPreviewId)}`,
4799
5043
  { method: "GET" }
@@ -4805,10 +5049,7 @@ async function getSkillPreviewById(client, previewId) {
4805
5049
  );
4806
5050
  }
4807
5051
  async function getSkillInstall(client, skillRef) {
4808
- const normalizedSkillRef = skillRef.trim();
4809
- if (!normalizedSkillRef) {
4810
- throw new Error("skillRef is required");
4811
- }
5052
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4812
5053
  const raw = await client.requestJson(
4813
5054
  `/skills/${encodeURIComponent(normalizedSkillRef)}/install`,
4814
5055
  { method: "GET" }
@@ -4820,10 +5061,7 @@ async function getSkillInstall(client, skillRef) {
4820
5061
  );
4821
5062
  }
4822
5063
  async function recordSkillInstallCopy(client, skillRef, payload = {}) {
4823
- const normalizedSkillRef = skillRef.trim();
4824
- if (!normalizedSkillRef) {
4825
- throw new Error("skillRef is required");
4826
- }
5064
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4827
5065
  const raw = await client.requestJson(
4828
5066
  `/skills/${encodeURIComponent(normalizedSkillRef)}/telemetry/install-copy`,
4829
5067
  {
@@ -4859,10 +5097,7 @@ async function listSkillCategories(client) {
4859
5097
  );
4860
5098
  }
4861
5099
  async function resolveSkillMarkdown(client, skillRef) {
4862
- const normalizedSkillRef = skillRef.trim();
4863
- if (!normalizedSkillRef) {
4864
- throw new Error("skillRef is required");
4865
- }
5100
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4866
5101
  const response = await client.request(
4867
5102
  `/skills/${encodeURIComponent(normalizedSkillRef)}/SKILL.md`,
4868
5103
  {
@@ -4875,10 +5110,7 @@ async function resolveSkillMarkdown(client, skillRef) {
4875
5110
  return response.text();
4876
5111
  }
4877
5112
  async function resolveSkillManifest(client, skillRef) {
4878
- const normalizedSkillRef = skillRef.trim();
4879
- if (!normalizedSkillRef) {
4880
- throw new Error("skillRef is required");
4881
- }
5113
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4882
5114
  const raw = await client.requestJson(
4883
5115
  `/skills/${encodeURIComponent(normalizedSkillRef)}/manifest`,
4884
5116
  {
@@ -4892,10 +5124,7 @@ async function resolveSkillManifest(client, skillRef) {
4892
5124
  );
4893
5125
  }
4894
5126
  async function getSkillVoteStatus(client, params) {
4895
- const normalizedName = params.name.trim();
4896
- if (!normalizedName) {
4897
- throw new Error("name is required");
4898
- }
5127
+ const normalizedName = requireTrimmedString(params.name, "name");
4899
5128
  const query = new URLSearchParams();
4900
5129
  query.set("name", normalizedName);
4901
5130
  const raw = await client.requestJson(
@@ -4909,10 +5138,7 @@ async function getSkillVoteStatus(client, params) {
4909
5138
  );
4910
5139
  }
4911
5140
  async function setSkillVote(client, payload) {
4912
- const normalizedName = payload.name.trim();
4913
- if (!normalizedName) {
4914
- throw new Error("name is required");
4915
- }
5141
+ const normalizedName = requireTrimmedString(payload.name, "name");
4916
5142
  const raw = await client.requestJson("/skills/vote", {
4917
5143
  method: "POST",
4918
5144
  body: { name: normalizedName, upvoted: payload.upvoted },
@@ -4925,10 +5151,7 @@ async function setSkillVote(client, payload) {
4925
5151
  );
4926
5152
  }
4927
5153
  async function requestSkillVerification(client, payload) {
4928
- const normalizedName = payload.name.trim();
4929
- if (!normalizedName) {
4930
- throw new Error("name is required");
4931
- }
5154
+ const normalizedName = requireTrimmedString(payload.name, "name");
4932
5155
  const raw = await client.requestJson(
4933
5156
  "/skills/verification/request",
4934
5157
  {
@@ -4948,10 +5171,7 @@ async function requestSkillVerification(client, payload) {
4948
5171
  );
4949
5172
  }
4950
5173
  async function getSkillVerificationStatus(client, params) {
4951
- const normalizedName = params.name.trim();
4952
- if (!normalizedName) {
4953
- throw new Error("name is required");
4954
- }
5174
+ const normalizedName = requireTrimmedString(params.name, "name");
4955
5175
  const query = new URLSearchParams();
4956
5176
  query.set("name", normalizedName);
4957
5177
  if (params.version) {
@@ -4968,10 +5188,7 @@ async function getSkillVerificationStatus(client, params) {
4968
5188
  );
4969
5189
  }
4970
5190
  async function createSkillDomainProofChallenge(client, payload) {
4971
- const normalizedName = payload.name.trim();
4972
- if (!normalizedName) {
4973
- throw new Error("name is required");
4974
- }
5191
+ const normalizedName = requireTrimmedString(payload.name, "name");
4975
5192
  const raw = await client.requestJson(
4976
5193
  "/skills/verification/domain/challenge",
4977
5194
  {
@@ -4991,14 +5208,11 @@ async function createSkillDomainProofChallenge(client, payload) {
4991
5208
  );
4992
5209
  }
4993
5210
  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
- }
5211
+ const normalizedName = requireTrimmedString(payload.name, "name");
5212
+ const challengeToken = requireTrimmedString(
5213
+ payload.challengeToken,
5214
+ "challengeToken"
5215
+ );
5002
5216
  const raw = await client.requestJson(
5003
5217
  "/skills/verification/domain/verify",
5004
5218
  {
@@ -5612,6 +5826,36 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5612
5826
  async dashboardStats() {
5613
5827
  return dashboardStats(this);
5614
5828
  }
5829
+ async getCreditsBalance(params = {}) {
5830
+ return getCreditsBalance(this, params);
5831
+ }
5832
+ async getCreditProviders() {
5833
+ return getCreditProviders(this);
5834
+ }
5835
+ async getGuardSession() {
5836
+ return getGuardSession(this);
5837
+ }
5838
+ async getGuardEntitlements() {
5839
+ return getGuardEntitlements(this);
5840
+ }
5841
+ async getGuardBillingBalance() {
5842
+ return getGuardBillingBalance(this);
5843
+ }
5844
+ async getGuardTrustByHash(sha256) {
5845
+ return getGuardTrustByHash(this, sha256);
5846
+ }
5847
+ async resolveGuardTrust(query) {
5848
+ return resolveGuardTrust(this, query);
5849
+ }
5850
+ async getGuardRevocations() {
5851
+ return getGuardRevocations(this);
5852
+ }
5853
+ async syncGuardReceipts(payload) {
5854
+ return syncGuardReceipts(this, payload);
5855
+ }
5856
+ async createHbarPurchaseIntent(payload) {
5857
+ return createHbarPurchaseIntent(this, payload);
5858
+ }
5615
5859
  async purchaseCreditsWithHbar(params) {
5616
5860
  return purchaseCreditsWithHbar(this, params);
5617
5861
  }