Skip to content

feat(usage): expose analytics reads and period comparison example - #41

Merged
ImLunaHey merged 5 commits into
mainfrom
luna/dep-7658-usage
Nov 4, 2026
Merged

ImLunaHey merged 5 commits into
mainfrom
luna/dep-7658-usage

Conversation

@ImLunaHey

@ImLunaHey ImLunaHey commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Exposes depot.core.v1.UsageAnalyticsService from both SDK module formats and adds a paginated period-comparison example.

node examples/usage-compare.mjs 2026-10-01T00:00:00Z 2026-10-08T00:00:00Z 2026-10-15T00:00:00Z owner/repo
  • Preserves filters, page tokens, coverage metadata, and bigint counts through Connect.
  • Comparison matches repository/workflow keys, includes new/removed/unattributed usage, and reports vCPU-minute deltas.
  • Uses the existing buf generate buf.build/depot/api command to generate from the latest published contract. Current generated output matches revision 5e103f054acb4b5294b74c6a3797b274 from feat(usage): define public usage analytics contract proto#63. Includes the complete generated module at that revision (build, GitHub Actions, usage, billing, and credits bindings); the new client surface in this PR is UsageAnalyticsService.
  • No copied schema or special usage generator.

Proto prerequisite depot/proto#63 is merged and published. Merge and publish this SDK next, then bump the API's package dependency in https://github.com/depot/api/pull/6555. Client calls require the API deployment; publishing the client does not. npm currently serves 2.2.0; repository version 2.3.0 has not been published.

Validation: 107 tests, including ESM/CommonJS HTTP/2 contract tests and a subprocess comparison over multiple pages; build, type check, formatting, and unchanged generated output from the canonical source.

Refs DEP-7658.

@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

DEP-7658

@ImLunaHey
ImLunaHey marked this pull request as ready for review November 4, 2026 12:37

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium. Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped; remaining signals and the approval threshold do not require withholding approval.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@ImLunaHey
ImLunaHey merged commit e44ef98 into main Nov 4, 2026
3 checks passed
@ImLunaHey
ImLunaHey deleted the luna/dep-7658-usage branch November 4, 2026 12:40
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