@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.js CHANGED
@@ -1012,9 +1012,197 @@ var guardReceiptSchema = z2.object({
1012
1012
  capabilities: z2.array(z2.string()),
1013
1013
  summary: z2.string()
1014
1014
  });
1015
+ var guardHistoryArtifactSchema = z2.object({
1016
+ artifactId: z2.string(),
1017
+ artifactName: z2.string(),
1018
+ artifactType: z2.enum(["skill", "plugin"]),
1019
+ artifactSlug: z2.string(),
1020
+ publisher: z2.string().optional(),
1021
+ harnesses: z2.array(z2.string()),
1022
+ eventCount: z2.number(),
1023
+ firstSeenAt: z2.string(),
1024
+ lastSeenAt: z2.string(),
1025
+ latestDecision: z2.enum([
1026
+ "allow",
1027
+ "warn",
1028
+ "block",
1029
+ "review",
1030
+ "require-reapproval",
1031
+ "sandbox-required"
1032
+ ]),
1033
+ latestRecommendation: z2.enum(["monitor", "review", "block"])
1034
+ });
1035
+ var guardReceiptHistoryResponseSchema = z2.object({
1036
+ generatedAt: z2.string(),
1037
+ artifacts: z2.array(guardHistoryArtifactSchema)
1038
+ });
1039
+ var guardInventoryArtifactSchema = z2.object({
1040
+ artifactId: z2.string(),
1041
+ artifactName: z2.string(),
1042
+ artifactType: z2.enum(["skill", "plugin"]),
1043
+ artifactSlug: z2.string(),
1044
+ publisher: z2.string().optional(),
1045
+ harnesses: z2.array(z2.string()),
1046
+ devices: z2.array(z2.string()),
1047
+ eventCount: z2.number(),
1048
+ firstSeenAt: z2.string(),
1049
+ lastSeenAt: z2.string(),
1050
+ latestDecision: z2.enum([
1051
+ "allow",
1052
+ "warn",
1053
+ "block",
1054
+ "review",
1055
+ "require-reapproval",
1056
+ "sandbox-required"
1057
+ ]),
1058
+ latestRecommendation: z2.enum(["monitor", "review", "block"]),
1059
+ latestHash: z2.string(),
1060
+ latestSummary: z2.string()
1061
+ });
1062
+ var guardInventoryDiffEntrySchema = z2.object({
1063
+ artifactId: z2.string(),
1064
+ artifactName: z2.string(),
1065
+ artifactType: z2.enum(["skill", "plugin"]),
1066
+ changeType: z2.enum(["new", "changed", "removed"]),
1067
+ previousHash: z2.string().nullable(),
1068
+ currentHash: z2.string().nullable()
1069
+ });
1070
+ var guardInventoryDiffResponseSchema = z2.object({
1071
+ generatedAt: z2.string(),
1072
+ items: z2.array(guardInventoryDiffEntrySchema)
1073
+ });
1015
1074
  var guardReceiptSyncResponseSchema = z2.object({
1016
1075
  syncedAt: z2.string(),
1017
- receiptsStored: z2.number()
1076
+ receiptsStored: z2.number(),
1077
+ inventoryStored: z2.number().optional(),
1078
+ inventoryDiff: guardInventoryDiffResponseSchema.optional()
1079
+ });
1080
+ var guardInventoryResponseSchema = z2.object({
1081
+ generatedAt: z2.string(),
1082
+ items: z2.array(guardInventoryArtifactSchema)
1083
+ });
1084
+ var guardAbomSummarySchema = z2.object({
1085
+ totalArtifacts: z2.number(),
1086
+ totalDevices: z2.number(),
1087
+ totalHarnesses: z2.number(),
1088
+ blockedArtifacts: z2.number(),
1089
+ reviewArtifacts: z2.number()
1090
+ });
1091
+ var guardAbomResponseSchema = z2.object({
1092
+ generatedAt: z2.string(),
1093
+ summary: guardAbomSummarySchema,
1094
+ items: z2.array(guardInventoryArtifactSchema)
1095
+ });
1096
+ var guardTimelineEventSchema = z2.object({
1097
+ receiptId: z2.string(),
1098
+ capturedAt: z2.string(),
1099
+ harness: z2.string(),
1100
+ deviceId: z2.string(),
1101
+ deviceName: z2.string(),
1102
+ artifactHash: z2.string(),
1103
+ policyDecision: z2.enum([
1104
+ "allow",
1105
+ "warn",
1106
+ "block",
1107
+ "review",
1108
+ "require-reapproval",
1109
+ "sandbox-required"
1110
+ ]),
1111
+ recommendation: z2.enum(["monitor", "review", "block"]),
1112
+ changedSinceLastApproval: z2.boolean(),
1113
+ summary: z2.string(),
1114
+ capabilities: z2.array(z2.string()),
1115
+ publisher: z2.string().optional()
1116
+ });
1117
+ var guardArtifactTimelineResponseSchema = z2.object({
1118
+ generatedAt: z2.string(),
1119
+ artifactId: z2.string(),
1120
+ artifactName: z2.string(),
1121
+ artifactType: z2.enum(["skill", "plugin"]),
1122
+ artifactSlug: z2.string(),
1123
+ events: z2.array(guardTimelineEventSchema)
1124
+ });
1125
+ var guardReceiptExportSummarySchema = z2.object({
1126
+ totalReceipts: z2.number(),
1127
+ blockedCount: z2.number(),
1128
+ reviewCount: z2.number(),
1129
+ approvedCount: z2.number()
1130
+ });
1131
+ var guardExportSignatureSchema = z2.object({
1132
+ algorithm: z2.enum(["hmac-sha256", "none"]),
1133
+ digest: z2.string()
1134
+ });
1135
+ var guardReceiptExportResponseSchema = z2.object({
1136
+ generatedAt: z2.string(),
1137
+ summary: guardReceiptExportSummarySchema,
1138
+ provenanceSummary: z2.array(z2.string()),
1139
+ items: z2.array(guardReceiptSchema),
1140
+ signature: guardExportSignatureSchema
1141
+ });
1142
+ var guardAlertPreferencesSchema = z2.object({
1143
+ emailEnabled: z2.boolean(),
1144
+ digestMode: z2.enum(["immediate", "daily", "weekly"]),
1145
+ watchlistEnabled: z2.boolean(),
1146
+ advisoriesEnabled: z2.boolean(),
1147
+ repeatedWarningsEnabled: z2.boolean(),
1148
+ teamAlertsEnabled: z2.boolean(),
1149
+ updatedAt: z2.string()
1150
+ });
1151
+ var guardWatchlistItemSchema = z2.object({
1152
+ artifactId: z2.string(),
1153
+ artifactName: z2.string(),
1154
+ artifactType: z2.enum(["skill", "plugin"]),
1155
+ artifactSlug: z2.string(),
1156
+ reason: z2.string(),
1157
+ source: z2.enum(["manual", "synced", "team-policy"]),
1158
+ createdAt: z2.string()
1159
+ });
1160
+ var guardWatchlistResponseSchema = z2.object({
1161
+ generatedAt: z2.string(),
1162
+ items: z2.array(guardWatchlistItemSchema)
1163
+ });
1164
+ var guardExceptionItemSchema = z2.object({
1165
+ exceptionId: z2.string(),
1166
+ scope: z2.enum(["artifact", "publisher", "harness", "global"]),
1167
+ harness: z2.string().nullable(),
1168
+ artifactId: z2.string().nullable(),
1169
+ publisher: z2.string().nullable(),
1170
+ reason: z2.string(),
1171
+ owner: z2.string(),
1172
+ source: z2.enum(["manual", "team-policy"]),
1173
+ expiresAt: z2.string(),
1174
+ createdAt: z2.string(),
1175
+ updatedAt: z2.string()
1176
+ });
1177
+ var guardExceptionListResponseSchema = z2.object({
1178
+ generatedAt: z2.string(),
1179
+ items: z2.array(guardExceptionItemSchema)
1180
+ });
1181
+ var guardTeamPolicyAuditItemSchema = z2.object({
1182
+ changedAt: z2.string(),
1183
+ actor: z2.string(),
1184
+ change: z2.enum(["created", "updated"]),
1185
+ summary: z2.string()
1186
+ });
1187
+ var guardTeamPolicyPackSchema = z2.object({
1188
+ name: z2.string(),
1189
+ sharedHarnessDefaults: z2.record(z2.string(), z2.enum(["observe", "prompt", "enforce"])),
1190
+ allowedPublishers: z2.array(z2.string()),
1191
+ blockedArtifacts: z2.array(z2.string()),
1192
+ alertChannel: z2.enum(["email", "slack", "teams", "webhook"]),
1193
+ updatedAt: z2.string(),
1194
+ auditTrail: z2.array(guardTeamPolicyAuditItemSchema)
1195
+ });
1196
+ var guardDeviceSchema = z2.object({
1197
+ deviceId: z2.string(),
1198
+ deviceName: z2.string(),
1199
+ harnesses: z2.array(z2.string()),
1200
+ receiptCount: z2.number(),
1201
+ lastSeenAt: z2.string()
1202
+ });
1203
+ var guardDeviceListResponseSchema = z2.object({
1204
+ generatedAt: z2.string(),
1205
+ items: z2.array(guardDeviceSchema)
1018
1206
  });
1019
1207
  var hbarPurchaseIntentResponseSchema = z2.object({
1020
1208
  transaction: z2.string(),
@@ -3953,10 +4141,198 @@ async function getGuardRevocations(client) {
3953
4141
  "guard revocations response"
3954
4142
  );
3955
4143
  }
4144
+ async function getGuardInventory(client) {
4145
+ const raw = await client.requestJson("/guard/inventory", {
4146
+ method: "GET"
4147
+ });
4148
+ return client.parseWithSchema(
4149
+ raw,
4150
+ guardInventoryResponseSchema,
4151
+ "guard inventory response"
4152
+ );
4153
+ }
4154
+ async function getGuardReceiptHistory(client) {
4155
+ const raw = await client.requestJson("/guard/history", {
4156
+ method: "GET"
4157
+ });
4158
+ return client.parseWithSchema(
4159
+ raw,
4160
+ guardReceiptHistoryResponseSchema,
4161
+ "guard receipt history response"
4162
+ );
4163
+ }
4164
+ async function getGuardArtifactTimeline(client, artifactId) {
4165
+ const normalizedArtifactId = artifactId.trim();
4166
+ if (!normalizedArtifactId) {
4167
+ throw new Error("artifactId is required");
4168
+ }
4169
+ const raw = await client.requestJson(
4170
+ `/guard/history/${encodeURIComponent(normalizedArtifactId)}`,
4171
+ { method: "GET" }
4172
+ );
4173
+ return client.parseWithSchema(
4174
+ raw,
4175
+ guardArtifactTimelineResponseSchema,
4176
+ "guard artifact timeline response"
4177
+ );
4178
+ }
4179
+ async function exportGuardAbom(client) {
4180
+ const raw = await client.requestJson("/guard/abom", {
4181
+ method: "GET"
4182
+ });
4183
+ return client.parseWithSchema(
4184
+ raw,
4185
+ guardAbomResponseSchema,
4186
+ "guard abom response"
4187
+ );
4188
+ }
4189
+ async function exportGuardReceipts(client) {
4190
+ const raw = await client.requestJson("/guard/receipts/export", {
4191
+ method: "GET"
4192
+ });
4193
+ return client.parseWithSchema(
4194
+ raw,
4195
+ guardReceiptExportResponseSchema,
4196
+ "guard receipt export response"
4197
+ );
4198
+ }
4199
+ async function getGuardInventoryDiff(client) {
4200
+ const raw = await client.requestJson("/guard/inventory/diff", {
4201
+ method: "GET"
4202
+ });
4203
+ return client.parseWithSchema(
4204
+ raw,
4205
+ guardInventoryDiffResponseSchema,
4206
+ "guard inventory diff response"
4207
+ );
4208
+ }
4209
+ async function getGuardDevices(client) {
4210
+ const raw = await client.requestJson("/guard/devices", {
4211
+ method: "GET"
4212
+ });
4213
+ return client.parseWithSchema(
4214
+ raw,
4215
+ guardDeviceListResponseSchema,
4216
+ "guard devices response"
4217
+ );
4218
+ }
4219
+ async function getGuardAlertPreferences(client) {
4220
+ const raw = await client.requestJson("/guard/alerts/preferences", {
4221
+ method: "GET"
4222
+ });
4223
+ return client.parseWithSchema(
4224
+ raw,
4225
+ guardAlertPreferencesSchema,
4226
+ "guard alert preferences response"
4227
+ );
4228
+ }
4229
+ async function updateGuardAlertPreferences(client, payload) {
4230
+ const raw = await client.requestJson("/guard/alerts/preferences", {
4231
+ method: "PUT",
4232
+ body: payload
4233
+ });
4234
+ return client.parseWithSchema(
4235
+ raw,
4236
+ guardAlertPreferencesSchema,
4237
+ "guard alert preferences response"
4238
+ );
4239
+ }
4240
+ async function getGuardExceptions(client) {
4241
+ const raw = await client.requestJson("/guard/exceptions", {
4242
+ method: "GET"
4243
+ });
4244
+ return client.parseWithSchema(
4245
+ raw,
4246
+ guardExceptionListResponseSchema,
4247
+ "guard exceptions response"
4248
+ );
4249
+ }
4250
+ async function getGuardWatchlist(client) {
4251
+ const raw = await client.requestJson("/guard/watchlist", {
4252
+ method: "GET"
4253
+ });
4254
+ return client.parseWithSchema(
4255
+ raw,
4256
+ guardWatchlistResponseSchema,
4257
+ "guard watchlist response"
4258
+ );
4259
+ }
4260
+ async function addGuardWatchlistItem(client, payload) {
4261
+ const raw = await client.requestJson("/guard/watchlist", {
4262
+ method: "POST",
4263
+ body: payload
4264
+ });
4265
+ return client.parseWithSchema(
4266
+ raw,
4267
+ guardWatchlistResponseSchema,
4268
+ "guard watchlist response"
4269
+ );
4270
+ }
4271
+ async function removeGuardWatchlistItem(client, artifactId) {
4272
+ const normalizedArtifactId = artifactId.trim();
4273
+ if (!normalizedArtifactId) {
4274
+ throw new Error("artifactId is required");
4275
+ }
4276
+ const raw = await client.requestJson(
4277
+ `/guard/watchlist/${encodeURIComponent(normalizedArtifactId)}`,
4278
+ { method: "DELETE" }
4279
+ );
4280
+ return client.parseWithSchema(
4281
+ raw,
4282
+ guardWatchlistResponseSchema,
4283
+ "guard watchlist response"
4284
+ );
4285
+ }
4286
+ async function addGuardException(client, payload) {
4287
+ const raw = await client.requestJson("/guard/exceptions", {
4288
+ method: "POST",
4289
+ body: payload
4290
+ });
4291
+ return client.parseWithSchema(
4292
+ raw,
4293
+ guardExceptionListResponseSchema,
4294
+ "guard exceptions response"
4295
+ );
4296
+ }
4297
+ async function removeGuardException(client, exceptionId) {
4298
+ const normalizedExceptionId = exceptionId.trim();
4299
+ if (!normalizedExceptionId) {
4300
+ throw new Error("exceptionId is required");
4301
+ }
4302
+ const raw = await client.requestJson(
4303
+ `/guard/exceptions/${encodeURIComponent(normalizedExceptionId)}`,
4304
+ { method: "DELETE" }
4305
+ );
4306
+ return client.parseWithSchema(
4307
+ raw,
4308
+ guardExceptionListResponseSchema,
4309
+ "guard exceptions response"
4310
+ );
4311
+ }
4312
+ async function getGuardTeamPolicyPack(client) {
4313
+ const raw = await client.requestJson("/guard/team/policy-pack", {
4314
+ method: "GET"
4315
+ });
4316
+ return client.parseWithSchema(
4317
+ raw,
4318
+ guardTeamPolicyPackSchema,
4319
+ "guard team policy pack response"
4320
+ );
4321
+ }
4322
+ async function updateGuardTeamPolicyPack(client, payload) {
4323
+ const raw = await client.requestJson("/guard/team/policy-pack", {
4324
+ method: "PUT",
4325
+ body: payload
4326
+ });
4327
+ return client.parseWithSchema(
4328
+ raw,
4329
+ guardTeamPolicyPackSchema,
4330
+ "guard team policy pack response"
4331
+ );
4332
+ }
3956
4333
  async function syncGuardReceipts(client, payload) {
3957
4334
  const raw = await client.requestJson("/guard/receipts/sync", {
3958
4335
  method: "POST",
3959
- headers: { "content-type": "application/json" },
3960
4336
  body: payload
3961
4337
  });
3962
4338
  return client.parseWithSchema(
@@ -5790,9 +6166,60 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5790
6166
  async getGuardRevocations() {
5791
6167
  return getGuardRevocations(this);
5792
6168
  }
6169
+ async getGuardInventory() {
6170
+ return getGuardInventory(this);
6171
+ }
6172
+ async getGuardReceiptHistory() {
6173
+ return getGuardReceiptHistory(this);
6174
+ }
6175
+ async getGuardArtifactTimeline(artifactId) {
6176
+ return getGuardArtifactTimeline(this, artifactId);
6177
+ }
6178
+ async getGuardInventoryDiff() {
6179
+ return getGuardInventoryDiff(this);
6180
+ }
6181
+ async exportGuardAbom() {
6182
+ return exportGuardAbom(this);
6183
+ }
6184
+ async exportGuardReceipts() {
6185
+ return exportGuardReceipts(this);
6186
+ }
6187
+ async getGuardDevices() {
6188
+ return getGuardDevices(this);
6189
+ }
6190
+ async getGuardAlertPreferences() {
6191
+ return getGuardAlertPreferences(this);
6192
+ }
6193
+ async updateGuardAlertPreferences(payload) {
6194
+ return updateGuardAlertPreferences(this, payload);
6195
+ }
6196
+ async getGuardExceptions() {
6197
+ return getGuardExceptions(this);
6198
+ }
6199
+ async getGuardWatchlist() {
6200
+ return getGuardWatchlist(this);
6201
+ }
6202
+ async addGuardWatchlistItem(payload) {
6203
+ return addGuardWatchlistItem(this, payload);
6204
+ }
6205
+ async removeGuardWatchlistItem(artifactId) {
6206
+ return removeGuardWatchlistItem(this, artifactId);
6207
+ }
6208
+ async addGuardException(payload) {
6209
+ return addGuardException(this, payload);
6210
+ }
6211
+ async removeGuardException(exceptionId) {
6212
+ return removeGuardException(this, exceptionId);
6213
+ }
5793
6214
  async syncGuardReceipts(payload) {
5794
6215
  return syncGuardReceipts(this, payload);
5795
6216
  }
6217
+ async getGuardTeamPolicyPack() {
6218
+ return getGuardTeamPolicyPack(this);
6219
+ }
6220
+ async updateGuardTeamPolicyPack(payload) {
6221
+ return updateGuardTeamPolicyPack(this, payload);
6222
+ }
5796
6223
  async createHbarPurchaseIntent(payload) {
5797
6224
  return createHbarPurchaseIntent(this, payload);
5798
6225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hol-org/rb-client",
3
- "version": "0.1.178",
3
+ "version": "0.1.179",
4
4
  "description": "Lightweight Registry Broker client for HOL registries.",
5
5
  "type": "module",
6
6
  "files": [