agent-afk 5.308.13 → 5.309.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/agent/risk-classifier.d.ts +5 -0
- package/dist/agent/risk-classifier.paths.d.ts +12 -0
- package/dist/cli.mjs +367 -364
- package/dist/index.mjs +170 -170
- package/dist/telegram.mjs +185 -183
- package/package.json +2 -2
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export type RiskLevel = 'safe' | 'medium' | 'high';
|
|
2
|
+
export interface RiskVerdict {
|
|
3
|
+
level: RiskLevel;
|
|
4
|
+
reason?: string;
|
|
5
|
+
}
|
|
2
6
|
export interface RiskContext {
|
|
3
7
|
cwd: string;
|
|
4
8
|
workspaceRoot?: string;
|
|
5
9
|
daemonTaskId?: string;
|
|
6
10
|
}
|
|
7
11
|
export declare function classifyRisk(toolName: string, input: unknown, ctx: RiskContext): RiskLevel;
|
|
12
|
+
export declare function classifyRiskDetailed(toolName: string, input: unknown, ctx: RiskContext): RiskVerdict;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import type { RiskContext, RiskVerdict } from './risk-classifier.js';
|
|
3
|
+
export declare function isPrivateTempRoot(st: {
|
|
4
|
+
isDirectory(): boolean;
|
|
5
|
+
isSymbolicLink(): boolean;
|
|
6
|
+
uid: number;
|
|
7
|
+
mode: number;
|
|
8
|
+
}, uid: number | undefined, platform: NodeJS.Platform): boolean;
|
|
9
|
+
export declare function getTempRoots(): readonly string[];
|
|
10
|
+
export declare function isOutsideRoot(root: string, target: string, pathImpl?: Pick<typeof path, 'relative' | 'isAbsolute'>): boolean;
|
|
11
|
+
export declare function classifyFilePath(filePath: string, ctx: RiskContext): RiskVerdict;
|
|
12
|
+
export declare function classifyPatchApply(input: unknown, ctx: RiskContext): RiskVerdict;
|