agentgate-runtime-control 2.13.8

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/LICENSE +21 -0
  3. package/README.md +534 -0
  4. package/SECURITY.md +19 -0
  5. package/bin/agentgate.js +303 -0
  6. package/docs/case-study-technical-validation.md +25 -0
  7. package/docs/case-study-template.md +37 -0
  8. package/docs/data-protection.md +49 -0
  9. package/docs/design-partner-checklist.md +32 -0
  10. package/docs/design-partner-kit.md +51 -0
  11. package/docs/design-partner-rollout.md +35 -0
  12. package/docs/design-partner.md +67 -0
  13. package/docs/external-security-review-test-pack.md +132 -0
  14. package/docs/external-security-review.md +33 -0
  15. package/docs/incident-response.md +54 -0
  16. package/docs/integration-matrix.md +17 -0
  17. package/docs/managed-postgres-acceptance-test.md +138 -0
  18. package/docs/marketing-plan.md +33 -0
  19. package/docs/observability-alerting.md +44 -0
  20. package/docs/outreach.md +26 -0
  21. package/docs/partner-intake-template.md +26 -0
  22. package/docs/performance-baseline.md +23 -0
  23. package/docs/performance.md +27 -0
  24. package/docs/pricing.md +53 -0
  25. package/docs/production-deployment.md +70 -0
  26. package/docs/production-quickstart.md +58 -0
  27. package/docs/production-readiness.md +29 -0
  28. package/docs/quickstart.md +115 -0
  29. package/docs/release-checklist.md +33 -0
  30. package/docs/security-hardening-release-report.md +69 -0
  31. package/docs/threat-model.md +47 -0
  32. package/docs/website-copy.md +44 -0
  33. package/examples/basic.mjs +14 -0
  34. package/examples/control-plane.mjs +17 -0
  35. package/examples/design-partner-refund.mjs +33 -0
  36. package/examples/design-partner-shadow.mjs +27 -0
  37. package/examples/mcp-gateway.mjs +26 -0
  38. package/examples/policy-bundle.mjs +18 -0
  39. package/examples/refund-agent.mjs +20 -0
  40. package/examples/runtime.mjs +12 -0
  41. package/package.json +49 -0
  42. package/schema/postgres.sql +17 -0
  43. package/src/admin-rbac.js +3 -0
  44. package/src/agentgate.js +85 -0
  45. package/src/approval.js +30 -0
  46. package/src/attack-lab.js +94 -0
  47. package/src/auth.js +27 -0
  48. package/src/behavior.js +146 -0
  49. package/src/control-plane.js +215 -0
  50. package/src/egress-guard.js +132 -0
  51. package/src/event-bus.js +10 -0
  52. package/src/identity.js +109 -0
  53. package/src/index.js +44 -0
  54. package/src/local-experience.js +46 -0
  55. package/src/mcp-gateway.js +383 -0
  56. package/src/mcp-scanner.js +45 -0
  57. package/src/middleware.js +17 -0
  58. package/src/multi-tenant.js +29 -0
  59. package/src/observability.js +395 -0
  60. package/src/oidc.js +38 -0
  61. package/src/persistent-store.js +56 -0
  62. package/src/policy-builder.js +74 -0
  63. package/src/policy-bundles.js +17 -0
  64. package/src/policy-engine.js +67 -0
  65. package/src/policy-packs.js +115 -0
  66. package/src/policy-registry.js +58 -0
  67. package/src/postgres-adapter.js +76 -0
  68. package/src/runtime.js +138 -0
  69. package/src/saas.js +67 -0
  70. package/src/security-report.js +42 -0
  71. package/src/security-validation.js +92 -0
  72. package/src/shadow-mode.js +47 -0
  73. package/src/telemetry.js +28 -0
  74. package/src/webhook-delivery.js +70 -0
  75. package/standalone.html +86 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,229 @@
1
+ # 2.13.8 — Production Readiness Pack
2
+ # 2.13.8 — Security Hardening
3
+
4
+ - Added generic sensitive-field egress protection for `secret`, `password`, `passphrase`, `private_key`, `access_token`, `refresh_token`, `authorization`, `auth_token`, `client_secret`, and `api_secret`.
5
+ - Sensitive-field values are redacted as `[REDACTED:SECRET]` and the egress decision is `BLOCK` by default.
6
+ - Added regression coverage for nested objects, arrays, inspection, and MCP egress behavior.
7
+ - Shipped example configuration defaults to `enforce` for the packaged runtime configuration.
8
+ - Forced PostgreSQL Row Level Security in the reference schema.
9
+ - Added an independent External Security Review test pack and a Managed PostgreSQL Production Acceptance test pack.
10
+ - No external security audit is claimed; those tests require an independent reviewer/managed provider environment.
11
+
12
+
13
+ - Added production deployment reference for PostgreSQL/Supabase, TLS, readiness, rollout and rollback.
14
+ - Added data-protection guidance for retention, encryption, backup/restore, RPO/RTO and deletion.
15
+ - Added incident-response runbook with severity, containment, investigation, recovery and post-incident regression steps.
16
+ - Added reproducible performance benchmark with P50/P95/P99 and throughput reporting.
17
+ - Added integration matrix and production release checklist.
18
+ - Added external security review scope/evidence package; explicitly does not claim an external audit was completed.
19
+ - Added automated release consistency checks for standalone JavaScript, package contents and production-readiness artifacts.
20
+
21
+ # 2.13.6 — Release Test Harness Fix
22
+ - Fixed the dev Attack Lab browser smoke assertion to avoid regex escaping inside an injected template literal.
23
+ - Release test now uses literal substring matching for `5/5 protected`.
24
+ - No runtime security behavior changed.
25
+
26
+ # 2.13.6 — Live Attack Lab Wiring Fix
27
+ - Registered all built-in Attack Lab demo tools in `agentgate dev`: `export_all`, `update_production`, `delete`, `refund`, and `publish`, with explicitly simulated handlers.
28
+ - Added registered-tool discovery to the gateway and made missing Attack Lab tools report as `SKIPPED` with `unregisteredTools` instead of false security failures.
29
+ - Added a real `agentgate dev` Attack Lab integration smoke and browser integration harness.
30
+ - Attack Lab status is `PROTECTED` only when all scenarios execute; partial tool coverage is reported as `PARTIAL`.
31
+
32
+ # 2.13.4 — Release Hardening
33
+ - Fixed standalone Control Plane JavaScript syntax error in Audit Export.
34
+ - Added release browser smoke coverage for the standalone Control Plane.
35
+ - Completed live policy lifecycle UI: Create → Test → Review → Activate.
36
+ - Added release version/archive consistency checks and removed stale internal tarballs from distribution.
37
+
38
+ # Changelog
39
+
40
+ ## 2.13.4 — P1 Control Plane UX
41
+
42
+ - Live Attack Lab wired to the Control Plane gateway.
43
+ - Policy creation wired to the Policy Registry API.
44
+ - First 10 Minutes onboarding flow added to the Control Plane.
45
+ - HTTP audit JSON export added.
46
+ - Control Plane surfaces explicit API failure messages instead of silently presenting demo results.
47
+ - Version identity unified at 2.13.4.
48
+
49
+
50
+ # 2.13.4 — First-Client Hardening
51
+
52
+ - Fixed Design Partner CLI test to resolve the packaged `bin/agentgate.js` instead of a hardcoded `/mnt/data` path.
53
+ - Added a complete approval lifecycle to `createAgentGate`: `approve()`, `deny()`, `approvals()`, `getApproval()`.
54
+ - `protect()` ASK results now include an `approvalId` and preserve the original pending execution until approval.
55
+ - Updated standalone Control Plane version to 2.13.4 and clearly labeled static dashboard/Attack Lab areas as Preview where they are not live operations.
56
+ - Added SDK approval lifecycle documentation and regression tests.
57
+
58
+ # Changelog
59
+
60
+ ## 2.13.2 — Commercial Readiness Pack
61
+ - Added technical validation case-study boundary and customer-case-study policy.
62
+ - Added initial pricing experiment.
63
+ - Added launch website copy and positioning.
64
+ - Added design-partner outreach scripts.
65
+ - Added marketing launch plan and claims policy.
66
+ - Updated standalone product shell messaging and version.
67
+
68
+
69
+ ## 2.13.0 — Design Partner Edition
70
+
71
+ - Added three curated Policy Packs: support/refund, production DevOps, and customer-data export.
72
+ - Added `agentgate pack list|show|init|test` for fast, reviewable policy-pack setup.
73
+ - Added `agentgate demo refund` for a focused first-protection demonstration.
74
+ - Added deterministic Shadow Mode analysis and a `agentgate shadow` report command.
75
+ - Added Design Partner rollout, checklist, and case-study templates.
76
+ - Increased local SDK run retention default to 25,000 to preserve replay evidence under large adversarial runs.
77
+ - SDK runtime Run records now persist `winningRule` and `ruleTrace` alongside the decision evidence.
78
+ - Kept the deterministic runtime enforcement model unchanged.
79
+
80
+ # 2.12.2 — Release Confidence & Adversarial Hardening
81
+
82
+ - Security validation now uses real instrumented tool handlers to prove BLOCK happens before side effects.
83
+ - Added real cross-tenant HTTP validation using scoped Tenant A/B API keys and tenant mismatch enforcement.
84
+ - Added run retention status and near-limit warning events.
85
+ - MCP/control-plane version reporting now derives from package version instead of a stale literal.
86
+ - MCP and control-plane examples now support `PORT` without editing source.
87
+ - Release confidence target: AG-RED-TEAM with 10,000+ mixed requests, persistence, replay, concurrency, egress, approvals, and tenant isolation.
88
+
89
+ # Changelog
90
+
91
+ ## 2.12.0 — Security Validation & Hardening
92
+
93
+ - Added deterministic security validation runner for runtime, approval, egress, malformed-input and tenant-isolation invariants.
94
+ - Added `agentgate validate-security` CLI gate with non-zero exit on failed security invariants.
95
+ - Added pre-execution blocking and approval-boundary regression checks.
96
+ - Added malformed-input resilience checks for the policy engine.
97
+ - Added tenant isolation validation over persisted runtime runs.
98
+
99
+ ## 2.11.0 — Developer Preflight & Policy Simulation
100
+
101
+ - Added configuration validation and deployment safety warnings.
102
+ - Added `agentgate doctor` preflight diagnostics.
103
+ - Added deterministic `agentgate simulate` policy matrix.
104
+ - Added programmatic configuration validation and policy simulation exports.
105
+
106
+ ## 2.10.1 — Release Candidate: Trust & Distribution
107
+
108
+ - Fixed npm package identity collision by publishing the product package under `agentgate-runtime-control`; the CLI command remains `agentgate`.
109
+ - Added `agentgate --help` and `agentgate --version`.
110
+ - Added explicit `agentgate dev --port <port>` handling and friendly `EADDRINUSE` errors.
111
+ - Added secure local development browser session for `agentgate dev`; production API authentication remains fail-closed.
112
+ - Seeded local dashboard with real ALLOW / ASK / BLOCK demo runs.
113
+ - Added deterministic policy `ruleTrace` and `winningRule` fields.
114
+ - Made Replay consume a real run and explain the winning rule and whether the tool handler executed.
115
+ - Reconciled refund examples and Quickstart expected outcomes.
116
+ - Updated MCP default server version and examples for configurable ports.
117
+ - Added 2.10.1 regression tests for policy explanations and local dashboard authentication.
118
+ - Full test suite: 112/112 passing.
119
+
120
+
121
+ ## 2.10.0 — Security-Aware Observability & Agent Intelligence
122
+
123
+ - Added unified security-aware traces joining LLM, tool, policy, approval, execution, egress, behavior and cost stages.
124
+ - Added deterministic Agent Efficiency Score with transparent component weights.
125
+ - Added behavior × cost × security correlation analytics.
126
+ - Added cost analytics by agent, model, tool, action, tenant and customer/user.
127
+ - Added security-cost accounting for blocked calls, approvals, attack tests and egress blocks.
128
+ - Added deterministic month-end cost forecasting from month-to-date run-rate.
129
+ - Added control-plane APIs for traces, efficiency, correlation, cost analytics and forecasts.
130
+ - Expanded the dashboard to surface efficiency, security correlation, unified traces, cost analytics and forecast.
131
+ - Preserved deterministic runtime authorization; analytics never becomes the authorization authority.
132
+ - Fixed persistence of enriched run/cost/egress state after runtime execution.
133
+
134
+ ## 2.9.0 — Agent Observability & Cost Control
135
+
136
+ - Added unified runtime observability over AgentGate runs: success/error rates, decision counts, P50/P95/P99 latency, tool/agent/model breakdowns, and security-aware telemetry.
137
+ - Run records now capture model/usage metadata, execution latency, and calculated cost when pricing is configured.
138
+ - Added provider-neutral model pricing registry; pricing is explicit and configurable rather than hard-coded to potentially stale provider rates.
139
+ - Added daily/monthly cost budgets with deterministic ALLOW / ASK / BLOCK decisions.
140
+ - Budget evaluation can use persisted runtime history, avoiding dependence on process-local cost state.
141
+ - Added Control Plane APIs for observability, cost status, pricing and budget configuration.
142
+ - Added dashboard sections for Observability and Cost Control.
143
+ - Added regression coverage for cost calculation, budget enforcement, persisted history, gateway integration and Control Plane endpoints.
144
+ - Test suite at release preparation: 110/110 passing.
145
+
146
+ ## 2.6.0 — Production Data & API Hardening
147
+
148
+ - Postgres adapter now supports tenant-scoped RLS sessions and optimistic concurrency updates.
149
+ - Supabase persistence requires explicit tenant scope for reads and writes.
150
+ - API key revoke/rotate operations are tenant-bound.
151
+ - Organization, billing, usage and tenant-management routes enforce tenant ownership boundaries.
152
+ - Rate limiting now applies at both network/API-key and authenticated-tenant layers.
153
+ - OIDC validation applies clock tolerance correctly and can enforce maximum token age.
154
+ - Production database schema includes tenant isolation policy and record versions.
155
+
156
+
157
+ ## 2.5.0 — Tenant-Isolated Policy Governance
158
+
159
+ - Policy Registry versions, activation, diff, audit, and reads are tenant-scoped.
160
+ - Policy Bundles are tenant-scoped with isolated versions and activation state.
161
+ - Runtime policy resolution uses the authenticated tenant context.
162
+ - Tenant policy activation no longer mutates shared global policy state.
163
+ - Added cross-tenant policy and runtime enforcement regression tests.
164
+ - Test suite: 80/80 passing.
165
+
166
+ ### Security Hardening (included in 2.5.0)
167
+
168
+ - Enforced authenticated tenant identity over request-body `tenantId`.
169
+ - Added tenant-scoped runs, approvals, replay, behavior and blast-radius reads.
170
+ - Added tenant binding to runtime runs and approvals.
171
+ - Prevented cross-tenant approval resolution.
172
+ - Added SSE tenant filtering.
173
+ - Added HTTP body-size limits to the Control Plane and MCP server.
174
+ - Hardened webhook delivery against localhost, private, link-local and metadata targets, with DNS resolution and redirect rejection.
175
+ - MCP HTTP server is local-only by default; non-local deployment requires an authentication hook.
176
+ - Added dedicated cross-tenant and SSRF security regression tests.
177
+
178
+ ## 2.2.0
179
+
180
+ - Public-launch packaging and documentation
181
+ - Five-minute quickstart
182
+ - Refund-agent and policy-bundle examples
183
+ - Docker deployment baseline
184
+ - npm package file allowlist
185
+ - Security policy and contribution guide
186
+ - Launch/package smoke tests
187
+
188
+ ## 2.1.0
189
+
190
+ - Runtime telemetry and latency metrics
191
+ - Runtime event stream
192
+ - Health and readiness endpoints
193
+ - Sliding-window rate limiting
194
+ - OIDC JWT validation
195
+ - Policy bundle control-plane integration
196
+
197
+ ## 2.0.0
198
+
199
+ - Runtime event bus
200
+ - Policy bundles
201
+ - Admin RBAC
202
+ - OIDC claim mapping
203
+ - Enterprise runtime foundations
204
+
205
+ ## 2.7.0 — Security Edge
206
+
207
+ - MCP Security Scanner with dangerous-tool, description-injection, sensitive-input and weak-schema findings.
208
+ - Stable tool contract fingerprints.
209
+ - Tool trust pinning and rug-pull/schema-drift detection.
210
+ - Runtime emergency kill switch with tenant-scoped Control Plane access.
211
+ - `agentgate scan` CLI with strict CI mode.
212
+ - `agentgate attack-ci` security gate.
213
+ - MCP scanner library export.
214
+
215
+ ## 2.8.0 — Response / Data Egress Guard
216
+
217
+ - Added deterministic response/data egress inspection and transformation.
218
+ - Added ALLOW / REDACT / BLOCK egress decisions.
219
+ - Added detection for common API keys, private keys, bearer tokens, JWTs, email, phone, and card-like data.
220
+ - Integrated egress enforcement into MCP tool responses and approval execution.
221
+ - Added egress audit metadata and runtime events.
222
+ - Added configurable per-type egress rules.
223
+
224
+ ## 2.13.1 — Design Partner Kit
225
+
226
+ - Added `agentgate partner init [pack]` to generate a controlled partner workspace.
227
+ - Added `agentgate partner check <report.json>` for deterministic acceptance-gate validation.
228
+ - Added Design Partner Kit, intake template, pilot workflow, scorecard, and exit-report templates.
229
+ - Preserved the 2.13.0 runtime and security boundaries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AgentGate contributors
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.