This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import express, { Request, Response } from 'express'; | |
| import cors from 'cors'; | |
| import helmet from 'helmet'; | |
| import { v4 as uuidv4 } from 'uuid'; | |
| // ============================================================================ | |
| // APPROVAL LOOP SYSTEM | |
| // ============================================================================ | |
| interface PendingAction { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import OpenAI from 'openai'; | |
| // ============================================================================ | |
| // GUARDRAILS SYSTEM | |
| // ============================================================================ | |
| interface GuardrailCheck { | |
| passed: boolean; | |
| reason?: string; | |
| severity?: 'low' | 'medium' | 'high'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import express from 'express'; | |
| const app = express(); | |
| app.use(express.json()); | |
| const SECTION_DIVIDER = '='.repeat(60); | |
| // ============================================ | |
| // 1. Define your tools | |
| // ============================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import express from 'express'; | |
| const app = express(); | |
| app.use(express.json()); | |
| // ============================================ | |
| // 1. Define your tools | |
| // ============================================ | |
| const tools = [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import express from 'express'; | |
| import OpenAI from 'openai'; | |
| const app = express(); | |
| app.use(express.json()); | |
| const openai = new OpenAI({ | |
| apiKey: process.env.OPENAI_API_KEY, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @font-face { | |
| font-family: 'SourceSansPro'; | |
| src: url('SourceSansPro-ExtraLight.ttf') format('truetype'); | |
| font-weight: 100; | |
| font-style: normal; | |
| } | |
| @font-face { | |
| font-family: 'SourceSansPro'; | |
| src: url('SourceSansPro-ExtraLightItalic.ttf') format('truetype'); |