-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add output guardrails workflow for processing #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| 'use client' | ||
|
|
||
| import type { ReactNode } from 'react' | ||
|
|
||
| import { ChatSettingsShell } from '../components/chat-settings-shell' | ||
|
|
||
| const adminSettingsSections = [ | ||
| { | ||
| href: '/chat/admin', | ||
| title: 'Overview', | ||
| description: 'Start from the admin summary and branch into runtime or user operations.', | ||
| }, | ||
| { | ||
| href: '/chat/admin/runtime', | ||
| title: 'Runtime', | ||
| description: 'Inspect active auth/runtime context and connected model providers.', | ||
| }, | ||
| { | ||
| href: '/chat/admin/users', | ||
| title: 'Users', | ||
| description: 'Search users, change roles, moderate access, impersonate, and revoke sessions.', | ||
| }, | ||
| ] as const | ||
|
|
||
| export default function AdminSettingsLayout({ | ||
| children, | ||
| }: { | ||
| children: ReactNode | ||
| }) { | ||
| return ( | ||
| <ChatSettingsShell | ||
| title="Admin settings" | ||
| description="Operate Better Auth administration and live Mastra runtime context from focused admin routes." | ||
| sections={[...adminSettingsSections]} | ||
| > | ||
| {children} | ||
| </ChatSettingsShell> | ||
| ) | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,54 @@ | ||
| import { ChatPageShell } from '../components/chat-page-shell' | ||
| import { MainSidebar } from '../components/main-sidebar' | ||
| import { AdminSettingsPanel } from './_components/admin-management-panel' | ||
| import Link from 'next/link' | ||
|
|
||
| import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/card' | ||
| import { | ||
| Tooltip, | ||
| TooltipContent, | ||
| TooltipProvider, | ||
| TooltipTrigger, | ||
| } from '@/ui/tooltip' | ||
|
|
||
| /** | ||
| * Admin settings page for chat operators. | ||
| * Admin settings overview for chat operators. | ||
| */ | ||
| export default function AdminPage() { | ||
| const sections = [ | ||
| { | ||
| href: '/chat/admin/runtime', | ||
| title: 'Runtime context', | ||
| description: 'Inspect the live Better Auth session and Mastra provider inventory.', | ||
| }, | ||
| { | ||
| href: '/chat/admin/users', | ||
| title: 'Users', | ||
| description: 'Search users, edit records, manage roles, moderate bans, and revoke sessions.', | ||
| }, | ||
| ] as const | ||
|
|
||
| return ( | ||
| <ChatPageShell | ||
| title="Admin settings" | ||
| description="Manage the chat admin console, future moderation tools, and access policies." | ||
| sidebar={<MainSidebar />} | ||
| > | ||
| <AdminSettingsPanel /> | ||
| </ChatPageShell> | ||
| <TooltipProvider delayDuration={150}> | ||
| <div className="grid gap-4 lg:grid-cols-2"> | ||
| {sections.map((section) => ( | ||
| <Tooltip key={section.href}> | ||
| <TooltipTrigger asChild> | ||
| <Link href={section.href}> | ||
| <Card className="h-full border-border/60 bg-card/80 transition-colors hover:border-primary/30 hover:bg-primary/5"> | ||
| <CardHeader className="space-y-2"> | ||
| <CardTitle>{section.title}</CardTitle> | ||
| <CardDescription>{section.description}</CardDescription> | ||
| </CardHeader> | ||
| <CardContent className="text-sm text-muted-foreground"> | ||
| Open the focused {section.title.toLowerCase()} admin route. | ||
| </CardContent> | ||
| </Card> | ||
| </Link> | ||
| </TooltipTrigger> | ||
| <TooltipContent className="max-w-xs"> | ||
| {section.description} | ||
| </TooltipContent> | ||
| </Tooltip> | ||
| ))} | ||
| </div> | ||
| </TooltipProvider> | ||
| ) | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { AdminSettingsPanel } from '../_components/admin-management-panel' | ||
|
|
||
| export default function AdminRuntimeSettingsPage() { | ||
| return <AdminSettingsPanel section="runtime" /> | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { AdminSettingsPanel } from '../_components/admin-management-panel' | ||
|
|
||
| export default function AdminUsersSettingsPage() { | ||
| return <AdminSettingsPanel section="users" /> | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
.gitignorefile is configured to ignore itself. This is typically unintended, as it prevents future modifications to this file from being tracked by Git. This could lead to files that should be ignored being accidentally committed in the future. Please consider removing this line.