Skip to content

Commit

Permalink
add/improve language around safety and privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
ehammond committed Dec 9, 2024
1 parent eda0523 commit bc0d462
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 20 deletions.
5 changes: 2 additions & 3 deletions app/components/Caveats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import { AlertCircle } from 'lucide-react'

export default function Caveats() {
const caveats = [
"AI LLMs may not generate correct, expected, or desired results",
"Commands should ALWAYS be reviewed carefully before execution",
"AI LLMs may not generate correct, expected, or desired results",
"Risk level evaluation is not foolproof",
"Results may vary between runs, even with identical input",
"Commercial LLM API usage has associated costs",
"Danger level evaluation is not foolproof",
"Environment-specific compatibility considerations"
]

return (
Expand Down
19 changes: 10 additions & 9 deletions app/components/OpenSource.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import { FileText, User, Calendar } from 'lucide-react'
import { FileText, User, Calendar, Sparkles } from 'lucide-react'

export default function OpenSource() {
return (
<section className="space-y-6 bg-white rounded-xl shadow-lg p-8 transition-all duration-300 hover:shadow-xl">
<h2 className="text-4xl font-bold text-gray-800 border-b pb-4">Open Source & License</h2>
<h2 className="text-4xl font-bold text-gray-800 border-b pb-4">Credits & License</h2>
<ul className="space-y-4">
<li className="flex items-center space-x-3">
<FileText className="w-6 h-6 text-green-500" />
<span className="text-gray-700">
Apache 2 License (see <a href="https://github.com/alestic/abc/blob/main/LICENSE" target="_blank" rel="noopener noreferrer" className="text-green-600 hover:underline">LICENSE</a> file)
</span>
</li>
<li className="flex items-center space-x-3">
<User className="w-6 h-6 text-green-500" />
<Sparkles className="w-6 h-6 text-green-500" />
<span className="text-gray-700">Written by Claude 3.5 Sonnet</span>
</li>
<li className="flex items-center space-x-3">
<User className="w-6 h-6 text-green-500" />
<span className="text-gray-700">Prompt crafting by Eric Hammond</span>
</li>
<li className="flex items-center space-x-3">
<FileText className="w-6 h-6 text-green-500" />
<span className="text-gray-700">
Apache 2 License (see <a href="https://github.com/alestic/abc/blob/main/LICENSE" target="_blank" rel="noopener noreferrer" className="text-green-600 hover:underline"
>LICENSE</a> file)
</span>
</li>
<li className="flex items-center space-x-3">
<Calendar className="w-6 h-6 text-green-500" />
<span className="text-gray-700">Current version: 2024.12.07</span>
Expand Down
14 changes: 8 additions & 6 deletions app/components/SafetyFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { Shield, AlertTriangle, Info } from 'lucide-react'

export default function SafetyFeatures() {
const dangerLevels = [
{ level: 0, description: "Read-only, informational commands", icon: Info },
{ level: 1, description: "Common system modifications", icon: AlertTriangle },
{ level: 2, description: "Potentially dangerous operations", icon: Shield },
{ level: 0, description: "Read only, informational command", icon: Info },
{ level: 1, description: "Modifies the system in common ways or generates some standard side effects", icon: AlertTriangle },
{ level: 2, description: "Potential loss of significant data or large side effects", icon: Shield },
]

return (
<section className="space-y-6 bg-white rounded-xl shadow-lg p-8 transition-all duration-300 hover:shadow-xl">
<h2 className="text-4xl font-bold text-gray-800 border-b pb-4">Safety Features</h2>
<p className="text-xl text-gray-600">abc includes a Danger Level Evaluation system:</p>
<p className="text-xl text-gray-600">abc uses the LLM to evaluate the potential danger of each generated command using a scale:</p>
<ul className="space-y-4">
{dangerLevels.map(({ level, description, icon: Icon }) => (
<li key={level} className="flex items-center space-x-3">
Expand All @@ -22,9 +22,11 @@ export default function SafetyFeatures() {
))}
</ul>
<p className="text-gray-600 bg-yellow-100 p-4 rounded-lg border border-yellow-200">
<strong>Note:</strong> Dangerous commands are prefixed with #DANGEROUS# and require editing before execution.
<strong>Note:</strong> Commands the LLM evaluates with Level 2 risk are prefixed with a <code
className="font-mono bg-gray-800 text-green-400 px-2 py-0.5 rounded"
>#DANGEROUS#</code> comment, which requires removing before execution.
A brief justification is provided for its evaluation, helping the user understand the potential risk.
</p>
</section>
)
}

40 changes: 40 additions & 0 deletions app/components/SecurityPrivacy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Shield } from 'lucide-react'

export default function SecurityPrivacy() {
const securityItems = [
"Users are responsible for securing their API key in the $HOME/abc.conf file",
"abc communicates directly with your chosen AI LLM API provider (e.g., Anthropic)",
"Review the LLM provider's privacy policy for data handling practices"
]

return (
<section className="space-y-6 bg-white rounded-xl shadow-lg p-8 transition-all duration-300 hover:shadow-xl">
<h2 className="text-4xl font-bold text-gray-800 border-b pb-4">Security & Privacy</h2>
<div className="space-y-6">
<ul className="space-y-4">
{securityItems.map((item, index) => (
<li key={index} className="flex items-start space-x-3">
<Shield className="w-6 h-6 text-blue-500 flex-shrink-0 mt-1" />
<span className="text-gray-700">{item}</span>
</li>
))}
</ul>
<div className="pt-4 border-t">
<h3 className="text-xl font-semibold text-gray-800 mb-3">LLM API Providers</h3>
<ul className="list-disc pl-6 space-y-2">
<li>
<a
href="https://www.anthropic.com/privacy"
className="text-blue-600 hover:text-blue-800 hover:underline"
target="_blank"
rel="noopener noreferrer"
>
Anthropic Privacy Policy
</a>
</li>
</ul>
</div>
</div>
</section>
)
}
5 changes: 3 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import Installation from './components/Installation'
import Examples from './components/Examples'
import SafetyFeatures from './components/SafetyFeatures'
import Caveats from './components/Caveats'
import SecurityPrivacy from './components/SecurityPrivacy'
import OpenSource from './components/OpenSource'
import Footer from './components/Footer'

export const metadata = {
title: 'abc - AI bash/zsh/tcsh Command',
description: 'abc is a command line tool that converts natural language instructions into shell commands and injects them into the next shell command line',
description: 'abc is a command line tool that converts natural language instructions into shell commands and injects them into the next shell prompt',
}

export default function Home() {
Expand All @@ -26,10 +27,10 @@ export default function Home() {
<Examples />
<SafetyFeatures />
<Caveats />
<SecurityPrivacy />
<OpenSource />
<Footer />
</div>
</main>
)
}

0 comments on commit bc0d462

Please sign in to comment.