TokenSafe
TokenSafe урезает то, что читает агент, и блокирует утечки. Sextant заставляет его проверить работающее приложение до того, как он напишет «готово».
Install TokenSafe and activate the free license: `curl -fsSL https://tokensafe.dev/install.sh | bash` (macOS/Linux/Git Bash, no Python or Node needed). On Windows use the installer from https://tokensafe.dev, then open a new terminal. Then run `tokensafe login`.
Копировать
// Agent requests entire 1,840-line file
import { db } from '../database/client';
import { sendEmail } from '../mailer/ses';
// [... 1,800 lines of unrelated handlers]
// [TokenSafe: Sliced target 'verifyJwt']
// 1-line signature dependencies:
// import { jwt } from 'jsonwebtoken';
export async function verifyJwt(token: string) {
return jwt.verify(token, process.env.SECRET!);
}
// 14 lines sent · 1,826 lines kept on disk