@solongate/proxy 0.48.1 → 0.49.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.
@@ -0,0 +1,22 @@
1
+ import type { CheckResult, AuditData } from './types.js';
2
+ export declare function printHeader(): void;
3
+ export declare function printLogSummary(data: AuditData): void;
4
+ export declare function calcScore(results: CheckResult[]): {
5
+ intScore: number;
6
+ fixCount: number;
7
+ };
8
+ export declare function printCompactReport(results: CheckResult[]): void;
9
+ export declare function printScore(results: CheckResult[]): void;
10
+ export declare function printDetailedReport(results: CheckResult[]): void;
11
+ export declare function printFooter(results: CheckResult[]): void;
12
+ export declare function printToolCall(tc: {
13
+ id: string;
14
+ toolName: string;
15
+ arguments: Record<string, unknown>;
16
+ result?: string;
17
+ isError?: boolean;
18
+ timestamp: string;
19
+ source: string;
20
+ sessionId: string;
21
+ }, detailed?: boolean, model?: string): void;
22
+ export declare function printLogs(data: AuditData, limit?: number, detailed?: boolean): void;
@@ -0,0 +1,10 @@
1
+ export declare class Spinner {
2
+ private interval;
3
+ private frame;
4
+ private message;
5
+ constructor(message: string);
6
+ start(): this;
7
+ update(message: string): void;
8
+ stop(finalMessage?: string): void;
9
+ }
10
+ export declare function withSpinner<T>(message: string, fn: () => T): T;
@@ -0,0 +1,105 @@
1
+ export type CheckStatus = 'PROTECTED' | 'PARTIAL' | 'NOT_PROTECTED';
2
+ export interface Evidence {
3
+ icon: 'found' | 'missing' | 'warn' | 'info';
4
+ text: string;
5
+ }
6
+ export interface CheckResult {
7
+ code: string;
8
+ title: string;
9
+ status: CheckStatus;
10
+ summary: string;
11
+ details: string;
12
+ evidence: Evidence[];
13
+ recommendation?: string;
14
+ }
15
+ export interface ToolCall {
16
+ id: string;
17
+ toolName: string;
18
+ arguments: Record<string, unknown>;
19
+ result?: string;
20
+ isError?: boolean;
21
+ timestamp: string;
22
+ source: 'claude' | 'gemini' | 'openclaw';
23
+ sessionId: string;
24
+ }
25
+ export interface UserMessage {
26
+ timestamp: string;
27
+ text: string;
28
+ nextToolCallIndex?: number;
29
+ }
30
+ export interface SessionInfo {
31
+ id: string;
32
+ source: 'claude' | 'gemini' | 'openclaw';
33
+ startTime: string;
34
+ endTime?: string;
35
+ model?: string;
36
+ toolCalls: ToolCall[];
37
+ userMessages?: UserMessage[];
38
+ filePath: string;
39
+ }
40
+ export interface AuditData {
41
+ sessions: SessionInfo[];
42
+ totalToolCalls: number;
43
+ sources: string[];
44
+ timeRange: {
45
+ from: string;
46
+ to: string;
47
+ } | null;
48
+ }
49
+ export interface ChainMatch {
50
+ chainName: string;
51
+ sessionId: string;
52
+ steps: {
53
+ index: number;
54
+ toolName: string;
55
+ summary: string;
56
+ }[];
57
+ severity: 'high' | 'medium' | 'low';
58
+ description: string;
59
+ }
60
+ export interface DataFlowLeak {
61
+ sessionId: string;
62
+ sourceIndex: number;
63
+ sinkIndex: number;
64
+ sourceToolName: string;
65
+ sinkToolName: string;
66
+ dataType: string;
67
+ pattern: string;
68
+ }
69
+ export interface PermissionDrift {
70
+ sessionId: string;
71
+ earlyPrivilegeLevel: number;
72
+ latePrivilegeLevel: number;
73
+ driftRatio: number;
74
+ newToolTypes: string[];
75
+ }
76
+ export interface SessionBaseline {
77
+ source: 'claude' | 'gemini' | 'openclaw' | 'all';
78
+ avgToolCalls: number;
79
+ stddevToolCalls: number;
80
+ toolTypeDistribution: Record<string, number>;
81
+ avgDurationMs: number;
82
+ stddevDurationMs: number;
83
+ }
84
+ export interface SessionAnomaly {
85
+ sessionId: string;
86
+ source: string;
87
+ deviations: string[];
88
+ severity: 'high' | 'medium' | 'low';
89
+ }
90
+ export interface UnsolicitedAction {
91
+ sessionId: string;
92
+ toolCallIndex: number;
93
+ toolName: string;
94
+ action: string;
95
+ lastUserMessageBefore?: string;
96
+ timeSinceLastUserMessage?: number;
97
+ }
98
+ export interface DeepAnalysis {
99
+ chains: ChainMatch[];
100
+ dataFlowLeaks: DataFlowLeak[];
101
+ permissionDrifts: PermissionDrift[];
102
+ baselines: SessionBaseline[];
103
+ anomalies: SessionAnomaly[];
104
+ unsolicitedActions: UnsolicitedAction[];
105
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.48.1",
3
+ "version": "0.49.0",
4
4
  "description": "AI tool security proxy — protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "solongate": "./dist/index.js",
8
8
  "solongate-proxy": "./dist/index.js",
9
9
  "solongate-init": "./dist/init.js",
10
+ "solongate-audit": "./dist/audit/index.js",
10
11
  "proxy": "./dist/index.js"
11
12
  },
12
13
  "main": "./dist/lib.js",
@@ -61,6 +62,7 @@
61
62
  },
62
63
  "devDependencies": {
63
64
  "@open-policy-agent/opa-wasm": "^1.10.0",
65
+ "chalk": "^5.3.0",
64
66
  "esbuild": "^0.19.12",
65
67
  "tsup": "^8.3.0",
66
68
  "tsx": "^4.19.0",