@bbradar/mcp 0.3.1 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release notes
2
2
 
3
+ ## 0.3.2 — new Activity data, contest awards and dependency security (2026-11-07)
4
+
5
+ - `find_programs` and `find_hunt_targets` now report the sort direction the API actually applied in `ranking_scope.sort_direction` and `scan.sort_direction`. With no `sort_direction`, the API ranks `first_response` and `time_to_bounty` fastest first (ascending), and these fields previously said `desc`. When the API does not echo a direction, the same rule applies.
6
+ - Fixed Activity, payout, History and analytics results failing in MCP clients that validate structured output against the discovered schema. Those schemas rejected unknown top-level fields, so Status rankings fail validation against an API with `facets` (added 2026-10-13), as do Value pages with `labels` and program payouts with `value_period`. The 21 tools that return one Pro API payload as it is now list these fields and also accept fields the API adds later.
7
+ - `get_activity_rankings` and `get_activity_value` accept `period` (`7d`, `30d` or `90d`) for Value, as the API now does; each period is used only when capabilities advertise it. `24h`, `all_time` and launch cohorts remain local errors. Descriptions cover per-period Value measures and labels, the default landing shortlist named by the page's `labels`, and the 90-day-only signals.
8
+ - `get_program` and `get_program_brief` keep `contest_awards`, the final award allocations of a contest or Huntr challenge, with decimal totals in the contest's own token and a null currency where the platform names none. Pending results stay `null`; other program kinds omit the field. The guide routes finished-contest award questions to `get_program`; a finished contest is readable only there, by exact `platform:handle`, since target reads exclude it. This needs the bbradar-web change that serves awards and finished contests on the API key detail route (`/v1/pro/programs/{program_id}`); before it, the field is absent and finished contests are not found.
9
+ - Updated `@modelcontextprotocol/sdk` to 1.32.2 and `zod` to 4.6.7, fixing the high-severity advisories that failed `npm audit` and the package check (GHSA-22jm-h49p-29qw, GHSA-46jr-4wx8-v453, GHSA-rvq5-wwqv-78pq and GHSA-6prh-2h8m-c8cw in the SDK; GHSA-mrhx-c7xc-m3w5 in zod, which has no 3.x fix), and refreshed patched transitive dependencies (body-parser, fast-uri, hono, `@hono/node-server`, ip-address, qs). Advertised tool fields, defaults and required inputs are unchanged. Zod 4 adds `propertyNames` to record schemas, safe-integer bounds to integers and an RFC 3339 pattern to date-times, and `find_programs.sort_by` stays one flat enum. `updated_since` now rejects date-times without seconds or with an offset lacking its colon, as its `date-time` format always stated.
10
+ - Tool descriptions and the README cover the API's new data: Status `facets`, payout `average_paid` and its sort, Rewards USD display bounds, per-provider Response definitions and windows, program payout facts (`paid_average`, `paid_maximum`, `last_paid_on`, per-severity figures, triage and resolution times, response rate, researcher counts) and `value_period`.
11
+
3
12
  ## 0.3.1 — hunt deadlines and target accuracy (2026-10-13)
4
13
 
5
14
  - Reduced unnecessary upstream target rows for small direct reads while preserving offset/limit semantics and full-page scans for local filters. Added a live STDIO check with fresh prefix comparison and cache diagnostics. Catalog concurrency remains four: smaller-pool trials did not establish a reliable improvement under changing API latency.
package/README.md CHANGED
@@ -116,6 +116,7 @@ Self-Hosted programs use IDs such as `Self-Hosted:program-slug`. They are availa
116
116
 
117
117
  `search_programs` accepts a `search` value and sends it to the API for indexed server-side filtering. Name resolution uses the same path automatically, avoiding broad page scans for exact or partial program names.
118
118
  Use `program_kind: "bounty"`, `"contest"`, or `"challenge"` with `search_programs` or `find_programs` for source-classified program filtering. `find_web3_contests` uses this classification instead of inferring contests from a name or platform.
119
+ `get_program` and `get_program_brief` keep `contest_awards` for a contest or Huntr challenge: the final award allocations its platform publishes (`contest_id`, `currency`, `awarded_total`, `pool_amount`, `awarded_count`, `participants`, `source_url`, `checked_at`, `first_final_at`), or `null` before a final result. Totals are decimal strings in the contest's own token, never USD or a payment record; `currency` is `null` when the platform names none (Huntr). A finished contest with a final result stays readable through `get_program` by exact `platform:handle`, without an opportunity tag; discovery, name resolution and target reads (so also `get_program_brief`) exclude ended contests. The field needs an API whose key-authenticated detail route (`/v1/pro/programs/{program_id}`) serves it; an older API omits it and answers 404 for finished contests.
119
120
  The program catalog now includes confirmed paused platform programs. Raw search preserves `program_status` and `is_active`; ranked discovery excludes paused programs so retained scope and historical rewards cannot be presented as huntable. Exact paused-program reads remain available when explicitly requested.
120
121
 
121
122
  The full tool profile also exposes `search_targets`, a one-request low-level wrapper for reverse search and paginated current target inventory. It supports optional `q`, all API match modes, platform/tag filters, eligibility controls, pages up to the negotiated 500-row limit, and compact or full target output.
@@ -155,7 +156,8 @@ silently replace its period or basis.
155
156
  | `get_activity_change_detail` | One bounded page of an exact Activity event's before/after items |
156
157
 
157
158
  `get_activity_rankings` takes `tab`: `payouts` (reported or tracked, the two bases
158
- kept separate), `value` (frozen Value map and label-specific shortlists),
159
+ kept separate), `value` (frozen Value map and label-specific shortlists for a 7, 30
160
+ or 90-day period),
159
161
  `scope`, `rewards`, `updates`, `reports`, `response`, `status` (lifecycle events;
160
162
  first seen is not a launch date) or `all_changes` (catalog events, including
161
163
  eligible events for departed programs). Each tab accepts only its own inputs:
@@ -176,9 +178,30 @@ An API that does not advertise the filter is told so before any request.
176
178
 
177
179
  Ranking pages omit the capabilities document the API repeats on every page; read it
178
180
  once with `get_activity_capabilities`. When a tab has no enabled default view the
179
- empty page carries that tab's `available_views` instead.
180
-
181
- `tab: "value"` has no period input. With `include_map: true` its `points` cover the
181
+ empty page carries that tab's `available_views` instead. Status pages add `facets`:
182
+ event counts per `change_type` and `current_status` for the period and filters, each
183
+ counted under every other filter but not its own selection, with zero counts omitted.
184
+
185
+ Payout rows also carry `average_paid`: the platform's own current average payment
186
+ (an exact mean, or HackerOne's 45th to 55th percentile range) with its
187
+ `source_label`, `period`, native currency and USD conversion. It is the same in every
188
+ period, and `sort: "average_paid"` ranks it where capabilities advertise it. Rewards
189
+ rows add `minimum_usd`/`maximum_usd` to `before`/`after` at the version's current
190
+ quotes for display; the change percentage still compares native maxima. Response
191
+ cells keep each provider's definition, label and window (`first_response_label`,
192
+ `first_response_window`, `first_response_precision`, `time_to_bounty_window`), and
193
+ duration sorts (`first_response`, `time_to_bounty`) rank fastest first when
194
+ `direction` is omitted.
195
+
196
+ `tab: "value"` takes `period` `7d`, `30d` or `90d`, each only once
197
+ `get_activity_capabilities` advertises it: report volume covers that period, while
198
+ payout per processed report is lifetime. Rows and points carry the period's count and
199
+ percentile in `value`; `signals` keep the lifetime and 90-day figures. Without a
200
+ period, a request naming `labels` or `sort` means 90 days, and a bare request opens
201
+ the advertised default view, which can be a label shortlist: the page's `labels`
202
+ names the list applied (empty for the map's programs). High value, Popular and Low
203
+ per report exist in each period; Pays near top, No payouts seen and processed versus
204
+ received exist only at 90 days. With `include_map: true` its `points` cover the
182
205
  full filtered map population from the same snapshot (up to 5,000); by default the
183
206
  map is replaced by `map_points_omitted` with its count, because thousands of points
184
207
  rarely help a text answer. `rows` are a separately paginated shortlist. Percentiles stay frozen within their original platform cohorts after
@@ -189,8 +212,14 @@ rejected rather than replaced.
189
212
 
190
213
  Rankings and `get_program_payouts` return server-owned `signals`, `labels` and
191
214
  `label_details`, including explanations and destinations. Program detail also
192
- returns `value_points` for same-platform peers when called with `include_map: true`
193
- (otherwise `map_points_omitted` gives their count). “Last payout seen” describes an
215
+ returns `value_points` for same-platform peers in the Value period named by
216
+ `value_period` when called with `include_map: true` (otherwise `map_points_omitted`
217
+ gives their count). Its `facts` also carry each platform's own published figures,
218
+ each with its `measure`, `unit`, `period` and `source_label`: `paid_average`,
219
+ `paid_maximum` and `last_paid_on`, HackerOne's 90-day `paid_average_<severity>` and
220
+ lifetime `severity_reports_<severity>`, triage and resolution times, PatchDay's
221
+ response rate and researcher counts. They are program-detail facts with no Activity
222
+ column or sort; keep each definition rather than comparing platforms as one measure. “Last payout seen” describes an
194
223
  observed counter increase, never a payment date. “Pays near top” is the platform's
195
224
  top-quarter rule: retain the actual amount/percentage in the explanation. Processed
196
225
  vs received can exceed 100% and does not measure response speed. Never recalculate
@@ -238,8 +267,10 @@ Reports and resolved counters support `7d`, `30d`, `90d`, `all_time`, and API-on
238
267
  `24h` where enabled. All-time uses the fresh lifetime counter; it has no Previous
239
268
  or Change. Finite report comparisons retain the same basis within each program;
240
269
  report volume does not establish researcher competition. Scope, Rewards, Updates,
241
- Status and All changes support only `7d`, `30d` and `90d`. Response counts retain
242
- the provider's term; time to bounty measures award timing, not settlement. Label
270
+ Status and All changes support only `7d`, `30d` and `90d`. Response publishes only
271
+ `7d` and `30d` until resolved counters hold 90 days of history; use the periods
272
+ capabilities advertise. Response counts retain the provider's term (resolved,
273
+ accepted, paid or rewarded); time to bounty measures award timing, not settlement. Label
243
274
  filters must come from current capabilities, and unsupported labels remain errors.
244
275
 
245
276
  Use exact `platform:handle` identities for `get_program_payouts`; slash-containing
@@ -248,6 +279,11 @@ definitions and source timestamps remain intact in structured output. Human
248
279
  summaries should show the available numbers and units, keeping internal collection
249
280
  and completeness metadata in the structured result.
250
281
 
282
+ Tools that return one Pro API payload as it is (the Activity, payout, History and
283
+ analytics tools) list its known fields in their output schemas and also accept new
284
+ top-level fields. Clients validate structured results against the schema they
285
+ discovered, so a field the API adds later reaches them instead of failing the call.
286
+
251
287
  `find_programs` and `find_hunt_targets` accept combined Activity predicates
252
288
  (`search_programs` and `get_opportunities` reject them; use `find_programs`, with one
253
289
  `opportunity_levels` entry for a tier). The API applies them together before
@@ -255,7 +291,9 @@ pagination, preserving one global ordering and one stable snapshot. For example,
255
291
  `{"payout_period":"30d","payout_metric":"payout_increase","payout_min":1000,"reports_period":"7d","reports_max":10,"sort_by":"payout_amount","sort_direction":"desc"}`
256
292
  to combine measured payouts in the last 30 days with report activity in the last
257
293
  7 days. Add `snapshot: "start"` on the first page and reuse `meta.snapshot` with
258
- identical filters. The default order remains `updated` descending. Bounds sorts
294
+ identical filters. The default order remains `updated` descending; an omitted
295
+ `sort_direction` for `first_response` or `time_to_bounty` means ascending (fastest
296
+ first), and `ranking_scope.sort_direction` reports the order applied. Bounds sorts
259
297
  require `proven_bounds`: `payout_lower_bound` descends and `payout_upper_bound`
260
298
  ascends. `payout_positive: false` requires an exact observed zero; omit it when
261
299
  both zero and positive payers should qualify.
package/dist/sanitize.js CHANGED
@@ -57,6 +57,7 @@ export function sanitizeProgram(value, webBaseUrl) {
57
57
  competition_risk: readString(value.competitionRisk) ?? readString(value.competition_risk),
58
58
  competition_risk_reason: readString(value.competitionRiskReason) ?? readString(value.competition_risk_reason),
59
59
  submission_cost: value.submission_cost === null ? null : sanitizeSubmissionCost(value.submission_cost),
60
+ contest_awards: sanitizeContestAwards(value.contest_awards, readString(value.program_kind)),
60
61
  payout_summary: sanitizeProPayload(value.payout_summary),
61
62
  activity_summary: sanitizeProPayload(value.activity_summary),
62
63
  activity: sanitizeProPayload(value.activity),
@@ -379,6 +380,42 @@ function sanitizeSubmissionCost(value) {
379
380
  updated_at: value.updated_at === null ? null : readString(value.updated_at)
380
381
  });
381
382
  }
383
+ const CONTEST_AWARD_KINDS = new Set(["contest", "challenge"]);
384
+ const DECIMAL_AMOUNT = /^\d+(?:\.\d+)?$/;
385
+ /**
386
+ * Final award allocations of a finished contest or challenge (Pro detail only).
387
+ * Amounts stay decimal strings in the contest's own token, and a null currency
388
+ * means the platform names none (Huntr), so neither becomes a USD figure. Null
389
+ * on a contest or challenge means no final result yet; other kinds omit it.
390
+ */
391
+ function sanitizeContestAwards(value, programKind) {
392
+ if (value === null) {
393
+ return programKind !== undefined && CONTEST_AWARD_KINDS.has(programKind) ? null : undefined;
394
+ }
395
+ if (!isJsonObject(value)) {
396
+ return undefined;
397
+ }
398
+ const text = (entry) => (entry === null ? null : readString(entry));
399
+ const count = (entry) => (entry === null ? null : readNumber(entry));
400
+ const amount = (entry) => {
401
+ if (entry === null)
402
+ return null;
403
+ const decimal = readString(entry);
404
+ return decimal !== undefined && DECIMAL_AMOUNT.test(decimal) ? decimal : undefined;
405
+ };
406
+ return stripUndefined({
407
+ contest_id: text(value.contest_id),
408
+ currency: text(value.currency),
409
+ awarded_total: amount(value.awarded_total),
410
+ pool_amount: amount(value.pool_amount),
411
+ awarded_count: count(value.awarded_count),
412
+ rows_listed: count(value.rows_listed),
413
+ participants: count(value.participants),
414
+ source_url: text(value.source_url),
415
+ checked_at: text(value.checked_at),
416
+ first_final_at: text(value.first_final_at)
417
+ });
418
+ }
382
419
  function sanitizeTargetCounts(value) {
383
420
  if (!isJsonObject(value)) {
384
421
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../src/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAC;AAE1E,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAC1C,MAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,yBAAyB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,aAAa,GAAG,wBAAwB,CAAC;AAC/C,MAAM,oBAAoB,GAAG,iDAAiD,CAAC;AAC/E,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE3D,MAAM,UAAU,eAAe,CAAC,KAAc,EAAE,UAAkB;IAChE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC1F,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC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E,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAa;IAC7C,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC"}
package/dist/server.js CHANGED
@@ -7,7 +7,7 @@ import { NumericCursorStore } from "./cursorStore.js";
7
7
  import { stableStringify, stripUndefined } from "./json.js";
8
8
  import { FixedWindowRateLimiter } from "./rateLimit.js";
9
9
  import { readArray, readBoolean, readNumber, readObject, readString, sanitizeJson, sanitizeProPayload, sanitizeChange, sanitizeProgram, sanitizeRepositoryChange, sanitizeTarget, sanitizeTargetsForExport } from "./sanitize.js";
10
- const SERVER_VERSION = "0.3.1";
10
+ const SERVER_VERSION = "0.3.2";
11
11
  const MAX_PROGRAMS_PER_SEARCH = 100;
12
12
  const MAX_TARGET_EXPORT = 500;
13
13
  const MAX_RECENT_CHANGES = 100;
@@ -46,7 +46,7 @@ const MAX_IN_MEMORY_FEED_CURSORS = 500;
46
46
  const MAX_RESOLVE_SEARCH_QUERIES = 4;
47
47
  const FAST_RESOLVE_SEARCH_QUERIES = 2;
48
48
  const MAX_DIRECT_HANDLE_RESOLUTION_REQUESTS = 96;
49
- const SDK_VERSION = "1.31.0";
49
+ const SDK_VERSION = "1.32.2";
50
50
  const CORE_TOOL_NAMES = new Set([
51
51
  "search_programs",
52
52
  "get_program",
@@ -294,7 +294,7 @@ const ACTIVITY_SHARED_PARAMS = ["tab", "sort", "direction", "platforms", "tags",
294
294
  // a request so it cannot be silently ignored or reinterpreted.
295
295
  const ACTIVITY_TAB_PARAMS = {
296
296
  payouts: ["period", "basis", "precision"],
297
- value: ["include_map"],
297
+ value: ["period", "include_map"],
298
298
  scope: ["period"],
299
299
  rewards: ["period"],
300
300
  updates: ["period", "category"],
@@ -336,7 +336,7 @@ const activityCatalogInput = {
336
336
  activity_labels: z.array(z.string().min(1).max(64)).max(10).optional(),
337
337
  sort_by: activityCatalogSortSchema.optional(), sort_direction: z.enum(["asc", "desc"]).optional()
338
338
  };
339
- const activityCatalogGuidance = "Give each Activity signal its own period. payout_total requires all_time; payout_increase uses 24h/7d/30d/90d; payout_native_90d requires 90d. change_category requires updates_period even when scope_period is present; scope_period with scope_added_min needs no change_category. Use enabled sort_by/sort_direction combinations; default is updated descending. Tracked no_increase/lower require 30d. Catalog snapshot is 'start' or meta.snapshot, never an Activity snapshot_id. An empty result does not authorize relaxing the user's thresholds or restricting platforms to a recent-feed sample.";
339
+ const activityCatalogGuidance = "Give each Activity signal its own period. payout_total requires all_time; payout_increase uses 24h/7d/30d/90d; payout_native_90d requires 90d. change_category requires updates_period even when scope_period is present; scope_period with scope_added_min needs no change_category. Use enabled sort_by/sort_direction combinations; default is updated descending, and an omitted direction for first_response or time_to_bounty means ascending (fastest first). Tracked no_increase/lower require 30d. Catalog snapshot is 'start' or meta.snapshot, never an Activity snapshot_id. An empty result does not authorize relaxing the user's thresholds or restricting platforms to a recent-feed sample.";
340
340
  const freeSubmissionOnlySchema = z.boolean().default(false).describe("Only programs with no detected submission fee or deposit.");
341
341
  const programIdSchema = z
342
342
  .string()
@@ -348,6 +348,7 @@ const programIdSchema = z
348
348
  message: "program_id cannot contain control characters."
349
349
  })
350
350
  .describe("platform:handle id.");
351
+ const PROGRAM_IDENTIFIER_DESCRIPTION = "BBRadar platform:handle program_id or a human program name/handle. Names are resolved automatically.";
351
352
  const programIdentifierSchema = z
352
353
  .string()
353
354
  .trim()
@@ -356,9 +357,9 @@ const programIdentifierSchema = z
356
357
  .refine((value) => !/[\u0000-\u001F\u007F]/.test(value), {
357
358
  message: "Program identifiers cannot contain control characters."
358
359
  })
359
- .describe("BBRadar platform:handle program_id or a human program name/handle. Names are resolved automatically.");
360
+ .describe(PROGRAM_IDENTIFIER_DESCRIPTION);
360
361
  function jsonRecordSchema() {
361
- return z.record(z.unknown());
362
+ return z.record(z.string(), z.unknown());
362
363
  }
363
364
  function programOutputSchema() {
364
365
  return jsonRecordSchema();
@@ -380,6 +381,13 @@ function apiEnvelopeOutputShape() {
380
381
  error: jsonRecordSchema().optional()
381
382
  };
382
383
  }
384
+ // Tools that return one Pro API payload as it is. The API adds response fields
385
+ // between MCP releases, and clients validate each structured result against the
386
+ // discovered schema: listed fields document the contract, while a new top-level
387
+ // field validates instead of failing every call (the API added Status facets on 2026-10-13).
388
+ function apiMirrorOutput(shape) {
389
+ return z.object(shape).passthrough();
390
+ }
383
391
  function programListOutputShape() {
384
392
  return {
385
393
  ...apiEnvelopeOutputShape(),
@@ -517,8 +525,8 @@ export function createBbradarServer(client, config) {
517
525
  const repositoryChangesPageSizeSchema = z.number().int().min(1).max(maxRepositoryChangesPageSize).default(Math.min(50, maxRepositoryChangesPageSize));
518
526
  const acceptedTargetLimitSchema = z.number().int().min(1).max(maxProgramTargetsPageSize);
519
527
  const targetSearchPageSizeSchema = z.number().int().min(1).max(maxTargetSearchPageSize).default(Math.min(50, maxTargetSearchPageSize));
520
- const historyOutput = { ...apiEnvelopeOutputShape(), changes: z.array(jsonRecordSchema()).optional(), coverage: jsonRecordSchema().optional(), meta: jsonRecordSchema().optional() };
521
- const analyticsOutput = { ...apiEnvelopeOutputShape(), platform: z.string().optional(), program: jsonRecordSchema().optional(), programs: z.array(jsonRecordSchema()).optional(), series: z.array(jsonRecordSchema()).optional(), observations: jsonRecordSchema().optional(), category: z.string().optional(), population: z.string().optional(), ranking_definition: z.string().optional(), inventory_definition: z.string().optional(), meta: jsonRecordSchema().optional() };
528
+ const historyOutput = apiMirrorOutput({ ...apiEnvelopeOutputShape(), changes: z.array(jsonRecordSchema()).optional(), coverage: jsonRecordSchema().optional(), meta: jsonRecordSchema().optional() });
529
+ const analyticsOutput = apiMirrorOutput({ ...apiEnvelopeOutputShape(), platform: z.string().optional(), program: jsonRecordSchema().optional(), programs: z.array(jsonRecordSchema()).optional(), series: z.array(jsonRecordSchema()).optional(), observations: jsonRecordSchema().optional(), category: z.string().optional(), population: z.string().optional(), ranking_definition: z.string().optional(), inventory_definition: z.string().optional(), meta: jsonRecordSchema().optional() });
522
530
  // Published Activity versions are 64 lowercase hex characters. "start" and
523
531
  // catalog snapshot tokens are different contracts and are rejected here.
524
532
  const activitySnapshotSchema = z.string().regex(/^[0-9a-f]{64}$/, "Use a snapshot_id returned by Activity.")
@@ -537,7 +545,7 @@ export function createBbradarServer(client, config) {
537
545
  program_type: z.enum(["paid", "vdp", "unknown"]).optional(),
538
546
  search: z.string().min(1).max(200).optional(),
539
547
  current_status: z.enum(["active", "paused", "suspended", "disabled", "closed", "unavailable", "unknown"]).optional(),
540
- labels: z.array(z.string().min(1).max(64)).max(10).optional().describe("Only labels listed by get_activity_capabilities; others return 422."),
548
+ labels: z.array(z.string().min(1).max(64)).max(10).optional().describe("Only labels listed by get_activity_capabilities (for tab=value, the chosen period view's labels); others return 422."),
541
549
  opportunity_tiers: z.array(opportunityLevelSchema).min(1).max(4).optional().describe("Any of these catalog opportunity tiers, as frozen into the Activity version. get_activity_capabilities lists the tiers present in facets.opportunity_tiers; an API without the filter is rejected before any request."),
542
550
  launched_within: z.enum(["7d", "30d", "90d"]).optional(),
543
551
  category: z.enum(["scope", "rewards", "rules", "program"]).optional(),
@@ -547,19 +555,23 @@ export function createBbradarServer(client, config) {
547
555
  cursor: opaqueCursorSchema.optional(), limit: proLimitSchema.default(25),
548
556
  snapshot: activitySnapshotSchema.optional()
549
557
  };
550
- const activityOutput = {
558
+ const activityOutput = apiMirrorOutput({
551
559
  ...apiEnvelopeOutputShape(), rows: z.array(jsonRecordSchema()).optional(), points: z.array(jsonRecordSchema()).optional(),
552
560
  tab: z.string().optional(), period: z.string().nullable().optional(),
553
561
  basis: z.string().nullable().optional(), precision: z.string().nullable().optional(),
554
562
  sort: z.string().nullable().optional(), direction: z.string().optional(), meta: jsonRecordSchema().optional(),
555
563
  cohort_median: jsonRecordSchema().nullable().optional(), available_views: z.array(jsonRecordSchema()).optional(),
556
- map_points_omitted: z.number().int().optional()
557
- };
564
+ map_points_omitted: z.number().int().optional(),
565
+ // tab=value: the label shortlist applied, including a default landing list (empty = the map's programs).
566
+ labels: z.array(z.string()).optional(),
567
+ // tab=status: event counts per change_type and current_status, each under the other filters.
568
+ facets: jsonRecordSchema().optional()
569
+ });
558
570
  registerTool("get_activity_capabilities", {
559
571
  title: "Get Available Activity Views",
560
572
  description: "Read the exact enabled period, sort, direction, basis and precision combinations before choosing an Activity ranking. Availability is evaluated before user filters; do not infer combinations from independent enums. Honor each view's sort_directions and default_direction and the enabled label list. The snapshot block identifies the published version these capabilities belong to.",
561
573
  inputSchema: z.object({ snapshot: activitySnapshotSchema.optional() }).strict(),
562
- outputSchema: { ...apiEnvelopeOutputShape(), tabs: z.array(jsonRecordSchema()).optional(), version: z.union([z.string(), z.number()]).optional(), facets: jsonRecordSchema().optional(), labels: z.array(z.string()).optional(), listing: jsonRecordSchema().optional(), listing_payouts_enabled: z.boolean().optional(), derived_signals_enabled: z.boolean().optional(), snapshot: jsonRecordSchema().optional() },
574
+ outputSchema: apiMirrorOutput({ ...apiEnvelopeOutputShape(), tabs: z.array(jsonRecordSchema()).optional(), version: z.union([z.string(), z.number()]).optional(), facets: jsonRecordSchema().optional(), labels: z.array(z.string()).optional(), listing: jsonRecordSchema().optional(), listing_payouts_enabled: z.boolean().optional(), derived_signals_enabled: z.boolean().optional(), snapshot: jsonRecordSchema().optional() }),
563
575
  annotations: readOnlyAnnotations
564
576
  }, (args) => runTool("get_activity_capabilities", config, rateLimiter, async () => {
565
577
  assertProFeature(client, "activity_capabilities", "enabled");
@@ -570,7 +582,7 @@ export function createBbradarServer(client, config) {
570
582
  title: "Get Current Activity Version",
571
583
  description: "Read only the identity of the currently published Activity version: snapshot_id, frozen as_of cutoff, expires_at, policy_version and suggested poll_seconds. Pass snapshot_id as snapshot only to get_activity_capabilities, get_activity_rankings and get_program_payouts. Catalog/feed tools such as find_programs use snapshot=start then meta.snapshot instead. as_of is when BBRadar froze its calculation, not a provider payment or update time.",
572
584
  inputSchema: z.object({}).strict(),
573
- outputSchema: { ...apiEnvelopeOutputShape(), snapshot_id: z.string().optional(), as_of: z.string().optional(), expires_at: z.string().optional(), policy_version: z.string().optional(), poll_seconds: z.number().optional() },
585
+ outputSchema: apiMirrorOutput({ ...apiEnvelopeOutputShape(), snapshot_id: z.string().optional(), as_of: z.string().optional(), expires_at: z.string().optional(), policy_version: z.string().optional(), poll_seconds: z.number().optional() }),
574
586
  annotations: readOnlyAnnotations
575
587
  }, () => runTool("get_activity_snapshot", config, rateLimiter, async () => {
576
588
  assertProFeature(client, "activity_snapshot", "enabled");
@@ -583,11 +595,11 @@ export function createBbradarServer(client, config) {
583
595
  }));
584
596
  registerTool("get_program_payouts", {
585
597
  title: "Get Program Payouts and Response Facts",
586
- description: "Read reported totals, measured counter increases, source dates, precision, report and response facts, derived signals and label explanations for one exact platform:handle. Keep null separate from zero, bounds separate from exact amounts and unknown payment dates null. Payout timestamps are when increases were seen, never payment dates. No provider requests are made.",
598
+ description: "Read reported totals, measured counter increases, source dates, precision, report and response facts, derived signals and label explanations for one exact platform:handle. facts also carry each platform's own published figures (paid_average, paid_maximum, last_paid_on, HackerOne per-severity averages and report counts, triage/resolution times, response rate, researcher counts), each with its measure, unit, period and source_label; keep each definition and never compare them across platforms as one measure. Keep null separate from zero, bounds separate from exact amounts and unknown payment dates null. Payout timestamps are when increases were seen, never payment dates. value_points (include_map) are same-platform peers in the Value period named by value_period. No provider requests are made.",
587
599
  inputSchema: z.object({ program_id: programIdSchema, snapshot: activitySnapshotSchema.optional(), include_map: includeMapSchema }).strict(),
588
- // Mirrors the API response, including its version identity: a client that
600
+ // Lists the API response fields, including its version identity: a client that
589
601
  // discovered this schema validates every structured result against it.
590
- outputSchema: { ...apiEnvelopeOutputShape(), program_id: z.string().optional(), program: jsonRecordSchema().optional(), summary: jsonRecordSchema().optional(), as_of: z.string().optional(), snapshot_id: z.string().optional(), expires_at: z.string().nullable().optional(), facts: z.array(jsonRecordSchema()).optional(), windows: jsonRecordSchema().optional(), series: z.array(jsonRecordSchema()).optional(), payout_summary: jsonRecordSchema().nullable().optional(), views: z.array(jsonRecordSchema()).optional(), reports: jsonRecordSchema().optional(), response: jsonRecordSchema().optional(), last_increase_at: z.string().nullable().optional(), signals: jsonRecordSchema().optional(), label_details: z.array(jsonRecordSchema()).optional(), labels: z.array(z.string()).optional(), value_points: z.array(jsonRecordSchema()).optional(), map_points_omitted: z.number().int().optional(), meta: jsonRecordSchema().optional() },
602
+ outputSchema: apiMirrorOutput({ ...apiEnvelopeOutputShape(), program_id: z.string().optional(), program: jsonRecordSchema().optional(), summary: jsonRecordSchema().optional(), as_of: z.string().optional(), snapshot_id: z.string().optional(), expires_at: z.string().nullable().optional(), facts: z.array(jsonRecordSchema()).optional(), windows: jsonRecordSchema().optional(), series: z.array(jsonRecordSchema()).optional(), payout_summary: jsonRecordSchema().nullable().optional(), views: z.array(jsonRecordSchema()).optional(), reports: jsonRecordSchema().optional(), response: jsonRecordSchema().optional(), last_increase_at: z.string().nullable().optional(), signals: jsonRecordSchema().optional(), label_details: z.array(jsonRecordSchema()).optional(), labels: z.array(z.string()).optional(), value_points: z.array(jsonRecordSchema()).optional(), value_period: z.string().nullable().optional(), map_points_omitted: z.number().int().optional(), meta: jsonRecordSchema().optional() }),
591
603
  annotations: readOnlyAnnotations
592
604
  }, (args) => runTool("get_program_payouts", config, rateLimiter, async () => {
593
605
  assertProFeature(client, "program_payouts", "enabled");
@@ -606,7 +618,7 @@ export function createBbradarServer(client, config) {
606
618
  };
607
619
  registerTool("get_activity_rankings", {
608
620
  title: "Get Activity Ranking",
609
- description: "One globally ranked server page of an Activity view, frozen at meta.as_of. Read get_activity_capabilities first: explicit period/basis/precision/sort/direction never fall back, and each tab only accepts its own inputs. tab: payouts (reported and tracked bases stay separate; proven_bounds desc = highest reported minimum, asc = lowest reported maximum, never an exact ranking; source totals can lag); value (fixed lifetime generosity and 90-day volume percentiles, no period; one label gives its shortlist); scope (recorded additions/removals/net, not inventory differences); rewards (net reward-range change, unknown % stays null); updates (active UTC days, change groups); reports (received counts; volume is not competition; all_time is the lifetime counter); response (resolved counts, last resolution, response time; time to bounty is award timing); status (first_seen/paused/resumed/left_listing/returned events); all_changes (chronological events; get_activity_change_detail for before/after). Event tabs use rolling 7d/30d/90d, not calendar months. launched_within applies to reports/response. Payout increases are observed counters, not payment dates. Reuse cursors only with identical inputs. For several signals at once, or with Web2/scope/competition/fee filters, use find_programs or find_hunt_targets.",
621
+ description: "One globally ranked server page of an Activity view, frozen at meta.as_of. Read get_activity_capabilities first: explicit period/basis/precision/sort/direction never fall back, and each tab only accepts its own inputs. tab: payouts (reported and tracked bases stay separate; proven_bounds desc = highest reported minimum, asc = lowest reported maximum, never an exact ranking; source totals can lag; average_paid is the platform's own current average payment, a range for HackerOne); value (advertised period 7d/30d/90d of report volume against lifetime payout per processed report; each row's value holds that period's count and percentile; Pays near top, No payouts seen and processed_received are 90d only; without period, labels or sort mean 90d and a bare read opens the advertised default, whose shortlist the page's labels name; one label gives its shortlist); scope (recorded additions/removals/net, not inventory differences); rewards (net reward-range change comparing native maxima, unknown % stays null; minimum_usd/maximum_usd are display conversions); updates (active UTC days, change groups); reports (received counts; volume is not competition; all_time is the lifetime counter); response (resolved counts, last resolution, response time with each provider's own label and window; time to bounty is award timing; durations default to fastest first); status (first_seen/paused/resumed/left_listing/returned events; facets count events per change_type and current_status); all_changes (chronological events; get_activity_change_detail for before/after). Event tabs use rolling 7d/30d/90d, not calendar months. launched_within applies to reports/response. Payout increases are observed counters, not payment dates. Reuse cursors only with identical inputs. For several signals at once, or with Web2/scope/competition/fee filters, use find_programs or find_hunt_targets.",
610
622
  inputSchema: z.object(activityParams).strict(),
611
623
  outputSchema: activityOutput,
612
624
  annotations: readOnlyAnnotations
@@ -617,14 +629,14 @@ export function createBbradarServer(client, config) {
617
629
  // Single-view aliases for the full profile; each schema exposes only the
618
630
  // inputs its view accepts and shares the ranking tool's request path.
619
631
  const activityDescriptions = {
620
- value: "Discover programs with frozen within-platform value and report-volume percentiles. Generosity is lifetime; volume is 90 days. No period or launch-cohort input applies. Use a label-specific shortlist: Pays near top orders by realization, No payouts seen by received_90d (raw count with its basis; small cohorts remain eligible). Comparative ratio sorts use server percentiles; never recompute after filtering. Preserve label_details explanations and destinations. A counter increase is observed activity, not an individual payment. Map points are returned only with include_map.",
621
- payouts: "Rank payouts using the same server calculation as BBRadar. Last 7 days and last 30 days are rolling windows. Explicit periods never fall back. For high or low payouts lately, use the same enabled tracked-30-day cohort, or separately label a native-90-day cohort. Reported and tracked bases stay separate. With proven_bounds, descending is Highest reported minimum using lower bounds; ascending is Lowest reported maximum using upper bounds. Neither claims an exact ranking. Source totals can be delayed, including Immunefi.",
632
+ value: "Discover programs with frozen within-platform value and report-volume percentiles. Generosity is lifetime payout per processed report; volume covers the selected period: 7d, 30d or 90d, each only when get_activity_capabilities advertises it. Each row's value holds that period's received count, basis and percentile; signals keep the lifetime and 90-day figures. Without period, naming labels or sort means 90d, and a bare read opens the advertised default, which may be a shortlist named in the page's labels. No launch-cohort input applies. High value, Popular and Low per report exist per period; Pays near top (orders by realization), No payouts seen (orders by received_90d, raw count with its basis; small cohorts remain eligible) and processed_received are 90d only. Comparative ratio sorts use server percentiles; never recompute after filtering. Preserve label_details explanations and destinations. A counter increase is observed activity, not an individual payment. Map points are returned only with include_map.",
633
+ payouts: "Rank payouts using the same server calculation as BBRadar. Last 7 days and last 30 days are rolling windows. Explicit periods never fall back. For high or low payouts lately, use the same enabled tracked-30-day cohort, or separately label a native-90-day cohort. Reported and tracked bases stay separate. With proven_bounds, descending is Highest reported minimum using lower bounds; ascending is Lowest reported maximum using upper bounds. Neither claims an exact ranking. Source totals can be delayed, including Immunefi. Rows also carry average_paid, the platform's own current average payment with its source_label, period, native currency and USD conversion (HackerOne publishes a 45th-55th percentile range); it is the same in every period, and sort=average_paid ranks it where advertised.",
622
634
  scope: "Rank recorded scope additions, removals, net movement or largest update; not differences between inventory totals. Periods are rolling 7, 30 or 90 days, not calendar months.",
623
- rewards: "Rank comparable net reward-range changes over rolling 7, 30 or 90 days. Unknown change percentages remain null.",
635
+ rewards: "Rank comparable net reward-range changes over rolling 7, 30 or 90 days. The change percentage compares native maxima; unknown percentages remain null. before/after keep native amounts and add minimum_usd/maximum_usd at the version's current quotes for display (null without a quote).",
624
636
  updates: "Rank active UTC days and recorded change groups over rolling periods. Baselines and internal corrections are excluded.",
625
637
  reports: "Rank received report counts. Each program uses measured lifetime-counter growth where available, otherwise its supported native period. All-time is the current lifetime counter. Previous and change compare like-for-like. Report volume is not competition. Launch cohorts use the canonical launch date; amounts are not reports since launch.",
626
- response: "Rank resolved counter growth or current lifetime counters, last resolution, response duration or time to bounty. Keep the provider's definition: time to bounty is award timing, not payment settlement. Period applies only to resolved counts.",
627
- status: "Read distinct First seen, Paused, Resumed, Left listing and Returned events. Event type and current status are separate filters; never merge events from one program.",
638
+ response: "Rank resolved counter growth or current lifetime counters, last resolution, response duration or time to bounty. Each cell keeps its provider's definition, label and window (for example HackerOne first response over 90 days, YesWeHack's 6-month band, Bugcrowd's 75% validated time); first_response_precision says whether a time is exact, a band bound or approximate. Time to bounty is award timing, not payment settlement. Durations sort fastest first unless a direction is given. Period applies only to resolved counts; use only advertised periods.",
639
+ status: "Read distinct First seen, Paused, Resumed, Left listing and Returned events. Event type and current status are separate filters; never merge events from one program. facets count events per change_type and current_status for the period and filters, each counted without its own selection; offer only options with counts.",
628
640
  all_changes: "Read chronological semantic program changes with event IDs. Fetch get_activity_change_detail lazily for before/after items, including eligible events for programs that left the catalog. Separate events stay separate."
629
641
  };
630
642
  for (const tab of ACTIVITY_TABS) {
@@ -643,7 +655,7 @@ export function createBbradarServer(client, config) {
643
655
  title: "Get Activity Change Detail",
644
656
  description: "Read one bounded page of recorded before/after items for an exact Activity event ID in its source snapshot. Pass meta.snapshot_id from the Activity page. Retained eligible events may describe programs that have left the catalog. Reuse an opaque cursor only with the same event, snapshot and limit.",
645
657
  inputSchema: z.object({ event_id: z.string().min(1).max(128), snapshot: activitySnapshotSchema.describe("meta.snapshot_id from the Activity page that supplied this event."), cursor: opaqueCursorSchema.optional(), limit: proLimitSchema.default(50) }).strict(),
646
- outputSchema: { ...apiEnvelopeOutputShape(), change: jsonRecordSchema().optional(), items: z.array(jsonRecordSchema()).optional(), meta: jsonRecordSchema().optional() }, annotations: readOnlyAnnotations
658
+ outputSchema: apiMirrorOutput({ ...apiEnvelopeOutputShape(), change: jsonRecordSchema().optional(), items: z.array(jsonRecordSchema()).optional(), meta: jsonRecordSchema().optional() }), annotations: readOnlyAnnotations
647
659
  }, (args) => runTool("get_activity_change_detail", config, rateLimiter, async () => {
648
660
  assertProFeature(client, "activity_event_detail", "enabled");
649
661
  return proPage(await client.getActivityChangeDetail(args.event_id, toQuery({ snapshot: args.snapshot, cursor: args.cursor, limit: args.limit })), "items");
@@ -668,7 +680,7 @@ export function createBbradarServer(client, config) {
668
680
  title: "Get History Change Detail",
669
681
  description: "Fetch one semantic History change's paginated before/after items only when needed.",
670
682
  inputSchema: { change_id: z.string().min(1).max(128), cursor: opaqueCursorSchema.optional(), limit: proLimitSchema.default(50) },
671
- outputSchema: { ...apiEnvelopeOutputShape(), change: jsonRecordSchema().optional(), items: z.array(jsonRecordSchema()).optional(), meta: jsonRecordSchema().optional() }, annotations: readOnlyAnnotations
683
+ outputSchema: apiMirrorOutput({ ...apiEnvelopeOutputShape(), change: jsonRecordSchema().optional(), items: z.array(jsonRecordSchema()).optional(), meta: jsonRecordSchema().optional() }), annotations: readOnlyAnnotations
672
684
  }, (args) => runTool("get_history_change_detail", config, rateLimiter, async () => {
673
685
  assertProFeature(client, "history_change_detail");
674
686
  assertHistoryCapture(client);
@@ -688,7 +700,7 @@ export function createBbradarServer(client, config) {
688
700
  title: "Get Exact Program Activity",
689
701
  description: "Read the authoritative activity_summary for one exact program ID.",
690
702
  inputSchema: { program_id: programIdSchema },
691
- outputSchema: { ...apiEnvelopeOutputShape(), program_id: z.string().optional(), activity_summary: jsonRecordSchema().optional() }, annotations: readOnlyAnnotations
703
+ outputSchema: apiMirrorOutput({ ...apiEnvelopeOutputShape(), program_id: z.string().optional(), activity_summary: jsonRecordSchema().optional() }), annotations: readOnlyAnnotations
692
704
  }, (args) => runTool("get_program_activity", config, rateLimiter, async () => {
693
705
  assertProFeature(client, "program_activity");
694
706
  return proPage(await client.getProgramActivity(args.program_id), "activity_summary");
@@ -795,7 +807,7 @@ export function createBbradarServer(client, config) {
795
807
  }));
796
808
  registerTool("get_program", {
797
809
  title: "Get BBRadar Program",
798
- description: "Get one program by platform:handle program_id, handle, or human program name. Names are resolved automatically when unambiguous.",
810
+ description: "Get one program by platform:handle program_id, handle, or human program name. Names are resolved automatically when unambiguous. A contest or Huntr challenge adds contest_awards: its final published award allocations (awarded_total and pool_amount as decimal strings in the contest's own currency token; currency null when the platform names none, as Huntr; never USD or a payment record), or null before a final result. A finished contest with a final result stays readable here by exact platform:handle, without an opportunity tag, although discovery and name resolution exclude ended contests.",
799
811
  inputSchema: {
800
812
  program_id: programIdentifierSchema
801
813
  },
@@ -1440,7 +1452,8 @@ export function createBbradarServer(client, config) {
1440
1452
  min_added_7d: z.number().int().min(0).optional(),
1441
1453
  max_pages: z.number().int().min(1).max(MAX_ACCEPTED_NUMERIC_LIMIT).default(3),
1442
1454
  max_results: z.number().int().min(1).max(MAX_ACCEPTED_NUMERIC_LIMIT).default(10),
1443
- sort_by: z.union([programSortSchema.removeDefault(), activityCatalogSortSchema]).optional(),
1455
+ // One flat enum, as clients have always seen it; a union would advertise anyOf.
1456
+ sort_by: z.enum([...programSortSchema.removeDefault().options, ...activityCatalogSortSchema.options]).optional(),
1444
1457
  include_target_samples: z.boolean().default(false),
1445
1458
  target_sample_programs: z.number().int().min(0).max(MAX_ACCEPTED_NUMERIC_LIMIT).default(3),
1446
1459
  target_sample_size: z.number().int().min(1).max(MAX_ACCEPTED_NUMERIC_LIMIT).default(5),
@@ -2398,6 +2411,7 @@ function bbradarGuide(topic, profile, client) {
2398
2411
  { user_goal: "program payouts, recent reports, response times or Activity rankings", first_tool: "get_activity_capabilities", arguments: {}, then: "Choose an enabled period, sort and direction, then call get_activity_rankings with that tab for one server-ranked page. Do not approximate by paging or re-ranking the catalog." },
2399
2412
  { user_goal: "programs with recent payouts and new scope that also match Web2, competition or fee criteria", first_tool: "find_hunt_targets", arguments: { payout_period: "30d", payout_positive: true, scope_period: "30d", scope_added_min: 1, surface_mode: "web2", free_submission_only: true, ranking_mode: "lowest_competition" }, then: "Use find_programs with the same Activity inputs and competition_risks for program-only results; continue with scan.next_cursor." },
2400
2413
  { user_goal: "payout and report facts for one exact program", first_tool: "get_program_payouts", arguments: { program_id: "Platform:handle" } },
2414
+ { user_goal: "final award results of a finished contest or Huntr challenge", first_tool: "get_program", arguments: { program_id: "Platform:handle" }, then: "Read contest_awards: awarded_total and pool_amount are decimal strings in the contest's own token (currency null when the platform names none); null means no final result yet." },
2401
2415
  { user_goal: "semantic program change history", first_tool: "get_program_history", arguments: { program_id: "Platform:handle" }, then: "Fetch get_history_change_detail only for a selected change." },
2402
2416
  { user_goal: "most active programs in a date range", first_tool: "get_analytics_program_activity", arguments: {}, then: "Use this server-side ranking rather than sampling the program catalog." },
2403
2417
  { user_goal: "exact recorded activity for one program", first_tool: "get_program_activity", arguments: { program_id: "Platform:handle" } },
@@ -2547,6 +2561,7 @@ function coreBbradarGuide(topic, client) {
2547
2561
  { user_goal: "program payouts, recent reports, response times or Activity rankings", first_tool: "get_activity_capabilities", arguments: {}, then: "Read supported view combinations and call get_activity_rankings with that tab. Use get_activity_change_detail lazily for a selected Activity event." },
2548
2562
  { user_goal: "programs with recent payouts and new scope that also match Web2, competition or fee criteria", first_tool: "find_hunt_targets", arguments: { payout_period: "30d", payout_positive: true, scope_period: "30d", scope_added_min: 1, surface_mode: "web2", free_submission_only: true, ranking_mode: "lowest_competition" } },
2549
2563
  { user_goal: "payout and report facts for one exact program", first_tool: "get_program_payouts", arguments: { program_id: "Platform:handle" } },
2564
+ { user_goal: "final award results of a finished contest or Huntr challenge", first_tool: "get_program", arguments: { program_id: "Platform:handle" }, then: "Read contest_awards in the contest's own token; null means no final result yet." },
2550
2565
  { user_goal: "semantic program change history", first_tool: "get_program_history", arguments: { program_id: "Platform:handle" }, then: "Fetch change detail only when needed." },
2551
2566
  { user_goal: "most active programs", first_tool: "get_analytics_program_activity", arguments: {} },
2552
2567
  { user_goal: "exact recorded activity", first_tool: "get_program_activity", arguments: { program_id: "Platform:handle" } },
@@ -6292,6 +6307,7 @@ function compactProgram(program) {
6292
6307
  competition_risk: stringField(program, "competition_risk"),
6293
6308
  competition_risk_reason: stringField(program, "competition_risk_reason"),
6294
6309
  submission_cost: program.submission_cost,
6310
+ contest_awards: program.contest_awards,
6295
6311
  payout_summary: program.payout_summary,
6296
6312
  activity: program.activity,
6297
6313
  activity_summary: program.activity_summary,
@@ -7825,6 +7841,17 @@ function serverCatalogQuery(client, input) {
7825
7841
  vdp_mode: input.vdp_mode, snapshot: input.snapshot }
7826
7842
  };
7827
7843
  }
7844
+ // Durations rank fastest first when no direction is given, as the API does. The
7845
+ // direction the server reports it applied wins, so an older API is labelled
7846
+ // correctly too.
7847
+ const ASCENDING_FIRST_SORTS = new Set(["first_response", "time_to_bounty"]);
7848
+ function appliedSortDirection(input, served) {
7849
+ if (served === "asc" || served === "desc")
7850
+ return served;
7851
+ if (input.sort_direction === "asc" || input.sort_direction === "desc")
7852
+ return input.sort_direction;
7853
+ return ASCENDING_FIRST_SORTS.has(String(input.sort_by ?? "updated")) ? "asc" : "desc";
7854
+ }
7828
7855
  function readServerCatalogPage(client, catalog, page, pageSize, snapshot) {
7829
7856
  const query = toQuery({ ...catalog.query, snapshot, page, page_size: pageSize });
7830
7857
  return catalog.level ? client.getOpportunities(catalog.level, query) : client.listPrograms(query);
@@ -7841,7 +7868,7 @@ async function findServerCatalogPrograms(client, config, input) {
7841
7868
  const mode = input.output_mode === "full" ? "full" : "compact";
7842
7869
  return withApiMetadata(api, {
7843
7870
  programs: readArray(data?.programs).map((program) => formatProgram(sanitizeProgram(program, config.webBaseUrl), mode)),
7844
- ranking_scope: { mode: "server", sort_by: input.sort_by ?? "updated", sort_direction: input.sort_direction ?? "desc" },
7871
+ ranking_scope: { mode: "server", sort_by: input.sort_by ?? "updated", sort_direction: appliedSortDirection(input, readObject(data?.meta)?.sort_direction) },
7845
7872
  meta: sanitizeJson(data?.meta)
7846
7873
  });
7847
7874
  }
@@ -7894,6 +7921,7 @@ async function scanServerCatalog(client, config, input, local, limits) {
7894
7921
  let token = start.t ?? input.snapshot;
7895
7922
  let totalPages;
7896
7923
  let serverTotal;
7924
+ let servedDirection;
7897
7925
  let rowsScanned = 0;
7898
7926
  let pagesRead = 0;
7899
7927
  let restarted = false;
@@ -7952,6 +7980,7 @@ async function scanServerCatalog(client, config, input, local, limits) {
7952
7980
  version ??= pageVersion;
7953
7981
  totalPages = readNumber(meta?.total_pages) ?? totalPages;
7954
7982
  serverTotal = readNumber(meta?.total) ?? serverTotal;
7983
+ servedDirection = meta?.sort_direction ?? servedDirection;
7955
7984
  if (token !== undefined && typeof meta?.snapshot === "string")
7956
7985
  token = meta.snapshot;
7957
7986
  const rows = readArray(data?.programs);
@@ -7987,7 +8016,7 @@ async function scanServerCatalog(client, config, input, local, limits) {
7987
8016
  scan: stripUndefined({
7988
8017
  order: "Server order; local filters only remove programs.",
7989
8018
  sort_by: input.sort_by ?? "updated",
7990
- sort_direction: input.sort_direction ?? "desc",
8019
+ sort_direction: appliedSortDirection(input, servedDirection),
7991
8020
  local_filters: localFilters.length > 0 ? localFilters : undefined,
7992
8021
  server_matches: serverTotal,
7993
8022
  rows_scanned: rowsScanned,
@@ -9055,7 +9084,9 @@ Summarize the program scope:
9055
9084
  title: "Prepare Passive Recon Plan",
9056
9085
  description: "Create a passive-only plan from BBRadar program and target data. Use only when planning is explicitly requested.",
9057
9086
  argsSchema: {
9058
- program_id: programIdentifierSchema.optional(),
9087
+ // Zod 4 keeps a description on the schema it was set on, and prompt
9088
+ // arguments read the outer optional, so describe it again here.
9089
+ program_id: programIdentifierSchema.optional().describe(PROGRAM_IDENTIFIER_DESCRIPTION),
9059
9090
  focus: z.string().optional().describe("Optional focus area such as APIs, domains, mobile, or cloud.")
9060
9091
  }
9061
9092
  }, (args) => promptResult(`Prepare a passive-only plan from BBRadar data. Program id JSON string, if present: ${promptJson(args.program_id ?? "")}.