@hashgraphonline/standards-sdk 0.1.179 → 0.1.181

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.
Files changed (167) hide show
  1. package/dist/browser/services/registry-broker/client/base-client.d.ts +18 -1
  2. package/dist/browser/services/registry-broker/client/base-client.d.ts.map +1 -1
  3. package/dist/browser/services/registry-broker/client/guard.d.ts +15 -1
  4. package/dist/browser/services/registry-broker/client/guard.d.ts.map +1 -1
  5. package/dist/browser/services/registry-broker/schemas.d.ts +1705 -173
  6. package/dist/browser/services/registry-broker/schemas.d.ts.map +1 -1
  7. package/dist/browser/services/registry-broker/types.d.ts +32 -1
  8. package/dist/browser/services/registry-broker/types.d.ts.map +1 -1
  9. package/dist/browser/standards-sdk.browser.js +178 -9
  10. package/dist/browser/standards-sdk.browser.js.map +1 -1
  11. package/dist/browser-root/services/registry-broker/client/base-client.d.ts +18 -1
  12. package/dist/browser-root/services/registry-broker/client/base-client.d.ts.map +1 -1
  13. package/dist/browser-root/services/registry-broker/client/guard.d.ts +15 -1
  14. package/dist/browser-root/services/registry-broker/client/guard.d.ts.map +1 -1
  15. package/dist/browser-root/services/registry-broker/schemas.d.ts +1705 -173
  16. package/dist/browser-root/services/registry-broker/schemas.d.ts.map +1 -1
  17. package/dist/browser-root/services/registry-broker/types.d.ts +32 -1
  18. package/dist/browser-root/services/registry-broker/types.d.ts.map +1 -1
  19. package/dist/browser-root/standards-sdk.root-browser.js +682 -71
  20. package/dist/browser-root/standards-sdk.root-browser.js.map +1 -1
  21. package/dist/cjs/services/registry-broker/client/base-client.d.ts +18 -1
  22. package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
  23. package/dist/cjs/services/registry-broker/client/guard.d.ts +15 -1
  24. package/dist/cjs/services/registry-broker/client/guard.d.ts.map +1 -1
  25. package/dist/cjs/services/registry-broker/schemas.d.ts +1705 -173
  26. package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
  27. package/dist/cjs/services/registry-broker/types.d.ts +32 -1
  28. package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
  29. package/dist/cjs/standards-sdk.cjs +1 -1
  30. package/dist/cjs/standards-sdk.cjs.map +1 -1
  31. package/dist/es/services/registry-broker/client/base-client.d.ts +18 -1
  32. package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
  33. package/dist/es/services/registry-broker/client/guard.d.ts +15 -1
  34. package/dist/es/services/registry-broker/client/guard.d.ts.map +1 -1
  35. package/dist/es/services/registry-broker/schemas.d.ts +1705 -173
  36. package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
  37. package/dist/es/services/registry-broker/types.d.ts +32 -1
  38. package/dist/es/services/registry-broker/types.d.ts.map +1 -1
  39. package/dist/es/standards-sdk.es.js +10 -7
  40. package/dist/es/standards-sdk.es.js.map +1 -1
  41. package/dist/es/standards-sdk.es104.js +1 -1
  42. package/dist/es/standards-sdk.es106.js +1 -1
  43. package/dist/es/standards-sdk.es108.js +1 -1
  44. package/dist/es/standards-sdk.es11.js +1 -1
  45. package/dist/es/standards-sdk.es110.js +1 -1
  46. package/dist/es/standards-sdk.es116.js +1 -1
  47. package/dist/es/standards-sdk.es12.js +1 -1
  48. package/dist/es/standards-sdk.es121.js +1 -1
  49. package/dist/es/standards-sdk.es127.js +2 -2
  50. package/dist/es/standards-sdk.es128.js +5 -5
  51. package/dist/es/standards-sdk.es138.js +1 -1
  52. package/dist/es/standards-sdk.es139.js +1 -1
  53. package/dist/es/standards-sdk.es140.js +5 -5
  54. package/dist/es/standards-sdk.es142.js +2 -2
  55. package/dist/es/standards-sdk.es145.js +86 -15
  56. package/dist/es/standards-sdk.es145.js.map +1 -1
  57. package/dist/es/standards-sdk.es147.js +3 -3
  58. package/dist/es/standards-sdk.es148.js +4 -81
  59. package/dist/es/standards-sdk.es148.js.map +1 -1
  60. package/dist/es/standards-sdk.es149.js +71 -77
  61. package/dist/es/standards-sdk.es149.js.map +1 -1
  62. package/dist/es/standards-sdk.es150.js +80 -53
  63. package/dist/es/standards-sdk.es150.js.map +1 -1
  64. package/dist/es/standards-sdk.es151.js +53 -152
  65. package/dist/es/standards-sdk.es151.js.map +1 -1
  66. package/dist/es/standards-sdk.es152.js +159 -7
  67. package/dist/es/standards-sdk.es152.js.map +1 -1
  68. package/dist/es/standards-sdk.es153.js +7 -86
  69. package/dist/es/standards-sdk.es153.js.map +1 -1
  70. package/dist/es/standards-sdk.es154.js +64 -43
  71. package/dist/es/standards-sdk.es154.js.map +1 -1
  72. package/dist/es/standards-sdk.es155.js +65 -30
  73. package/dist/es/standards-sdk.es155.js.map +1 -1
  74. package/dist/es/standards-sdk.es156.js +30 -34
  75. package/dist/es/standards-sdk.es156.js.map +1 -1
  76. package/dist/es/standards-sdk.es157.js +34 -48
  77. package/dist/es/standards-sdk.es157.js.map +1 -1
  78. package/dist/es/standards-sdk.es158.js +48 -138
  79. package/dist/es/standards-sdk.es158.js.map +1 -1
  80. package/dist/es/standards-sdk.es159.js +133 -37
  81. package/dist/es/standards-sdk.es159.js.map +1 -1
  82. package/dist/es/standards-sdk.es16.js +2 -2
  83. package/dist/es/standards-sdk.es160.js +42 -2168
  84. package/dist/es/standards-sdk.es160.js.map +1 -1
  85. package/dist/es/standards-sdk.es162.js +2352 -672
  86. package/dist/es/standards-sdk.es162.js.map +1 -1
  87. package/dist/es/standards-sdk.es163.js +15 -109
  88. package/dist/es/standards-sdk.es163.js.map +1 -1
  89. package/dist/es/standards-sdk.es164.js +96 -58
  90. package/dist/es/standards-sdk.es164.js.map +1 -1
  91. package/dist/es/standards-sdk.es165.js +66 -165
  92. package/dist/es/standards-sdk.es165.js.map +1 -1
  93. package/dist/es/standards-sdk.es166.js +55 -321
  94. package/dist/es/standards-sdk.es166.js.map +1 -1
  95. package/dist/es/standards-sdk.es167.js +71 -336
  96. package/dist/es/standards-sdk.es167.js.map +1 -1
  97. package/dist/es/standards-sdk.es168.js +186 -439
  98. package/dist/es/standards-sdk.es168.js.map +1 -1
  99. package/dist/es/standards-sdk.es169.js +142 -301
  100. package/dist/es/standards-sdk.es169.js.map +1 -1
  101. package/dist/es/standards-sdk.es170.js +310 -64
  102. package/dist/es/standards-sdk.es170.js.map +1 -1
  103. package/dist/es/standards-sdk.es171.js +345 -55
  104. package/dist/es/standards-sdk.es171.js.map +1 -1
  105. package/dist/es/standards-sdk.es172.js +443 -71
  106. package/dist/es/standards-sdk.es172.js.map +1 -1
  107. package/dist/es/standards-sdk.es173.js +315 -184
  108. package/dist/es/standards-sdk.es173.js.map +1 -1
  109. package/dist/es/standards-sdk.es174.js +74 -15
  110. package/dist/es/standards-sdk.es174.js.map +1 -1
  111. package/dist/es/standards-sdk.es175.js +653 -120
  112. package/dist/es/standards-sdk.es175.js.map +1 -1
  113. package/dist/es/standards-sdk.es176.js +111 -303
  114. package/dist/es/standards-sdk.es176.js.map +1 -1
  115. package/dist/es/standards-sdk.es177.js +297 -225
  116. package/dist/es/standards-sdk.es177.js.map +1 -1
  117. package/dist/es/standards-sdk.es178.js +239 -176
  118. package/dist/es/standards-sdk.es178.js.map +1 -1
  119. package/dist/es/standards-sdk.es179.js +178 -101
  120. package/dist/es/standards-sdk.es179.js.map +1 -1
  121. package/dist/es/standards-sdk.es18.js +4 -4
  122. package/dist/es/standards-sdk.es180.js +75 -108
  123. package/dist/es/standards-sdk.es180.js.map +1 -1
  124. package/dist/es/standards-sdk.es181.js +116 -148
  125. package/dist/es/standards-sdk.es181.js.map +1 -1
  126. package/dist/es/standards-sdk.es182.js +146 -264
  127. package/dist/es/standards-sdk.es182.js.map +1 -1
  128. package/dist/es/standards-sdk.es183.js +661 -162
  129. package/dist/es/standards-sdk.es183.js.map +1 -1
  130. package/dist/es/standards-sdk.es184.js +156 -206
  131. package/dist/es/standards-sdk.es184.js.map +1 -1
  132. package/dist/es/standards-sdk.es185.js +219 -223
  133. package/dist/es/standards-sdk.es185.js.map +1 -1
  134. package/dist/es/standards-sdk.es186.js +242 -0
  135. package/dist/es/standards-sdk.es186.js.map +1 -0
  136. package/dist/es/standards-sdk.es19.js +2 -2
  137. package/dist/es/standards-sdk.es22.js +1 -1
  138. package/dist/es/standards-sdk.es27.js +4 -4
  139. package/dist/es/standards-sdk.es35.js +2 -2
  140. package/dist/es/standards-sdk.es36.js +2 -2
  141. package/dist/es/standards-sdk.es4.js +1 -1
  142. package/dist/es/standards-sdk.es53.js +1 -1
  143. package/dist/es/standards-sdk.es56.js +1 -1
  144. package/dist/es/standards-sdk.es59.js +1 -1
  145. package/dist/es/standards-sdk.es60.js +1 -1
  146. package/dist/es/standards-sdk.es62.js +1 -1
  147. package/dist/es/standards-sdk.es63.js +2 -2
  148. package/dist/es/standards-sdk.es64.js +1 -1
  149. package/dist/es/standards-sdk.es65.js +1 -1
  150. package/dist/es/standards-sdk.es66.js +1 -1
  151. package/dist/es/standards-sdk.es67.js +3 -3
  152. package/dist/es/standards-sdk.es69.js +1 -1
  153. package/dist/es/standards-sdk.es7.js +1 -1
  154. package/dist/es/standards-sdk.es71.js +1 -1
  155. package/dist/es/standards-sdk.es72.js +2 -2
  156. package/dist/es/standards-sdk.es75.js +2 -2
  157. package/dist/es/standards-sdk.es76.js +1 -1
  158. package/dist/es/standards-sdk.es78.js +1 -1
  159. package/dist/es/standards-sdk.es83.js +1 -1
  160. package/dist/es/standards-sdk.es84.js +2 -2
  161. package/dist/es/standards-sdk.es85.js +1 -1
  162. package/dist/es/standards-sdk.es88.js +1 -1
  163. package/dist/es/standards-sdk.es90.js +1 -1
  164. package/dist/es/standards-sdk.es94.js +3 -3
  165. package/dist/es/standards-sdk.es98.js +1 -1
  166. package/dist/es/standards-sdk.es99.js +1 -1
  167. package/package.json +1 -1
@@ -6842,10 +6842,14 @@ const guardBucketBalanceSchema = objectType({
6842
6842
  });
6843
6843
  const guardPrincipalSchema = objectType({
6844
6844
  signedIn: booleanType(),
6845
+ principalType: enumType(["user", "service"]).default("user"),
6845
6846
  userId: stringType().optional(),
6846
6847
  email: stringType().optional(),
6847
6848
  accountId: stringType().optional(),
6848
6849
  stripeCustomerId: stringType().optional(),
6850
+ serviceId: stringType().optional(),
6851
+ workspaceId: stringType().optional(),
6852
+ serviceLabel: stringType().optional(),
6849
6853
  roles: arrayType(stringType())
6850
6854
  });
6851
6855
  const guardEntitlementsSchema = objectType({
@@ -6872,6 +6876,65 @@ const guardBalanceResponseSchema = objectType({
6872
6876
  bucketingMode: enumType(["shared-ledger", "product-bucketed"]),
6873
6877
  buckets: arrayType(guardBucketBalanceSchema)
6874
6878
  });
6879
+ const guardFeedItemSchema = objectType({
6880
+ id: stringType(),
6881
+ artifactType: enumType(["skill", "plugin"]),
6882
+ slug: stringType(),
6883
+ name: stringType(),
6884
+ href: stringType(),
6885
+ ecosystem: stringType().optional(),
6886
+ safetyScore: numberType().nullable().optional(),
6887
+ trustScore: numberType().nullable().optional(),
6888
+ verified: booleanType(),
6889
+ recommendation: enumType(["monitor", "review", "block"]),
6890
+ updatedAt: stringType()
6891
+ });
6892
+ const guardFeedSummarySchema = objectType({
6893
+ total: numberType(),
6894
+ monitorCount: numberType(),
6895
+ reviewCount: numberType(),
6896
+ blockCount: numberType()
6897
+ });
6898
+ const guardFeedResponseSchema = objectType({
6899
+ generatedAt: stringType(),
6900
+ items: arrayType(guardFeedItemSchema),
6901
+ summary: guardFeedSummarySchema
6902
+ });
6903
+ const guardIntegrationSchema = objectType({
6904
+ id: enumType(["openclaw", "hermes"]),
6905
+ name: stringType(),
6906
+ status: enumType(["available", "planned"]),
6907
+ href: stringType().nullable(),
6908
+ summary: stringType()
6909
+ });
6910
+ const guardActionItemSchema = objectType({
6911
+ title: stringType(),
6912
+ description: stringType(),
6913
+ href: stringType()
6914
+ });
6915
+ const guardOverviewResponseSchema = objectType({
6916
+ generatedAt: stringType(),
6917
+ principal: guardPrincipalSchema,
6918
+ entitlements: guardEntitlementsSchema,
6919
+ balance: objectType({
6920
+ accountId: stringType(),
6921
+ availableCredits: numberType()
6922
+ }).nullable(),
6923
+ trustFeed: guardFeedResponseSchema,
6924
+ integrations: arrayType(guardIntegrationSchema),
6925
+ actionItems: arrayType(guardActionItemSchema)
6926
+ });
6927
+ const guardPolicySchema = objectType({
6928
+ mode: enumType(["observe", "prompt", "enforce"]),
6929
+ defaultAction: enumType(["allow", "warn", "block"]),
6930
+ unknownPublisherAction: enumType(["review", "block", "allow"]),
6931
+ changedHashAction: enumType(["allow", "warn", "require-reapproval", "block"]),
6932
+ newNetworkDomainAction: enumType(["allow", "warn", "block"]),
6933
+ subprocessAction: enumType(["allow", "warn", "block"]),
6934
+ telemetryEnabled: booleanType(),
6935
+ syncEnabled: booleanType(),
6936
+ updatedAt: stringType()
6937
+ });
6875
6938
  const guardTrustMatchSchema = objectType({
6876
6939
  artifactId: stringType(),
6877
6940
  artifactName: stringType(),
@@ -6907,7 +6970,13 @@ const guardRevocationSchema = objectType({
6907
6970
  artifactName: stringType(),
6908
6971
  reason: stringType(),
6909
6972
  severity: enumType(["low", "medium", "high"]),
6910
- publishedAt: stringType()
6973
+ publishedAt: stringType(),
6974
+ confidence: numberType().optional(),
6975
+ remediation: stringType().nullable().optional(),
6976
+ scope: enumType(["artifact", "publisher", "domain", "workspace", "ecosystem"]).optional(),
6977
+ source: stringType().optional(),
6978
+ firstSeenAt: stringType().optional(),
6979
+ lastUpdatedAt: stringType().optional()
6911
6980
  });
6912
6981
  const guardRevocationResponseSchema = objectType({
6913
6982
  generatedAt: stringType(),
@@ -7001,7 +7070,12 @@ const guardReceiptSyncResponseSchema = objectType({
7001
7070
  syncedAt: stringType(),
7002
7071
  receiptsStored: numberType(),
7003
7072
  inventoryStored: numberType().optional(),
7004
- inventoryDiff: guardInventoryDiffResponseSchema.optional()
7073
+ inventoryDiff: guardInventoryDiffResponseSchema.optional(),
7074
+ advisories: arrayType(guardRevocationSchema).optional(),
7075
+ policy: guardPolicySchema.optional(),
7076
+ alertPreferences: lazyType(() => guardAlertPreferencesSchema).optional(),
7077
+ exceptions: arrayType(lazyType(() => guardExceptionItemSchema)).optional(),
7078
+ teamPolicyPack: lazyType(() => guardTeamPolicyPackSchema).optional()
7005
7079
  });
7006
7080
  const guardInventoryResponseSchema = objectType({
7007
7081
  generatedAt: stringType(),
@@ -7087,6 +7161,59 @@ const guardWatchlistResponseSchema = objectType({
7087
7161
  generatedAt: stringType(),
7088
7162
  items: arrayType(guardWatchlistItemSchema)
7089
7163
  });
7164
+ const guardWatchlistLookupMatchSchema = objectType({
7165
+ artifactId: stringType().nullable(),
7166
+ publisher: stringType().nullable(),
7167
+ domain: stringType().nullable(),
7168
+ source: enumType(["watchlist", "team-policy"]),
7169
+ reason: stringType()
7170
+ });
7171
+ const guardWatchlistLookupResponseSchema = objectType({
7172
+ generatedAt: stringType(),
7173
+ matched: booleanType(),
7174
+ scope: enumType(["artifact", "publisher", "domain", "none"]),
7175
+ item: guardWatchlistLookupMatchSchema.nullable()
7176
+ });
7177
+ const guardPainSignalSchema = objectType({
7178
+ signalId: stringType(),
7179
+ signalName: stringType(),
7180
+ artifactId: stringType(),
7181
+ artifactName: stringType(),
7182
+ artifactType: enumType(["skill", "plugin"]),
7183
+ harness: stringType(),
7184
+ latestSummary: stringType(),
7185
+ firstSeenAt: stringType(),
7186
+ lastSeenAt: stringType(),
7187
+ count: numberType(),
7188
+ source: literalType("scanner"),
7189
+ publisher: stringType().optional()
7190
+ });
7191
+ const guardPainSignalListResponseSchema = objectType({
7192
+ generatedAt: stringType(),
7193
+ items: arrayType(guardPainSignalSchema)
7194
+ });
7195
+ const guardPainSignalAggregateSchema = objectType({
7196
+ artifactId: stringType(),
7197
+ artifactName: stringType(),
7198
+ artifactType: enumType(["skill", "plugin"]),
7199
+ signalName: stringType(),
7200
+ latestSummary: stringType(),
7201
+ firstSeenAt: stringType(),
7202
+ lastSeenAt: stringType(),
7203
+ totalCount: numberType(),
7204
+ consumerCount: numberType(),
7205
+ harnesses: arrayType(stringType()),
7206
+ publishers: arrayType(stringType())
7207
+ });
7208
+ const guardPainSignalAggregateResponseSchema = objectType({
7209
+ generatedAt: stringType(),
7210
+ summary: objectType({
7211
+ totalSignals: numberType(),
7212
+ uniqueArtifacts: numberType(),
7213
+ uniqueConsumers: numberType()
7214
+ }),
7215
+ items: arrayType(guardPainSignalAggregateSchema)
7216
+ });
7090
7217
  const guardExceptionItemSchema = objectType({
7091
7218
  exceptionId: stringType(),
7092
7219
  scope: enumType(["artifact", "publisher", "harness", "global"]),
@@ -7104,6 +7231,45 @@ const guardExceptionListResponseSchema = objectType({
7104
7231
  generatedAt: stringType(),
7105
7232
  items: arrayType(guardExceptionItemSchema)
7106
7233
  });
7234
+ const guardPreflightEvidenceSchema = objectType({
7235
+ category: enumType([
7236
+ "policy",
7237
+ "trust",
7238
+ "watchlist",
7239
+ "team-policy",
7240
+ "exception"
7241
+ ]),
7242
+ source: stringType(),
7243
+ detail: stringType()
7244
+ });
7245
+ objectType({
7246
+ harness: stringType(),
7247
+ artifactName: stringType(),
7248
+ artifactType: enumType(["skill", "plugin"]),
7249
+ artifactId: stringType().optional(),
7250
+ artifactSlug: stringType().optional(),
7251
+ artifactHash: stringType().optional(),
7252
+ publisher: stringType().optional(),
7253
+ domain: stringType().optional(),
7254
+ launchSummary: stringType().optional(),
7255
+ capabilities: arrayType(stringType()).optional(),
7256
+ workspacePath: stringType().optional()
7257
+ });
7258
+ const guardPreflightVerdictResponseSchema = objectType({
7259
+ generatedAt: stringType(),
7260
+ principal: guardPrincipalSchema,
7261
+ decision: enumType(["allow", "review", "block"]),
7262
+ recommendation: enumType(["monitor", "review", "block"]),
7263
+ rationale: stringType(),
7264
+ category: enumType(["exception", "team-policy", "watchlist", "trust", "policy"]).optional(),
7265
+ confidence: numberType().optional(),
7266
+ freshnessTimestamp: stringType().optional(),
7267
+ evidenceSources: arrayType(stringType()).optional(),
7268
+ scope: enumType(["artifact", "publisher", "domain", "policy"]),
7269
+ matchedEvidence: arrayType(guardPreflightEvidenceSchema),
7270
+ matchedException: guardExceptionItemSchema.nullable(),
7271
+ trustMatch: guardTrustMatchSchema.nullable()
7272
+ });
7107
7273
  const guardTeamPolicyAuditItemSchema = objectType({
7108
7274
  changedAt: stringType(),
7109
7275
  actor: stringType(),
@@ -7112,8 +7278,13 @@ const guardTeamPolicyAuditItemSchema = objectType({
7112
7278
  });
7113
7279
  const guardTeamPolicyPackSchema = objectType({
7114
7280
  name: stringType(),
7115
- sharedHarnessDefaults: recordType(stringType(), enumType(["observe", "prompt", "enforce"])),
7281
+ sharedHarnessDefaults: recordType(
7282
+ stringType(),
7283
+ enumType(["observe", "prompt", "enforce"])
7284
+ ),
7116
7285
  allowedPublishers: arrayType(stringType()),
7286
+ blockedPublishers: arrayType(stringType()).optional(),
7287
+ blockedDomains: arrayType(stringType()).optional(),
7117
7288
  blockedArtifacts: arrayType(stringType()),
7118
7289
  alertChannel: enumType(["email", "slack", "teams", "webhook"]),
7119
7290
  updatedAt: stringType(),
@@ -7528,13 +7699,11 @@ const skillDeprecationsResponseSchema = objectType({
7528
7699
  name: stringType(),
7529
7700
  items: arrayType(skillDeprecationRecordSchema)
7530
7701
  }).passthrough();
7531
- const skillSecurityBreakdownFindingSchema = recordType(jsonValueSchema);
7532
- const skillSecurityBreakdownSummarySchema = recordType(jsonValueSchema);
7533
7702
  const skillSecurityBreakdownResponseSchema = objectType({
7534
7703
  jobId: stringType(),
7535
7704
  score: numberType().nullable().optional(),
7536
- findings: arrayType(skillSecurityBreakdownFindingSchema).optional(),
7537
- summary: skillSecurityBreakdownSummarySchema.optional(),
7705
+ findings: arrayType(jsonValueSchema).optional(),
7706
+ summary: jsonValueSchema.optional(),
7538
7707
  generatedAt: stringType().nullable().optional(),
7539
7708
  scannerVersion: stringType().nullable().optional()
7540
7709
  }).passthrough();
@@ -9958,10 +10127,98 @@ async function registerOwnedMoltbookAgent(client, uaid, request) {
9958
10127
  "moltbook owner registration update response"
9959
10128
  );
9960
10129
  }
10130
+ function isStatusError(error) {
10131
+ if (error instanceof RegistryBrokerError) {
10132
+ return true;
10133
+ }
10134
+ if (typeof error !== "object" || error === null || !("status" in error)) {
10135
+ return false;
10136
+ }
10137
+ return typeof Reflect.get(error, "status") === "number";
10138
+ }
10139
+ function toPortalCanonicalGuardPath(path) {
10140
+ const segments = path.split("/");
10141
+ const findPatternStart = (size2, matcher) => {
10142
+ for (let startIndex = segments.length - size2; startIndex >= 0; startIndex -= 1) {
10143
+ if (matcher(startIndex)) {
10144
+ return startIndex;
10145
+ }
10146
+ }
10147
+ return -1;
10148
+ };
10149
+ const replaceAt = (startIndex, consumed) => [
10150
+ ...segments.slice(0, startIndex),
10151
+ "api",
10152
+ "guard",
10153
+ ...segments.slice(startIndex + consumed)
10154
+ ].join("/");
10155
+ const registryStart = findPatternStart(
10156
+ 4,
10157
+ (startIndex) => segments[startIndex] === "registry" && segments[startIndex + 1] === "api" && /^v\d+$/.test(segments[startIndex + 2] ?? "") && segments[startIndex + 3] === "guard"
10158
+ );
10159
+ if (registryStart >= 0) {
10160
+ return replaceAt(registryStart, 4);
10161
+ }
10162
+ const apiVersionStart = findPatternStart(
10163
+ 3,
10164
+ (startIndex) => segments[startIndex] === "api" && /^v\d+$/.test(segments[startIndex + 1] ?? "") && segments[startIndex + 2] === "guard"
10165
+ );
10166
+ if (apiVersionStart >= 0) {
10167
+ return replaceAt(apiVersionStart, 3);
10168
+ }
10169
+ for (let index2 = segments.length - 1; index2 >= 0; index2 -= 1) {
10170
+ if (segments[index2] === "guard" && segments[index2 - 1] !== "api") {
10171
+ return [
10172
+ ...segments.slice(0, index2),
10173
+ "api",
10174
+ "guard",
10175
+ ...segments.slice(index2 + 1)
10176
+ ].join("/");
10177
+ }
10178
+ }
10179
+ return path;
10180
+ }
10181
+ function buildPortalCanonicalGuardUrl(baseUrl, path) {
10182
+ const target = new URL(path, "https://guard.local");
10183
+ const normalizedBasePath = (() => {
10184
+ try {
10185
+ const base = new URL(baseUrl);
10186
+ return base.pathname.replace(/\/+$/, "");
10187
+ } catch {
10188
+ return baseUrl.replace(/\/+$/, "");
10189
+ }
10190
+ })();
10191
+ const requestedPath = `${normalizedBasePath}${target.pathname}`;
10192
+ const canonicalPath = toPortalCanonicalGuardPath(requestedPath);
10193
+ const canonicalRelativePath = `${canonicalPath}${target.search}`;
10194
+ try {
10195
+ const base = new URL(baseUrl);
10196
+ return `${base.origin}${canonicalRelativePath}`;
10197
+ } catch {
10198
+ return canonicalRelativePath;
10199
+ }
10200
+ }
10201
+ async function requestPortalFirstJson(client, path, init) {
10202
+ try {
10203
+ return await client.requestJson(path, init);
10204
+ } catch (error) {
10205
+ if (isStatusError(error) && (error.status === 404 || error.status === 501)) {
10206
+ return client.requestAbsoluteJson(
10207
+ buildPortalCanonicalGuardUrl(client.baseUrl, path),
10208
+ init
10209
+ );
10210
+ }
10211
+ throw error;
10212
+ }
10213
+ }
9961
10214
  async function getGuardSession(client) {
9962
- const raw = await client.requestJson("/guard/auth/session", {
9963
- method: "GET"
9964
- });
10215
+ const raw = await requestPortalFirstJson(
10216
+ client,
10217
+ "/guard/auth/session",
10218
+ {
10219
+ method: "GET"
10220
+ }
10221
+ );
9965
10222
  return client.parseWithSchema(
9966
10223
  raw,
9967
10224
  guardSessionResponseSchema,
@@ -9969,9 +10226,13 @@ async function getGuardSession(client) {
9969
10226
  );
9970
10227
  }
9971
10228
  async function getGuardEntitlements(client) {
9972
- const raw = await client.requestJson("/guard/entitlements", {
9973
- method: "GET"
9974
- });
10229
+ const raw = await requestPortalFirstJson(
10230
+ client,
10231
+ "/guard/entitlements",
10232
+ {
10233
+ method: "GET"
10234
+ }
10235
+ );
9975
10236
  return client.parseWithSchema(
9976
10237
  raw,
9977
10238
  guardSessionResponseSchema,
@@ -9979,21 +10240,60 @@ async function getGuardEntitlements(client) {
9979
10240
  );
9980
10241
  }
9981
10242
  async function getGuardBillingBalance(client) {
9982
- const raw = await client.requestJson("/guard/billing/balance", {
9983
- method: "GET"
9984
- });
10243
+ const raw = await requestPortalFirstJson(
10244
+ client,
10245
+ "/guard/billing/balance",
10246
+ {
10247
+ method: "GET"
10248
+ }
10249
+ );
9985
10250
  return client.parseWithSchema(
9986
10251
  raw,
9987
10252
  guardBalanceResponseSchema,
9988
10253
  "guard billing balance response"
9989
10254
  );
9990
10255
  }
10256
+ async function getGuardFeed(client, limit) {
10257
+ const params = new URLSearchParams();
10258
+ if (typeof limit === "number" && Number.isFinite(limit) && Math.trunc(limit) > 0) {
10259
+ params.set("limit", String(Math.trunc(limit)));
10260
+ }
10261
+ const query = params.toString();
10262
+ const suffix = query ? `?${query}` : "";
10263
+ const raw = await requestPortalFirstJson(
10264
+ client,
10265
+ `/guard/feed${suffix}`,
10266
+ {
10267
+ method: "GET"
10268
+ }
10269
+ );
10270
+ return client.parseWithSchema(
10271
+ raw,
10272
+ guardFeedResponseSchema,
10273
+ "guard feed response"
10274
+ );
10275
+ }
10276
+ async function getGuardOverview(client) {
10277
+ const raw = await requestPortalFirstJson(
10278
+ client,
10279
+ "/guard/overview",
10280
+ {
10281
+ method: "GET"
10282
+ }
10283
+ );
10284
+ return client.parseWithSchema(
10285
+ raw,
10286
+ guardOverviewResponseSchema,
10287
+ "guard overview response"
10288
+ );
10289
+ }
9991
10290
  async function getGuardTrustByHash(client, sha2562) {
9992
10291
  const normalizedHash = sha2562.trim();
9993
10292
  if (!normalizedHash) {
9994
10293
  throw new Error("sha256 is required");
9995
10294
  }
9996
- const raw = await client.requestJson(
10295
+ const raw = await requestPortalFirstJson(
10296
+ client,
9997
10297
  `/guard/trust/by-hash/${encodeURIComponent(normalizedHash)}`,
9998
10298
  { method: "GET" }
9999
10299
  );
@@ -10015,7 +10315,8 @@ async function resolveGuardTrust(client, query) {
10015
10315
  params.set("version", query.version.trim());
10016
10316
  }
10017
10317
  const suffix = params.size > 0 ? `?${params.toString()}` : "";
10018
- const raw = await client.requestJson(
10318
+ const raw = await requestPortalFirstJson(
10319
+ client,
10019
10320
  `/guard/trust/resolve${suffix}`,
10020
10321
  { method: "GET" }
10021
10322
  );
@@ -10026,19 +10327,55 @@ async function resolveGuardTrust(client, query) {
10026
10327
  );
10027
10328
  }
10028
10329
  async function getGuardRevocations(client) {
10029
- const raw = await client.requestJson("/guard/revocations", {
10030
- method: "GET"
10031
- });
10330
+ const raw = await requestPortalFirstJson(
10331
+ client,
10332
+ "/guard/revocations",
10333
+ {
10334
+ method: "GET"
10335
+ }
10336
+ );
10032
10337
  return client.parseWithSchema(
10033
10338
  raw,
10034
10339
  guardRevocationResponseSchema,
10035
10340
  "guard revocations response"
10036
10341
  );
10037
10342
  }
10343
+ async function fetchGuardAdvisories(client) {
10344
+ const raw = await requestPortalFirstJson(
10345
+ client,
10346
+ "/guard/advisories",
10347
+ {
10348
+ method: "GET"
10349
+ }
10350
+ );
10351
+ return client.parseWithSchema(
10352
+ raw,
10353
+ guardRevocationResponseSchema,
10354
+ "guard advisories response"
10355
+ );
10356
+ }
10357
+ async function fetchGuardPolicy(client) {
10358
+ const raw = await requestPortalFirstJson(
10359
+ client,
10360
+ "/guard/policy/fetch",
10361
+ {
10362
+ method: "GET"
10363
+ }
10364
+ );
10365
+ return client.parseWithSchema(
10366
+ raw,
10367
+ guardPolicySchema,
10368
+ "guard policy response"
10369
+ );
10370
+ }
10038
10371
  async function getGuardInventory(client) {
10039
- const raw = await client.requestJson("/guard/inventory", {
10040
- method: "GET"
10041
- });
10372
+ const raw = await requestPortalFirstJson(
10373
+ client,
10374
+ "/guard/inventory",
10375
+ {
10376
+ method: "GET"
10377
+ }
10378
+ );
10042
10379
  return client.parseWithSchema(
10043
10380
  raw,
10044
10381
  guardInventoryResponseSchema,
@@ -10046,9 +10383,13 @@ async function getGuardInventory(client) {
10046
10383
  );
10047
10384
  }
10048
10385
  async function getGuardReceiptHistory(client) {
10049
- const raw = await client.requestJson("/guard/history", {
10050
- method: "GET"
10051
- });
10386
+ const raw = await requestPortalFirstJson(
10387
+ client,
10388
+ "/guard/history",
10389
+ {
10390
+ method: "GET"
10391
+ }
10392
+ );
10052
10393
  return client.parseWithSchema(
10053
10394
  raw,
10054
10395
  guardReceiptHistoryResponseSchema,
@@ -10060,7 +10401,8 @@ async function getGuardArtifactTimeline(client, artifactId) {
10060
10401
  if (!normalizedArtifactId) {
10061
10402
  throw new Error("artifactId is required");
10062
10403
  }
10063
- const raw = await client.requestJson(
10404
+ const raw = await requestPortalFirstJson(
10405
+ client,
10064
10406
  `/guard/history/${encodeURIComponent(normalizedArtifactId)}`,
10065
10407
  { method: "GET" }
10066
10408
  );
@@ -10071,7 +10413,7 @@ async function getGuardArtifactTimeline(client, artifactId) {
10071
10413
  );
10072
10414
  }
10073
10415
  async function exportGuardAbom(client) {
10074
- const raw = await client.requestJson("/guard/abom", {
10416
+ const raw = await requestPortalFirstJson(client, "/guard/abom", {
10075
10417
  method: "GET"
10076
10418
  });
10077
10419
  return client.parseWithSchema(
@@ -10080,10 +10422,30 @@ async function exportGuardAbom(client) {
10080
10422
  "guard abom response"
10081
10423
  );
10082
10424
  }
10425
+ async function exportGuardArtifactAbom(client, artifactId) {
10426
+ const normalizedArtifactId = artifactId.trim();
10427
+ if (!normalizedArtifactId) {
10428
+ throw new Error("artifactId is required");
10429
+ }
10430
+ const raw = await requestPortalFirstJson(
10431
+ client,
10432
+ `/guard/abom/${encodeURIComponent(normalizedArtifactId)}`,
10433
+ { method: "GET" }
10434
+ );
10435
+ return client.parseWithSchema(
10436
+ raw,
10437
+ guardAbomResponseSchema,
10438
+ "guard artifact abom response"
10439
+ );
10440
+ }
10083
10441
  async function exportGuardReceipts(client) {
10084
- const raw = await client.requestJson("/guard/receipts/export", {
10085
- method: "GET"
10086
- });
10442
+ const raw = await requestPortalFirstJson(
10443
+ client,
10444
+ "/guard/receipts/export",
10445
+ {
10446
+ method: "GET"
10447
+ }
10448
+ );
10087
10449
  return client.parseWithSchema(
10088
10450
  raw,
10089
10451
  guardReceiptExportResponseSchema,
@@ -10091,9 +10453,13 @@ async function exportGuardReceipts(client) {
10091
10453
  );
10092
10454
  }
10093
10455
  async function getGuardInventoryDiff(client) {
10094
- const raw = await client.requestJson("/guard/inventory/diff", {
10095
- method: "GET"
10096
- });
10456
+ const raw = await requestPortalFirstJson(
10457
+ client,
10458
+ "/guard/inventory/diff",
10459
+ {
10460
+ method: "GET"
10461
+ }
10462
+ );
10097
10463
  return client.parseWithSchema(
10098
10464
  raw,
10099
10465
  guardInventoryDiffResponseSchema,
@@ -10101,9 +10467,13 @@ async function getGuardInventoryDiff(client) {
10101
10467
  );
10102
10468
  }
10103
10469
  async function getGuardDevices(client) {
10104
- const raw = await client.requestJson("/guard/devices", {
10105
- method: "GET"
10106
- });
10470
+ const raw = await requestPortalFirstJson(
10471
+ client,
10472
+ "/guard/devices",
10473
+ {
10474
+ method: "GET"
10475
+ }
10476
+ );
10107
10477
  return client.parseWithSchema(
10108
10478
  raw,
10109
10479
  guardDeviceListResponseSchema,
@@ -10111,9 +10481,13 @@ async function getGuardDevices(client) {
10111
10481
  );
10112
10482
  }
10113
10483
  async function getGuardAlertPreferences(client) {
10114
- const raw = await client.requestJson("/guard/alerts/preferences", {
10115
- method: "GET"
10116
- });
10484
+ const raw = await requestPortalFirstJson(
10485
+ client,
10486
+ "/guard/alerts/preferences",
10487
+ {
10488
+ method: "GET"
10489
+ }
10490
+ );
10117
10491
  return client.parseWithSchema(
10118
10492
  raw,
10119
10493
  guardAlertPreferencesSchema,
@@ -10121,10 +10495,14 @@ async function getGuardAlertPreferences(client) {
10121
10495
  );
10122
10496
  }
10123
10497
  async function updateGuardAlertPreferences(client, payload) {
10124
- const raw = await client.requestJson("/guard/alerts/preferences", {
10125
- method: "PUT",
10126
- body: payload
10127
- });
10498
+ const raw = await requestPortalFirstJson(
10499
+ client,
10500
+ "/guard/alerts/preferences",
10501
+ {
10502
+ method: "PUT",
10503
+ body: payload
10504
+ }
10505
+ );
10128
10506
  return client.parseWithSchema(
10129
10507
  raw,
10130
10508
  guardAlertPreferencesSchema,
@@ -10132,9 +10510,13 @@ async function updateGuardAlertPreferences(client, payload) {
10132
10510
  );
10133
10511
  }
10134
10512
  async function getGuardExceptions(client) {
10135
- const raw = await client.requestJson("/guard/exceptions", {
10136
- method: "GET"
10137
- });
10513
+ const raw = await requestPortalFirstJson(
10514
+ client,
10515
+ "/guard/exceptions",
10516
+ {
10517
+ method: "GET"
10518
+ }
10519
+ );
10138
10520
  return client.parseWithSchema(
10139
10521
  raw,
10140
10522
  guardExceptionListResponseSchema,
@@ -10142,20 +10524,126 @@ async function getGuardExceptions(client) {
10142
10524
  );
10143
10525
  }
10144
10526
  async function getGuardWatchlist(client) {
10145
- const raw = await client.requestJson("/guard/watchlist", {
10146
- method: "GET"
10147
- });
10527
+ const raw = await requestPortalFirstJson(
10528
+ client,
10529
+ "/guard/watchlist",
10530
+ {
10531
+ method: "GET"
10532
+ }
10533
+ );
10148
10534
  return client.parseWithSchema(
10149
10535
  raw,
10150
10536
  guardWatchlistResponseSchema,
10151
10537
  "guard watchlist response"
10152
10538
  );
10153
10539
  }
10154
- async function addGuardWatchlistItem(client, payload) {
10155
- const raw = await client.requestJson("/guard/watchlist", {
10540
+ async function lookupGuardWatchlist(client, payload) {
10541
+ const raw = await requestPortalFirstJson(
10542
+ client,
10543
+ "/guard/watchlist/lookup",
10544
+ {
10545
+ method: "POST",
10546
+ body: payload
10547
+ }
10548
+ );
10549
+ return client.parseWithSchema(
10550
+ raw,
10551
+ guardWatchlistLookupResponseSchema,
10552
+ "guard watchlist lookup response"
10553
+ );
10554
+ }
10555
+ async function getGuardPainSignals(client) {
10556
+ const raw = await requestPortalFirstJson(
10557
+ client,
10558
+ "/guard/signals/pain",
10559
+ {
10560
+ method: "GET"
10561
+ }
10562
+ );
10563
+ return client.parseWithSchema(
10564
+ raw,
10565
+ guardPainSignalListResponseSchema,
10566
+ "guard pain signals response"
10567
+ );
10568
+ }
10569
+ async function getGuardAggregatedPainSignals(client) {
10570
+ const raw = await requestPortalFirstJson(
10571
+ client,
10572
+ "/guard/signals/pain/aggregate",
10573
+ {
10574
+ method: "GET"
10575
+ }
10576
+ );
10577
+ return client.parseWithSchema(
10578
+ raw,
10579
+ guardPainSignalAggregateResponseSchema,
10580
+ "guard aggregated pain signals response"
10581
+ );
10582
+ }
10583
+ async function getGuardPreflightVerdict(client, path, payload) {
10584
+ const raw = await requestPortalFirstJson(client, path, {
10156
10585
  method: "POST",
10157
10586
  body: payload
10158
10587
  });
10588
+ return client.parseWithSchema(
10589
+ raw,
10590
+ guardPreflightVerdictResponseSchema,
10591
+ "guard preflight verdict response"
10592
+ );
10593
+ }
10594
+ async function getGuardPreInstallVerdict(client, payload) {
10595
+ return getGuardPreflightVerdict(
10596
+ client,
10597
+ "/guard/verdict/pre-install",
10598
+ payload
10599
+ );
10600
+ }
10601
+ async function getGuardPreExecutionVerdict(client, payload) {
10602
+ return getGuardPreflightVerdict(
10603
+ client,
10604
+ "/guard/verdict/pre-execution",
10605
+ payload
10606
+ );
10607
+ }
10608
+ async function ingestGuardPainSignals(client, items) {
10609
+ const raw = await requestPortalFirstJson(
10610
+ client,
10611
+ "/guard/signals/pain",
10612
+ {
10613
+ method: "POST",
10614
+ body: { items }
10615
+ }
10616
+ );
10617
+ return client.parseWithSchema(
10618
+ raw,
10619
+ guardPainSignalListResponseSchema,
10620
+ "guard pain signals response"
10621
+ );
10622
+ }
10623
+ async function submitGuardReceipts(client, payload) {
10624
+ const raw = await requestPortalFirstJson(
10625
+ client,
10626
+ "/guard/receipts/submit",
10627
+ {
10628
+ method: "POST",
10629
+ body: payload
10630
+ }
10631
+ );
10632
+ return client.parseWithSchema(
10633
+ raw,
10634
+ guardReceiptSyncResponseSchema,
10635
+ "guard receipt submit response"
10636
+ );
10637
+ }
10638
+ async function addGuardWatchlistItem(client, payload) {
10639
+ const raw = await requestPortalFirstJson(
10640
+ client,
10641
+ "/guard/watchlist",
10642
+ {
10643
+ method: "POST",
10644
+ body: payload
10645
+ }
10646
+ );
10159
10647
  return client.parseWithSchema(
10160
10648
  raw,
10161
10649
  guardWatchlistResponseSchema,
@@ -10167,7 +10655,8 @@ async function removeGuardWatchlistItem(client, artifactId) {
10167
10655
  if (!normalizedArtifactId) {
10168
10656
  throw new Error("artifactId is required");
10169
10657
  }
10170
- const raw = await client.requestJson(
10658
+ const raw = await requestPortalFirstJson(
10659
+ client,
10171
10660
  `/guard/watchlist/${encodeURIComponent(normalizedArtifactId)}`,
10172
10661
  { method: "DELETE" }
10173
10662
  );
@@ -10178,22 +10667,57 @@ async function removeGuardWatchlistItem(client, artifactId) {
10178
10667
  );
10179
10668
  }
10180
10669
  async function addGuardException(client, payload) {
10181
- const raw = await client.requestJson("/guard/exceptions", {
10182
- method: "POST",
10183
- body: payload
10184
- });
10670
+ const raw = await requestPortalFirstJson(
10671
+ client,
10672
+ "/guard/exceptions",
10673
+ {
10674
+ method: "POST",
10675
+ body: payload
10676
+ }
10677
+ );
10185
10678
  return client.parseWithSchema(
10186
10679
  raw,
10187
10680
  guardExceptionListResponseSchema,
10188
10681
  "guard exceptions response"
10189
10682
  );
10190
10683
  }
10684
+ async function requestGuardException(client, payload) {
10685
+ const raw = await requestPortalFirstJson(
10686
+ client,
10687
+ "/guard/exceptions/request",
10688
+ {
10689
+ method: "POST",
10690
+ body: payload
10691
+ }
10692
+ );
10693
+ return client.parseWithSchema(
10694
+ raw,
10695
+ guardExceptionListResponseSchema,
10696
+ "guard exception request response"
10697
+ );
10698
+ }
10699
+ async function syncGuardInventory(client, payload) {
10700
+ const raw = await requestPortalFirstJson(
10701
+ client,
10702
+ "/guard/inventory/sync",
10703
+ {
10704
+ method: "POST",
10705
+ body: payload
10706
+ }
10707
+ );
10708
+ return client.parseWithSchema(
10709
+ raw,
10710
+ guardReceiptSyncResponseSchema,
10711
+ "guard inventory sync response"
10712
+ );
10713
+ }
10191
10714
  async function removeGuardException(client, exceptionId) {
10192
10715
  const normalizedExceptionId = exceptionId.trim();
10193
10716
  if (!normalizedExceptionId) {
10194
10717
  throw new Error("exceptionId is required");
10195
10718
  }
10196
- const raw = await client.requestJson(
10719
+ const raw = await requestPortalFirstJson(
10720
+ client,
10197
10721
  `/guard/exceptions/${encodeURIComponent(normalizedExceptionId)}`,
10198
10722
  { method: "DELETE" }
10199
10723
  );
@@ -10204,9 +10728,13 @@ async function removeGuardException(client, exceptionId) {
10204
10728
  );
10205
10729
  }
10206
10730
  async function getGuardTeamPolicyPack(client) {
10207
- const raw = await client.requestJson("/guard/team/policy-pack", {
10208
- method: "GET"
10209
- });
10731
+ const raw = await requestPortalFirstJson(
10732
+ client,
10733
+ "/guard/team/policy-pack",
10734
+ {
10735
+ method: "GET"
10736
+ }
10737
+ );
10210
10738
  return client.parseWithSchema(
10211
10739
  raw,
10212
10740
  guardTeamPolicyPackSchema,
@@ -10214,10 +10742,14 @@ async function getGuardTeamPolicyPack(client) {
10214
10742
  );
10215
10743
  }
10216
10744
  async function updateGuardTeamPolicyPack(client, payload) {
10217
- const raw = await client.requestJson("/guard/team/policy-pack", {
10218
- method: "PUT",
10219
- body: payload
10220
- });
10745
+ const raw = await requestPortalFirstJson(
10746
+ client,
10747
+ "/guard/team/policy-pack",
10748
+ {
10749
+ method: "PUT",
10750
+ body: payload
10751
+ }
10752
+ );
10221
10753
  return client.parseWithSchema(
10222
10754
  raw,
10223
10755
  guardTeamPolicyPackSchema,
@@ -10225,10 +10757,14 @@ async function updateGuardTeamPolicyPack(client, payload) {
10225
10757
  );
10226
10758
  }
10227
10759
  async function syncGuardReceipts(client, payload) {
10228
- const raw = await client.requestJson("/guard/receipts/sync", {
10229
- method: "POST",
10230
- body: payload
10231
- });
10760
+ const raw = await requestPortalFirstJson(
10761
+ client,
10762
+ "/guard/receipts/sync",
10763
+ {
10764
+ method: "POST",
10765
+ body: payload
10766
+ }
10767
+ );
10232
10768
  return client.parseWithSchema(
10233
10769
  raw,
10234
10770
  guardReceiptSyncResponseSchema,
@@ -11549,7 +12085,7 @@ class RegistryBrokerClient {
11549
12085
  const normalisedPath = path.startsWith("/") ? path : `/${path}`;
11550
12086
  return `${this.baseUrl}${normalisedPath}`;
11551
12087
  }
11552
- async request(path, config) {
12088
+ buildRequestInit(config) {
11553
12089
  const headers = new Headers();
11554
12090
  Object.entries(this.defaultHeaders).forEach(([key, value]) => {
11555
12091
  headers.set(key, value);
@@ -11575,6 +12111,10 @@ class RegistryBrokerClient {
11575
12111
  headers.set("content-type", "application/json");
11576
12112
  }
11577
12113
  }
12114
+ return init;
12115
+ }
12116
+ async request(path, config) {
12117
+ const init = this.buildRequestInit(config);
11578
12118
  const response = await this.fetchImpl(this.buildUrl(path), init);
11579
12119
  if (response.ok) {
11580
12120
  return response;
@@ -11586,6 +12126,19 @@ class RegistryBrokerClient {
11586
12126
  body: errorBody
11587
12127
  });
11588
12128
  }
12129
+ async requestAbsolute(url, config) {
12130
+ const init = this.buildRequestInit(config);
12131
+ const response = await this.fetchImpl(url, init);
12132
+ if (response.ok) {
12133
+ return response;
12134
+ }
12135
+ const errorBody = await this.extractErrorBody(response);
12136
+ throw new RegistryBrokerError("Registry broker request failed", {
12137
+ status: response.status,
12138
+ statusText: response.statusText,
12139
+ body: errorBody
12140
+ });
12141
+ }
11589
12142
  async requestJson(path, config) {
11590
12143
  const response = await this.request(path, config);
11591
12144
  const contentType = response.headers?.get("content-type") ?? "";
@@ -11598,6 +12151,18 @@ class RegistryBrokerClient {
11598
12151
  }
11599
12152
  return await response.json();
11600
12153
  }
12154
+ async requestAbsoluteJson(url, config) {
12155
+ const response = await this.requestAbsolute(url, config);
12156
+ const contentType = response.headers?.get("content-type") ?? "";
12157
+ if (!JSON_CONTENT_TYPE.test(contentType)) {
12158
+ const body = await response.text();
12159
+ throw new RegistryBrokerParseError(
12160
+ "Expected JSON response from registry broker",
12161
+ body
12162
+ );
12163
+ }
12164
+ return await response.json();
12165
+ }
11601
12166
  async getAgentFeedback(uaid, options = {}) {
11602
12167
  const normalized = uaid.trim();
11603
12168
  if (!normalized) {
@@ -12036,6 +12601,12 @@ class RegistryBrokerClient {
12036
12601
  async getGuardBillingBalance() {
12037
12602
  return getGuardBillingBalance(this);
12038
12603
  }
12604
+ async getGuardFeed(limit) {
12605
+ return getGuardFeed(this, limit);
12606
+ }
12607
+ async getGuardOverview() {
12608
+ return getGuardOverview(this);
12609
+ }
12039
12610
  async getGuardTrustByHash(sha2562) {
12040
12611
  return getGuardTrustByHash(this, sha2562);
12041
12612
  }
@@ -12045,6 +12616,12 @@ class RegistryBrokerClient {
12045
12616
  async getGuardRevocations() {
12046
12617
  return getGuardRevocations(this);
12047
12618
  }
12619
+ async fetchGuardAdvisories() {
12620
+ return fetchGuardAdvisories(this);
12621
+ }
12622
+ async fetchGuardPolicy() {
12623
+ return fetchGuardPolicy(this);
12624
+ }
12048
12625
  async getGuardInventory() {
12049
12626
  return getGuardInventory(this);
12050
12627
  }
@@ -12060,6 +12637,9 @@ class RegistryBrokerClient {
12060
12637
  async exportGuardAbom() {
12061
12638
  return exportGuardAbom(this);
12062
12639
  }
12640
+ async exportGuardArtifactAbom(artifactId) {
12641
+ return exportGuardArtifactAbom(this, artifactId);
12642
+ }
12063
12643
  async exportGuardReceipts() {
12064
12644
  return exportGuardReceipts(this);
12065
12645
  }
@@ -12078,6 +12658,21 @@ class RegistryBrokerClient {
12078
12658
  async getGuardWatchlist() {
12079
12659
  return getGuardWatchlist(this);
12080
12660
  }
12661
+ async lookupGuardWatchlist(payload) {
12662
+ return lookupGuardWatchlist(this, payload);
12663
+ }
12664
+ async getGuardPainSignals() {
12665
+ return getGuardPainSignals(this);
12666
+ }
12667
+ async getGuardAggregatedPainSignals() {
12668
+ return getGuardAggregatedPainSignals(this);
12669
+ }
12670
+ async getGuardPreInstallVerdict(payload) {
12671
+ return getGuardPreInstallVerdict(this, payload);
12672
+ }
12673
+ async getGuardPreExecutionVerdict(payload) {
12674
+ return getGuardPreExecutionVerdict(this, payload);
12675
+ }
12081
12676
  async addGuardWatchlistItem(payload) {
12082
12677
  return addGuardWatchlistItem(this, payload);
12083
12678
  }
@@ -12087,12 +12682,24 @@ class RegistryBrokerClient {
12087
12682
  async addGuardException(payload) {
12088
12683
  return addGuardException(this, payload);
12089
12684
  }
12685
+ async requestGuardException(payload) {
12686
+ return requestGuardException(this, payload);
12687
+ }
12090
12688
  async removeGuardException(exceptionId) {
12091
12689
  return removeGuardException(this, exceptionId);
12092
12690
  }
12691
+ async ingestGuardPainSignals(items) {
12692
+ return ingestGuardPainSignals(this, items);
12693
+ }
12093
12694
  async syncGuardReceipts(payload) {
12094
12695
  return syncGuardReceipts(this, payload);
12095
12696
  }
12697
+ async syncGuardInventory(payload) {
12698
+ return syncGuardInventory(this, payload);
12699
+ }
12700
+ async submitGuardReceipts(payload) {
12701
+ return submitGuardReceipts(this, payload);
12702
+ }
12096
12703
  async getGuardTeamPolicyPack() {
12097
12704
  return getGuardTeamPolicyPack(this);
12098
12705
  }
@@ -12480,6 +13087,8 @@ class RegistryBrokerClient {
12480
13087
  const isPendingRegisterAgentResponse = (response) => response.status === "pending";
12481
13088
  const isPartialRegisterAgentResponse = (response) => response.status === "partial" && response.success === false;
12482
13089
  const isSuccessRegisterAgentResponse = (response) => response.success === true && response.status !== "pending";
13090
+ const GUARD_CANONICAL_PATH_PREFIX = "/api/guard";
13091
+ const GUARD_COMPAT_PATH_PREFIX = "/guard";
12483
13092
  const HOL_CHAT_PROTOCOL_ID = "hol-chat";
12484
13093
  const isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
12485
13094
  const isHolChatOp = (value) => {
@@ -42850,6 +43459,8 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
42850
43459
  traditionalChinese: wordlist
42851
43460
  }, Symbol.toStringTag, { value: "Module" }));
42852
43461
  export {
43462
+ GUARD_CANONICAL_PATH_PREFIX,
43463
+ GUARD_COMPAT_PATH_PREFIX,
42853
43464
  HOL_CHAT_PROTOCOL_ID,
42854
43465
  Logger,
42855
43466
  RegistryBrokerClient,