@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.js CHANGED
@@ -887,6 +887,151 @@ var creditPurchaseResponseSchema = z2.object({
887
887
  transactionId: z2.string(),
888
888
  consensusTimestamp: z2.string().nullable().optional()
889
889
  });
890
+ var creditProviderSummarySchema = z2.object({
891
+ name: z2.string(),
892
+ publishableKey: z2.string().optional(),
893
+ currency: z2.string().optional(),
894
+ centsPerHbar: z2.number().nullable().optional()
895
+ });
896
+ var creditProvidersResponseSchema = z2.object({
897
+ providers: z2.array(creditProviderSummarySchema)
898
+ });
899
+ var creditBalanceResponseSchema = z2.object({
900
+ accountId: z2.string(),
901
+ balance: z2.number(),
902
+ balanceRecord: jsonValueSchema.optional(),
903
+ timestamp: z2.string().optional()
904
+ });
905
+ var guardPlanIdSchema = z2.enum(["free", "pro", "team", "enterprise"]);
906
+ var guardBucketBalanceSchema = z2.object({
907
+ bucketId: z2.enum([
908
+ "registry_credits",
909
+ "chat_credits",
910
+ "guard_credits",
911
+ "org_policy_credits"
912
+ ]),
913
+ label: z2.string(),
914
+ availableCredits: z2.number(),
915
+ includedMonthlyCredits: z2.number().nullable().optional()
916
+ });
917
+ var guardPrincipalSchema = z2.object({
918
+ signedIn: z2.boolean(),
919
+ userId: z2.string().optional(),
920
+ email: z2.string().optional(),
921
+ accountId: z2.string().optional(),
922
+ stripeCustomerId: z2.string().optional(),
923
+ roles: z2.array(z2.string())
924
+ });
925
+ var guardEntitlementsSchema = z2.object({
926
+ planId: guardPlanIdSchema,
927
+ includedMonthlyCredits: z2.number(),
928
+ deviceLimit: z2.number(),
929
+ retentionDays: z2.number(),
930
+ syncEnabled: z2.boolean(),
931
+ premiumFeedsEnabled: z2.boolean(),
932
+ teamPolicyEnabled: z2.boolean()
933
+ });
934
+ var guardSessionResponseSchema = z2.object({
935
+ principal: guardPrincipalSchema,
936
+ entitlements: guardEntitlementsSchema,
937
+ balance: z2.object({
938
+ accountId: z2.string(),
939
+ availableCredits: z2.number()
940
+ }).nullable(),
941
+ bucketingMode: z2.enum(["shared-ledger", "product-bucketed"]),
942
+ buckets: z2.array(guardBucketBalanceSchema)
943
+ });
944
+ var guardBalanceResponseSchema = z2.object({
945
+ generatedAt: z2.string(),
946
+ bucketingMode: z2.enum(["shared-ledger", "product-bucketed"]),
947
+ buckets: z2.array(guardBucketBalanceSchema)
948
+ });
949
+ var guardTrustMatchSchema = z2.object({
950
+ artifactId: z2.string(),
951
+ artifactName: z2.string(),
952
+ artifactType: z2.enum(["skill", "plugin"]),
953
+ artifactSlug: z2.string(),
954
+ recommendation: z2.enum(["monitor", "review", "block"]),
955
+ verified: z2.boolean(),
956
+ safetyScore: z2.number().nullable().optional(),
957
+ trustScore: z2.number().nullable().optional(),
958
+ href: z2.string().optional(),
959
+ ecosystem: z2.string().optional()
960
+ });
961
+ var guardTrustByHashResponseSchema = z2.object({
962
+ generatedAt: z2.string(),
963
+ query: z2.object({
964
+ sha256: z2.string()
965
+ }),
966
+ match: guardTrustMatchSchema.nullable(),
967
+ evidence: z2.array(z2.string())
968
+ });
969
+ var guardTrustResolveResponseSchema = z2.object({
970
+ generatedAt: z2.string(),
971
+ query: z2.object({
972
+ ecosystem: z2.string().optional(),
973
+ name: z2.string().optional(),
974
+ version: z2.string().optional()
975
+ }),
976
+ items: z2.array(guardTrustMatchSchema)
977
+ });
978
+ var guardRevocationSchema = z2.object({
979
+ id: z2.string(),
980
+ artifactId: z2.string(),
981
+ artifactName: z2.string(),
982
+ reason: z2.string(),
983
+ severity: z2.enum(["low", "medium", "high"]),
984
+ publishedAt: z2.string()
985
+ });
986
+ var guardRevocationResponseSchema = z2.object({
987
+ generatedAt: z2.string(),
988
+ items: z2.array(guardRevocationSchema)
989
+ });
990
+ var guardReceiptSchema = z2.object({
991
+ receiptId: z2.string(),
992
+ capturedAt: z2.string(),
993
+ harness: z2.string(),
994
+ deviceId: z2.string(),
995
+ deviceName: z2.string(),
996
+ artifactId: z2.string(),
997
+ artifactName: z2.string(),
998
+ artifactType: z2.enum(["skill", "plugin"]),
999
+ artifactSlug: z2.string(),
1000
+ artifactHash: z2.string(),
1001
+ policyDecision: z2.enum([
1002
+ "allow",
1003
+ "warn",
1004
+ "block",
1005
+ "review",
1006
+ "require-reapproval",
1007
+ "sandbox-required"
1008
+ ]),
1009
+ recommendation: z2.enum(["monitor", "review", "block"]),
1010
+ changedSinceLastApproval: z2.boolean(),
1011
+ publisher: z2.string().optional(),
1012
+ capabilities: z2.array(z2.string()),
1013
+ summary: z2.string()
1014
+ });
1015
+ var guardReceiptSyncResponseSchema = z2.object({
1016
+ syncedAt: z2.string(),
1017
+ receiptsStored: z2.number()
1018
+ });
1019
+ var hbarPurchaseIntentResponseSchema = z2.object({
1020
+ transaction: z2.string(),
1021
+ transactionId: z2.string(),
1022
+ network: z2.enum(["mainnet", "testnet"]),
1023
+ accountId: z2.string(),
1024
+ treasuryAccountId: z2.string(),
1025
+ hbarAmount: z2.number(),
1026
+ credits: z2.number(),
1027
+ tinybarAmount: z2.number(),
1028
+ memo: z2.string(),
1029
+ centsPerHbar: z2.number(),
1030
+ validStart: z2.string(),
1031
+ validDurationSeconds: z2.number(),
1032
+ requiresManualSubmit: z2.literal(true),
1033
+ purchaseId: z2.string()
1034
+ });
890
1035
  var x402SettlementSchema = z2.object({
891
1036
  success: z2.boolean().optional(),
892
1037
  transaction: z2.string().optional(),
@@ -1269,11 +1414,13 @@ var skillDeprecationsResponseSchema = z2.object({
1269
1414
  name: z2.string(),
1270
1415
  items: z2.array(skillDeprecationRecordSchema)
1271
1416
  }).passthrough();
1417
+ var skillSecurityBreakdownFindingSchema = z2.record(jsonValueSchema);
1418
+ var skillSecurityBreakdownSummarySchema = z2.record(jsonValueSchema);
1272
1419
  var skillSecurityBreakdownResponseSchema = z2.object({
1273
1420
  jobId: z2.string(),
1274
1421
  score: z2.number().nullable().optional(),
1275
- findings: z2.array(z2.unknown()).optional(),
1276
- summary: z2.unknown().optional(),
1422
+ findings: z2.array(skillSecurityBreakdownFindingSchema).optional(),
1423
+ summary: skillSecurityBreakdownSummarySchema.optional(),
1277
1424
  generatedAt: z2.string().nullable().optional(),
1278
1425
  scannerVersion: z2.string().nullable().optional()
1279
1426
  }).passthrough();
@@ -2737,9 +2884,16 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
2737
2884
  // ../../src/utils/dynamic-import.ts
2738
2885
  var nodeRequire;
2739
2886
  var isNodeRuntime = () => typeof process !== "undefined" && Boolean(process.versions?.node);
2887
+ function resolveBuiltinModuleLoader() {
2888
+ if (typeof process === "undefined") {
2889
+ return void 0;
2890
+ }
2891
+ return process.getBuiltinModule;
2892
+ }
2740
2893
  function getNodeRequireSync() {
2741
2894
  try {
2742
- const moduleNamespace = process.getBuiltinModule?.("module");
2895
+ const builtinModuleLoader = resolveBuiltinModuleLoader();
2896
+ const moduleNamespace = builtinModuleLoader?.("module");
2743
2897
  if (typeof moduleNamespace?.createRequire === "function") {
2744
2898
  const requireFromModule = moduleNamespace.createRequire(import.meta.url);
2745
2899
  if (typeof requireFromModule.resolve === "function") {
@@ -3139,6 +3293,61 @@ async function adapterRegistrySubmissionStatus(client, submissionId) {
3139
3293
  }
3140
3294
 
3141
3295
  // ../../src/services/registry-broker/client/credits.ts
3296
+ async function getCreditsBalance(client, params = {}) {
3297
+ const query = new URLSearchParams();
3298
+ const normalizedAccountId = params.accountId?.trim();
3299
+ if (normalizedAccountId) {
3300
+ query.set("accountId", normalizedAccountId);
3301
+ }
3302
+ const suffix = query.size > 0 ? `?${query.toString()}` : "";
3303
+ const raw = await client.requestJson(`/credits/balance${suffix}`, {
3304
+ method: "GET"
3305
+ });
3306
+ return client.parseWithSchema(
3307
+ raw,
3308
+ creditBalanceResponseSchema,
3309
+ "credit balance response"
3310
+ );
3311
+ }
3312
+ async function getCreditProviders(client) {
3313
+ const raw = await client.requestJson("/credits/providers", {
3314
+ method: "GET"
3315
+ });
3316
+ return client.parseWithSchema(
3317
+ raw,
3318
+ creditProvidersResponseSchema,
3319
+ "credit providers response"
3320
+ );
3321
+ }
3322
+ async function createHbarPurchaseIntent(client, payload) {
3323
+ const body = {};
3324
+ const normalizedAccountId = payload.accountId?.trim();
3325
+ if (normalizedAccountId) {
3326
+ body.accountId = normalizedAccountId;
3327
+ }
3328
+ if (payload.credits !== void 0) {
3329
+ body.credits = payload.credits;
3330
+ }
3331
+ if (payload.hbarAmount !== void 0) {
3332
+ body.hbarAmount = payload.hbarAmount;
3333
+ }
3334
+ if (payload.memo?.trim()) {
3335
+ body.memo = payload.memo.trim();
3336
+ }
3337
+ const raw = await client.requestJson(
3338
+ "/credits/payments/hbar/intent",
3339
+ {
3340
+ method: "POST",
3341
+ headers: { "content-type": "application/json" },
3342
+ body
3343
+ }
3344
+ );
3345
+ return client.parseWithSchema(
3346
+ raw,
3347
+ hbarPurchaseIntentResponseSchema,
3348
+ "hbar purchase intent response"
3349
+ );
3350
+ }
3142
3351
  async function loadX402Dependencies(client) {
3143
3352
  const [{ default: axios }, x402Axios, x402Types] = await Promise.all([
3144
3353
  import("axios"),
@@ -3666,6 +3875,97 @@ async function registerOwnedMoltbookAgent(client, uaid, request) {
3666
3875
  );
3667
3876
  }
3668
3877
 
3878
+ // ../../src/services/registry-broker/client/guard.ts
3879
+ async function getGuardSession(client) {
3880
+ const raw = await client.requestJson("/guard/auth/session", {
3881
+ method: "GET"
3882
+ });
3883
+ return client.parseWithSchema(
3884
+ raw,
3885
+ guardSessionResponseSchema,
3886
+ "guard session response"
3887
+ );
3888
+ }
3889
+ async function getGuardEntitlements(client) {
3890
+ const raw = await client.requestJson("/guard/entitlements", {
3891
+ method: "GET"
3892
+ });
3893
+ return client.parseWithSchema(
3894
+ raw,
3895
+ guardSessionResponseSchema,
3896
+ "guard entitlements response"
3897
+ );
3898
+ }
3899
+ async function getGuardBillingBalance(client) {
3900
+ const raw = await client.requestJson("/guard/billing/balance", {
3901
+ method: "GET"
3902
+ });
3903
+ return client.parseWithSchema(
3904
+ raw,
3905
+ guardBalanceResponseSchema,
3906
+ "guard billing balance response"
3907
+ );
3908
+ }
3909
+ async function getGuardTrustByHash(client, sha256) {
3910
+ const normalizedHash = sha256.trim();
3911
+ if (!normalizedHash) {
3912
+ throw new Error("sha256 is required");
3913
+ }
3914
+ const raw = await client.requestJson(
3915
+ `/guard/trust/by-hash/${encodeURIComponent(normalizedHash)}`,
3916
+ { method: "GET" }
3917
+ );
3918
+ return client.parseWithSchema(
3919
+ raw,
3920
+ guardTrustByHashResponseSchema,
3921
+ "guard trust by hash response"
3922
+ );
3923
+ }
3924
+ async function resolveGuardTrust(client, query) {
3925
+ const params = new URLSearchParams();
3926
+ if (query.ecosystem?.trim()) {
3927
+ params.set("ecosystem", query.ecosystem.trim());
3928
+ }
3929
+ if (query.name?.trim()) {
3930
+ params.set("name", query.name.trim());
3931
+ }
3932
+ if (query.version?.trim()) {
3933
+ params.set("version", query.version.trim());
3934
+ }
3935
+ const suffix = params.size > 0 ? `?${params.toString()}` : "";
3936
+ const raw = await client.requestJson(
3937
+ `/guard/trust/resolve${suffix}`,
3938
+ { method: "GET" }
3939
+ );
3940
+ return client.parseWithSchema(
3941
+ raw,
3942
+ guardTrustResolveResponseSchema,
3943
+ "guard trust resolve response"
3944
+ );
3945
+ }
3946
+ async function getGuardRevocations(client) {
3947
+ const raw = await client.requestJson("/guard/revocations", {
3948
+ method: "GET"
3949
+ });
3950
+ return client.parseWithSchema(
3951
+ raw,
3952
+ guardRevocationResponseSchema,
3953
+ "guard revocations response"
3954
+ );
3955
+ }
3956
+ async function syncGuardReceipts(client, payload) {
3957
+ const raw = await client.requestJson("/guard/receipts/sync", {
3958
+ method: "POST",
3959
+ headers: { "content-type": "application/json" },
3960
+ body: payload
3961
+ });
3962
+ return client.parseWithSchema(
3963
+ raw,
3964
+ guardReceiptSyncResponseSchema,
3965
+ "guard receipt sync response"
3966
+ );
3967
+ }
3968
+
3669
3969
  // ../../src/services/registry-broker/client/ledger-auth.ts
3670
3970
  import { Buffer as Buffer4 } from "buffer";
3671
3971
 
@@ -4237,6 +4537,13 @@ async function facets(client, adapter) {
4237
4537
  }
4238
4538
 
4239
4539
  // ../../src/services/registry-broker/client/skills.ts
4540
+ function requireTrimmedString(value, fieldName) {
4541
+ const normalizedValue = value.trim();
4542
+ if (!normalizedValue) {
4543
+ throw new Error(`${fieldName} is required`);
4544
+ }
4545
+ return normalizedValue;
4546
+ }
4240
4547
  async function skillsConfig(client) {
4241
4548
  const raw = await client.requestJson("/skills/config", {
4242
4549
  method: "GET"
@@ -4296,10 +4603,7 @@ async function listSkills(client, params = {}) {
4296
4603
  );
4297
4604
  }
4298
4605
  async function getSkillSecurityBreakdown(client, params) {
4299
- const normalizedJobId = params.jobId.trim();
4300
- if (!normalizedJobId) {
4301
- throw new Error("jobId is required");
4302
- }
4606
+ const normalizedJobId = requireTrimmedString(params.jobId, "jobId");
4303
4607
  const raw = await client.requestJson(
4304
4608
  `/skills/${encodeURIComponent(normalizedJobId)}/security-breakdown`,
4305
4609
  { method: "GET" }
@@ -4352,10 +4656,7 @@ async function getSkillsCatalog(client, params = {}) {
4352
4656
  );
4353
4657
  }
4354
4658
  async function listSkillVersions(client, params) {
4355
- const normalizedName = params.name.trim();
4356
- if (!normalizedName) {
4357
- throw new Error("name is required");
4358
- }
4659
+ const normalizedName = requireTrimmedString(params.name, "name");
4359
4660
  const query = new URLSearchParams();
4360
4661
  query.set("name", normalizedName);
4361
4662
  const raw = await client.requestJson(
@@ -4441,10 +4742,7 @@ async function publishSkill(client, payload) {
4441
4742
  );
4442
4743
  }
4443
4744
  async function getSkillPublishJob(client, jobId, params = {}) {
4444
- const normalized = jobId.trim();
4445
- if (!normalized) {
4446
- throw new Error("jobId is required");
4447
- }
4745
+ const normalized = requireTrimmedString(jobId, "jobId");
4448
4746
  const query = new URLSearchParams();
4449
4747
  if (params.accountId) {
4450
4748
  query.set("accountId", params.accountId);
@@ -4461,10 +4759,7 @@ async function getSkillPublishJob(client, jobId, params = {}) {
4461
4759
  );
4462
4760
  }
4463
4761
  async function getSkillOwnership(client, params) {
4464
- const normalizedName = params.name.trim();
4465
- if (!normalizedName) {
4466
- throw new Error("name is required");
4467
- }
4762
+ const normalizedName = requireTrimmedString(params.name, "name");
4468
4763
  const query = new URLSearchParams();
4469
4764
  query.set("name", normalizedName);
4470
4765
  if (params.accountId) {
@@ -4483,10 +4778,7 @@ async function getSkillOwnership(client, params) {
4483
4778
  );
4484
4779
  }
4485
4780
  async function getRecommendedSkillVersion(client, params) {
4486
- const normalizedName = params.name.trim();
4487
- if (!normalizedName) {
4488
- throw new Error("name is required");
4489
- }
4781
+ const normalizedName = requireTrimmedString(params.name, "name");
4490
4782
  const query = new URLSearchParams();
4491
4783
  query.set("name", normalizedName);
4492
4784
  const raw = await client.requestJson(
@@ -4500,14 +4792,8 @@ async function getRecommendedSkillVersion(client, params) {
4500
4792
  );
4501
4793
  }
4502
4794
  async function setRecommendedSkillVersion(client, payload) {
4503
- const normalizedName = payload.name.trim();
4504
- const normalizedVersion = payload.version.trim();
4505
- if (!normalizedName) {
4506
- throw new Error("name is required");
4507
- }
4508
- if (!normalizedVersion) {
4509
- throw new Error("version is required");
4510
- }
4795
+ const normalizedName = requireTrimmedString(payload.name, "name");
4796
+ const normalizedVersion = requireTrimmedString(payload.version, "version");
4511
4797
  const raw = await client.requestJson("/skills/recommended", {
4512
4798
  method: "POST",
4513
4799
  body: {
@@ -4523,10 +4809,7 @@ async function setRecommendedSkillVersion(client, payload) {
4523
4809
  );
4524
4810
  }
4525
4811
  async function getSkillDeprecations(client, params) {
4526
- const normalizedName = params.name.trim();
4527
- if (!normalizedName) {
4528
- throw new Error("name is required");
4529
- }
4812
+ const normalizedName = requireTrimmedString(params.name, "name");
4530
4813
  const query = new URLSearchParams();
4531
4814
  query.set("name", normalizedName);
4532
4815
  const raw = await client.requestJson(
@@ -4540,15 +4823,9 @@ async function getSkillDeprecations(client, params) {
4540
4823
  );
4541
4824
  }
4542
4825
  async function setSkillDeprecation(client, payload) {
4543
- const normalizedName = payload.name.trim();
4544
- if (!normalizedName) {
4545
- throw new Error("name is required");
4546
- }
4826
+ const normalizedName = requireTrimmedString(payload.name, "name");
4547
4827
  const version = payload.version?.trim();
4548
- const reason = payload.reason.trim();
4549
- if (!reason) {
4550
- throw new Error("reason is required");
4551
- }
4828
+ const reason = requireTrimmedString(payload.reason, "reason");
4552
4829
  const replacementRef = payload.replacementRef?.trim();
4553
4830
  const raw = await client.requestJson("/skills/deprecate", {
4554
4831
  method: "POST",
@@ -4567,10 +4844,7 @@ async function setSkillDeprecation(client, payload) {
4567
4844
  );
4568
4845
  }
4569
4846
  async function getSkillBadge(client, params) {
4570
- const normalizedName = params.name.trim();
4571
- if (!normalizedName) {
4572
- throw new Error("name is required");
4573
- }
4847
+ const normalizedName = requireTrimmedString(params.name, "name");
4574
4848
  const query = new URLSearchParams();
4575
4849
  query.set("name", normalizedName);
4576
4850
  if (params.metric) {
@@ -4593,10 +4867,7 @@ async function getSkillBadge(client, params) {
4593
4867
  );
4594
4868
  }
4595
4869
  async function getSkillStatus(client, params) {
4596
- const normalizedName = params.name.trim();
4597
- if (!normalizedName) {
4598
- throw new Error("name is required");
4599
- }
4870
+ const normalizedName = requireTrimmedString(params.name, "name");
4600
4871
  const query = new URLSearchParams();
4601
4872
  query.set("name", normalizedName);
4602
4873
  if (params.version?.trim()) {
@@ -4613,14 +4884,8 @@ async function getSkillStatus(client, params) {
4613
4884
  );
4614
4885
  }
4615
4886
  async function getSkillStatusByRepo(client, params) {
4616
- const repo = params.repo.trim();
4617
- const skillDir = params.skillDir.trim();
4618
- if (!repo) {
4619
- throw new Error("repo is required");
4620
- }
4621
- if (!skillDir) {
4622
- throw new Error("skillDir is required");
4623
- }
4887
+ const repo = requireTrimmedString(params.repo, "repo");
4888
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4624
4889
  const query = new URLSearchParams();
4625
4890
  query.set("repo", repo);
4626
4891
  query.set("skillDir", skillDir);
@@ -4638,14 +4903,8 @@ async function getSkillStatusByRepo(client, params) {
4638
4903
  );
4639
4904
  }
4640
4905
  async function getSkillConversionSignalsByRepo(client, params) {
4641
- const repo = params.repo.trim();
4642
- const skillDir = params.skillDir.trim();
4643
- if (!repo) {
4644
- throw new Error("repo is required");
4645
- }
4646
- if (!skillDir) {
4647
- throw new Error("skillDir is required");
4648
- }
4906
+ const repo = requireTrimmedString(params.repo, "repo");
4907
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4649
4908
  const query = new URLSearchParams();
4650
4909
  query.set("repo", repo);
4651
4910
  query.set("skillDir", skillDir);
@@ -4663,10 +4922,7 @@ async function getSkillConversionSignalsByRepo(client, params) {
4663
4922
  );
4664
4923
  }
4665
4924
  async function uploadSkillPreviewFromGithubOidc(client, payload) {
4666
- const token = payload.token.trim();
4667
- if (!token) {
4668
- throw new Error("token is required");
4669
- }
4925
+ const token = requireTrimmedString(payload.token, "token");
4670
4926
  const raw = await client.requestJson(
4671
4927
  "/skills/preview/github-oidc",
4672
4928
  {
@@ -4685,10 +4941,7 @@ async function uploadSkillPreviewFromGithubOidc(client, payload) {
4685
4941
  );
4686
4942
  }
4687
4943
  async function getSkillPreview(client, params) {
4688
- const normalizedName = params.name.trim();
4689
- if (!normalizedName) {
4690
- throw new Error("name is required");
4691
- }
4944
+ const normalizedName = requireTrimmedString(params.name, "name");
4692
4945
  const query = new URLSearchParams();
4693
4946
  query.set("name", normalizedName);
4694
4947
  if (params.version?.trim()) {
@@ -4705,14 +4958,8 @@ async function getSkillPreview(client, params) {
4705
4958
  );
4706
4959
  }
4707
4960
  async function getSkillPreviewByRepo(client, params) {
4708
- const repo = params.repo.trim();
4709
- const skillDir = params.skillDir.trim();
4710
- if (!repo) {
4711
- throw new Error("repo is required");
4712
- }
4713
- if (!skillDir) {
4714
- throw new Error("skillDir is required");
4715
- }
4961
+ const repo = requireTrimmedString(params.repo, "repo");
4962
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4716
4963
  const query = new URLSearchParams();
4717
4964
  query.set("repo", repo);
4718
4965
  query.set("skillDir", skillDir);
@@ -4730,10 +4977,7 @@ async function getSkillPreviewByRepo(client, params) {
4730
4977
  );
4731
4978
  }
4732
4979
  async function getSkillPreviewById(client, previewId) {
4733
- const normalizedPreviewId = previewId.trim();
4734
- if (!normalizedPreviewId) {
4735
- throw new Error("previewId is required");
4736
- }
4980
+ const normalizedPreviewId = requireTrimmedString(previewId, "previewId");
4737
4981
  const raw = await client.requestJson(
4738
4982
  `/skills/preview/${encodeURIComponent(normalizedPreviewId)}`,
4739
4983
  { method: "GET" }
@@ -4745,10 +4989,7 @@ async function getSkillPreviewById(client, previewId) {
4745
4989
  );
4746
4990
  }
4747
4991
  async function getSkillInstall(client, skillRef) {
4748
- const normalizedSkillRef = skillRef.trim();
4749
- if (!normalizedSkillRef) {
4750
- throw new Error("skillRef is required");
4751
- }
4992
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4752
4993
  const raw = await client.requestJson(
4753
4994
  `/skills/${encodeURIComponent(normalizedSkillRef)}/install`,
4754
4995
  { method: "GET" }
@@ -4760,10 +5001,7 @@ async function getSkillInstall(client, skillRef) {
4760
5001
  );
4761
5002
  }
4762
5003
  async function recordSkillInstallCopy(client, skillRef, payload = {}) {
4763
- const normalizedSkillRef = skillRef.trim();
4764
- if (!normalizedSkillRef) {
4765
- throw new Error("skillRef is required");
4766
- }
5004
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4767
5005
  const raw = await client.requestJson(
4768
5006
  `/skills/${encodeURIComponent(normalizedSkillRef)}/telemetry/install-copy`,
4769
5007
  {
@@ -4799,10 +5037,7 @@ async function listSkillCategories(client) {
4799
5037
  );
4800
5038
  }
4801
5039
  async function resolveSkillMarkdown(client, skillRef) {
4802
- const normalizedSkillRef = skillRef.trim();
4803
- if (!normalizedSkillRef) {
4804
- throw new Error("skillRef is required");
4805
- }
5040
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4806
5041
  const response = await client.request(
4807
5042
  `/skills/${encodeURIComponent(normalizedSkillRef)}/SKILL.md`,
4808
5043
  {
@@ -4815,10 +5050,7 @@ async function resolveSkillMarkdown(client, skillRef) {
4815
5050
  return response.text();
4816
5051
  }
4817
5052
  async function resolveSkillManifest(client, skillRef) {
4818
- const normalizedSkillRef = skillRef.trim();
4819
- if (!normalizedSkillRef) {
4820
- throw new Error("skillRef is required");
4821
- }
5053
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4822
5054
  const raw = await client.requestJson(
4823
5055
  `/skills/${encodeURIComponent(normalizedSkillRef)}/manifest`,
4824
5056
  {
@@ -4832,10 +5064,7 @@ async function resolveSkillManifest(client, skillRef) {
4832
5064
  );
4833
5065
  }
4834
5066
  async function getSkillVoteStatus(client, params) {
4835
- const normalizedName = params.name.trim();
4836
- if (!normalizedName) {
4837
- throw new Error("name is required");
4838
- }
5067
+ const normalizedName = requireTrimmedString(params.name, "name");
4839
5068
  const query = new URLSearchParams();
4840
5069
  query.set("name", normalizedName);
4841
5070
  const raw = await client.requestJson(
@@ -4849,10 +5078,7 @@ async function getSkillVoteStatus(client, params) {
4849
5078
  );
4850
5079
  }
4851
5080
  async function setSkillVote(client, payload) {
4852
- const normalizedName = payload.name.trim();
4853
- if (!normalizedName) {
4854
- throw new Error("name is required");
4855
- }
5081
+ const normalizedName = requireTrimmedString(payload.name, "name");
4856
5082
  const raw = await client.requestJson("/skills/vote", {
4857
5083
  method: "POST",
4858
5084
  body: { name: normalizedName, upvoted: payload.upvoted },
@@ -4865,10 +5091,7 @@ async function setSkillVote(client, payload) {
4865
5091
  );
4866
5092
  }
4867
5093
  async function requestSkillVerification(client, payload) {
4868
- const normalizedName = payload.name.trim();
4869
- if (!normalizedName) {
4870
- throw new Error("name is required");
4871
- }
5094
+ const normalizedName = requireTrimmedString(payload.name, "name");
4872
5095
  const raw = await client.requestJson(
4873
5096
  "/skills/verification/request",
4874
5097
  {
@@ -4888,10 +5111,7 @@ async function requestSkillVerification(client, payload) {
4888
5111
  );
4889
5112
  }
4890
5113
  async function getSkillVerificationStatus(client, params) {
4891
- const normalizedName = params.name.trim();
4892
- if (!normalizedName) {
4893
- throw new Error("name is required");
4894
- }
5114
+ const normalizedName = requireTrimmedString(params.name, "name");
4895
5115
  const query = new URLSearchParams();
4896
5116
  query.set("name", normalizedName);
4897
5117
  if (params.version) {
@@ -4908,10 +5128,7 @@ async function getSkillVerificationStatus(client, params) {
4908
5128
  );
4909
5129
  }
4910
5130
  async function createSkillDomainProofChallenge(client, payload) {
4911
- const normalizedName = payload.name.trim();
4912
- if (!normalizedName) {
4913
- throw new Error("name is required");
4914
- }
5131
+ const normalizedName = requireTrimmedString(payload.name, "name");
4915
5132
  const raw = await client.requestJson(
4916
5133
  "/skills/verification/domain/challenge",
4917
5134
  {
@@ -4931,14 +5148,11 @@ async function createSkillDomainProofChallenge(client, payload) {
4931
5148
  );
4932
5149
  }
4933
5150
  async function verifySkillDomainProof(client, payload) {
4934
- const normalizedName = payload.name.trim();
4935
- const challengeToken = payload.challengeToken.trim();
4936
- if (!normalizedName) {
4937
- throw new Error("name is required");
4938
- }
4939
- if (!challengeToken) {
4940
- throw new Error("challengeToken is required");
4941
- }
5151
+ const normalizedName = requireTrimmedString(payload.name, "name");
5152
+ const challengeToken = requireTrimmedString(
5153
+ payload.challengeToken,
5154
+ "challengeToken"
5155
+ );
4942
5156
  const raw = await client.requestJson(
4943
5157
  "/skills/verification/domain/verify",
4944
5158
  {
@@ -5552,6 +5766,36 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5552
5766
  async dashboardStats() {
5553
5767
  return dashboardStats(this);
5554
5768
  }
5769
+ async getCreditsBalance(params = {}) {
5770
+ return getCreditsBalance(this, params);
5771
+ }
5772
+ async getCreditProviders() {
5773
+ return getCreditProviders(this);
5774
+ }
5775
+ async getGuardSession() {
5776
+ return getGuardSession(this);
5777
+ }
5778
+ async getGuardEntitlements() {
5779
+ return getGuardEntitlements(this);
5780
+ }
5781
+ async getGuardBillingBalance() {
5782
+ return getGuardBillingBalance(this);
5783
+ }
5784
+ async getGuardTrustByHash(sha256) {
5785
+ return getGuardTrustByHash(this, sha256);
5786
+ }
5787
+ async resolveGuardTrust(query) {
5788
+ return resolveGuardTrust(this, query);
5789
+ }
5790
+ async getGuardRevocations() {
5791
+ return getGuardRevocations(this);
5792
+ }
5793
+ async syncGuardReceipts(payload) {
5794
+ return syncGuardReceipts(this, payload);
5795
+ }
5796
+ async createHbarPurchaseIntent(payload) {
5797
+ return createHbarPurchaseIntent(this, payload);
5798
+ }
5555
5799
  async purchaseCreditsWithHbar(params) {
5556
5800
  return purchaseCreditsWithHbar(this, params);
5557
5801
  }