import { Type } from "@sinclair/typebox";
//#region src/agent/prompt/safety.ts
Type.Object({
	allowExternalActions: Type.Optional(Type.Boolean({ default: false })),
	allowDangerousOperations: Type.Optional(Type.Boolean({ default: false })),
	requireConfirmationForDestructive: Type.Optional(Type.Boolean({ default: true })),
	allowedChannels: Type.Optional(Type.Array(Type.String())),
	blockedCommands: Type.Optional(Type.Array(Type.String())),
	maxFileSize: Type.Optional(Type.Number({ default: 10 * 1024 * 1024 })),
	maxShellTimeout: Type.Optional(Type.Number({ default: 300 }))
});
/**
* Quick safety check for file operations
*/
function checkFileSafety(operation, path) {
	for (const sp of [
		"/etc/passwd",
		"/etc/shadow",
		"/root/.ssh",
		"/home/*/.ssh",
		"~/.aws",
		"~/.bashrc",
		"~/.profile"
	]) if (path.includes(sp)) return {
		allowed: false,
		message: `Cannot ${operation} sensitive path: ${path}`
	};
	return { allowed: true };
}
//#endregion
export { checkFileSafety };

//# sourceMappingURL=safety.js.map