@cdot65/prisma-airs-sdk 0.20.1 → 0.22.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/LICENSE +21 -0
- package/README.md +28 -9
- package/dist/index.cjs +19016 -10272
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50840 -6976
- package/dist/index.d.ts +50840 -6976
- package/dist/index.js +18454 -10272
- package/dist/index.js.map +1 -1
- package/package.json +17 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Calvin Remsburg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -17,6 +17,12 @@ TypeScript SDK for Palo Alto Networks **Prisma AIRS** — covering the full life
|
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
+
Version **0.21.0** includes the September 2026 conformance update. See [SDK-ASSESSMENT.md](SDK-ASSESSMENT.md)
|
|
21
|
+
for validation results and remaining live-service limitations, and the
|
|
22
|
+
[OpenAPI report](docs-site/docs/developer/openapi-conformance.md) for the exact coverage denominator.
|
|
23
|
+
`npm run openapi:check` runs the pinned offline contract suite; `npm run openapi:audit` compares local
|
|
24
|
+
upstream checkouts. All 149 AIRS operations are modeled; this is not a claim of full Portkey runtime support.
|
|
25
|
+
|
|
20
26
|
```bash
|
|
21
27
|
npm install @cdot65/prisma-airs-sdk
|
|
22
28
|
```
|
|
@@ -25,16 +31,23 @@ Requires Node.js 18+. Zero external HTTP dependencies (native `fetch` + `crypto`
|
|
|
25
31
|
|
|
26
32
|
## What's Included
|
|
27
33
|
|
|
28
|
-
| Service
|
|
29
|
-
|
|
|
30
|
-
| **AI Runtime Security**
|
|
31
|
-
| **Management**
|
|
32
|
-
| **Model Security**
|
|
33
|
-
| **AI Gateway**
|
|
34
|
-
| **
|
|
34
|
+
| Service | Client | Auth | Capabilities |
|
|
35
|
+
| ------------------------ | ----------------------------- | ----------- | ---------------------------------------------------------------------- |
|
|
36
|
+
| **AI Runtime Security** | `Scanner` | API Key | Sync/async content scanning, prompt injection detection |
|
|
37
|
+
| **Management** | `ManagementClient` | OAuth2 | Profiles, topics, API keys, apps, DLP, deployment, logs |
|
|
38
|
+
| **Model Security** | `ModelSecurityClient` | OAuth2 | ML model scanning, security groups, rule management |
|
|
39
|
+
| **AI Gateway** | `AIGatewayClient` | OAuth2 | SCM-managed gateway telemetry and configuration |
|
|
40
|
+
| **Gateway runtime** | `AIGatewayInferenceClient` | Gateway key | Chat, Responses, embeddings, bounded SSE and provider resources |
|
|
41
|
+
| **Public model pricing** | `AIGatewayModelPricingClient` | None | Explicit public catalog endpoint; typed rates and unevaluated formulas |
|
|
42
|
+
| **AI Red Teaming** | `RedTeamClient` | OAuth2 | Automated red team scans, reports, targets, custom attacks |
|
|
35
43
|
|
|
36
44
|
All OAuth2 services share credentials and handle token lifecycle automatically (caching, proactive refresh, 401/403 auto-retry).
|
|
37
45
|
|
|
46
|
+
Gateway inference uses an explicitly configured runtime endpoint and `x-portkey-api-key`, with
|
|
47
|
+
zero automatic retries by default. It does not reuse management OAuth credentials.
|
|
48
|
+
See the [runtime inference guide](docs-site/docs/guides/ai-gateway-inference.md) for live results,
|
|
49
|
+
stream cancellation, CLI integration and the remaining experimental operations.
|
|
50
|
+
|
|
38
51
|
## Quick Start
|
|
39
52
|
|
|
40
53
|
```ts
|
|
@@ -80,10 +93,16 @@ and returns the highest revision. `getByName()` returns the highest revision for
|
|
|
80
93
|
|
|
81
94
|
## AI Gateway
|
|
82
95
|
|
|
83
|
-
`AIGatewayClient` covers the SCM-managed Prisma AIRS **AI Gateway**
|
|
96
|
+
`AIGatewayClient` covers the SCM-managed Prisma AIRS **AI Gateway** through 17 SCM sub-clients. The data plane (`/ai_gw/v2`) provides `telemetry`, `workspaces`, `configs`, `guardrails`, `providers`, `apiKeys`, `mcpServers`, `usageLimits`, `rateLimits`, and `logExports`. The admin plane (`/ai_gw/admin/v2`) provides `integrations`, `mcpIntegrations`, `deployments`, `plugins`, `organisations`, `auditLogs`, and `secretReferences`; workspace writes also use the admin plane. The separate `inference` client uses an explicit runtime endpoint/key, not SCM OAuth.
|
|
97
|
+
|
|
98
|
+
Runtime observability uses that same explicit runtime client: `inference.createFeedback()` creates trace feedback, and `inference.createLogs()` accepts a single log or an array and returns the plain-text acknowledgement. These routes are live-verified on Prisma AIRS; SCM denies the corresponding writes. Log/feedback audit records have no deletion API. Experimental `inference.updateFeedback()` and `inference.getLog()` model the confirmed runtime detail routes, but both still return HTTP 500 on owned records because of deployed storage-handler limitations. Their typed contracts are not passing live update/retrieval claims; no storage backend is changed. Log v2 paths require an ISO timestamp with a timezone, and log bodies are omitted from SDK debug output.
|
|
99
|
+
|
|
100
|
+
Experimental runtime methods also model image/audio/moderation/rerank/OCR, legacy completions, prompt completions and prompt rendering. They have independent offline contracts, not successful live certification with the prescribed model and tenant. Prompt parameters belong at the request root, not inside `hyperparameters`; JSON and bounded SSE preserve the declared provider response shapes. These methods remain outside stability guarantees until verified. See the [runtime guide and actual diagnostic output](docs-site/docs/guides/ai-gateway-inference.md).
|
|
101
|
+
|
|
102
|
+
Secret-reference CRUD is verified using owned, unbound synthetic references; external secret resolution is not certified. See the [captured lifecycle output](docs-site/docs/guides/examples.mdx#secret-reference-management-lifecycle). Portkey compatibility remains partial; retired upstream endpoints and tenant-unverified families stay visible in the [complete operation ledger](docs-site/docs/developer/gateway-coverage.md).
|
|
84
103
|
|
|
85
104
|
All AI Gateway write bodies have exported Zod schemas and inferred TypeScript types. Validation
|
|
86
|
-
happens before OAuth and network access;
|
|
105
|
+
happens before OAuth and network access; documented nonempty-update requirements are enforced. The package also
|
|
87
106
|
exports typed routing/provider configuration, deterministic known-value catalogs,
|
|
88
107
|
`buildDottedObject()` / `setDottedValue()` for CLI-style nested settings, and operation-scoped
|
|
89
108
|
secret metadata used by SDK debug redaction.
|