@hol-org/rb-client 0.1.178 → 0.1.179

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1071,9 +1071,197 @@ var guardReceiptSchema = import_zod2.z.object({
1071
1071
  capabilities: import_zod2.z.array(import_zod2.z.string()),
1072
1072
  summary: import_zod2.z.string()
1073
1073
  });
1074
+ var guardHistoryArtifactSchema = import_zod2.z.object({
1075
+ artifactId: import_zod2.z.string(),
1076
+ artifactName: import_zod2.z.string(),
1077
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1078
+ artifactSlug: import_zod2.z.string(),
1079
+ publisher: import_zod2.z.string().optional(),
1080
+ harnesses: import_zod2.z.array(import_zod2.z.string()),
1081
+ eventCount: import_zod2.z.number(),
1082
+ firstSeenAt: import_zod2.z.string(),
1083
+ lastSeenAt: import_zod2.z.string(),
1084
+ latestDecision: import_zod2.z.enum([
1085
+ "allow",
1086
+ "warn",
1087
+ "block",
1088
+ "review",
1089
+ "require-reapproval",
1090
+ "sandbox-required"
1091
+ ]),
1092
+ latestRecommendation: import_zod2.z.enum(["monitor", "review", "block"])
1093
+ });
1094
+ var guardReceiptHistoryResponseSchema = import_zod2.z.object({
1095
+ generatedAt: import_zod2.z.string(),
1096
+ artifacts: import_zod2.z.array(guardHistoryArtifactSchema)
1097
+ });
1098
+ var guardInventoryArtifactSchema = import_zod2.z.object({
1099
+ artifactId: import_zod2.z.string(),
1100
+ artifactName: import_zod2.z.string(),
1101
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1102
+ artifactSlug: import_zod2.z.string(),
1103
+ publisher: import_zod2.z.string().optional(),
1104
+ harnesses: import_zod2.z.array(import_zod2.z.string()),
1105
+ devices: import_zod2.z.array(import_zod2.z.string()),
1106
+ eventCount: import_zod2.z.number(),
1107
+ firstSeenAt: import_zod2.z.string(),
1108
+ lastSeenAt: import_zod2.z.string(),
1109
+ latestDecision: import_zod2.z.enum([
1110
+ "allow",
1111
+ "warn",
1112
+ "block",
1113
+ "review",
1114
+ "require-reapproval",
1115
+ "sandbox-required"
1116
+ ]),
1117
+ latestRecommendation: import_zod2.z.enum(["monitor", "review", "block"]),
1118
+ latestHash: import_zod2.z.string(),
1119
+ latestSummary: import_zod2.z.string()
1120
+ });
1121
+ var guardInventoryDiffEntrySchema = import_zod2.z.object({
1122
+ artifactId: import_zod2.z.string(),
1123
+ artifactName: import_zod2.z.string(),
1124
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1125
+ changeType: import_zod2.z.enum(["new", "changed", "removed"]),
1126
+ previousHash: import_zod2.z.string().nullable(),
1127
+ currentHash: import_zod2.z.string().nullable()
1128
+ });
1129
+ var guardInventoryDiffResponseSchema = import_zod2.z.object({
1130
+ generatedAt: import_zod2.z.string(),
1131
+ items: import_zod2.z.array(guardInventoryDiffEntrySchema)
1132
+ });
1074
1133
  var guardReceiptSyncResponseSchema = import_zod2.z.object({
1075
1134
  syncedAt: import_zod2.z.string(),
1076
- receiptsStored: import_zod2.z.number()
1135
+ receiptsStored: import_zod2.z.number(),
1136
+ inventoryStored: import_zod2.z.number().optional(),
1137
+ inventoryDiff: guardInventoryDiffResponseSchema.optional()
1138
+ });
1139
+ var guardInventoryResponseSchema = import_zod2.z.object({
1140
+ generatedAt: import_zod2.z.string(),
1141
+ items: import_zod2.z.array(guardInventoryArtifactSchema)
1142
+ });
1143
+ var guardAbomSummarySchema = import_zod2.z.object({
1144
+ totalArtifacts: import_zod2.z.number(),
1145
+ totalDevices: import_zod2.z.number(),
1146
+ totalHarnesses: import_zod2.z.number(),
1147
+ blockedArtifacts: import_zod2.z.number(),
1148
+ reviewArtifacts: import_zod2.z.number()
1149
+ });
1150
+ var guardAbomResponseSchema = import_zod2.z.object({
1151
+ generatedAt: import_zod2.z.string(),
1152
+ summary: guardAbomSummarySchema,
1153
+ items: import_zod2.z.array(guardInventoryArtifactSchema)
1154
+ });
1155
+ var guardTimelineEventSchema = import_zod2.z.object({
1156
+ receiptId: import_zod2.z.string(),
1157
+ capturedAt: import_zod2.z.string(),
1158
+ harness: import_zod2.z.string(),
1159
+ deviceId: import_zod2.z.string(),
1160
+ deviceName: import_zod2.z.string(),
1161
+ artifactHash: import_zod2.z.string(),
1162
+ policyDecision: import_zod2.z.enum([
1163
+ "allow",
1164
+ "warn",
1165
+ "block",
1166
+ "review",
1167
+ "require-reapproval",
1168
+ "sandbox-required"
1169
+ ]),
1170
+ recommendation: import_zod2.z.enum(["monitor", "review", "block"]),
1171
+ changedSinceLastApproval: import_zod2.z.boolean(),
1172
+ summary: import_zod2.z.string(),
1173
+ capabilities: import_zod2.z.array(import_zod2.z.string()),
1174
+ publisher: import_zod2.z.string().optional()
1175
+ });
1176
+ var guardArtifactTimelineResponseSchema = import_zod2.z.object({
1177
+ generatedAt: import_zod2.z.string(),
1178
+ artifactId: import_zod2.z.string(),
1179
+ artifactName: import_zod2.z.string(),
1180
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1181
+ artifactSlug: import_zod2.z.string(),
1182
+ events: import_zod2.z.array(guardTimelineEventSchema)
1183
+ });
1184
+ var guardReceiptExportSummarySchema = import_zod2.z.object({
1185
+ totalReceipts: import_zod2.z.number(),
1186
+ blockedCount: import_zod2.z.number(),
1187
+ reviewCount: import_zod2.z.number(),
1188
+ approvedCount: import_zod2.z.number()
1189
+ });
1190
+ var guardExportSignatureSchema = import_zod2.z.object({
1191
+ algorithm: import_zod2.z.enum(["hmac-sha256", "none"]),
1192
+ digest: import_zod2.z.string()
1193
+ });
1194
+ var guardReceiptExportResponseSchema = import_zod2.z.object({
1195
+ generatedAt: import_zod2.z.string(),
1196
+ summary: guardReceiptExportSummarySchema,
1197
+ provenanceSummary: import_zod2.z.array(import_zod2.z.string()),
1198
+ items: import_zod2.z.array(guardReceiptSchema),
1199
+ signature: guardExportSignatureSchema
1200
+ });
1201
+ var guardAlertPreferencesSchema = import_zod2.z.object({
1202
+ emailEnabled: import_zod2.z.boolean(),
1203
+ digestMode: import_zod2.z.enum(["immediate", "daily", "weekly"]),
1204
+ watchlistEnabled: import_zod2.z.boolean(),
1205
+ advisoriesEnabled: import_zod2.z.boolean(),
1206
+ repeatedWarningsEnabled: import_zod2.z.boolean(),
1207
+ teamAlertsEnabled: import_zod2.z.boolean(),
1208
+ updatedAt: import_zod2.z.string()
1209
+ });
1210
+ var guardWatchlistItemSchema = import_zod2.z.object({
1211
+ artifactId: import_zod2.z.string(),
1212
+ artifactName: import_zod2.z.string(),
1213
+ artifactType: import_zod2.z.enum(["skill", "plugin"]),
1214
+ artifactSlug: import_zod2.z.string(),
1215
+ reason: import_zod2.z.string(),
1216
+ source: import_zod2.z.enum(["manual", "synced", "team-policy"]),
1217
+ createdAt: import_zod2.z.string()
1218
+ });
1219
+ var guardWatchlistResponseSchema = import_zod2.z.object({
1220
+ generatedAt: import_zod2.z.string(),
1221
+ items: import_zod2.z.array(guardWatchlistItemSchema)
1222
+ });
1223
+ var guardExceptionItemSchema = import_zod2.z.object({
1224
+ exceptionId: import_zod2.z.string(),
1225
+ scope: import_zod2.z.enum(["artifact", "publisher", "harness", "global"]),
1226
+ harness: import_zod2.z.string().nullable(),
1227
+ artifactId: import_zod2.z.string().nullable(),
1228
+ publisher: import_zod2.z.string().nullable(),
1229
+ reason: import_zod2.z.string(),
1230
+ owner: import_zod2.z.string(),
1231
+ source: import_zod2.z.enum(["manual", "team-policy"]),
1232
+ expiresAt: import_zod2.z.string(),
1233
+ createdAt: import_zod2.z.string(),
1234
+ updatedAt: import_zod2.z.string()
1235
+ });
1236
+ var guardExceptionListResponseSchema = import_zod2.z.object({
1237
+ generatedAt: import_zod2.z.string(),
1238
+ items: import_zod2.z.array(guardExceptionItemSchema)
1239
+ });
1240
+ var guardTeamPolicyAuditItemSchema = import_zod2.z.object({
1241
+ changedAt: import_zod2.z.string(),
1242
+ actor: import_zod2.z.string(),
1243
+ change: import_zod2.z.enum(["created", "updated"]),
1244
+ summary: import_zod2.z.string()
1245
+ });
1246
+ var guardTeamPolicyPackSchema = import_zod2.z.object({
1247
+ name: import_zod2.z.string(),
1248
+ sharedHarnessDefaults: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.enum(["observe", "prompt", "enforce"])),
1249
+ allowedPublishers: import_zod2.z.array(import_zod2.z.string()),
1250
+ blockedArtifacts: import_zod2.z.array(import_zod2.z.string()),
1251
+ alertChannel: import_zod2.z.enum(["email", "slack", "teams", "webhook"]),
1252
+ updatedAt: import_zod2.z.string(),
1253
+ auditTrail: import_zod2.z.array(guardTeamPolicyAuditItemSchema)
1254
+ });
1255
+ var guardDeviceSchema = import_zod2.z.object({
1256
+ deviceId: import_zod2.z.string(),
1257
+ deviceName: import_zod2.z.string(),
1258
+ harnesses: import_zod2.z.array(import_zod2.z.string()),
1259
+ receiptCount: import_zod2.z.number(),
1260
+ lastSeenAt: import_zod2.z.string()
1261
+ });
1262
+ var guardDeviceListResponseSchema = import_zod2.z.object({
1263
+ generatedAt: import_zod2.z.string(),
1264
+ items: import_zod2.z.array(guardDeviceSchema)
1077
1265
  });
1078
1266
  var hbarPurchaseIntentResponseSchema = import_zod2.z.object({
1079
1267
  transaction: import_zod2.z.string(),
@@ -4013,10 +4201,198 @@ async function getGuardRevocations(client) {
4013
4201
  "guard revocations response"
4014
4202
  );
4015
4203
  }
4204
+ async function getGuardInventory(client) {
4205
+ const raw = await client.requestJson("/guard/inventory", {
4206
+ method: "GET"
4207
+ });
4208
+ return client.parseWithSchema(
4209
+ raw,
4210
+ guardInventoryResponseSchema,
4211
+ "guard inventory response"
4212
+ );
4213
+ }
4214
+ async function getGuardReceiptHistory(client) {
4215
+ const raw = await client.requestJson("/guard/history", {
4216
+ method: "GET"
4217
+ });
4218
+ return client.parseWithSchema(
4219
+ raw,
4220
+ guardReceiptHistoryResponseSchema,
4221
+ "guard receipt history response"
4222
+ );
4223
+ }
4224
+ async function getGuardArtifactTimeline(client, artifactId) {
4225
+ const normalizedArtifactId = artifactId.trim();
4226
+ if (!normalizedArtifactId) {
4227
+ throw new Error("artifactId is required");
4228
+ }
4229
+ const raw = await client.requestJson(
4230
+ `/guard/history/${encodeURIComponent(normalizedArtifactId)}`,
4231
+ { method: "GET" }
4232
+ );
4233
+ return client.parseWithSchema(
4234
+ raw,
4235
+ guardArtifactTimelineResponseSchema,
4236
+ "guard artifact timeline response"
4237
+ );
4238
+ }
4239
+ async function exportGuardAbom(client) {
4240
+ const raw = await client.requestJson("/guard/abom", {
4241
+ method: "GET"
4242
+ });
4243
+ return client.parseWithSchema(
4244
+ raw,
4245
+ guardAbomResponseSchema,
4246
+ "guard abom response"
4247
+ );
4248
+ }
4249
+ async function exportGuardReceipts(client) {
4250
+ const raw = await client.requestJson("/guard/receipts/export", {
4251
+ method: "GET"
4252
+ });
4253
+ return client.parseWithSchema(
4254
+ raw,
4255
+ guardReceiptExportResponseSchema,
4256
+ "guard receipt export response"
4257
+ );
4258
+ }
4259
+ async function getGuardInventoryDiff(client) {
4260
+ const raw = await client.requestJson("/guard/inventory/diff", {
4261
+ method: "GET"
4262
+ });
4263
+ return client.parseWithSchema(
4264
+ raw,
4265
+ guardInventoryDiffResponseSchema,
4266
+ "guard inventory diff response"
4267
+ );
4268
+ }
4269
+ async function getGuardDevices(client) {
4270
+ const raw = await client.requestJson("/guard/devices", {
4271
+ method: "GET"
4272
+ });
4273
+ return client.parseWithSchema(
4274
+ raw,
4275
+ guardDeviceListResponseSchema,
4276
+ "guard devices response"
4277
+ );
4278
+ }
4279
+ async function getGuardAlertPreferences(client) {
4280
+ const raw = await client.requestJson("/guard/alerts/preferences", {
4281
+ method: "GET"
4282
+ });
4283
+ return client.parseWithSchema(
4284
+ raw,
4285
+ guardAlertPreferencesSchema,
4286
+ "guard alert preferences response"
4287
+ );
4288
+ }
4289
+ async function updateGuardAlertPreferences(client, payload) {
4290
+ const raw = await client.requestJson("/guard/alerts/preferences", {
4291
+ method: "PUT",
4292
+ body: payload
4293
+ });
4294
+ return client.parseWithSchema(
4295
+ raw,
4296
+ guardAlertPreferencesSchema,
4297
+ "guard alert preferences response"
4298
+ );
4299
+ }
4300
+ async function getGuardExceptions(client) {
4301
+ const raw = await client.requestJson("/guard/exceptions", {
4302
+ method: "GET"
4303
+ });
4304
+ return client.parseWithSchema(
4305
+ raw,
4306
+ guardExceptionListResponseSchema,
4307
+ "guard exceptions response"
4308
+ );
4309
+ }
4310
+ async function getGuardWatchlist(client) {
4311
+ const raw = await client.requestJson("/guard/watchlist", {
4312
+ method: "GET"
4313
+ });
4314
+ return client.parseWithSchema(
4315
+ raw,
4316
+ guardWatchlistResponseSchema,
4317
+ "guard watchlist response"
4318
+ );
4319
+ }
4320
+ async function addGuardWatchlistItem(client, payload) {
4321
+ const raw = await client.requestJson("/guard/watchlist", {
4322
+ method: "POST",
4323
+ body: payload
4324
+ });
4325
+ return client.parseWithSchema(
4326
+ raw,
4327
+ guardWatchlistResponseSchema,
4328
+ "guard watchlist response"
4329
+ );
4330
+ }
4331
+ async function removeGuardWatchlistItem(client, artifactId) {
4332
+ const normalizedArtifactId = artifactId.trim();
4333
+ if (!normalizedArtifactId) {
4334
+ throw new Error("artifactId is required");
4335
+ }
4336
+ const raw = await client.requestJson(
4337
+ `/guard/watchlist/${encodeURIComponent(normalizedArtifactId)}`,
4338
+ { method: "DELETE" }
4339
+ );
4340
+ return client.parseWithSchema(
4341
+ raw,
4342
+ guardWatchlistResponseSchema,
4343
+ "guard watchlist response"
4344
+ );
4345
+ }
4346
+ async function addGuardException(client, payload) {
4347
+ const raw = await client.requestJson("/guard/exceptions", {
4348
+ method: "POST",
4349
+ body: payload
4350
+ });
4351
+ return client.parseWithSchema(
4352
+ raw,
4353
+ guardExceptionListResponseSchema,
4354
+ "guard exceptions response"
4355
+ );
4356
+ }
4357
+ async function removeGuardException(client, exceptionId) {
4358
+ const normalizedExceptionId = exceptionId.trim();
4359
+ if (!normalizedExceptionId) {
4360
+ throw new Error("exceptionId is required");
4361
+ }
4362
+ const raw = await client.requestJson(
4363
+ `/guard/exceptions/${encodeURIComponent(normalizedExceptionId)}`,
4364
+ { method: "DELETE" }
4365
+ );
4366
+ return client.parseWithSchema(
4367
+ raw,
4368
+ guardExceptionListResponseSchema,
4369
+ "guard exceptions response"
4370
+ );
4371
+ }
4372
+ async function getGuardTeamPolicyPack(client) {
4373
+ const raw = await client.requestJson("/guard/team/policy-pack", {
4374
+ method: "GET"
4375
+ });
4376
+ return client.parseWithSchema(
4377
+ raw,
4378
+ guardTeamPolicyPackSchema,
4379
+ "guard team policy pack response"
4380
+ );
4381
+ }
4382
+ async function updateGuardTeamPolicyPack(client, payload) {
4383
+ const raw = await client.requestJson("/guard/team/policy-pack", {
4384
+ method: "PUT",
4385
+ body: payload
4386
+ });
4387
+ return client.parseWithSchema(
4388
+ raw,
4389
+ guardTeamPolicyPackSchema,
4390
+ "guard team policy pack response"
4391
+ );
4392
+ }
4016
4393
  async function syncGuardReceipts(client, payload) {
4017
4394
  const raw = await client.requestJson("/guard/receipts/sync", {
4018
4395
  method: "POST",
4019
- headers: { "content-type": "application/json" },
4020
4396
  body: payload
4021
4397
  });
4022
4398
  return client.parseWithSchema(
@@ -5850,9 +6226,60 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5850
6226
  async getGuardRevocations() {
5851
6227
  return getGuardRevocations(this);
5852
6228
  }
6229
+ async getGuardInventory() {
6230
+ return getGuardInventory(this);
6231
+ }
6232
+ async getGuardReceiptHistory() {
6233
+ return getGuardReceiptHistory(this);
6234
+ }
6235
+ async getGuardArtifactTimeline(artifactId) {
6236
+ return getGuardArtifactTimeline(this, artifactId);
6237
+ }
6238
+ async getGuardInventoryDiff() {
6239
+ return getGuardInventoryDiff(this);
6240
+ }
6241
+ async exportGuardAbom() {
6242
+ return exportGuardAbom(this);
6243
+ }
6244
+ async exportGuardReceipts() {
6245
+ return exportGuardReceipts(this);
6246
+ }
6247
+ async getGuardDevices() {
6248
+ return getGuardDevices(this);
6249
+ }
6250
+ async getGuardAlertPreferences() {
6251
+ return getGuardAlertPreferences(this);
6252
+ }
6253
+ async updateGuardAlertPreferences(payload) {
6254
+ return updateGuardAlertPreferences(this, payload);
6255
+ }
6256
+ async getGuardExceptions() {
6257
+ return getGuardExceptions(this);
6258
+ }
6259
+ async getGuardWatchlist() {
6260
+ return getGuardWatchlist(this);
6261
+ }
6262
+ async addGuardWatchlistItem(payload) {
6263
+ return addGuardWatchlistItem(this, payload);
6264
+ }
6265
+ async removeGuardWatchlistItem(artifactId) {
6266
+ return removeGuardWatchlistItem(this, artifactId);
6267
+ }
6268
+ async addGuardException(payload) {
6269
+ return addGuardException(this, payload);
6270
+ }
6271
+ async removeGuardException(exceptionId) {
6272
+ return removeGuardException(this, exceptionId);
6273
+ }
5853
6274
  async syncGuardReceipts(payload) {
5854
6275
  return syncGuardReceipts(this, payload);
5855
6276
  }
6277
+ async getGuardTeamPolicyPack() {
6278
+ return getGuardTeamPolicyPack(this);
6279
+ }
6280
+ async updateGuardTeamPolicyPack(payload) {
6281
+ return updateGuardTeamPolicyPack(this, payload);
6282
+ }
5856
6283
  async createHbarPurchaseIntent(payload) {
5857
6284
  return createHbarPurchaseIntent(this, payload);
5858
6285
  }