feat: add reports resource for report generation and download - #15
Merged
Conversation
The community PowerShell module (InforcerCommunity) exposes report
generation (Get-InforcerReportType, Invoke-InforcerReport,
Get-InforcerReportRun, Save-InforcerReportOutput) that this SDK had no
equivalent for. Endpoints confirmed by reading the module's own HTTP
calls, not guessed:
GET /beta/reports/types - type catalog
GET /beta/reports/runs - list runs
POST /beta/reports/runs - queue a run
GET /beta/reports/runs/{id}/outputs - poll (200 terminal, 404 pending)
GET /beta/reports/runs/{id}/outputs/{outputId} - download raw bytes
Adds ReportsResource with types/listRuns/run/outputs/downloadOutput,
and HttpClient.requestBinary for the one endpoint that returns a file
instead of a JSON envelope. run() resolves tenant identifiers the same
flexible way as assessments.run().
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 19, 2026
# [1.1.0](v1.0.0...v1.1.0) (2026-08-19) ### Features * add reports resource for report generation and download ([#15](#15)) ([65a1b1b](65a1b1b))
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
asachs01
added a commit
to WYRE-AI/inforcer-mcp
that referenced
this pull request
Aug 19, 2026
…#26) * feat: add reports domain for cmdlet parity with the PowerShell module The community PowerShell module (InforcerCommunity, github.com/royklo) exposes report generation this server had no equivalent for. Backed by @wyre-technology/node-inforcer@1.1.0's new reports resource (github.com/WYRE-AI/node-inforcer#15), whose endpoints were confirmed by reading the module's own HTTP calls, not guessed. Adds a `reports` domain with 5 tools: - inforcer_reports_types_list, inforcer_reports_runs_list — read-only - inforcer_reports_run — HIGH-IMPACT write, elicitation-confirmed like inforcer_assessments_run; queues reports across one or more tenants - inforcer_reports_run_status — polls a run to terminal - inforcer_reports_download_output — returns file bytes base64-encoded (MCP tools return content, not files, so this replaces the module's Save-InforcerReportOutput disk-write behavior) Not built: Compare-InforcerEnvironments and Export-InforcerTenantDocumentation call no API beyond /beta/baselines (already covered by inforcer_baselines_list) — they're pure PowerShell-side diff/template rendering over data this server already exposes, not new API surface. Building a templating pipeline to match would replicate PowerShell's presentation layer, not close a gap. * refactor: dedup elicitation confirm helper, simplify report-entry mapping /simplify pass on the reports-domain diff: confirmAssessmentRun and confirmReportRun were ~90% identical (elicitInput call shape, schema, accept/decline/cancel handling) — extracted confirmHighImpactAction as the shared primitive. Also drop the conditional spreads building the report-run entry object; JSON.stringify already omits undefined-valued properties, so the plain assignment produces the same wire body.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The community PowerShell module (InforcerCommunity) exposes report generation (
Get-InforcerReportType,Invoke-InforcerReport,Get-InforcerReportRun,Save-InforcerReportOutput) that this SDK had no equivalent for — a gap flagged while bringinginforcer-mcp's tool coverage to parity with it.What changed
Endpoints below were confirmed by reading the PowerShell module's own
Invoke-InforcerApiRequest/Invoke-WebRequestcall sites, not guessed:/beta/reports/types/beta/reports/runs/beta/reports/runs/{id}/outputs/beta/reports/runs/{id}/outputs/{outputId}ReportsResource:types(),listRuns(),run(reports, tenantIds),outputs(runId),downloadOutput(runId, outputId).run()resolves tenant identifiers the same flexible way (resolveTenantId) asassessments.run().outputs()normalizes the API's 200/404 polling contract into{ isTerminal, outputs }by catchingNotFoundErrorinternally — callers don't handle 404 themselves.HttpClient.requestBinary()— the download endpoint returns a file, not a JSON envelope, so it can't go throughHttpClient.request()'s JSON-parsing path. Mirrorsrequest()'s timeout/retry behavior.Compare-InforcerEnvironmentsandExport-InforcerTenantDocumentationcall no API endpoint beyond/beta/baselines(already covered) — they're pure PowerShell-side diff/template rendering over existing data, not new API surface.Testing
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.