Skip to content

feat(cli): nirium report summary/export - thin client for the Reporting node - #266

Merged
Eras256 merged 3 commits into
mainfrom
issue-136-report
Nov 7, 2026
Merged

Eras256 merged 3 commits into
mainfrom
issue-136-report

Conversation

@M0nsxx

@M0nsxx M0nsxx commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds nirium report summary and nirium report export anchors|payments|payroll, thin clients for the Reporting node's GET /api/reporting/summary and GET /api/reporting/export:

nirium report summary --from 2026-10-01 --json
nirium report export anchors --from 2026-10-01 | xargs -n1 nirium verify
  • export anchors prints exactly one CID per line on stdout, nothing else - pipeable straight into nirium verify. The row count and the "not certified regulatory reporting" disclaimer go to stderr so neither ends up in that pipe.
  • --csv <file> writes the server's CSV export to that file instead of printing rows.
  • --json prints the full response (type, period, rowCount, rows, disclaimer); mutually exclusive with --csv.
  • Both subcommands keep and reprint the server's own "not certified regulatory reporting" disclaimer.

Test plan

  • New test/report.test.js (15 cases) against a local HTTP server standing in for the Reporting node: summary JSON/human output, query param forwarding, server-error surfacing; export's CID-only stdout for anchors, the stdout/stderr split, --json, --csv (file write + mutual exclusivity with --json), input validation (bad type, non-positive --limit) before any network call, and query param forwarding.
  • Full suite green: npm test.
  • node --check bin/nirium.js clean.

Closes #136

…ng node

Adds `nirium report summary` and `nirium report export
anchors|payments|payroll` against GET /api/reporting/summary and
GET /api/reporting/export.

`export anchors` prints exactly one CID per line on stdout, pipeable
straight into `nirium verify` (xargs -n1 or a while-read loop); the row
count and the "not certified regulatory reporting" disclaimer print to
stderr so neither lands in that pipe. --csv <file> writes the server's
CSV instead of printing rows; --json prints the full response
(mutually exclusive with --csv).

15 new tests against a local HTTP server standing in for the Reporting
node, full suite green.

Closes #136

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@Eras256 Eras256 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving — clean thin client for the Reporting node's summary/export, export anchors pipes one CID per row straight into verify as intended, keeps the "not certified regulatory reporting" disclaimer. CI green (4/4).

# Conflicts:
#	packages/cli/CHANGELOG.md
#	packages/cli/bin/nirium.js
#	packages/cli/package.json

@Eras256 Eras256 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving - conflict resolution looks correct (interleaved anchor/report blocks in bin/nirium.js, plus package.json/CHANGELOG entries), 91/91 tests pass locally including anchor+report together. CI at 3/4, last check still running, nothing failed - merging once it finishes.

# Conflicts:
#	packages/cli/CHANGELOG.md
#	packages/cli/package.json

@Eras256 Eras256 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving — conflict resolved cleanly (anchor + verify --gateway + report all registered together in bin/nirium.js), 99/99 tests pass locally, CI green (4/4). Merging.

@Eras256
Eras256 merged commit 894164d into main Nov 7, 2026
4 checks passed
@M0nsxx M0nsxx mentioned this pull request Nov 7, 2026
Eras256 pushed a commit that referenced this pull request Nov 7, 2026
…k, report (#263, #268, #265, #266) (#269)

Bumps packages/cli 3.0.1 -> 3.1.0 (new public commands, not a patch) and
dates the Unreleased CHANGELOG section. All four changes are already
merged to main.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

CLI: nirium report, summary and export from the Reporting node

2 participants