@cdot65/prisma-airs-cli 5.1.0 → 5.3.0

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CreateCustomTopicRequest, CustomTopic as CustomTopic$1, CreateSecurityProfileRequest, ManagementClientOptions, ModelSecurityClientOptions, RedTeamClientOptions, InitOptions, ManagementClient, RedTeamClient, QuotaSummary } from '@cdot65/prisma-airs-sdk';
1
+ import { CreateCustomTopicRequest, CustomTopic as CustomTopic$1, CreateSecurityProfileRequest, ManagementClientOptions, ModelSecurityClientOptions, RedTeamClientOptions, InitOptions, ManagementClient, AIGatewayClient, RedTeamClient, QuotaSummary } from '@cdot65/prisma-airs-sdk';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -1845,9 +1845,6 @@ declare function computeMetrics(results: TestResult[]): EfficacyMetrics;
1845
1845
  /** Compute per-category error breakdown from test results. Sorted by error rate descending. */
1846
1846
  declare function computeCategoryBreakdown(results: TestResult[]): CategoryBreakdown[];
1847
1847
 
1848
- /** Atomically publish a private report without overwriting a file or following a symlink. */
1849
- declare function writeReportFile(path: string, content: string): Promise<void>;
1850
-
1851
1848
  /** Read-only SDK surface needed by the first product report. */
1852
1849
  interface RuntimeReportClient {
1853
1850
  dashboard: Pick<ManagementClient['dashboard'], 'applicationsOverview' | 'sessionsOverview' | 'sessionsChart' | 'topApplicationsViolations' | 'applicationsViolationsTrend'>;
@@ -1857,6 +1854,31 @@ interface RuntimeReportClient {
1857
1854
  type ReportSourceStatus = 'complete' | 'partial' | 'unavailable';
1858
1855
  type ReportPriority = 'attention' | 'review' | 'info';
1859
1856
  type ReportFormat = 'html' | 'markdown';
1857
+ interface EnvironmentReportTable {
1858
+ title: string;
1859
+ note: string;
1860
+ headers: string[];
1861
+ rows: Array<Array<string | number | null>>;
1862
+ }
1863
+ /** Aggregate-only view shared by portable product dashboards. */
1864
+ interface EnvironmentReport {
1865
+ schemaVersion: 1;
1866
+ product: string;
1867
+ title: string;
1868
+ collectionStartedAt: string;
1869
+ generatedAt: string;
1870
+ window: {
1871
+ start: string;
1872
+ end: string;
1873
+ };
1874
+ windowLabel?: string;
1875
+ schemaLabel?: string;
1876
+ health: 'attention' | 'review' | 'no-findings' | 'unknown';
1877
+ sources: ReportSource[];
1878
+ findings: ReportFinding[];
1879
+ tables: EnvironmentReportTable[];
1880
+ limitations: string[];
1881
+ }
1860
1882
  interface ReportSource {
1861
1883
  name: string;
1862
1884
  method: string;
@@ -1970,6 +1992,27 @@ interface RuntimeReportOptions {
1970
1992
  now?: () => Date;
1971
1993
  }
1972
1994
 
1995
+ type GatewayReportClient = Pick<AIGatewayClient, 'telemetry' | 'workspaces' | 'configs' | 'apiKeys' | 'organisations' | 'guardrails'>;
1996
+ interface GatewayReportOptions {
1997
+ workspace: string;
1998
+ tsgId: string;
1999
+ start: Date;
2000
+ end: Date;
2001
+ title?: string;
2002
+ maxPages?: number;
2003
+ now?: () => Date;
2004
+ }
2005
+ /** Collect all 25 supplied read feeds; retain only allowlisted aggregate evidence. */
2006
+ declare function collectGatewayEnvironmentReport(client: GatewayReportClient, options: GatewayReportOptions): Promise<EnvironmentReport>;
2007
+
2008
+ /** Portable Markdown using the same allowlisted evidence as the HTML report. */
2009
+ declare function renderEnvironmentReportMarkdown(r: EnvironmentReport): string;
2010
+ /** Self-contained HTML with hash-based CSP, static inline JS/CSS and no remote resources. */
2011
+ declare function renderEnvironmentReportHtml(r: EnvironmentReport): string;
2012
+
2013
+ /** Atomically publish a private report without overwriting a file or following a symlink. */
2014
+ declare function writeReportFile(path: string, content: string): Promise<void>;
2015
+
1973
2016
  /** Read-only SDK surface; older SDK installations explicitly report quota as unavailable. */
1974
2017
  type RedTeamReportClient = Pick<RedTeamClient, 'getDashboardOverview' | 'getScanStatistics'> & {
1975
2018
  targets: Pick<RedTeamClient['targets'], 'list'>;
@@ -2004,10 +2047,10 @@ interface RedTeamEnvironmentReport {
2004
2047
  /** Collect seven read-only feeds, with explicit source budgets and independent metric windows. */
2005
2048
  declare function collectRedTeamEnvironmentReport(client: RedTeamReportClient, options?: RuntimeReportOptions): Promise<RedTeamEnvironmentReport>;
2006
2049
 
2007
- /** Portable Markdown using the same allowlisted evidence as the HTML dashboard. */
2008
- declare function renderRedTeamReportMarkdown(r: RedTeamEnvironmentReport): string;
2009
- /** Self-contained HTML with hash-based CSP, static inline JS/CSS and no remote resources. */
2010
- declare function renderRedTeamReportHtml(r: RedTeamEnvironmentReport): string;
2050
+ /** Portable Markdown using the same allowlisted evidence as the HTML report. */
2051
+ declare function renderRedTeamReportMarkdown(report: RedTeamEnvironmentReport): string;
2052
+ /** Self-contained HTML with hash-based CSP and no remote resources. */
2053
+ declare function renderRedTeamReportHtml(report: RedTeamEnvironmentReport): string;
2011
2054
 
2012
2055
  /** Render the same evidence model as a portable, inert Markdown deliverable. */
2013
2056
  declare function renderRuntimeReportMarkdown(report: RuntimeDailyReport): string;
@@ -2020,4 +2063,4 @@ declare function renderRuntimeReportHtml(report: RuntimeDailyReport): string;
2020
2063
  */
2021
2064
  declare function collectRuntimeDailyReport(client: RuntimeReportClient, options?: RuntimeReportOptions): Promise<RuntimeDailyReport>;
2022
2065
 
2023
- export { AirsScanService, type AnalysisReport, type ApiKeyInfo, type ApiKeyListResult, type BackupEnvelope, type BackupFormat, type BackupResult, type BatchEntry, type BulkScanAction, type BulkScanResult, type CategoryBreakdown, type ConsumptionAppListEntry, type ConsumptionQueryOptions, type ConsumptionTimeInterval, type CustomTopic, type CustomerAppConsumption, type CustomerAppInfo, type CustomerAppListResult, type DeleteResponse, type DeploymentProfileInfo, type EfficacyMetrics, type EulaContent, type EulaStatus, type IndexedPrompt, type InstanceDetail, type InstanceRequest, type InstanceResponse, type IterationResult, type ManagementService, type ModelSecurityEvaluation, type ModelSecurityFile, type ModelSecurityFileListOptions, type ModelSecurityGroup, type ModelSecurityGroupCreateRequest, type ModelSecurityGroupListOptions, type ModelSecurityGroupUpdateRequest, type ModelSecurityLabel, type ModelSecurityModel, type ModelSecurityModelListOptions, type ModelSecurityModelVersion, type ModelSecurityModelVersionListOptions, type ModelSecurityPyPIAuth, type ModelSecurityRule, type ModelSecurityRuleEditableField, type ModelSecurityRuleInstance, type ModelSecurityRuleInstanceListOptions, type ModelSecurityRuleInstanceUpdateRequest, type ModelSecurityRuleListOptions, type ModelSecurityScan, type ModelSecurityScanListOptions, type ModelSecurityService, type ModelSecurityViolation, type MutationResponse, type PaginationOptions, type PollRetryOptions, type ProfileTopic, type PromptDetail, type PromptSetDetail, type PromptSetService, type PromptSetVersionInfo, type PropertyValueList, type RedTeamAdapterCreateRequest, type RedTeamAdapterDetail, type RedTeamAdapterListItem, type RedTeamAdapterListOptions, type RedTeamAdapterUpdateOverrides, type RedTeamAdapterValidateRequest, type RedTeamAdapterValidationResult, type RedTeamAdapterVar, type RedTeamAttack, type RedTeamCategory, type RedTeamChannel, type RedTeamChannelCreateRequest, type RedTeamChannelListOptions, type RedTeamChannelStats, type RedTeamChannelUpdateRequest, type RedTeamCustomAttack, type RedTeamCustomReport, type RedTeamDynamicReport, type RedTeamEnvironmentReport, type RedTeamErrorLog, type RedTeamJob, type RedTeamLanguages, type RedTeamReportClient, type RedTeamReportTable, type RedTeamService, type RedTeamStaticReport, type RedTeamTarget, type RedTeamTargetCreateRequest, type RedTeamTargetDetail, type RedTeamTargetUpdateRequest, type RegistryCredentials, type ReliableRuntimeService, type ReportApplication, type ReportDailyTelemetry, type ReportFinding, type ReportFormat, type ReportPriority, type ReportProfile, type ReportRegisteredApp, type ReportSessionSummary, type ReportSeverity, type ReportSource, type ReportSourceStatus, type ResourceType, type RestoreResult, type RunState, type RuntimeDailyReport, type RuntimeReportClient, type RuntimeReportOptions, type RuntimeScanResult, type RuntimeService, SDK_ASYNC_BATCH_SIZE, type ScanLogQueryOptions, type ScanLogQueryResult, type ScanResult, type ScanService, SdkManagementService, SdkModelSecurityService, SdkPromptSetService, SdkRedTeamService, SdkRuntimeService, type SecurityProfileInfo, type SecurityProfileListResult, type SubmittedBatch, type TargetAuthValidationRequest, type TargetAuthValidationResult, type TargetOperationOptions, type TestCase, type TestResult, type UserInput, type ValidationError, collectRedTeamEnvironmentReport, collectRuntimeDailyReport, computeCategoryBreakdown, computeMetrics, loadConfig, readBackupDir, readBackupFile, renderRedTeamReportHtml, renderRedTeamReportMarkdown, renderRuntimeReportHtml, renderRuntimeReportMarkdown, resolveOutputDir, sanitizeFilename, validateDescription, validateExamples, validateName, validateTopic, writeBackupFile, writeReportFile };
2066
+ export { AirsScanService, type AnalysisReport, type ApiKeyInfo, type ApiKeyListResult, type BackupEnvelope, type BackupFormat, type BackupResult, type BatchEntry, type BulkScanAction, type BulkScanResult, type CategoryBreakdown, type ConsumptionAppListEntry, type ConsumptionQueryOptions, type ConsumptionTimeInterval, type CustomTopic, type CustomerAppConsumption, type CustomerAppInfo, type CustomerAppListResult, type DeleteResponse, type DeploymentProfileInfo, type EfficacyMetrics, type EnvironmentReport, type EnvironmentReportTable, type EulaContent, type EulaStatus, type GatewayReportClient, type GatewayReportOptions, type IndexedPrompt, type InstanceDetail, type InstanceRequest, type InstanceResponse, type IterationResult, type ManagementService, type ModelSecurityEvaluation, type ModelSecurityFile, type ModelSecurityFileListOptions, type ModelSecurityGroup, type ModelSecurityGroupCreateRequest, type ModelSecurityGroupListOptions, type ModelSecurityGroupUpdateRequest, type ModelSecurityLabel, type ModelSecurityModel, type ModelSecurityModelListOptions, type ModelSecurityModelVersion, type ModelSecurityModelVersionListOptions, type ModelSecurityPyPIAuth, type ModelSecurityRule, type ModelSecurityRuleEditableField, type ModelSecurityRuleInstance, type ModelSecurityRuleInstanceListOptions, type ModelSecurityRuleInstanceUpdateRequest, type ModelSecurityRuleListOptions, type ModelSecurityScan, type ModelSecurityScanListOptions, type ModelSecurityService, type ModelSecurityViolation, type MutationResponse, type PaginationOptions, type PollRetryOptions, type ProfileTopic, type PromptDetail, type PromptSetDetail, type PromptSetService, type PromptSetVersionInfo, type PropertyValueList, type RedTeamAdapterCreateRequest, type RedTeamAdapterDetail, type RedTeamAdapterListItem, type RedTeamAdapterListOptions, type RedTeamAdapterUpdateOverrides, type RedTeamAdapterValidateRequest, type RedTeamAdapterValidationResult, type RedTeamAdapterVar, type RedTeamAttack, type RedTeamCategory, type RedTeamChannel, type RedTeamChannelCreateRequest, type RedTeamChannelListOptions, type RedTeamChannelStats, type RedTeamChannelUpdateRequest, type RedTeamCustomAttack, type RedTeamCustomReport, type RedTeamDynamicReport, type RedTeamEnvironmentReport, type RedTeamErrorLog, type RedTeamJob, type RedTeamLanguages, type RedTeamReportClient, type RedTeamReportTable, type RedTeamService, type RedTeamStaticReport, type RedTeamTarget, type RedTeamTargetCreateRequest, type RedTeamTargetDetail, type RedTeamTargetUpdateRequest, type RegistryCredentials, type ReliableRuntimeService, type ReportApplication, type ReportDailyTelemetry, type ReportFinding, type ReportFormat, type ReportPriority, type ReportProfile, type ReportRegisteredApp, type ReportSessionSummary, type ReportSeverity, type ReportSource, type ReportSourceStatus, type ResourceType, type RestoreResult, type RunState, type RuntimeDailyReport, type RuntimeReportClient, type RuntimeReportOptions, type RuntimeScanResult, type RuntimeService, SDK_ASYNC_BATCH_SIZE, type ScanLogQueryOptions, type ScanLogQueryResult, type ScanResult, type ScanService, SdkManagementService, SdkModelSecurityService, SdkPromptSetService, SdkRedTeamService, SdkRuntimeService, type SecurityProfileInfo, type SecurityProfileListResult, type SubmittedBatch, type TargetAuthValidationRequest, type TargetAuthValidationResult, type TargetOperationOptions, type TestCase, type TestResult, type UserInput, type ValidationError, collectGatewayEnvironmentReport, collectRedTeamEnvironmentReport, collectRuntimeDailyReport, computeCategoryBreakdown, computeMetrics, loadConfig, readBackupDir, readBackupFile, renderEnvironmentReportHtml, renderEnvironmentReportMarkdown, renderRedTeamReportHtml, renderRedTeamReportMarkdown, renderRuntimeReportHtml, renderRuntimeReportMarkdown, resolveOutputDir, sanitizeFilename, validateDescription, validateExamples, validateName, validateTopic, writeBackupFile, writeReportFile };
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  SdkPromptSetService,
7
7
  SdkRedTeamService,
8
8
  SdkRuntimeService,
9
+ collectGatewayEnvironmentReport,
9
10
  collectRedTeamEnvironmentReport,
10
11
  collectRuntimeDailyReport,
11
12
  computeCategoryBreakdown,
@@ -13,6 +14,8 @@ import {
13
14
  loadConfig,
14
15
  readBackupDir,
15
16
  readBackupFile,
17
+ renderEnvironmentReportHtml,
18
+ renderEnvironmentReportMarkdown,
16
19
  renderRedTeamReportHtml,
17
20
  renderRedTeamReportMarkdown,
18
21
  renderRuntimeReportHtml,
@@ -25,7 +28,7 @@ import {
25
28
  validateTopic,
26
29
  writeBackupFile,
27
30
  writeReportFile
28
- } from "./chunk-DR6MZG4E.js";
31
+ } from "./chunk-7Z76VCB3.js";
29
32
  export {
30
33
  AirsScanService,
31
34
  SDK_ASYNC_BATCH_SIZE,
@@ -34,6 +37,7 @@ export {
34
37
  SdkPromptSetService,
35
38
  SdkRedTeamService,
36
39
  SdkRuntimeService,
40
+ collectGatewayEnvironmentReport,
37
41
  collectRedTeamEnvironmentReport,
38
42
  collectRuntimeDailyReport,
39
43
  computeCategoryBreakdown,
@@ -41,6 +45,8 @@ export {
41
45
  loadConfig,
42
46
  readBackupDir,
43
47
  readBackupFile,
48
+ renderEnvironmentReportHtml,
49
+ renderEnvironmentReportMarkdown,
44
50
  renderRedTeamReportHtml,
45
51
  renderRedTeamReportMarkdown,
46
52
  renderRuntimeReportHtml,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cdot65/prisma-airs-cli",
3
3
  "packageManager": "pnpm@10.6.5",
4
- "version": "5.1.0",
4
+ "version": "5.3.0",
5
5
  "description": "CLI and library for Palo Alto Prisma AIRS — guardrail refinement, AI red teaming, model security scanning, profile audits",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "license": "MIT",
61
61
  "dependencies": {
62
- "@cdot65/prisma-airs-sdk": "0.27.0",
62
+ "@cdot65/prisma-airs-sdk": "0.28.0",
63
63
  "@inquirer/prompts": "^8.3.0",
64
64
  "chalk": "^5.6.2",
65
65
  "commander": "^14.0.3",