@hol-org/rb-client 0.1.179 → 0.1.180

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
@@ -916,10 +916,14 @@ var guardBucketBalanceSchema = z2.object({
916
916
  });
917
917
  var guardPrincipalSchema = z2.object({
918
918
  signedIn: z2.boolean(),
919
+ principalType: z2.enum(["user", "service"]).default("user"),
919
920
  userId: z2.string().optional(),
920
921
  email: z2.string().optional(),
921
922
  accountId: z2.string().optional(),
922
923
  stripeCustomerId: z2.string().optional(),
924
+ serviceId: z2.string().optional(),
925
+ workspaceId: z2.string().optional(),
926
+ serviceLabel: z2.string().optional(),
923
927
  roles: z2.array(z2.string())
924
928
  });
925
929
  var guardEntitlementsSchema = z2.object({
@@ -946,6 +950,65 @@ var guardBalanceResponseSchema = z2.object({
946
950
  bucketingMode: z2.enum(["shared-ledger", "product-bucketed"]),
947
951
  buckets: z2.array(guardBucketBalanceSchema)
948
952
  });
953
+ var guardFeedItemSchema = z2.object({
954
+ id: z2.string(),
955
+ artifactType: z2.enum(["skill", "plugin"]),
956
+ slug: z2.string(),
957
+ name: z2.string(),
958
+ href: z2.string(),
959
+ ecosystem: z2.string().optional(),
960
+ safetyScore: z2.number().nullable().optional(),
961
+ trustScore: z2.number().nullable().optional(),
962
+ verified: z2.boolean(),
963
+ recommendation: z2.enum(["monitor", "review", "block"]),
964
+ updatedAt: z2.string()
965
+ });
966
+ var guardFeedSummarySchema = z2.object({
967
+ total: z2.number(),
968
+ monitorCount: z2.number(),
969
+ reviewCount: z2.number(),
970
+ blockCount: z2.number()
971
+ });
972
+ var guardFeedResponseSchema = z2.object({
973
+ generatedAt: z2.string(),
974
+ items: z2.array(guardFeedItemSchema),
975
+ summary: guardFeedSummarySchema
976
+ });
977
+ var guardIntegrationSchema = z2.object({
978
+ id: z2.enum(["openclaw", "hermes"]),
979
+ name: z2.string(),
980
+ status: z2.enum(["available", "planned"]),
981
+ href: z2.string().nullable(),
982
+ summary: z2.string()
983
+ });
984
+ var guardActionItemSchema = z2.object({
985
+ title: z2.string(),
986
+ description: z2.string(),
987
+ href: z2.string()
988
+ });
989
+ var guardOverviewResponseSchema = z2.object({
990
+ generatedAt: z2.string(),
991
+ principal: guardPrincipalSchema,
992
+ entitlements: guardEntitlementsSchema,
993
+ balance: z2.object({
994
+ accountId: z2.string(),
995
+ availableCredits: z2.number()
996
+ }).nullable(),
997
+ trustFeed: guardFeedResponseSchema,
998
+ integrations: z2.array(guardIntegrationSchema),
999
+ actionItems: z2.array(guardActionItemSchema)
1000
+ });
1001
+ var guardPolicySchema = z2.object({
1002
+ mode: z2.enum(["observe", "prompt", "enforce"]),
1003
+ defaultAction: z2.enum(["allow", "warn", "block"]),
1004
+ unknownPublisherAction: z2.enum(["review", "block", "allow"]),
1005
+ changedHashAction: z2.enum(["allow", "warn", "require-reapproval", "block"]),
1006
+ newNetworkDomainAction: z2.enum(["allow", "warn", "block"]),
1007
+ subprocessAction: z2.enum(["allow", "warn", "block"]),
1008
+ telemetryEnabled: z2.boolean(),
1009
+ syncEnabled: z2.boolean(),
1010
+ updatedAt: z2.string()
1011
+ });
949
1012
  var guardTrustMatchSchema = z2.object({
950
1013
  artifactId: z2.string(),
951
1014
  artifactName: z2.string(),
@@ -981,7 +1044,13 @@ var guardRevocationSchema = z2.object({
981
1044
  artifactName: z2.string(),
982
1045
  reason: z2.string(),
983
1046
  severity: z2.enum(["low", "medium", "high"]),
984
- publishedAt: z2.string()
1047
+ publishedAt: z2.string(),
1048
+ confidence: z2.number().optional(),
1049
+ remediation: z2.string().nullable().optional(),
1050
+ scope: z2.enum(["artifact", "publisher", "domain", "workspace", "ecosystem"]).optional(),
1051
+ source: z2.string().optional(),
1052
+ firstSeenAt: z2.string().optional(),
1053
+ lastUpdatedAt: z2.string().optional()
985
1054
  });
986
1055
  var guardRevocationResponseSchema = z2.object({
987
1056
  generatedAt: z2.string(),
@@ -1075,7 +1144,12 @@ var guardReceiptSyncResponseSchema = z2.object({
1075
1144
  syncedAt: z2.string(),
1076
1145
  receiptsStored: z2.number(),
1077
1146
  inventoryStored: z2.number().optional(),
1078
- inventoryDiff: guardInventoryDiffResponseSchema.optional()
1147
+ inventoryDiff: guardInventoryDiffResponseSchema.optional(),
1148
+ advisories: z2.array(guardRevocationSchema).optional(),
1149
+ policy: guardPolicySchema.optional(),
1150
+ alertPreferences: z2.lazy(() => guardAlertPreferencesSchema).optional(),
1151
+ exceptions: z2.array(z2.lazy(() => guardExceptionItemSchema)).optional(),
1152
+ teamPolicyPack: z2.lazy(() => guardTeamPolicyPackSchema).optional()
1079
1153
  });
1080
1154
  var guardInventoryResponseSchema = z2.object({
1081
1155
  generatedAt: z2.string(),
@@ -1161,6 +1235,59 @@ var guardWatchlistResponseSchema = z2.object({
1161
1235
  generatedAt: z2.string(),
1162
1236
  items: z2.array(guardWatchlistItemSchema)
1163
1237
  });
1238
+ var guardWatchlistLookupMatchSchema = z2.object({
1239
+ artifactId: z2.string().nullable(),
1240
+ publisher: z2.string().nullable(),
1241
+ domain: z2.string().nullable(),
1242
+ source: z2.enum(["watchlist", "team-policy"]),
1243
+ reason: z2.string()
1244
+ });
1245
+ var guardWatchlistLookupResponseSchema = z2.object({
1246
+ generatedAt: z2.string(),
1247
+ matched: z2.boolean(),
1248
+ scope: z2.enum(["artifact", "publisher", "domain", "none"]),
1249
+ item: guardWatchlistLookupMatchSchema.nullable()
1250
+ });
1251
+ var guardPainSignalSchema = z2.object({
1252
+ signalId: z2.string(),
1253
+ signalName: z2.string(),
1254
+ artifactId: z2.string(),
1255
+ artifactName: z2.string(),
1256
+ artifactType: z2.enum(["skill", "plugin"]),
1257
+ harness: z2.string(),
1258
+ latestSummary: z2.string(),
1259
+ firstSeenAt: z2.string(),
1260
+ lastSeenAt: z2.string(),
1261
+ count: z2.number(),
1262
+ source: z2.literal("scanner"),
1263
+ publisher: z2.string().optional()
1264
+ });
1265
+ var guardPainSignalListResponseSchema = z2.object({
1266
+ generatedAt: z2.string(),
1267
+ items: z2.array(guardPainSignalSchema)
1268
+ });
1269
+ var guardPainSignalAggregateSchema = z2.object({
1270
+ artifactId: z2.string(),
1271
+ artifactName: z2.string(),
1272
+ artifactType: z2.enum(["skill", "plugin"]),
1273
+ signalName: z2.string(),
1274
+ latestSummary: z2.string(),
1275
+ firstSeenAt: z2.string(),
1276
+ lastSeenAt: z2.string(),
1277
+ totalCount: z2.number(),
1278
+ consumerCount: z2.number(),
1279
+ harnesses: z2.array(z2.string()),
1280
+ publishers: z2.array(z2.string())
1281
+ });
1282
+ var guardPainSignalAggregateResponseSchema = z2.object({
1283
+ generatedAt: z2.string(),
1284
+ summary: z2.object({
1285
+ totalSignals: z2.number(),
1286
+ uniqueArtifacts: z2.number(),
1287
+ uniqueConsumers: z2.number()
1288
+ }),
1289
+ items: z2.array(guardPainSignalAggregateSchema)
1290
+ });
1164
1291
  var guardExceptionItemSchema = z2.object({
1165
1292
  exceptionId: z2.string(),
1166
1293
  scope: z2.enum(["artifact", "publisher", "harness", "global"]),
@@ -1178,6 +1305,45 @@ var guardExceptionListResponseSchema = z2.object({
1178
1305
  generatedAt: z2.string(),
1179
1306
  items: z2.array(guardExceptionItemSchema)
1180
1307
  });
1308
+ var guardPreflightEvidenceSchema = z2.object({
1309
+ category: z2.enum([
1310
+ "policy",
1311
+ "trust",
1312
+ "watchlist",
1313
+ "team-policy",
1314
+ "exception"
1315
+ ]),
1316
+ source: z2.string(),
1317
+ detail: z2.string()
1318
+ });
1319
+ var guardPreflightRequestSchema = z2.object({
1320
+ harness: z2.string(),
1321
+ artifactName: z2.string(),
1322
+ artifactType: z2.enum(["skill", "plugin"]),
1323
+ artifactId: z2.string().optional(),
1324
+ artifactSlug: z2.string().optional(),
1325
+ artifactHash: z2.string().optional(),
1326
+ publisher: z2.string().optional(),
1327
+ domain: z2.string().optional(),
1328
+ launchSummary: z2.string().optional(),
1329
+ capabilities: z2.array(z2.string()).optional(),
1330
+ workspacePath: z2.string().optional()
1331
+ });
1332
+ var guardPreflightVerdictResponseSchema = z2.object({
1333
+ generatedAt: z2.string(),
1334
+ principal: guardPrincipalSchema,
1335
+ decision: z2.enum(["allow", "review", "block"]),
1336
+ recommendation: z2.enum(["monitor", "review", "block"]),
1337
+ rationale: z2.string(),
1338
+ category: z2.enum(["exception", "team-policy", "watchlist", "trust", "policy"]).optional(),
1339
+ confidence: z2.number().optional(),
1340
+ freshnessTimestamp: z2.string().optional(),
1341
+ evidenceSources: z2.array(z2.string()).optional(),
1342
+ scope: z2.enum(["artifact", "publisher", "domain", "policy"]),
1343
+ matchedEvidence: z2.array(guardPreflightEvidenceSchema),
1344
+ matchedException: guardExceptionItemSchema.nullable(),
1345
+ trustMatch: guardTrustMatchSchema.nullable()
1346
+ });
1181
1347
  var guardTeamPolicyAuditItemSchema = z2.object({
1182
1348
  changedAt: z2.string(),
1183
1349
  actor: z2.string(),
@@ -1186,8 +1352,13 @@ var guardTeamPolicyAuditItemSchema = z2.object({
1186
1352
  });
1187
1353
  var guardTeamPolicyPackSchema = z2.object({
1188
1354
  name: z2.string(),
1189
- sharedHarnessDefaults: z2.record(z2.string(), z2.enum(["observe", "prompt", "enforce"])),
1355
+ sharedHarnessDefaults: z2.record(
1356
+ z2.string(),
1357
+ z2.enum(["observe", "prompt", "enforce"])
1358
+ ),
1190
1359
  allowedPublishers: z2.array(z2.string()),
1360
+ blockedPublishers: z2.array(z2.string()).optional(),
1361
+ blockedDomains: z2.array(z2.string()).optional(),
1191
1362
  blockedArtifacts: z2.array(z2.string()),
1192
1363
  alertChannel: z2.enum(["email", "slack", "teams", "webhook"]),
1193
1364
  updatedAt: z2.string(),
@@ -1602,13 +1773,11 @@ var skillDeprecationsResponseSchema = z2.object({
1602
1773
  name: z2.string(),
1603
1774
  items: z2.array(skillDeprecationRecordSchema)
1604
1775
  }).passthrough();
1605
- var skillSecurityBreakdownFindingSchema = z2.record(jsonValueSchema);
1606
- var skillSecurityBreakdownSummarySchema = z2.record(jsonValueSchema);
1607
1776
  var skillSecurityBreakdownResponseSchema = z2.object({
1608
1777
  jobId: z2.string(),
1609
1778
  score: z2.number().nullable().optional(),
1610
- findings: z2.array(skillSecurityBreakdownFindingSchema).optional(),
1611
- summary: skillSecurityBreakdownSummarySchema.optional(),
1779
+ findings: z2.array(jsonValueSchema).optional(),
1780
+ summary: jsonValueSchema.optional(),
1612
1781
  generatedAt: z2.string().nullable().optional(),
1613
1782
  scannerVersion: z2.string().nullable().optional()
1614
1783
  }).passthrough();
@@ -4094,6 +4263,32 @@ async function getGuardBillingBalance(client) {
4094
4263
  "guard billing balance response"
4095
4264
  );
4096
4265
  }
4266
+ async function getGuardFeed(client, limit) {
4267
+ const params = new URLSearchParams();
4268
+ if (typeof limit === "number" && Number.isFinite(limit) && Math.trunc(limit) > 0) {
4269
+ params.set("limit", String(Math.trunc(limit)));
4270
+ }
4271
+ const query = params.toString();
4272
+ const suffix = query ? `?${query}` : "";
4273
+ const raw = await client.requestJson(`/guard/feed${suffix}`, {
4274
+ method: "GET"
4275
+ });
4276
+ return client.parseWithSchema(
4277
+ raw,
4278
+ guardFeedResponseSchema,
4279
+ "guard feed response"
4280
+ );
4281
+ }
4282
+ async function getGuardOverview(client) {
4283
+ const raw = await client.requestJson("/guard/overview", {
4284
+ method: "GET"
4285
+ });
4286
+ return client.parseWithSchema(
4287
+ raw,
4288
+ guardOverviewResponseSchema,
4289
+ "guard overview response"
4290
+ );
4291
+ }
4097
4292
  async function getGuardTrustByHash(client, sha256) {
4098
4293
  const normalizedHash = sha256.trim();
4099
4294
  if (!normalizedHash) {
@@ -4141,6 +4336,26 @@ async function getGuardRevocations(client) {
4141
4336
  "guard revocations response"
4142
4337
  );
4143
4338
  }
4339
+ async function fetchGuardAdvisories(client) {
4340
+ const raw = await client.requestJson("/guard/advisories", {
4341
+ method: "GET"
4342
+ });
4343
+ return client.parseWithSchema(
4344
+ raw,
4345
+ guardRevocationResponseSchema,
4346
+ "guard advisories response"
4347
+ );
4348
+ }
4349
+ async function fetchGuardPolicy(client) {
4350
+ const raw = await client.requestJson("/guard/policy/fetch", {
4351
+ method: "GET"
4352
+ });
4353
+ return client.parseWithSchema(
4354
+ raw,
4355
+ guardPolicySchema,
4356
+ "guard policy response"
4357
+ );
4358
+ }
4144
4359
  async function getGuardInventory(client) {
4145
4360
  const raw = await client.requestJson("/guard/inventory", {
4146
4361
  method: "GET"
@@ -4186,6 +4401,21 @@ async function exportGuardAbom(client) {
4186
4401
  "guard abom response"
4187
4402
  );
4188
4403
  }
4404
+ async function exportGuardArtifactAbom(client, artifactId) {
4405
+ const normalizedArtifactId = artifactId.trim();
4406
+ if (!normalizedArtifactId) {
4407
+ throw new Error("artifactId is required");
4408
+ }
4409
+ const raw = await client.requestJson(
4410
+ `/guard/abom/${encodeURIComponent(normalizedArtifactId)}`,
4411
+ { method: "GET" }
4412
+ );
4413
+ return client.parseWithSchema(
4414
+ raw,
4415
+ guardAbomResponseSchema,
4416
+ "guard artifact abom response"
4417
+ );
4418
+ }
4189
4419
  async function exportGuardReceipts(client) {
4190
4420
  const raw = await client.requestJson("/guard/receipts/export", {
4191
4421
  method: "GET"
@@ -4257,6 +4487,87 @@ async function getGuardWatchlist(client) {
4257
4487
  "guard watchlist response"
4258
4488
  );
4259
4489
  }
4490
+ async function lookupGuardWatchlist(client, payload) {
4491
+ const raw = await client.requestJson("/guard/watchlist/lookup", {
4492
+ method: "POST",
4493
+ body: payload
4494
+ });
4495
+ return client.parseWithSchema(
4496
+ raw,
4497
+ guardWatchlistLookupResponseSchema,
4498
+ "guard watchlist lookup response"
4499
+ );
4500
+ }
4501
+ async function getGuardPainSignals(client) {
4502
+ const raw = await client.requestJson("/guard/signals/pain", {
4503
+ method: "GET"
4504
+ });
4505
+ return client.parseWithSchema(
4506
+ raw,
4507
+ guardPainSignalListResponseSchema,
4508
+ "guard pain signals response"
4509
+ );
4510
+ }
4511
+ async function getGuardAggregatedPainSignals(client) {
4512
+ const raw = await client.requestJson(
4513
+ "/guard/signals/pain/aggregate",
4514
+ {
4515
+ method: "GET"
4516
+ }
4517
+ );
4518
+ return client.parseWithSchema(
4519
+ raw,
4520
+ guardPainSignalAggregateResponseSchema,
4521
+ "guard aggregated pain signals response"
4522
+ );
4523
+ }
4524
+ async function getGuardPreflightVerdict(client, path, payload) {
4525
+ const raw = await client.requestJson(path, {
4526
+ method: "POST",
4527
+ body: payload
4528
+ });
4529
+ return client.parseWithSchema(
4530
+ raw,
4531
+ guardPreflightVerdictResponseSchema,
4532
+ "guard preflight verdict response"
4533
+ );
4534
+ }
4535
+ async function getGuardPreInstallVerdict(client, payload) {
4536
+ return getGuardPreflightVerdict(
4537
+ client,
4538
+ "/guard/verdict/pre-install",
4539
+ payload
4540
+ );
4541
+ }
4542
+ async function getGuardPreExecutionVerdict(client, payload) {
4543
+ return getGuardPreflightVerdict(
4544
+ client,
4545
+ "/guard/verdict/pre-execution",
4546
+ payload
4547
+ );
4548
+ }
4549
+ async function ingestGuardPainSignals(client, items) {
4550
+ const raw = await client.requestJson("/guard/signals/pain", {
4551
+ method: "POST",
4552
+ body: { items }
4553
+ });
4554
+ return client.parseWithSchema(
4555
+ raw,
4556
+ guardPainSignalListResponseSchema,
4557
+ "guard pain signals response"
4558
+ );
4559
+ }
4560
+ async function submitGuardReceipts(client, payload) {
4561
+ const raw = await client.requestJson("/guard/receipts/submit", {
4562
+ method: "POST",
4563
+ body: payload
4564
+ });
4565
+ return client.parseWithSchema(
4566
+ raw,
4567
+ guardReceiptSyncResponseSchema,
4568
+ "guard receipt submit response"
4569
+ );
4570
+ }
4260
4571
  async function addGuardWatchlistItem(client, payload) {
4261
4572
  const raw = await client.requestJson("/guard/watchlist", {
4262
4573
  method: "POST",
@@ -4294,6 +4605,28 @@ async function addGuardException(client, payload) {
4294
4605
  "guard exceptions response"
4295
4606
  );
4296
4607
  }
4608
+ async function requestGuardException(client, payload) {
4609
+ const raw = await client.requestJson("/guard/exceptions/request", {
4610
+ method: "POST",
4611
+ body: payload
4612
+ });
4613
+ return client.parseWithSchema(
4614
+ raw,
4615
+ guardExceptionListResponseSchema,
4616
+ "guard exception request response"
4617
+ );
4618
+ }
4619
+ async function syncGuardInventory(client, payload) {
4620
+ const raw = await client.requestJson("/guard/inventory/sync", {
4621
+ method: "POST",
4622
+ body: payload
4623
+ });
4624
+ return client.parseWithSchema(
4625
+ raw,
4626
+ guardReceiptSyncResponseSchema,
4627
+ "guard inventory sync response"
4628
+ );
4629
+ }
4297
4630
  async function removeGuardException(client, exceptionId) {
4298
4631
  const normalizedExceptionId = exceptionId.trim();
4299
4632
  if (!normalizedExceptionId) {
@@ -6157,6 +6490,12 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
6157
6490
  async getGuardBillingBalance() {
6158
6491
  return getGuardBillingBalance(this);
6159
6492
  }
6493
+ async getGuardFeed(limit) {
6494
+ return getGuardFeed(this, limit);
6495
+ }
6496
+ async getGuardOverview() {
6497
+ return getGuardOverview(this);
6498
+ }
6160
6499
  async getGuardTrustByHash(sha256) {
6161
6500
  return getGuardTrustByHash(this, sha256);
6162
6501
  }
@@ -6166,6 +6505,12 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
6166
6505
  async getGuardRevocations() {
6167
6506
  return getGuardRevocations(this);
6168
6507
  }
6508
+ async fetchGuardAdvisories() {
6509
+ return fetchGuardAdvisories(this);
6510
+ }
6511
+ async fetchGuardPolicy() {
6512
+ return fetchGuardPolicy(this);
6513
+ }
6169
6514
  async getGuardInventory() {
6170
6515
  return getGuardInventory(this);
6171
6516
  }
@@ -6181,6 +6526,9 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
6181
6526
  async exportGuardAbom() {
6182
6527
  return exportGuardAbom(this);
6183
6528
  }
6529
+ async exportGuardArtifactAbom(artifactId) {
6530
+ return exportGuardArtifactAbom(this, artifactId);
6531
+ }
6184
6532
  async exportGuardReceipts() {
6185
6533
  return exportGuardReceipts(this);
6186
6534
  }
@@ -6199,6 +6547,21 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
6199
6547
  async getGuardWatchlist() {
6200
6548
  return getGuardWatchlist(this);
6201
6549
  }
6550
+ async lookupGuardWatchlist(payload) {
6551
+ return lookupGuardWatchlist(this, payload);
6552
+ }
6553
+ async getGuardPainSignals() {
6554
+ return getGuardPainSignals(this);
6555
+ }
6556
+ async getGuardAggregatedPainSignals() {
6557
+ return getGuardAggregatedPainSignals(this);
6558
+ }
6559
+ async getGuardPreInstallVerdict(payload) {
6560
+ return getGuardPreInstallVerdict(this, payload);
6561
+ }
6562
+ async getGuardPreExecutionVerdict(payload) {
6563
+ return getGuardPreExecutionVerdict(this, payload);
6564
+ }
6202
6565
  async addGuardWatchlistItem(payload) {
6203
6566
  return addGuardWatchlistItem(this, payload);
6204
6567
  }
@@ -6208,12 +6571,24 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
6208
6571
  async addGuardException(payload) {
6209
6572
  return addGuardException(this, payload);
6210
6573
  }
6574
+ async requestGuardException(payload) {
6575
+ return requestGuardException(this, payload);
6576
+ }
6211
6577
  async removeGuardException(exceptionId) {
6212
6578
  return removeGuardException(this, exceptionId);
6213
6579
  }
6580
+ async ingestGuardPainSignals(items) {
6581
+ return ingestGuardPainSignals(this, items);
6582
+ }
6214
6583
  async syncGuardReceipts(payload) {
6215
6584
  return syncGuardReceipts(this, payload);
6216
6585
  }
6586
+ async syncGuardInventory(payload) {
6587
+ return syncGuardInventory(this, payload);
6588
+ }
6589
+ async submitGuardReceipts(payload) {
6590
+ return submitGuardReceipts(this, payload);
6591
+ }
6217
6592
  async getGuardTeamPolicyPack() {
6218
6593
  return getGuardTeamPolicyPack(this);
6219
6594
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hol-org/rb-client",
3
- "version": "0.1.179",
3
+ "version": "0.1.180",
4
4
  "description": "Lightweight Registry Broker client for HOL registries.",
5
5
  "type": "module",
6
6
  "files": [