@relayplane/proxy 1.3.2 → 1.4.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
@@ -37,4 +37,6 @@ export { defaultLogger } from './logger.js';
37
37
  export type { Logger } from './logger.js';
38
38
  export { proxyStatsCollector } from './standalone-proxy.js';
39
39
  export type { Provider, TaskType } from '@relayplane/core';
40
+ export { ProxyServer, createProxyServer, createSandboxedProxyServer } from './server.js';
41
+ export type { ProxyServerConfig } from './server.js';
40
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EACL,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE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EACd,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzF,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@
19
19
  * @packageDocumentation
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.proxyStatsCollector = exports.defaultLogger = exports.resolveConfig = exports.StatusReporter = exports.StatsCollector = exports.probeHealth = exports.handleHealthRequest = exports.ProcessManager = exports.RelayPlaneMiddleware = exports.CircuitBreaker = exports.printTelemetryDisclosure = exports.getTelemetryPath = exports.clearTelemetry = exports.getTelemetryStats = exports.getLocalTelemetry = exports.clearAuditBuffer = exports.getAuditBuffer = exports.isOfflineMode = exports.setOfflineMode = exports.isAuditMode = exports.setAuditMode = exports.estimateCost = exports.inferTaskType = exports.recordTelemetry = exports.getConfigPath = exports.getConfigDir = exports.getApiKey = exports.setApiKey = exports.getDeviceId = exports.disableTelemetry = exports.enableTelemetry = exports.isTelemetryEnabled = exports.markFirstRunComplete = exports.isFirstRun = exports.updateConfig = exports.saveConfig = exports.loadConfig = exports.startProxy = void 0;
22
+ exports.createSandboxedProxyServer = exports.createProxyServer = exports.ProxyServer = exports.proxyStatsCollector = exports.defaultLogger = exports.resolveConfig = exports.StatusReporter = exports.StatsCollector = exports.probeHealth = exports.handleHealthRequest = exports.ProcessManager = exports.RelayPlaneMiddleware = exports.CircuitBreaker = exports.printTelemetryDisclosure = exports.getTelemetryPath = exports.clearTelemetry = exports.getTelemetryStats = exports.getLocalTelemetry = exports.clearAuditBuffer = exports.getAuditBuffer = exports.isOfflineMode = exports.setOfflineMode = exports.isAuditMode = exports.setAuditMode = exports.estimateCost = exports.inferTaskType = exports.recordTelemetry = exports.getConfigPath = exports.getConfigDir = exports.getApiKey = exports.setApiKey = exports.getDeviceId = exports.disableTelemetry = exports.enableTelemetry = exports.isTelemetryEnabled = exports.markFirstRunComplete = exports.isFirstRun = exports.updateConfig = exports.saveConfig = exports.loadConfig = exports.startProxy = void 0;
23
23
  // Standalone proxy (requires only @relayplane/core)
24
24
  var standalone_proxy_js_1 = require("./standalone-proxy.js");
25
25
  Object.defineProperty(exports, "startProxy", { enumerable: true, get: function () { return standalone_proxy_js_1.startProxy; } });
@@ -75,7 +75,9 @@ Object.defineProperty(exports, "defaultLogger", { enumerable: true, get: functio
75
75
  // Proxy stats collector (from standalone proxy)
76
76
  var standalone_proxy_js_2 = require("./standalone-proxy.js");
77
77
  Object.defineProperty(exports, "proxyStatsCollector", { enumerable: true, get: function () { return standalone_proxy_js_2.proxyStatsCollector; } });
78
- // Note: Advanced features (ProxyServer, streaming, etc.) require additional
79
- // dependencies. Install @relayplane/ledger, @relayplane/auth-gate, etc.
80
- // for full functionality. See documentation for details.
78
+ // Advanced proxy server (requires @relayplane/ledger, @relayplane/auth-gate, etc.)
79
+ var server_js_1 = require("./server.js");
80
+ Object.defineProperty(exports, "ProxyServer", { enumerable: true, get: function () { return server_js_1.ProxyServer; } });
81
+ Object.defineProperty(exports, "createProxyServer", { enumerable: true, get: function () { return server_js_1.createProxyServer; } });
82
+ Object.defineProperty(exports, "createSandboxedProxyServer", { enumerable: true, get: function () { return server_js_1.createSandboxedProxyServer; } });
81
83
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAEH,oDAAoD;AACpD,6DAAmD;AAA1C,iHAAA,UAAU,OAAA;AAGnB,gBAAgB;AAChB,yCAcqB;AAbnB,uGAAA,UAAU,OAAA;AACV,uGAAA,UAAU,OAAA;AACV,yGAAA,YAAY,OAAA;AACZ,uGAAA,UAAU,OAAA;AACV,iHAAA,oBAAoB,OAAA;AACpB,+GAAA,kBAAkB,OAAA;AAClB,4GAAA,eAAe,OAAA;AACf,6GAAA,gBAAgB,OAAA;AAChB,wGAAA,WAAW,OAAA;AACX,sGAAA,SAAS,OAAA;AACT,sGAAA,SAAS,OAAA;AACT,yGAAA,YAAY,OAAA;AACZ,0GAAA,aAAa,OAAA;AAIf,YAAY;AACZ,+CAewB;AAdtB,+GAAA,eAAe,OAAA;AACf,6GAAA,aAAa,OAAA;AACb,4GAAA,YAAY,OAAA;AACZ,4GAAA,YAAY,OAAA;AACZ,2GAAA,WAAW,OAAA;AACX,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,8GAAA,cAAc,OAAA;AACd,gHAAA,gBAAgB,O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;AACZ,4GAAA,YAAY,OAAA;AACZ,2GAAA,WAAW,OAAA;AACX,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,8GAAA,cAAc,OAAA;AACd,gHAAA,gBAAgB,OAAA;AAChB,iHAAA,iBAAiB,OAAA;AACjB,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AACd,gHAAA,gBAAgB,OAAA;AAChB,wHAAA,wBAAwB,OAAA;AAI1B,iCAAiC;AACjC,2DAAoE;AAA3D,oHAAA,cAAc,OAAA;AACvB,iDAAuD;AAA9C,qHAAA,oBAAoB,OAAA;AAE7B,2DAAsD;AAA7C,oHAAA,cAAc,OAAA;AACvB,yCAA+D;AAAtD,gHAAA,mBAAmB,OAAA;AAAE,wGAAA,WAAW,OAAA;AACzC,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,yCAA6C;AAApC,2GAAA,cAAc,OAAA;AAEvB,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AAEtB,yCAA4C;AAAnC,0GAAA,aAAa,OAAA;AAGtB,gDAAgD;AAChD,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAK5B,mFAAmF;AACnF,yCAAyF;AAAhF,wGAAA,WAAW,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AAAE,uHAAA,0BAA0B,OAAA"}
package/dist/server.d.ts CHANGED
@@ -1,13 +1,238 @@
1
- #!/usr/bin/env node
2
1
  /**
3
- * RelayPlane Local LLM Proxy Server
2
+ * RelayPlane Agent Ops Proxy Server
3
+ *
4
+ * OpenAI-compatible proxy server with integrated observability via the Learning Ledger
5
+ * and auth enforcement via Auth Gate.
4
6
  *
5
- * Routes OpenAI-compatible requests to multiple providers.
6
7
  * Features:
7
- * - /health endpoint for monitoring
8
- * - Usage tracking with spending warnings
9
- * - Model aliases (rp:fast, rp:cheap, rp:best)
10
- * - Dry-run mode for testing
8
+ * - OpenAI-compatible `/v1/chat/completions` endpoint
9
+ * - Auth Gate integration for consumer vs API auth detection
10
+ * - Learning Ledger integration for run tracking
11
+ * - Timing capture (latency_ms, ttft_ms)
12
+ * - Structured error handling
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+ import { Ledger } from '@relayplane/ledger';
17
+ import { AuthGate, type AuthProfileStorage } from '@relayplane/auth-gate';
18
+ import { PolicyEngine, type PolicyStorage } from '@relayplane/policy-engine';
19
+ import { RoutingEngine, type CapabilityRegistry, type ProviderManager } from '@relayplane/routing-engine';
20
+ import { ExplanationEngine, RunComparator, Simulator } from '@relayplane/explainability';
21
+ import type { AuthEnforcementMode } from '@relayplane/ledger';
22
+ import { LearningEngine, type LearningEngineConfig } from '@relayplane/learning-engine';
23
+ import { RelayPlaneMiddleware } from './middleware.js';
24
+ import { type RelayPlaneConfig } from './relay-config.js';
25
+ /**
26
+ * Proxy server configuration
27
+ */
28
+ export interface ProxyServerConfig {
29
+ port?: number;
30
+ host?: string;
31
+ ledger?: Ledger;
32
+ authStorage?: AuthProfileStorage;
33
+ policyStorage?: PolicyStorage;
34
+ policyEngine?: PolicyEngine;
35
+ verbose?: boolean;
36
+ defaultWorkspaceId?: string;
37
+ defaultAgentId?: string;
38
+ defaultAuthEnforcementMode?: AuthEnforcementMode;
39
+ enforcePolicies?: boolean;
40
+ routingEngine?: RoutingEngine;
41
+ capabilityRegistry?: CapabilityRegistry;
42
+ providerManager?: ProviderManager;
43
+ /** Enable capability-based routing (Phase 3) */
44
+ enableRouting?: boolean;
45
+ learningEngine?: LearningEngine;
46
+ /** Enable learning engine analytics and suggestions (default: false) */
47
+ enableLearning?: boolean;
48
+ learningConfig?: LearningEngineConfig;
49
+ providers?: {
50
+ anthropic?: {
51
+ apiKey: string;
52
+ baseUrl?: string;
53
+ };
54
+ openai?: {
55
+ apiKey: string;
56
+ baseUrl?: string;
57
+ };
58
+ openrouter?: {
59
+ apiKey: string;
60
+ baseUrl?: string;
61
+ };
62
+ google?: {
63
+ apiKey: string;
64
+ baseUrl?: string;
65
+ };
66
+ together?: {
67
+ apiKey: string;
68
+ baseUrl?: string;
69
+ };
70
+ deepseek?: {
71
+ apiKey: string;
72
+ baseUrl?: string;
73
+ };
74
+ };
75
+ }
76
+ /**
77
+ * RelayPlane Agent Ops Proxy Server
78
+ */
79
+ export declare class ProxyServer {
80
+ private server;
81
+ private ledger;
82
+ private authGate;
83
+ private policyEngine;
84
+ private routingEngine;
85
+ private capabilityRegistry;
86
+ private providerManager;
87
+ private explainer;
88
+ private comparator;
89
+ private simulator;
90
+ private learningEngine;
91
+ private config;
92
+ constructor(config?: ProxyServerConfig);
93
+ /**
94
+ * Build provider overrides from config
95
+ */
96
+ private buildProviderOverrides;
97
+ /**
98
+ * Configure provider API keys from config
99
+ */
100
+ private configureProviderApiKeys;
101
+ /**
102
+ * Start the proxy server
103
+ */
104
+ start(): Promise<void>;
105
+ /**
106
+ * Stop the proxy server
107
+ */
108
+ stop(): Promise<void>;
109
+ /**
110
+ * Handle incoming request
111
+ */
112
+ private handleRequest;
113
+ private handleListPolicies;
114
+ private handleCreatePolicy;
115
+ private handleGetPolicy;
116
+ private handleUpdatePolicy;
117
+ private handleDeletePolicy;
118
+ private handlePolicyTest;
119
+ private handleGetBudget;
120
+ /**
121
+ * Handle GET /v1/runs/{id}/explain - Full decision chain explanation
122
+ */
123
+ private handleExplainRun;
124
+ /**
125
+ * Handle GET /v1/runs/{id}/timeline - Timeline view only
126
+ */
127
+ private handleRunTimeline;
128
+ /**
129
+ * Handle GET /v1/runs/{id}/decisions - Raw decision chain
130
+ */
131
+ private handleRunDecisions;
132
+ /**
133
+ * Handle GET /v1/runs/{id} - Run inspector (all details)
134
+ */
135
+ private handleRunInspector;
136
+ /**
137
+ * Handle GET /v1/runs/compare?ids=run1,run2 - Run comparison
138
+ */
139
+ private handleCompareRuns;
140
+ /**
141
+ * Handle POST /v1/simulate/policy - Policy simulation
142
+ */
143
+ private handleSimulatePolicy;
144
+ /**
145
+ * Handle POST /v1/simulate/routing - Routing simulation
146
+ */
147
+ private handleSimulateRouting;
148
+ /**
149
+ * Handle /v1/chat/completions
150
+ */
151
+ private handleChatCompletions;
152
+ /**
153
+ * Forward request to provider
154
+ */
155
+ private forwardToProvider;
156
+ /**
157
+ * Detect auth type from Authorization header
158
+ */
159
+ private detectAuthType;
160
+ /**
161
+ * Estimate cost based on provider and usage
162
+ */
163
+ private estimateCost;
164
+ /**
165
+ * Read request body
166
+ */
167
+ private readBody;
168
+ /**
169
+ * Send error response
170
+ */
171
+ private sendError;
172
+ private handleAnalyticsSummary;
173
+ private handleRunAnalysis;
174
+ private handleListSuggestions;
175
+ private handleApproveSuggestion;
176
+ private handleRejectSuggestion;
177
+ private handleListRules;
178
+ private handleRuleEffectiveness;
179
+ /**
180
+ * Log message
181
+ */
182
+ private log;
183
+ /**
184
+ * Get the ledger instance (useful for testing)
185
+ */
186
+ getLedger(): Ledger;
187
+ /**
188
+ * Get the auth gate instance (useful for testing)
189
+ */
190
+ getAuthGate(): AuthGate;
191
+ /**
192
+ * Get the policy engine instance (useful for testing and policy management)
193
+ */
194
+ getPolicyEngine(): PolicyEngine;
195
+ /**
196
+ * Get the routing engine instance (Phase 3)
197
+ */
198
+ getRoutingEngine(): RoutingEngine;
199
+ /**
200
+ * Get the capability registry instance (Phase 3)
201
+ */
202
+ getCapabilityRegistry(): CapabilityRegistry;
203
+ /**
204
+ * Get the provider manager instance (Phase 3)
205
+ */
206
+ getProviderManager(): ProviderManager;
207
+ /**
208
+ * Get the explanation engine instance (Phase 4)
209
+ */
210
+ getExplainer(): ExplanationEngine;
211
+ /**
212
+ * Get the run comparator instance (Phase 4)
213
+ */
214
+ getComparator(): RunComparator;
215
+ /**
216
+ * Get the simulator instance (Phase 4)
217
+ */
218
+ getSimulator(): Simulator;
219
+ /**
220
+ * Get the learning engine instance (Phase 5)
221
+ */
222
+ getLearningEngine(): LearningEngine | null;
223
+ }
224
+ /**
225
+ * Create a new proxy server
226
+ */
227
+ export declare function createProxyServer(config?: ProxyServerConfig): ProxyServer;
228
+ /**
229
+ * Create a proxy server with optional circuit breaker middleware wrapping.
230
+ * This gives the advanced proxy the same circuit breaker protection as standalone.
11
231
  */
12
- export {};
232
+ export declare function createSandboxedProxyServer(config?: ProxyServerConfig & {
233
+ relayplane?: Partial<RelayPlaneConfig>;
234
+ }): {
235
+ server: ProxyServer;
236
+ middleware?: RelayPlaneMiddleware;
237
+ };
13
238
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAgB,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,QAAQ,EAGR,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,YAAY,EAGZ,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EAIb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAGrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iBAAiB,EAEjB,aAAa,EAEb,SAAS,EAIV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAA0C,MAAM,oBAAoB,CAAC;AACtG,OAAO,EACL,cAAc,EAEd,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,mBAAmB,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,kBAA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