@hol-org/rb-client 0.1.176 → 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
@@ -297,13 +297,6 @@ var metadataFacetSchema = import_zod2.z.record(
297
297
  jsonValueSchema
298
298
  ])
299
299
  ).optional();
300
- var searchHitMetadataSchema = import_zod2.z.object({
301
- delegationRoles: jsonValueSchema.optional(),
302
- delegationTaskTags: jsonValueSchema.optional(),
303
- delegationProtocols: jsonValueSchema.optional(),
304
- delegationSummary: jsonValueSchema.optional(),
305
- delegationSignals: jsonValueSchema.optional()
306
- }).passthrough();
307
300
  var searchHitSchema = import_zod2.z.object({
308
301
  id: import_zod2.z.string(),
309
302
  uaid: import_zod2.z.string(),
@@ -312,7 +305,7 @@ var searchHitSchema = import_zod2.z.object({
312
305
  description: import_zod2.z.string().optional(),
313
306
  capabilities: import_zod2.z.array(capabilityValueSchema),
314
307
  endpoints: import_zod2.z.union([import_zod2.z.record(jsonValueSchema), import_zod2.z.array(import_zod2.z.string())]).optional(),
315
- metadata: searchHitMetadataSchema.optional(),
308
+ metadata: import_zod2.z.record(jsonValueSchema).optional(),
316
309
  metadataFacet: metadataFacetSchema,
317
310
  profile: agentProfileSchema.optional(),
318
311
  protocols: import_zod2.z.array(import_zod2.z.string()).optional(),
@@ -358,22 +351,13 @@ var resolveResponseSchema = import_zod2.z.object({
358
351
  });
359
352
  var delegationPlanCandidateSchema = import_zod2.z.object({
360
353
  uaid: import_zod2.z.string(),
361
- label: import_zod2.z.string(),
362
- registry: import_zod2.z.string().optional(),
363
- agent: searchHitSchema,
364
354
  score: import_zod2.z.number(),
365
- matchedQueries: import_zod2.z.array(import_zod2.z.string()).optional(),
366
- matchedRoles: import_zod2.z.array(import_zod2.z.string()).optional(),
367
- matchedProtocols: import_zod2.z.array(import_zod2.z.string()).optional(),
368
- matchedSurfaces: import_zod2.z.array(import_zod2.z.string()).optional(),
369
- matchedLanguages: import_zod2.z.array(import_zod2.z.string()).optional(),
370
- matchedArtifacts: import_zod2.z.array(import_zod2.z.string()).optional(),
371
- matchedTaskTags: import_zod2.z.array(import_zod2.z.string()).optional(),
372
- reasons: import_zod2.z.array(import_zod2.z.string()).optional(),
373
- suggestedMessage: import_zod2.z.string().optional(),
374
- trustScore: import_zod2.z.number().optional(),
375
- verified: import_zod2.z.boolean().optional(),
376
- communicationSupported: import_zod2.z.boolean().optional(),
355
+ displayName: import_zod2.z.string().optional(),
356
+ summary: import_zod2.z.string().optional(),
357
+ protocols: import_zod2.z.array(import_zod2.z.string()).optional(),
358
+ surfaces: import_zod2.z.array(import_zod2.z.string()).optional(),
359
+ languages: import_zod2.z.array(import_zod2.z.string()).optional(),
360
+ artifacts: import_zod2.z.array(import_zod2.z.string()).optional(),
377
361
  availability: import_zod2.z.boolean().optional(),
378
362
  explanation: import_zod2.z.string().optional()
379
363
  }).passthrough();
@@ -962,6 +946,151 @@ var creditPurchaseResponseSchema = import_zod2.z.object({
962
946
  transactionId: import_zod2.z.string(),
963
947
  consensusTimestamp: import_zod2.z.string().nullable().optional()
964
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
+ });
965
1094
  var x402SettlementSchema = import_zod2.z.object({
966
1095
  success: import_zod2.z.boolean().optional(),
967
1096
  transaction: import_zod2.z.string().optional(),
@@ -1291,14 +1420,6 @@ var skillRegistryListResponseSchema = import_zod2.z.object({
1291
1420
  items: import_zod2.z.array(skillRegistryPublishSummarySchema),
1292
1421
  nextCursor: import_zod2.z.string().nullable()
1293
1422
  }).passthrough();
1294
- var skillSecurityBreakdownResponseSchema = import_zod2.z.object({
1295
- name: import_zod2.z.string(),
1296
- version: import_zod2.z.string(),
1297
- jobId: import_zod2.z.string(),
1298
- createdAt: import_zod2.z.string(),
1299
- safety: skillSafetySummarySchema.nullable(),
1300
- findings: import_zod2.z.array(skillSafetyFindingSchema)
1301
- }).passthrough();
1302
1423
  var skillCatalogChannelSchema = import_zod2.z.enum([
1303
1424
  "stable",
1304
1425
  "prerelease",
@@ -1352,58 +1473,190 @@ var skillDeprecationsResponseSchema = import_zod2.z.object({
1352
1473
  name: import_zod2.z.string(),
1353
1474
  items: import_zod2.z.array(skillDeprecationRecordSchema)
1354
1475
  }).passthrough();
1355
- var skillPublisherQuickstartCommandSchema = import_zod2.z.object({
1356
- id: import_zod2.z.string(),
1357
- label: import_zod2.z.string(),
1358
- description: import_zod2.z.string(),
1359
- command: import_zod2.z.string(),
1360
- href: import_zod2.z.string().nullable().optional()
1476
+ var skillSecurityBreakdownFindingSchema = import_zod2.z.record(jsonValueSchema);
1477
+ var skillSecurityBreakdownSummarySchema = import_zod2.z.record(jsonValueSchema);
1478
+ var skillSecurityBreakdownResponseSchema = import_zod2.z.object({
1479
+ jobId: import_zod2.z.string(),
1480
+ score: import_zod2.z.number().nullable().optional(),
1481
+ findings: import_zod2.z.array(skillSecurityBreakdownFindingSchema).optional(),
1482
+ summary: skillSecurityBreakdownSummarySchema.optional(),
1483
+ generatedAt: import_zod2.z.string().nullable().optional(),
1484
+ scannerVersion: import_zod2.z.string().nullable().optional()
1361
1485
  }).passthrough();
1362
- var skillPublisherTemplatePresetSchema = import_zod2.z.object({
1363
- presetId: import_zod2.z.string(),
1486
+ var skillBadgeMetricSchema = import_zod2.z.enum([
1487
+ "version",
1488
+ "version_verification",
1489
+ "status",
1490
+ "verification",
1491
+ "repo_commit",
1492
+ "manifest",
1493
+ "domain",
1494
+ "trust",
1495
+ "tier",
1496
+ "safety",
1497
+ "upvotes",
1498
+ "updated"
1499
+ ]);
1500
+ var skillBadgeStyleSchema = import_zod2.z.enum([
1501
+ "flat",
1502
+ "flat-square",
1503
+ "for-the-badge",
1504
+ "plastic",
1505
+ "social"
1506
+ ]);
1507
+ var skillBadgeResponseSchema = import_zod2.z.object({
1508
+ schemaVersion: import_zod2.z.number().int(),
1364
1509
  label: import_zod2.z.string(),
1365
- description: import_zod2.z.string(),
1366
- recommendedFor: import_zod2.z.string(),
1367
- command: import_zod2.z.string()
1510
+ message: import_zod2.z.string(),
1511
+ color: import_zod2.z.string(),
1512
+ style: skillBadgeStyleSchema.optional(),
1513
+ isError: import_zod2.z.boolean().optional(),
1514
+ cacheSeconds: import_zod2.z.number().int().optional()
1368
1515
  }).passthrough();
1369
- var skillPublisherMetadataSchema = import_zod2.z.object({
1370
- cliPackageUrl: import_zod2.z.string(),
1371
- cliCommand: import_zod2.z.string(),
1372
- actionMarketplaceUrl: import_zod2.z.string(),
1373
- repositoryUrl: import_zod2.z.string(),
1374
- guideUrl: import_zod2.z.string().nullable().optional(),
1375
- docsUrl: import_zod2.z.string().nullable().optional(),
1376
- submitUrl: import_zod2.z.string().nullable().optional(),
1377
- skillsIndexUrl: import_zod2.z.string().nullable().optional(),
1378
- quickstartCommands: import_zod2.z.array(skillPublisherQuickstartCommandSchema),
1379
- templatePresets: import_zod2.z.array(skillPublisherTemplatePresetSchema)
1516
+ var skillRegistryTagsResponseSchema = import_zod2.z.object({
1517
+ tags: import_zod2.z.array(import_zod2.z.string())
1518
+ }).passthrough();
1519
+ var skillRegistryCategoriesResponseSchema = import_zod2.z.object({
1520
+ categories: import_zod2.z.array(import_zod2.z.string())
1521
+ }).passthrough();
1522
+ var skillResolverManifestResponseSchema = import_zod2.z.record(jsonValueSchema);
1523
+ var skillRegistryQuoteFileBreakdownSchema = import_zod2.z.object({
1524
+ name: import_zod2.z.string(),
1525
+ mimeType: import_zod2.z.string(),
1526
+ estimatedCostHbar: import_zod2.z.number()
1527
+ }).passthrough();
1528
+ var skillRegistryQuoteResponseSchema = import_zod2.z.object({
1529
+ quoteId: import_zod2.z.string(),
1530
+ name: import_zod2.z.string(),
1531
+ version: import_zod2.z.string(),
1532
+ directoryTopicId: import_zod2.z.string(),
1533
+ estimatedCostHbar: import_zod2.z.number(),
1534
+ credits: import_zod2.z.number(),
1535
+ usdCents: import_zod2.z.number(),
1536
+ expiresAt: import_zod2.z.string(),
1537
+ files: import_zod2.z.array(skillRegistryQuoteFileBreakdownSchema)
1538
+ }).passthrough();
1539
+ var skillRegistryJobStatusSchema = import_zod2.z.union([
1540
+ import_zod2.z.literal("pending"),
1541
+ import_zod2.z.literal("in_progress"),
1542
+ import_zod2.z.literal("completed"),
1543
+ import_zod2.z.literal("failed")
1544
+ ]);
1545
+ var skillRegistryPublishResponseSchema = import_zod2.z.object({
1546
+ jobId: import_zod2.z.string(),
1547
+ status: skillRegistryJobStatusSchema,
1548
+ credits: import_zod2.z.number().nullable().optional(),
1549
+ usdCents: import_zod2.z.number().nullable().optional(),
1550
+ quoteId: import_zod2.z.string().nullable().optional(),
1551
+ createdAt: import_zod2.z.string(),
1552
+ updatedAt: import_zod2.z.string(),
1553
+ network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")])
1554
+ }).passthrough();
1555
+ var skillRegistryJobStatusResponseSchema = import_zod2.z.object({
1556
+ jobId: import_zod2.z.string(),
1557
+ status: skillRegistryJobStatusSchema,
1558
+ network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]),
1559
+ name: import_zod2.z.string(),
1560
+ version: import_zod2.z.string(),
1561
+ directoryTopicId: import_zod2.z.string(),
1562
+ skillUid: import_zod2.z.number().int().nullable().optional(),
1563
+ directorySequenceNumber: import_zod2.z.number().int().nullable().optional(),
1564
+ versionRegistryTopicId: import_zod2.z.string().nullable().optional(),
1565
+ packageTopicId: import_zod2.z.string().nullable().optional(),
1566
+ manifestHrl: import_zod2.z.string().nullable().optional(),
1567
+ skillJsonHrl: import_zod2.z.string().nullable().optional(),
1568
+ iconHcs1: import_zod2.z.string().nullable().optional(),
1569
+ tags: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
1570
+ category: import_zod2.z.string().nullable().optional(),
1571
+ files: import_zod2.z.array(skillRegistryFileDescriptorSchema).nullable().optional(),
1572
+ quoteCredits: import_zod2.z.number().nullable().optional(),
1573
+ quoteUsdCents: import_zod2.z.number().nullable().optional(),
1574
+ safety: skillSafetySummarySchema.nullable().optional(),
1575
+ reservationId: import_zod2.z.string().nullable().optional(),
1576
+ totalCostHbar: import_zod2.z.number().nullable().optional(),
1577
+ totalCostCredits: import_zod2.z.number().nullable().optional(),
1578
+ failureReason: import_zod2.z.string().nullable().optional(),
1579
+ createdAt: import_zod2.z.string(),
1580
+ updatedAt: import_zod2.z.string()
1581
+ }).passthrough();
1582
+ var skillRegistryVersionItemSchema = import_zod2.z.object({
1583
+ jobId: import_zod2.z.string(),
1584
+ version: import_zod2.z.string(),
1585
+ createdAt: import_zod2.z.string(),
1586
+ verified: import_zod2.z.boolean().optional()
1587
+ }).passthrough();
1588
+ var skillRegistryVersionsResponseSchema = import_zod2.z.object({
1589
+ name: import_zod2.z.string(),
1590
+ items: import_zod2.z.array(skillRegistryVersionItemSchema)
1591
+ }).passthrough();
1592
+ var skillRegistryMineItemSchema = import_zod2.z.object({
1593
+ name: import_zod2.z.string(),
1594
+ latestVersion: import_zod2.z.string(),
1595
+ latestCreatedAt: import_zod2.z.string(),
1596
+ verified: import_zod2.z.boolean().optional(),
1597
+ iconHcs1: import_zod2.z.string().optional(),
1598
+ versions: import_zod2.z.array(import_zod2.z.string())
1599
+ }).passthrough();
1600
+ var skillRegistryMineResponseSchema = import_zod2.z.object({
1601
+ items: import_zod2.z.array(skillRegistryMineItemSchema)
1602
+ }).passthrough();
1603
+ var skillRegistryMyListResponseSchema = import_zod2.z.object({
1604
+ owned: skillRegistryMineResponseSchema,
1605
+ upvoted: skillRegistryListResponseSchema
1606
+ }).passthrough();
1607
+ var skillRegistryConfigResponseSchema = import_zod2.z.object({
1608
+ enabled: import_zod2.z.boolean(),
1609
+ directoryTopicId: import_zod2.z.string().nullable().optional(),
1610
+ maxFiles: import_zod2.z.number().int().nullable().optional(),
1611
+ maxTotalSizeBytes: import_zod2.z.number().int().nullable().optional(),
1612
+ allowedMimeTypes: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
1613
+ network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]).nullable().optional(),
1614
+ publisher: import_zod2.z.object({
1615
+ cliPackageUrl: import_zod2.z.string(),
1616
+ cliCommand: import_zod2.z.string(),
1617
+ actionMarketplaceUrl: import_zod2.z.string(),
1618
+ repositoryUrl: import_zod2.z.string(),
1619
+ guideUrl: import_zod2.z.string().nullable().optional(),
1620
+ docsUrl: import_zod2.z.string().nullable().optional(),
1621
+ submitUrl: import_zod2.z.string().nullable().optional(),
1622
+ skillsIndexUrl: import_zod2.z.string().nullable().optional(),
1623
+ quickstartCommands: import_zod2.z.array(
1624
+ import_zod2.z.object({
1625
+ id: import_zod2.z.string(),
1626
+ label: import_zod2.z.string(),
1627
+ description: import_zod2.z.string(),
1628
+ command: import_zod2.z.string(),
1629
+ href: import_zod2.z.string().nullable().optional()
1630
+ }).passthrough()
1631
+ ).optional().default([]),
1632
+ templatePresets: import_zod2.z.array(
1633
+ import_zod2.z.object({
1634
+ presetId: import_zod2.z.string(),
1635
+ label: import_zod2.z.string(),
1636
+ description: import_zod2.z.string(),
1637
+ recommendedFor: import_zod2.z.string(),
1638
+ command: import_zod2.z.string()
1639
+ }).passthrough()
1640
+ ).optional().default([])
1641
+ }).nullable().optional()
1642
+ }).passthrough();
1643
+ var skillRegistryOwnershipResponseSchema = import_zod2.z.object({
1644
+ name: import_zod2.z.string(),
1645
+ exists: import_zod2.z.boolean(),
1646
+ isOwner: import_zod2.z.boolean()
1647
+ }).passthrough();
1648
+ var skillRegistryVoteStatusResponseSchema = import_zod2.z.object({
1649
+ name: import_zod2.z.string(),
1650
+ upvotes: import_zod2.z.number().int(),
1651
+ hasUpvoted: import_zod2.z.boolean()
1380
1652
  }).passthrough();
1381
1653
  var skillTrustTierSchema = import_zod2.z.enum([
1382
- "unpublished",
1383
1654
  "unclaimed",
1384
1655
  "validated",
1385
1656
  "published",
1386
1657
  "verified",
1387
1658
  "hardened"
1388
1659
  ]);
1389
- var skillStatusDefaultVerificationSignals = {
1390
- publisherBound: false,
1391
- domainProof: false,
1392
- verifiedDomain: false,
1393
- previewValidated: false
1394
- };
1395
- var skillStatusDefaultProvenanceSignals = {
1396
- repoCommitIntegrity: false,
1397
- manifestIntegrity: false,
1398
- canonicalRelease: false,
1399
- previewAvailable: false,
1400
- previewAuthoritative: false
1401
- };
1402
- var skillStatusChecksSchema = import_zod2.z.object({
1403
- repoCommitIntegrity: import_zod2.z.boolean(),
1404
- manifestIntegrity: import_zod2.z.boolean(),
1405
- domainProof: import_zod2.z.boolean()
1406
- }).passthrough();
1407
1660
  var skillStatusNextStepSchema = import_zod2.z.object({
1408
1661
  kind: import_zod2.z.enum([
1409
1662
  "setup_validate",
@@ -1411,8 +1664,8 @@ var skillStatusNextStepSchema = import_zod2.z.object({
1411
1664
  "verify_domain",
1412
1665
  "harden_workflow",
1413
1666
  "share_status"
1414
- ]).optional(),
1415
- priority: import_zod2.z.number().int().optional(),
1667
+ ]),
1668
+ priority: import_zod2.z.number().int(),
1416
1669
  id: import_zod2.z.string(),
1417
1670
  label: import_zod2.z.string(),
1418
1671
  description: import_zod2.z.string(),
@@ -1478,6 +1731,11 @@ var skillStatusPreviewMetadataSchema = import_zod2.z.object({
1478
1731
  expiresAt: import_zod2.z.string(),
1479
1732
  statusUrl: import_zod2.z.string()
1480
1733
  }).passthrough();
1734
+ var skillStatusChecksSchema = import_zod2.z.object({
1735
+ repoCommitIntegrity: import_zod2.z.boolean(),
1736
+ manifestIntegrity: import_zod2.z.boolean(),
1737
+ domainProof: import_zod2.z.boolean()
1738
+ }).passthrough();
1481
1739
  var skillStatusVerificationSignalsSchema = import_zod2.z.object({
1482
1740
  publisherBound: import_zod2.z.boolean(),
1483
1741
  domainProof: import_zod2.z.boolean(),
@@ -1491,20 +1749,6 @@ var skillStatusProvenanceSignalsSchema = import_zod2.z.object({
1491
1749
  previewAvailable: import_zod2.z.boolean(),
1492
1750
  previewAuthoritative: import_zod2.z.boolean()
1493
1751
  }).passthrough();
1494
- var skillBadgeMetricSchema = import_zod2.z.enum([
1495
- "version",
1496
- "version_verification",
1497
- "status",
1498
- "verification",
1499
- "repo_commit",
1500
- "manifest",
1501
- "domain",
1502
- "trust",
1503
- "tier",
1504
- "safety",
1505
- "upvotes",
1506
- "updated"
1507
- ]);
1508
1752
  var skillStatusResponseSchema = import_zod2.z.object({
1509
1753
  name: import_zod2.z.string(),
1510
1754
  version: import_zod2.z.string().nullable(),
@@ -1514,16 +1758,44 @@ var skillStatusResponseSchema = import_zod2.z.object({
1514
1758
  badgeMetric: skillBadgeMetricSchema,
1515
1759
  checks: skillStatusChecksSchema,
1516
1760
  nextSteps: import_zod2.z.array(skillStatusNextStepSchema),
1517
- verificationSignals: skillStatusVerificationSignalsSchema.default(
1518
- skillStatusDefaultVerificationSignals
1519
- ),
1520
- provenanceSignals: skillStatusProvenanceSignalsSchema.default(
1521
- skillStatusDefaultProvenanceSignals
1522
- ),
1523
- publisher: skillPublisherMetadataSchema.nullable().optional(),
1761
+ verificationSignals: skillStatusVerificationSignalsSchema,
1762
+ provenanceSignals: skillStatusProvenanceSignalsSchema,
1763
+ publisher: skillRegistryConfigResponseSchema.shape.publisher,
1524
1764
  preview: skillStatusPreviewMetadataSchema.nullable().optional(),
1525
1765
  statusUrl: import_zod2.z.string().nullable().optional()
1526
1766
  }).passthrough();
1767
+ var skillQuotePreviewRangeSchema = import_zod2.z.object({
1768
+ min: import_zod2.z.number(),
1769
+ max: import_zod2.z.number()
1770
+ }).passthrough();
1771
+ var skillQuotePreviewResponseSchema = import_zod2.z.object({
1772
+ estimatedCredits: skillQuotePreviewRangeSchema,
1773
+ estimatedHbar: skillQuotePreviewRangeSchema,
1774
+ pricingVersion: import_zod2.z.string(),
1775
+ assumptions: import_zod2.z.array(import_zod2.z.string()),
1776
+ purchaseUrl: import_zod2.z.string().nullable(),
1777
+ publishUrl: import_zod2.z.string().nullable(),
1778
+ verificationUrl: import_zod2.z.string().nullable()
1779
+ }).passthrough();
1780
+ var skillConversionSignalsResponseSchema = import_zod2.z.object({
1781
+ repoUrl: import_zod2.z.string(),
1782
+ skillDir: import_zod2.z.string(),
1783
+ trustTier: skillTrustTierSchema,
1784
+ actionInstalled: import_zod2.z.boolean(),
1785
+ previewUploaded: import_zod2.z.boolean(),
1786
+ previewId: import_zod2.z.string().nullable(),
1787
+ lastValidateSuccessAt: import_zod2.z.string().nullable(),
1788
+ stalePreviewAgeDays: import_zod2.z.number().nullable(),
1789
+ published: import_zod2.z.boolean(),
1790
+ verified: import_zod2.z.boolean(),
1791
+ publishReady: import_zod2.z.boolean(),
1792
+ publishBlockedByMissingAuth: import_zod2.z.boolean(),
1793
+ statusUrl: import_zod2.z.string().nullable(),
1794
+ purchaseUrl: import_zod2.z.string().nullable(),
1795
+ publishUrl: import_zod2.z.string().nullable(),
1796
+ verificationUrl: import_zod2.z.string().nullable(),
1797
+ nextSteps: import_zod2.z.array(skillStatusNextStepSchema)
1798
+ }).passthrough();
1527
1799
  var skillInstallArtifactDescriptorSchema = import_zod2.z.object({
1528
1800
  url: import_zod2.z.string(),
1529
1801
  pointer: import_zod2.z.string().nullable(),
@@ -1559,146 +1831,20 @@ var skillInstallResponseSchema = import_zod2.z.object({
1559
1831
  version: import_zod2.z.string(),
1560
1832
  skillRef: import_zod2.z.string(),
1561
1833
  network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]),
1562
- detailUrl: import_zod2.z.string().nullable(),
1563
- artifacts: import_zod2.z.object({
1564
- skillMd: skillInstallArtifactDescriptorSchema,
1565
- manifest: skillInstallArtifactDescriptorSchema
1566
- }).passthrough(),
1567
- resolvers: import_zod2.z.object({
1568
- pinned: skillInstallResolverDescriptorSchema,
1569
- latest: skillInstallResolverDescriptorSchema
1570
- }).passthrough(),
1571
- share: skillInstallShareDescriptorSchema,
1572
- snippets: skillInstallSnippetSetSchema
1573
- }).passthrough();
1574
- var skillInstallCopyTelemetryResponseSchema = import_zod2.z.object({
1575
- accepted: import_zod2.z.boolean()
1576
- }).passthrough();
1577
- var skillBadgeStyleSchema = import_zod2.z.enum([
1578
- "flat",
1579
- "flat-square",
1580
- "for-the-badge",
1581
- "plastic",
1582
- "social"
1583
- ]);
1584
- var skillBadgeResponseSchema = import_zod2.z.object({
1585
- schemaVersion: import_zod2.z.number().int(),
1586
- label: import_zod2.z.string(),
1587
- message: import_zod2.z.string(),
1588
- color: import_zod2.z.string(),
1589
- style: skillBadgeStyleSchema.optional(),
1590
- isError: import_zod2.z.boolean().optional(),
1591
- cacheSeconds: import_zod2.z.number().int().optional()
1592
- }).passthrough();
1593
- var skillRegistryTagsResponseSchema = import_zod2.z.object({
1594
- tags: import_zod2.z.array(import_zod2.z.string())
1595
- }).passthrough();
1596
- var skillRegistryCategoriesResponseSchema = import_zod2.z.object({
1597
- categories: import_zod2.z.array(import_zod2.z.string())
1598
- }).passthrough();
1599
- var skillResolverManifestResponseSchema = import_zod2.z.record(jsonValueSchema);
1600
- var skillRegistryQuoteFileBreakdownSchema = import_zod2.z.object({
1601
- name: import_zod2.z.string(),
1602
- mimeType: import_zod2.z.string(),
1603
- estimatedCostHbar: import_zod2.z.number()
1604
- }).passthrough();
1605
- var skillRegistryQuoteResponseSchema = import_zod2.z.object({
1606
- quoteId: import_zod2.z.string(),
1607
- name: import_zod2.z.string(),
1608
- version: import_zod2.z.string(),
1609
- directoryTopicId: import_zod2.z.string(),
1610
- estimatedCostHbar: import_zod2.z.number(),
1611
- credits: import_zod2.z.number(),
1612
- usdCents: import_zod2.z.number(),
1613
- expiresAt: import_zod2.z.string(),
1614
- files: import_zod2.z.array(skillRegistryQuoteFileBreakdownSchema)
1615
- }).passthrough();
1616
- var skillRegistryJobStatusSchema = import_zod2.z.union([
1617
- import_zod2.z.literal("pending"),
1618
- import_zod2.z.literal("in_progress"),
1619
- import_zod2.z.literal("completed"),
1620
- import_zod2.z.literal("failed")
1621
- ]);
1622
- var skillRegistryPublishResponseSchema = import_zod2.z.object({
1623
- jobId: import_zod2.z.string(),
1624
- status: skillRegistryJobStatusSchema,
1625
- credits: import_zod2.z.number().nullable().optional(),
1626
- usdCents: import_zod2.z.number().nullable().optional(),
1627
- quoteId: import_zod2.z.string().nullable().optional(),
1628
- createdAt: import_zod2.z.string(),
1629
- updatedAt: import_zod2.z.string(),
1630
- network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")])
1631
- }).passthrough();
1632
- var skillRegistryJobStatusResponseSchema = import_zod2.z.object({
1633
- jobId: import_zod2.z.string(),
1634
- status: skillRegistryJobStatusSchema,
1635
- network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]),
1636
- name: import_zod2.z.string(),
1637
- version: import_zod2.z.string(),
1638
- directoryTopicId: import_zod2.z.string(),
1639
- skillUid: import_zod2.z.number().int().nullable().optional(),
1640
- directorySequenceNumber: import_zod2.z.number().int().nullable().optional(),
1641
- versionRegistryTopicId: import_zod2.z.string().nullable().optional(),
1642
- packageTopicId: import_zod2.z.string().nullable().optional(),
1643
- manifestHrl: import_zod2.z.string().nullable().optional(),
1644
- skillJsonHrl: import_zod2.z.string().nullable().optional(),
1645
- iconHcs1: import_zod2.z.string().nullable().optional(),
1646
- tags: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
1647
- category: import_zod2.z.string().nullable().optional(),
1648
- files: import_zod2.z.array(skillRegistryFileDescriptorSchema).nullable().optional(),
1649
- quoteCredits: import_zod2.z.number().nullable().optional(),
1650
- quoteUsdCents: import_zod2.z.number().nullable().optional(),
1651
- safety: skillSafetySummarySchema.nullable().optional(),
1652
- reservationId: import_zod2.z.string().nullable().optional(),
1653
- totalCostHbar: import_zod2.z.number().nullable().optional(),
1654
- totalCostCredits: import_zod2.z.number().nullable().optional(),
1655
- failureReason: import_zod2.z.string().nullable().optional(),
1656
- createdAt: import_zod2.z.string(),
1657
- updatedAt: import_zod2.z.string()
1658
- }).passthrough();
1659
- var skillRegistryVersionItemSchema = import_zod2.z.object({
1660
- jobId: import_zod2.z.string(),
1661
- version: import_zod2.z.string(),
1662
- createdAt: import_zod2.z.string(),
1663
- verified: import_zod2.z.boolean().optional()
1664
- }).passthrough();
1665
- var skillRegistryVersionsResponseSchema = import_zod2.z.object({
1666
- name: import_zod2.z.string(),
1667
- items: import_zod2.z.array(skillRegistryVersionItemSchema)
1668
- }).passthrough();
1669
- var skillRegistryMineItemSchema = import_zod2.z.object({
1670
- name: import_zod2.z.string(),
1671
- latestVersion: import_zod2.z.string(),
1672
- latestCreatedAt: import_zod2.z.string(),
1673
- verified: import_zod2.z.boolean().optional(),
1674
- iconHcs1: import_zod2.z.string().optional(),
1675
- versions: import_zod2.z.array(import_zod2.z.string())
1676
- }).passthrough();
1677
- var skillRegistryMineResponseSchema = import_zod2.z.object({
1678
- items: import_zod2.z.array(skillRegistryMineItemSchema)
1679
- }).passthrough();
1680
- var skillRegistryMyListResponseSchema = import_zod2.z.object({
1681
- owned: skillRegistryMineResponseSchema,
1682
- upvoted: skillRegistryListResponseSchema
1683
- }).passthrough();
1684
- var skillRegistryConfigResponseSchema = import_zod2.z.object({
1685
- enabled: import_zod2.z.boolean(),
1686
- directoryTopicId: import_zod2.z.string().nullable().optional(),
1687
- maxFiles: import_zod2.z.number().int().nullable().optional(),
1688
- maxTotalSizeBytes: import_zod2.z.number().int().nullable().optional(),
1689
- allowedMimeTypes: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
1690
- network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]).nullable().optional(),
1691
- publisher: skillPublisherMetadataSchema.nullable().optional()
1692
- }).passthrough();
1693
- var skillRegistryOwnershipResponseSchema = import_zod2.z.object({
1694
- name: import_zod2.z.string(),
1695
- exists: import_zod2.z.boolean(),
1696
- isOwner: import_zod2.z.boolean()
1834
+ detailUrl: import_zod2.z.string().nullable(),
1835
+ artifacts: import_zod2.z.object({
1836
+ skillMd: skillInstallArtifactDescriptorSchema,
1837
+ manifest: skillInstallArtifactDescriptorSchema
1838
+ }).passthrough(),
1839
+ resolvers: import_zod2.z.object({
1840
+ pinned: skillInstallResolverDescriptorSchema,
1841
+ latest: skillInstallResolverDescriptorSchema
1842
+ }).passthrough(),
1843
+ share: skillInstallShareDescriptorSchema,
1844
+ snippets: skillInstallSnippetSetSchema
1697
1845
  }).passthrough();
1698
- var skillRegistryVoteStatusResponseSchema = import_zod2.z.object({
1699
- name: import_zod2.z.string(),
1700
- upvotes: import_zod2.z.number().int(),
1701
- hasUpvoted: import_zod2.z.boolean()
1846
+ var skillInstallCopyTelemetryResponseSchema = import_zod2.z.object({
1847
+ accepted: import_zod2.z.boolean()
1702
1848
  }).passthrough();
1703
1849
  var skillVerificationTierSchema = import_zod2.z.enum(["basic", "express"]);
1704
1850
  var skillVerificationStatusSchema = import_zod2.z.enum([
@@ -2798,9 +2944,16 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
2798
2944
  var import_meta = {};
2799
2945
  var nodeRequire;
2800
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
+ }
2801
2953
  function getNodeRequireSync() {
2802
2954
  try {
2803
- const moduleNamespace = process.getBuiltinModule?.("module");
2955
+ const builtinModuleLoader = resolveBuiltinModuleLoader();
2956
+ const moduleNamespace = builtinModuleLoader?.("module");
2804
2957
  if (typeof moduleNamespace?.createRequire === "function") {
2805
2958
  const requireFromModule = moduleNamespace.createRequire(import_meta.url);
2806
2959
  if (typeof requireFromModule.resolve === "function") {
@@ -3200,6 +3353,61 @@ async function adapterRegistrySubmissionStatus(client, submissionId) {
3200
3353
  }
3201
3354
 
3202
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
+ }
3203
3411
  async function loadX402Dependencies(client) {
3204
3412
  const [{ default: axios }, x402Axios, x402Types] = await Promise.all([
3205
3413
  import("axios"),
@@ -3727,6 +3935,97 @@ async function registerOwnedMoltbookAgent(client, uaid, request) {
3727
3935
  );
3728
3936
  }
3729
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
+
3730
4029
  // ../../src/services/registry-broker/client/ledger-auth.ts
3731
4030
  var import_buffer3 = require("buffer");
3732
4031
 
@@ -4298,6 +4597,13 @@ async function facets(client, adapter) {
4298
4597
  }
4299
4598
 
4300
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
+ }
4301
4607
  async function skillsConfig(client) {
4302
4608
  const raw = await client.requestJson("/skills/config", {
4303
4609
  method: "GET"
@@ -4308,57 +4614,6 @@ async function skillsConfig(client) {
4308
4614
  "skill registry config response"
4309
4615
  );
4310
4616
  }
4311
- async function getSkillStatus(client, params) {
4312
- const normalizedName = params.name.trim();
4313
- if (!normalizedName) {
4314
- throw new Error("name is required");
4315
- }
4316
- const query = new URLSearchParams();
4317
- query.set("name", normalizedName);
4318
- if (params.version?.trim()) {
4319
- query.set("version", params.version.trim());
4320
- }
4321
- const raw = await client.requestJson(
4322
- `/skills/status?${query.toString()}`,
4323
- {
4324
- method: "GET"
4325
- }
4326
- );
4327
- return client.parseWithSchema(
4328
- raw,
4329
- skillStatusResponseSchema,
4330
- "skill status response"
4331
- );
4332
- }
4333
- function buildRepoPreviewQuery(params) {
4334
- const repo = params.repo.trim();
4335
- const skillDir = params.skillDir.trim();
4336
- if (!repo) {
4337
- throw new Error("repo is required");
4338
- }
4339
- if (!skillDir) {
4340
- throw new Error("skillDir is required");
4341
- }
4342
- const query = new URLSearchParams();
4343
- query.set("repo", repo);
4344
- query.set("skillDir", skillDir);
4345
- if (params.ref?.trim()) {
4346
- query.set("ref", params.ref.trim());
4347
- }
4348
- return query.toString();
4349
- }
4350
- async function getSkillStatusByRepo(client, params) {
4351
- const query = buildRepoPreviewQuery(params);
4352
- const raw = await client.requestJson(
4353
- `/skills/status/by-repo?${query}`,
4354
- { method: "GET" }
4355
- );
4356
- return client.parseWithSchema(
4357
- raw,
4358
- skillStatusResponseSchema,
4359
- "skill status response"
4360
- );
4361
- }
4362
4617
  async function listSkills(client, params = {}) {
4363
4618
  const query = new URLSearchParams();
4364
4619
  if (params.name) {
@@ -4408,10 +4663,7 @@ async function listSkills(client, params = {}) {
4408
4663
  );
4409
4664
  }
4410
4665
  async function getSkillSecurityBreakdown(client, params) {
4411
- const normalizedJobId = params.jobId.trim();
4412
- if (!normalizedJobId) {
4413
- throw new Error("jobId is required");
4414
- }
4666
+ const normalizedJobId = requireTrimmedString(params.jobId, "jobId");
4415
4667
  const raw = await client.requestJson(
4416
4668
  `/skills/${encodeURIComponent(normalizedJobId)}/security-breakdown`,
4417
4669
  { method: "GET" }
@@ -4464,10 +4716,7 @@ async function getSkillsCatalog(client, params = {}) {
4464
4716
  );
4465
4717
  }
4466
4718
  async function listSkillVersions(client, params) {
4467
- const normalizedName = params.name.trim();
4468
- if (!normalizedName) {
4469
- throw new Error("name is required");
4470
- }
4719
+ const normalizedName = requireTrimmedString(params.name, "name");
4471
4720
  const query = new URLSearchParams();
4472
4721
  query.set("name", normalizedName);
4473
4722
  const raw = await client.requestJson(
@@ -4528,6 +4777,18 @@ async function quoteSkillPublish(client, payload) {
4528
4777
  "skill registry quote response"
4529
4778
  );
4530
4779
  }
4780
+ async function quoteSkillPublishPreview(client, payload) {
4781
+ const raw = await client.requestJson("/skills/quote-preview", {
4782
+ method: "POST",
4783
+ body: payload,
4784
+ headers: { "content-type": "application/json" }
4785
+ });
4786
+ return client.parseWithSchema(
4787
+ raw,
4788
+ skillQuotePreviewResponseSchema,
4789
+ "skill quote preview response"
4790
+ );
4791
+ }
4531
4792
  async function publishSkill(client, payload) {
4532
4793
  const raw = await client.requestJson("/skills/publish", {
4533
4794
  method: "POST",
@@ -4541,10 +4802,7 @@ async function publishSkill(client, payload) {
4541
4802
  );
4542
4803
  }
4543
4804
  async function getSkillPublishJob(client, jobId, params = {}) {
4544
- const normalized = jobId.trim();
4545
- if (!normalized) {
4546
- throw new Error("jobId is required");
4547
- }
4805
+ const normalized = requireTrimmedString(jobId, "jobId");
4548
4806
  const query = new URLSearchParams();
4549
4807
  if (params.accountId) {
4550
4808
  query.set("accountId", params.accountId);
@@ -4561,10 +4819,7 @@ async function getSkillPublishJob(client, jobId, params = {}) {
4561
4819
  );
4562
4820
  }
4563
4821
  async function getSkillOwnership(client, params) {
4564
- const normalizedName = params.name.trim();
4565
- if (!normalizedName) {
4566
- throw new Error("name is required");
4567
- }
4822
+ const normalizedName = requireTrimmedString(params.name, "name");
4568
4823
  const query = new URLSearchParams();
4569
4824
  query.set("name", normalizedName);
4570
4825
  if (params.accountId) {
@@ -4583,10 +4838,7 @@ async function getSkillOwnership(client, params) {
4583
4838
  );
4584
4839
  }
4585
4840
  async function getRecommendedSkillVersion(client, params) {
4586
- const normalizedName = params.name.trim();
4587
- if (!normalizedName) {
4588
- throw new Error("name is required");
4589
- }
4841
+ const normalizedName = requireTrimmedString(params.name, "name");
4590
4842
  const query = new URLSearchParams();
4591
4843
  query.set("name", normalizedName);
4592
4844
  const raw = await client.requestJson(
@@ -4600,14 +4852,8 @@ async function getRecommendedSkillVersion(client, params) {
4600
4852
  );
4601
4853
  }
4602
4854
  async function setRecommendedSkillVersion(client, payload) {
4603
- const normalizedName = payload.name.trim();
4604
- const normalizedVersion = payload.version.trim();
4605
- if (!normalizedName) {
4606
- throw new Error("name is required");
4607
- }
4608
- if (!normalizedVersion) {
4609
- throw new Error("version is required");
4610
- }
4855
+ const normalizedName = requireTrimmedString(payload.name, "name");
4856
+ const normalizedVersion = requireTrimmedString(payload.version, "version");
4611
4857
  const raw = await client.requestJson("/skills/recommended", {
4612
4858
  method: "POST",
4613
4859
  body: {
@@ -4623,10 +4869,7 @@ async function setRecommendedSkillVersion(client, payload) {
4623
4869
  );
4624
4870
  }
4625
4871
  async function getSkillDeprecations(client, params) {
4626
- const normalizedName = params.name.trim();
4627
- if (!normalizedName) {
4628
- throw new Error("name is required");
4629
- }
4872
+ const normalizedName = requireTrimmedString(params.name, "name");
4630
4873
  const query = new URLSearchParams();
4631
4874
  query.set("name", normalizedName);
4632
4875
  const raw = await client.requestJson(
@@ -4640,15 +4883,9 @@ async function getSkillDeprecations(client, params) {
4640
4883
  );
4641
4884
  }
4642
4885
  async function setSkillDeprecation(client, payload) {
4643
- const normalizedName = payload.name.trim();
4644
- if (!normalizedName) {
4645
- throw new Error("name is required");
4646
- }
4886
+ const normalizedName = requireTrimmedString(payload.name, "name");
4647
4887
  const version = payload.version?.trim();
4648
- const reason = payload.reason.trim();
4649
- if (!reason) {
4650
- throw new Error("reason is required");
4651
- }
4888
+ const reason = requireTrimmedString(payload.reason, "reason");
4652
4889
  const replacementRef = payload.replacementRef?.trim();
4653
4890
  const raw = await client.requestJson("/skills/deprecate", {
4654
4891
  method: "POST",
@@ -4667,10 +4904,7 @@ async function setSkillDeprecation(client, payload) {
4667
4904
  );
4668
4905
  }
4669
4906
  async function getSkillBadge(client, params) {
4670
- const normalizedName = params.name.trim();
4671
- if (!normalizedName) {
4672
- throw new Error("name is required");
4673
- }
4907
+ const normalizedName = requireTrimmedString(params.name, "name");
4674
4908
  const query = new URLSearchParams();
4675
4909
  query.set("name", normalizedName);
4676
4910
  if (params.metric) {
@@ -4692,11 +4926,63 @@ async function getSkillBadge(client, params) {
4692
4926
  "skill badge response"
4693
4927
  );
4694
4928
  }
4695
- async function uploadSkillPreviewFromGithubOidc(client, payload) {
4696
- const token = payload.token.trim();
4697
- if (!token) {
4698
- throw new Error("token is required");
4929
+ async function getSkillStatus(client, params) {
4930
+ const normalizedName = requireTrimmedString(params.name, "name");
4931
+ const query = new URLSearchParams();
4932
+ query.set("name", normalizedName);
4933
+ if (params.version?.trim()) {
4934
+ query.set("version", params.version.trim());
4935
+ }
4936
+ const raw = await client.requestJson(
4937
+ `/skills/status?${query.toString()}`,
4938
+ { method: "GET" }
4939
+ );
4940
+ return client.parseWithSchema(
4941
+ raw,
4942
+ skillStatusResponseSchema,
4943
+ "skill status response"
4944
+ );
4945
+ }
4946
+ async function getSkillStatusByRepo(client, params) {
4947
+ const repo = requireTrimmedString(params.repo, "repo");
4948
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4949
+ const query = new URLSearchParams();
4950
+ query.set("repo", repo);
4951
+ query.set("skillDir", skillDir);
4952
+ if (params.ref?.trim()) {
4953
+ query.set("ref", params.ref.trim());
4954
+ }
4955
+ const raw = await client.requestJson(
4956
+ `/skills/status/by-repo?${query.toString()}`,
4957
+ { method: "GET" }
4958
+ );
4959
+ return client.parseWithSchema(
4960
+ raw,
4961
+ skillStatusResponseSchema,
4962
+ "skill status response"
4963
+ );
4964
+ }
4965
+ async function getSkillConversionSignalsByRepo(client, params) {
4966
+ const repo = requireTrimmedString(params.repo, "repo");
4967
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
4968
+ const query = new URLSearchParams();
4969
+ query.set("repo", repo);
4970
+ query.set("skillDir", skillDir);
4971
+ if (params.ref?.trim()) {
4972
+ query.set("ref", params.ref.trim());
4699
4973
  }
4974
+ const raw = await client.requestJson(
4975
+ `/skills/conversion-signals/by-repo?${query.toString()}`,
4976
+ { method: "GET" }
4977
+ );
4978
+ return client.parseWithSchema(
4979
+ raw,
4980
+ skillConversionSignalsResponseSchema,
4981
+ "skill conversion signals response"
4982
+ );
4983
+ }
4984
+ async function uploadSkillPreviewFromGithubOidc(client, payload) {
4985
+ const token = requireTrimmedString(payload.token, "token");
4700
4986
  const raw = await client.requestJson(
4701
4987
  "/skills/preview/github-oidc",
4702
4988
  {
@@ -4715,10 +5001,7 @@ async function uploadSkillPreviewFromGithubOidc(client, payload) {
4715
5001
  );
4716
5002
  }
4717
5003
  async function getSkillPreview(client, params) {
4718
- const normalizedName = params.name.trim();
4719
- if (!normalizedName) {
4720
- throw new Error("name is required");
4721
- }
5004
+ const normalizedName = requireTrimmedString(params.name, "name");
4722
5005
  const query = new URLSearchParams();
4723
5006
  query.set("name", normalizedName);
4724
5007
  if (params.version?.trim()) {
@@ -4735,9 +5018,16 @@ async function getSkillPreview(client, params) {
4735
5018
  );
4736
5019
  }
4737
5020
  async function getSkillPreviewByRepo(client, params) {
4738
- const query = buildRepoPreviewQuery(params);
5021
+ const repo = requireTrimmedString(params.repo, "repo");
5022
+ const skillDir = requireTrimmedString(params.skillDir, "skillDir");
5023
+ const query = new URLSearchParams();
5024
+ query.set("repo", repo);
5025
+ query.set("skillDir", skillDir);
5026
+ if (params.ref?.trim()) {
5027
+ query.set("ref", params.ref.trim());
5028
+ }
4739
5029
  const raw = await client.requestJson(
4740
- `/skills/preview/by-repo?${query}`,
5030
+ `/skills/preview/by-repo?${query.toString()}`,
4741
5031
  { method: "GET" }
4742
5032
  );
4743
5033
  return client.parseWithSchema(
@@ -4747,10 +5037,7 @@ async function getSkillPreviewByRepo(client, params) {
4747
5037
  );
4748
5038
  }
4749
5039
  async function getSkillPreviewById(client, previewId) {
4750
- const normalizedPreviewId = previewId.trim();
4751
- if (!normalizedPreviewId) {
4752
- throw new Error("previewId is required");
4753
- }
5040
+ const normalizedPreviewId = requireTrimmedString(previewId, "previewId");
4754
5041
  const raw = await client.requestJson(
4755
5042
  `/skills/preview/${encodeURIComponent(normalizedPreviewId)}`,
4756
5043
  { method: "GET" }
@@ -4762,10 +5049,7 @@ async function getSkillPreviewById(client, previewId) {
4762
5049
  );
4763
5050
  }
4764
5051
  async function getSkillInstall(client, skillRef) {
4765
- const normalizedSkillRef = skillRef.trim();
4766
- if (!normalizedSkillRef) {
4767
- throw new Error("skillRef is required");
4768
- }
5052
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4769
5053
  const raw = await client.requestJson(
4770
5054
  `/skills/${encodeURIComponent(normalizedSkillRef)}/install`,
4771
5055
  { method: "GET" }
@@ -4777,10 +5061,7 @@ async function getSkillInstall(client, skillRef) {
4777
5061
  );
4778
5062
  }
4779
5063
  async function recordSkillInstallCopy(client, skillRef, payload = {}) {
4780
- const normalizedSkillRef = skillRef.trim();
4781
- if (!normalizedSkillRef) {
4782
- throw new Error("skillRef is required");
4783
- }
5064
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4784
5065
  const raw = await client.requestJson(
4785
5066
  `/skills/${encodeURIComponent(normalizedSkillRef)}/telemetry/install-copy`,
4786
5067
  {
@@ -4816,10 +5097,7 @@ async function listSkillCategories(client) {
4816
5097
  );
4817
5098
  }
4818
5099
  async function resolveSkillMarkdown(client, skillRef) {
4819
- const normalizedSkillRef = skillRef.trim();
4820
- if (!normalizedSkillRef) {
4821
- throw new Error("skillRef is required");
4822
- }
5100
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4823
5101
  const response = await client.request(
4824
5102
  `/skills/${encodeURIComponent(normalizedSkillRef)}/SKILL.md`,
4825
5103
  {
@@ -4832,10 +5110,7 @@ async function resolveSkillMarkdown(client, skillRef) {
4832
5110
  return response.text();
4833
5111
  }
4834
5112
  async function resolveSkillManifest(client, skillRef) {
4835
- const normalizedSkillRef = skillRef.trim();
4836
- if (!normalizedSkillRef) {
4837
- throw new Error("skillRef is required");
4838
- }
5113
+ const normalizedSkillRef = requireTrimmedString(skillRef, "skillRef");
4839
5114
  const raw = await client.requestJson(
4840
5115
  `/skills/${encodeURIComponent(normalizedSkillRef)}/manifest`,
4841
5116
  {
@@ -4849,10 +5124,7 @@ async function resolveSkillManifest(client, skillRef) {
4849
5124
  );
4850
5125
  }
4851
5126
  async function getSkillVoteStatus(client, params) {
4852
- const normalizedName = params.name.trim();
4853
- if (!normalizedName) {
4854
- throw new Error("name is required");
4855
- }
5127
+ const normalizedName = requireTrimmedString(params.name, "name");
4856
5128
  const query = new URLSearchParams();
4857
5129
  query.set("name", normalizedName);
4858
5130
  const raw = await client.requestJson(
@@ -4866,10 +5138,7 @@ async function getSkillVoteStatus(client, params) {
4866
5138
  );
4867
5139
  }
4868
5140
  async function setSkillVote(client, payload) {
4869
- const normalizedName = payload.name.trim();
4870
- if (!normalizedName) {
4871
- throw new Error("name is required");
4872
- }
5141
+ const normalizedName = requireTrimmedString(payload.name, "name");
4873
5142
  const raw = await client.requestJson("/skills/vote", {
4874
5143
  method: "POST",
4875
5144
  body: { name: normalizedName, upvoted: payload.upvoted },
@@ -4882,10 +5151,7 @@ async function setSkillVote(client, payload) {
4882
5151
  );
4883
5152
  }
4884
5153
  async function requestSkillVerification(client, payload) {
4885
- const normalizedName = payload.name.trim();
4886
- if (!normalizedName) {
4887
- throw new Error("name is required");
4888
- }
5154
+ const normalizedName = requireTrimmedString(payload.name, "name");
4889
5155
  const raw = await client.requestJson(
4890
5156
  "/skills/verification/request",
4891
5157
  {
@@ -4905,10 +5171,7 @@ async function requestSkillVerification(client, payload) {
4905
5171
  );
4906
5172
  }
4907
5173
  async function getSkillVerificationStatus(client, params) {
4908
- const normalizedName = params.name.trim();
4909
- if (!normalizedName) {
4910
- throw new Error("name is required");
4911
- }
5174
+ const normalizedName = requireTrimmedString(params.name, "name");
4912
5175
  const query = new URLSearchParams();
4913
5176
  query.set("name", normalizedName);
4914
5177
  if (params.version) {
@@ -4925,10 +5188,7 @@ async function getSkillVerificationStatus(client, params) {
4925
5188
  );
4926
5189
  }
4927
5190
  async function createSkillDomainProofChallenge(client, payload) {
4928
- const normalizedName = payload.name.trim();
4929
- if (!normalizedName) {
4930
- throw new Error("name is required");
4931
- }
5191
+ const normalizedName = requireTrimmedString(payload.name, "name");
4932
5192
  const raw = await client.requestJson(
4933
5193
  "/skills/verification/domain/challenge",
4934
5194
  {
@@ -4948,14 +5208,11 @@ async function createSkillDomainProofChallenge(client, payload) {
4948
5208
  );
4949
5209
  }
4950
5210
  async function verifySkillDomainProof(client, payload) {
4951
- const normalizedName = payload.name.trim();
4952
- const challengeToken = payload.challengeToken.trim();
4953
- if (!normalizedName) {
4954
- throw new Error("name is required");
4955
- }
4956
- if (!challengeToken) {
4957
- throw new Error("challengeToken is required");
4958
- }
5211
+ const normalizedName = requireTrimmedString(payload.name, "name");
5212
+ const challengeToken = requireTrimmedString(
5213
+ payload.challengeToken,
5214
+ "challengeToken"
5215
+ );
4959
5216
  const raw = await client.requestJson(
4960
5217
  "/skills/verification/domain/verify",
4961
5218
  {
@@ -5314,15 +5571,9 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5314
5571
  async skillsConfig() {
5315
5572
  return skillsConfig(this);
5316
5573
  }
5317
- async getSkillStatus(params) {
5318
- return getSkillStatus(this, params);
5319
- }
5320
5574
  async listSkills(options) {
5321
5575
  return listSkills(this, options);
5322
5576
  }
5323
- async getSkillSecurityBreakdown(params) {
5324
- return getSkillSecurityBreakdown(this, params);
5325
- }
5326
5577
  async getSkillsCatalog(options) {
5327
5578
  return getSkillsCatalog(this, options);
5328
5579
  }
@@ -5338,6 +5589,9 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5338
5589
  async quoteSkillPublish(payload) {
5339
5590
  return quoteSkillPublish(this, payload);
5340
5591
  }
5592
+ async quoteSkillPublishPreview(payload) {
5593
+ return quoteSkillPublishPreview(this, payload);
5594
+ }
5341
5595
  async publishSkill(payload) {
5342
5596
  return publishSkill(this, payload);
5343
5597
  }
@@ -5362,9 +5616,18 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5362
5616
  async getSkillBadge(params) {
5363
5617
  return getSkillBadge(this, params);
5364
5618
  }
5619
+ async getSkillStatus(params) {
5620
+ return getSkillStatus(this, params);
5621
+ }
5622
+ async getSkillSecurityBreakdown(params) {
5623
+ return getSkillSecurityBreakdown(this, params);
5624
+ }
5365
5625
  async getSkillStatusByRepo(params) {
5366
5626
  return getSkillStatusByRepo(this, params);
5367
5627
  }
5628
+ async getSkillConversionSignalsByRepo(params) {
5629
+ return getSkillConversionSignalsByRepo(this, params);
5630
+ }
5368
5631
  async uploadSkillPreviewFromGithubOidc(payload) {
5369
5632
  return uploadSkillPreviewFromGithubOidc(this, payload);
5370
5633
  }
@@ -5563,6 +5826,36 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5563
5826
  async dashboardStats() {
5564
5827
  return dashboardStats(this);
5565
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
+ }
5566
5859
  async purchaseCreditsWithHbar(params) {
5567
5860
  return purchaseCreditsWithHbar(this, params);
5568
5861
  }
@@ -5764,9 +6057,20 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5764
6057
  }
5765
6058
  return nodeCrypto;
5766
6059
  }
6060
+ getSecureRandomBytes(size, feature) {
6061
+ const webCrypto = globalThis.crypto;
6062
+ if (webCrypto && typeof webCrypto.getRandomValues === "function") {
6063
+ const bytes = new Uint8Array(size);
6064
+ webCrypto.getRandomValues(bytes);
6065
+ return bytes;
6066
+ }
6067
+ return this.getNodeCrypto(feature).randomBytes(size);
6068
+ }
5767
6069
  createEphemeralKeyPair() {
5768
- const { randomBytes } = this.getNodeCrypto("generateEphemeralKeyPair");
5769
- const privateKeyBytes = randomBytes(32);
6070
+ const privateKeyBytes = this.getSecureRandomBytes(
6071
+ 32,
6072
+ "generateEphemeralKeyPair"
6073
+ );
5770
6074
  const publicKey = import_secp256k12.secp256k1.getPublicKey(privateKeyBytes, true);
5771
6075
  return {
5772
6076
  privateKey: import_buffer4.Buffer.from(privateKeyBytes).toString("hex"),