Skip to content

feat: rr.stats() for /v1/stats platform counters (0.1.8) - #11

Merged
github-actions[bot] merged 1 commit into
mainfrom
agent/v1-stats-method
Jun 27, 2026
Merged

feat: rr.stats() for /v1/stats platform counters (0.1.8)#11
github-actions[bot] merged 1 commit into
mainfrom
agent/v1-stats-method

Conversation

@mik3fly

@mik3fly mik3fly commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What

Adds rr.stats() to the SDK, mirroring the live GET /v1/stats endpoint (platform-wide aggregate counters: tokens scanned, scams detected, deployers mapped, etc.). Real-time for every tier.

  • rr.stats(): Promise<StatsResponse>
  • StatsResponse type (exported from the package root)
  • pinned in api-surface.test.ts + a client.test.ts case
  • README REST-methods table row
  • version bump 0.1.7 -> 0.1.8 (SDK_VERSION + package.json)

Why

The demo (demo.rektradar.io) and docs showcase the SDK; /v1/stats shipped on the API but had no SDK method, so it could not be demoed through the package. This closes that.

Verified

npm run build + npm test clean (22 passed). No lint/em-dash issues.

After merge: push tag v0.1.8 to trigger the npm publish (Trusted Publishing OIDC).

The API exposes GET /v1/stats (platform-wide aggregate counters: tokens
scanned, scams detected, deployers mapped, ...), real-time for every tier.
The SDK had no method for it. Adds:
- rr.stats() -> StatsResponse
- StatsResponse type (exported)
- pins it in api-surface.test.ts + a client.test.ts case
- README REST-methods row
- bump 0.1.7 -> 0.1.8 (SDK_VERSION + package.json)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit 4c92aae into main Jun 27, 2026
2 checks passed
@github-actions
github-actions Bot deleted the agent/v1-stats-method branch June 27, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant