├── huf ├── modules.txt ├── config │ └── __init__.py ├── huf │ ├── __init__.py │ ├── doctype │ │ ├── __init__.py │ │ ├── agent │ │ │ ├── __init__.py │ │ │ ├── test_agent.py │ │ │ ├── agent_dashboard.py │ │ │ └── agent.js │ │ ├── agent_chat │ │ │ ├── __init__.py │ │ │ ├── test_agent_chat.py │ │ │ ├── agent_chat.py │ │ │ └── agent_chat.json │ │ ├── agent_role │ │ │ ├── __init__.py │ │ │ ├── agent_role.py │ │ │ └── agent_role.json │ │ ├── agent_run │ │ │ ├── __init__.py │ │ │ ├── agent_run.js │ │ │ ├── test_agent_run.py │ │ │ ├── agent_run.py │ │ │ └── agent_run_dashboard.py │ │ ├── agent_tool │ │ │ ├── __init__.py │ │ │ ├── agent_tool.py │ │ │ └── agent_tool.json │ │ ├── agent_user │ │ │ ├── __init__.py │ │ │ ├── agent_user.py │ │ │ └── agent_user.json │ │ ├── ai_model │ │ │ ├── __init__.py │ │ │ ├── ai_model.js │ │ │ ├── test_ai_model.py │ │ │ ├── ai_model.py │ │ │ ├── ai_model_dashboard.py │ │ │ └── ai_model.json │ │ ├── agent_console │ │ │ ├── __init__.py │ │ │ ├── test_agent_console.py │ │ │ ├── agent_console.py │ │ │ ├── agent_console.js │ │ │ └── agent_console.json │ │ ├── agent_message │ │ │ ├── __init__.py │ │ │ ├── agent_message.js │ │ │ ├── test_agent_message.py │ │ │ └── agent_message.py │ │ ├── agent_run_group │ │ │ ├── __init__.py │ │ │ ├── agent_run_group.js │ │ │ ├── test_agent_run_group.py │ │ │ ├── agent_run_group.py │ │ │ └── agent_run_group.json │ │ ├── agent_settings │ │ │ ├── __init__.py │ │ │ ├── agent_settings.js │ │ │ ├── test_agent_settings.py │ │ │ ├── agent_settings.py │ │ │ └── agent_settings.json │ │ ├── agent_tool_call │ │ │ ├── __init__.py │ │ │ ├── agent_tool_call.js │ │ │ ├── test_agent_tool_call.py │ │ │ ├── agent_tool_call.py │ │ │ └── agent_tool_call.json │ │ ├── agent_tool_type │ │ │ ├── __init__.py │ │ │ ├── agent_tool_type.js │ │ │ ├── test_agent_tool_type.py │ │ │ ├── agent_tool_type.py │ │ │ └── agent_tool_type.json │ │ ├── agent_trigger │ │ │ ├── __init__.py │ │ │ ├── test_agent_trigger.py │ │ │ ├── agent_trigger.js │ │ │ └── agent_trigger.py │ │ ├── ai_provider │ │ │ ├── __init__.py │ │ │ ├── ai_provider.js │ │ │ ├── test_ai_provider.py │ │ │ ├── ai_provider.py │ │ │ ├── ai_provider_dashboard.py │ │ │ └── ai_provider.json │ │ ├── agent_conversation │ │ │ ├── __init__.py │ │ │ ├── agent_conversation.js │ │ │ ├── test_agent_conversation.py │ │ │ ├── agent_conversation.py │ │ │ └── agent_conversation_dashboard.py │ │ ├── agent_orchestration │ │ │ ├── __init__.py │ │ │ ├── agent_orchestration.js │ │ │ ├── agent_orchestration.py │ │ │ └── test_agent_orchestration.py │ │ ├── agent_run_feedback │ │ │ ├── __init__.py │ │ │ ├── agent_run_feedback.js │ │ │ ├── test_agent_run_feedback.py │ │ │ ├── agent_run_feedback.py │ │ │ └── agent_run_feedback.json │ │ ├── agent_tool_function │ │ │ ├── __init__.py │ │ │ ├── test_agent_tool_function.py │ │ │ └── agent_tool_function_dashboard.py │ │ ├── ai_provider_settings │ │ │ ├── __init__.py │ │ │ ├── ai_provider_settings.js │ │ │ ├── test_ai_provider_settings.py │ │ │ ├── ai_provider_settings.py │ │ │ └── ai_provider_settings.json │ │ ├── ai_provider_tool │ │ │ ├── __init__.py │ │ │ ├── ai_provider_tool.js │ │ │ ├── test_ai_provider_tool.py │ │ │ └── ai_provider_tool.py │ │ ├── agent_function_params │ │ │ ├── __init__.py │ │ │ ├── agent_function_params.py │ │ │ └── agent_function_params.json │ │ ├── agent_orchestration_plan │ │ │ ├── __init__.py │ │ │ ├── agent_orchestration_plan.py │ │ │ └── agent_orchestration_plan.json │ │ └── agent_tool_http_header │ │ │ ├── __init__.py │ │ │ ├── agent_tool_http_header.py │ │ │ └── agent_tool_http_header.json │ ├── report │ │ ├── __init__.py │ │ ├── agent_run_feedback │ │ │ ├── __init__.py │ │ │ └── agent_run_feedback.json │ │ ├── average_time_duration │ │ │ ├── __init__.py │ │ │ └── average_time_duration.json │ │ └── ai_model_efficiency_analysis │ │ │ ├── __init__.py │ │ │ └── ai_model_efficiency_analysis.json │ └── number_card │ │ ├── total_cost │ │ └── total_cost.json │ │ ├── total_agent_runs │ │ └── total_agent_runs.json │ │ └── success_rate │ │ └── success_rate.json ├── public │ ├── .gitkeep │ └── Images │ │ └── Huf.jpg ├── templates │ ├── __init__.py │ └── pages │ │ └── __init__.py ├── __init__.py ├── ai │ ├── orchestration │ │ ├── __init__.py │ │ ├── scheduler.py │ │ └── planning.py │ ├── providers │ │ └── openai.py │ ├── tool_serializer.py │ └── agent_scheduler.py ├── patches.txt ├── fixtures │ └── custom_html_block.json └── www │ └── huf.py ├── frontend ├── src │ ├── vite-env.d.ts │ ├── App.css │ ├── components │ │ ├── tools │ │ │ ├── index.ts │ │ │ └── ToolCard.tsx │ │ ├── ui │ │ │ ├── aspect-ratio.tsx │ │ │ ├── skeleton.tsx │ │ │ ├── collapsible.tsx │ │ │ ├── label.tsx │ │ │ ├── textarea.tsx │ │ │ ├── separator.tsx │ │ │ ├── progress.tsx │ │ │ ├── toaster.tsx │ │ │ ├── input.tsx │ │ │ ├── slider.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── tooltip.tsx │ │ │ ├── switch.tsx │ │ │ ├── badge.tsx │ │ │ ├── hover-card.tsx │ │ │ ├── popover.tsx │ │ │ ├── sonner.tsx │ │ │ ├── toggle.tsx │ │ │ ├── avatar.tsx │ │ │ ├── radio-group.tsx │ │ │ ├── scroll-area.tsx │ │ │ ├── alert.tsx │ │ │ ├── resizable.tsx │ │ │ ├── toggle-group.tsx │ │ │ ├── tabs.tsx │ │ │ ├── button.tsx │ │ │ ├── accordion.tsx │ │ │ └── input-otp.tsx │ │ ├── ai-elements │ │ │ ├── types.ts │ │ │ ├── panel.tsx │ │ │ ├── toolbar.tsx │ │ │ ├── image.tsx │ │ │ ├── canvas.tsx │ │ │ ├── controls.tsx │ │ │ ├── connection.tsx │ │ │ ├── suggestion.tsx │ │ │ ├── shimmer.tsx │ │ │ ├── checkpoint.tsx │ │ │ ├── sources.tsx │ │ │ └── node.tsx │ │ ├── DataHeaderActions.tsx │ │ ├── IntegrationsHeaderActions.tsx │ │ ├── AgentsHeaderActions.tsx │ │ ├── ChatHeaderActions.tsx │ │ ├── ProtectedRoute.tsx │ │ ├── dashboard │ │ │ ├── index.ts │ │ │ ├── cards │ │ │ │ ├── BaseCard.tsx │ │ │ │ └── StatCard.tsx │ │ │ ├── layouts │ │ │ │ ├── PageSection.tsx │ │ │ │ └── PageLayout.tsx │ │ │ └── views │ │ │ │ ├── SystemAlertsTab.tsx │ │ │ │ └── ActiveFlowsTab.tsx │ │ ├── AuthenticatingPage.tsx │ │ ├── agent │ │ │ └── types.ts │ │ ├── FlowsHeaderActions.tsx │ │ ├── UserAvatar.tsx │ │ ├── app-sidebar-header.tsx │ │ ├── Header.tsx │ │ ├── HomeHeaderActions.tsx │ │ ├── nav-main.tsx │ │ ├── FlowNode.tsx │ │ ├── chat │ │ │ └── CopyButton.tsx │ │ ├── nodes │ │ │ └── EndNode.tsx │ │ └── app-sidebar.tsx │ ├── lib │ │ ├── utils.ts │ │ └── frappe-sdk.ts │ ├── main.tsx │ ├── types │ │ ├── pagination.ts │ │ └── modal.types.ts │ ├── data │ │ ├── doctypes.ts │ │ ├── triggers.ts │ │ └── actions.ts │ ├── utils │ │ ├── status.ts │ │ ├── socket.ts │ │ └── htmlUtils.ts │ ├── hooks │ │ ├── use-mobile.tsx │ │ ├── useDebounce.ts │ │ ├── dashboard │ │ │ └── usePageData.ts │ │ └── useChatSocket.tsx │ ├── contexts │ │ └── IntegrationsContext.tsx │ ├── pages │ │ ├── IntegrationsPageWrapper.tsx │ │ ├── AgentFormPageWrapper.tsx │ │ ├── DataPage.tsx │ │ ├── FlowCanvasPageWrapper.tsx │ │ ├── NotFoundPage.tsx │ │ └── FlowCanvasPage.tsx │ ├── services │ │ ├── utilsApi.ts │ │ └── toolApi.ts │ └── layouts │ │ └── UnifiedLayout.tsx ├── favicon.ico ├── postcss.config.js ├── tsconfig.json ├── .gitignore ├── components.json ├── vite.config.ts ├── tsconfig.node.json ├── index.html ├── tsconfig.app.json ├── eslint.config.js └── proxyOptions.ts ├── docs ├── mdx-components.js ├── public │ └── images │ │ ├── add-from-github.png │ │ └── add-marketplace-app.png ├── app │ └── docs │ │ ├── tools │ │ └── _meta.json │ │ ├── guides │ │ └── _meta.json │ │ ├── concepts │ │ └── _meta.json │ │ └── _meta.json ├── next-env.d.ts ├── tsconfig.json ├── theme.config.jsx ├── package.json ├── next.config.js └── README.md ├── yarn.lock ├── .gitignore ├── .editorconfig ├── package.json ├── .github └── workflows │ └── linter.yml ├── pyproject.toml └── .pre-commit-config.yaml /huf/modules.txt: -------------------------------------------------------------------------------- 1 | Huf -------------------------------------------------------------------------------- /huf/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/report/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/templates/pages/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_chat/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_role/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_user/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_model/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.0.1" 2 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_console/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_message/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_group/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_call/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_type/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_trigger/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_conversation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_orchestration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_feedback/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_function/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_tool/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/report/agent_run_feedback/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/report/average_time_duration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_function_params/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_orchestration_plan/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_http_header/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /huf/huf/report/ai_model_efficiency_analysis/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /docs/mdx-components.js: -------------------------------------------------------------------------------- 1 | export { useMDXComponents } from 'nextra-theme-docs' 2 | 3 | -------------------------------------------------------------------------------- /frontend/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridz-dev/huf/HEAD/frontend/favicon.ico -------------------------------------------------------------------------------- /huf/public/Images/Huf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridz-dev/huf/HEAD/huf/public/Images/Huf.jpg -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/public/images/add-from-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridz-dev/huf/HEAD/docs/public/images/add-from-github.png -------------------------------------------------------------------------------- /huf/ai/orchestration/__init__.py: -------------------------------------------------------------------------------- 1 | # AgentFlo Orchestration Module 2 | # Handles multi-step agent execution workflows 3 | 4 | -------------------------------------------------------------------------------- /docs/public/images/add-marketplace-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridz-dev/huf/HEAD/docs/public/images/add-marketplace-app.png -------------------------------------------------------------------------------- /frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /frontend/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /frontend/src/components/tools/index.ts: -------------------------------------------------------------------------------- 1 | export { ToolCard } from './ToolCard'; 2 | export { SelectToolsModal } from './SelectToolsModal'; -------------------------------------------------------------------------------- /docs/app/docs/tools/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "built-in": "Built-in Tools", 3 | "custom": "Creating Custom Tools", 4 | "publishing": "Publishing Tools" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /frontend/src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio'; 2 | 3 | const AspectRatio = AspectRatioPrimitive.Root; 4 | 5 | export { AspectRatio }; 6 | -------------------------------------------------------------------------------- /frontend/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from 'clsx'; 2 | import { twMerge } from 'tailwind-merge'; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /docs/app/docs/guides/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "creating-agents": "Creating Agents", 3 | "managing-agents": "Managing Agents", 4 | "running-agents": "Running Agents", 5 | "monitoring": "Monitoring & Debugging" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /huf/ai/providers/openai.py: -------------------------------------------------------------------------------- 1 | from agents import Runner 2 | 3 | async def run(agent, enhanced_prompt, provider, model, context=None): 4 | return await Runner.run(agent, enhanced_prompt, max_turns=8, context=context or {}) 5 | -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/types.ts: -------------------------------------------------------------------------------- 1 | import type { ToolUIPart } from "ai"; 2 | 3 | export type ExtendedToolState = 4 | | ToolUIPart["state"] 5 | | "approval-requested" 6 | | "approval-responded" 7 | | "output-denied"; 8 | 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_model/ai_model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("AI Model", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_tool/ai_provider_tool.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Huf and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("AI Provider Tool", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run/agent_run.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Run", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider/ai_provider.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("AI Provider", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent/test_agent.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgent(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_message/agent_message.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Message", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /docs/app/docs/concepts/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": "Interfaces (/huf vs /app)", 3 | "agents": "Agents", 4 | "providers-models": "Providers & Models", 5 | "tools": "Tools", 6 | "conversations": "Conversations", 7 | "triggers": "Triggers" 8 | } 9 | 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_role/agent_role.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Huf and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentRole(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_group/agent_run_group.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Run Group", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_settings/agent_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Settings", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_call/agent_tool_call.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Tool Call", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_type/agent_tool_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Tool Type", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_user/agent_user.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Huf and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentUser(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_model/test_ai_model.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAIModel(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_tool/test_ai_provider_tool.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Huf and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAIProviderTool(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_chat/test_agent_chat.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentChat(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run/test_agent_run.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentRun(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_conversation/agent_conversation.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Conversation", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_feedback/agent_run_feedback.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Run Feedback", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider/test_ai_provider.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAIProvider(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | node_modules 7 | __pycache__ 8 | **/yarn.lock 9 | 10 | huf/public/frontend 11 | huf/public/docs 12 | huf/www/huf.html 13 | huf/www/docs.html 14 | docs/.next 15 | docs/out 16 | docs/node_modules 17 | docs/yarn.lock -------------------------------------------------------------------------------- /huf/huf/doctype/agent_console/test_agent_console.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentConsole(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_message/test_agent_message.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentMessage(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_orchestration/agent_orchestration.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Agent Orchestration", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_trigger/test_agent_trigger.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentTrigger(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_model/ai_model.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AIModel(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_settings/ai_provider_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("AI Provider Settings", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_tool/ai_provider_tool.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Huf and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AIProviderTool(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_chat/agent_chat.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentChat(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run/agent_run.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentRun(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_group/test_agent_run_group.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentRunGroup(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_settings/test_agent_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentSettings(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool/agent_tool.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentTool(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_call/test_agent_tool_call.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentToolCall(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_type/test_agent_tool_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentToolType(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ], 7 | "compilerOptions": { 8 | "baseUrl": ".", 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider/ai_provider.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AIProvider(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. 7 | -------------------------------------------------------------------------------- /frontend/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import App from './App.tsx'; 4 | import './index.css'; 5 | 6 | createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_console/agent_console.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentConsole(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_conversation/test_agent_conversation.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentConversation(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_message/agent_message.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentMessage(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_feedback/test_agent_run_feedback.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentRunFeedback(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_group/agent_run_group.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentRunGroup(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_settings/agent_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentSettings(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_call/agent_tool_call.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentToolCall(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_function/test_agent_tool_function.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAgentToolFunction(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_type/agent_tool_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentToolType(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_settings/test_ai_provider_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestAIProviderSettings(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /docs/app/docs/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "quick-start": "Quick Start", 3 | "installation": "Installation", 4 | "concepts": "Core Concepts", 5 | "tools": "Working with Tools", 6 | "use-cases": "Use Cases", 7 | "examples": "Example Agents", 8 | "guides": "Guides", 9 | "development": "Development" 10 | } 11 | -------------------------------------------------------------------------------- /frontend/src/components/DataHeaderActions.tsx: -------------------------------------------------------------------------------- 1 | import { Plus } from 'lucide-react'; 2 | import { Button } from './ui/button'; 3 | 4 | export function DataHeaderActions() { 5 | return ( 6 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_conversation/agent_conversation.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentConversation(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run_feedback/agent_run_feedback.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentRunFeedback(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_orchestration/agent_orchestration.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentOrchestration(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider_settings/ai_provider_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AIProviderSettings(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/patches.txt: -------------------------------------------------------------------------------- 1 | [pre_model_sync] 2 | # Patches added in this section will be executed before doctypes are migrated 3 | # Read docs to understand patches: https://frappeframework.com/docs/v14/user/en/database-migrations 4 | 5 | [post_model_sync] 6 | # Patches added in this section will be executed after doctypes are migrated -------------------------------------------------------------------------------- /huf/huf/doctype/agent_function_params/agent_function_params.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentFunctionParams(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_http_header/agent_tool_http_header.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentToolHTTPHeader(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_orchestration_plan/agent_orchestration_plan.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class AgentOrchestrationPlan(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /frontend/src/types/pagination.ts: -------------------------------------------------------------------------------- 1 | export interface PaginationParams { 2 | page?: number; 3 | limit?: number; 4 | start?: number; 5 | search?: string; 6 | [key: string]: unknown; 7 | } 8 | 9 | export interface PaginatedResponse { 10 | data: T[]; 11 | hasMore: boolean; 12 | total?: number; 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_model/ai_model_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'model', 6 | 7 | 'transactions': [ 8 | { 9 | 'label': _('Context'), 10 | 'items': ['Agent', 'Agent Message'] 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_run/agent_run_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'agent_run', 6 | 7 | 'transactions': [ 8 | { 9 | 'label': _('Context'), 10 | 'items': ['Agent Tool Call', 'Agent Message'] 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /huf/huf/doctype/ai_provider/ai_provider_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'provider', 6 | 7 | 'transactions': [ 8 | { 9 | 'label': _('Context'), 10 | 'items': ['AI Model','Agent', 'Agent Message'] 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_tool_function/agent_tool_function_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'tool', 6 | 7 | 'transactions': [ 8 | { 9 | 'label': _('Context'), 10 | 'items': ['Agent', 'Agent Tool Call'] 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/lib/utils'; 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ); 13 | } 14 | 15 | export { Skeleton }; 16 | -------------------------------------------------------------------------------- /frontend/src/lib/frappe-sdk.ts: -------------------------------------------------------------------------------- 1 | import { FrappeApp } from 'frappe-js-sdk'; 2 | 3 | // Initialize Frappe App instance 4 | const frappeUrl = import.meta.env.VITE_FRAPPE_URL || window.location.origin; 5 | 6 | export const frappe = new FrappeApp(frappeUrl); 7 | 8 | export const auth = frappe.auth(); 9 | export const db = frappe.db(); 10 | export const call = frappe.call(); 11 | -------------------------------------------------------------------------------- /frontend/src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; 2 | 3 | const Collapsible = CollapsiblePrimitive.Root; 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }; 10 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | .env 15 | 16 | # Editor directories and files 17 | .vscode/* 18 | !.vscode/extensions.json 19 | .idea 20 | .DS_Store 21 | *.suo 22 | *.ntvs* 23 | *.njsproj 24 | *.sln 25 | *.sw? 26 | 27 | tsconfig.app.tsbuildinfo 28 | tsconfig.node.tsbuildinfo -------------------------------------------------------------------------------- /huf/fixtures/custom_html_block.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "docstatus": 0, 4 | "doctype": "Custom HTML Block", 5 | "html": "\n \n
Huf UI
\n
\n", 6 | "modified": "2025-12-03 18:37:34.945328", 7 | "name": "Huf", 8 | "private": 0, 9 | "roles": [], 10 | "script": null, 11 | "style": ".huflogo {\n height: 37px;\n}" 12 | } 13 | ] -------------------------------------------------------------------------------- /frontend/src/components/IntegrationsHeaderActions.tsx: -------------------------------------------------------------------------------- 1 | import { Plus } from 'lucide-react'; 2 | import { Button } from './ui/button'; 3 | import { useIntegrations } from '../contexts/IntegrationsContext'; 4 | 5 | export function IntegrationsHeaderActions() { 6 | const { onAddProvider } = useIntegrations(); 7 | 8 | return ( 9 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent/agent_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'agent', 6 | 7 | 'transactions': [ 8 | { 9 | 'label': _('Execution'), 10 | 'items': ['Agent Run','Agent Trigger'] 11 | }, 12 | { 13 | 'label': _('Context'), 14 | 'items': ['Agent Conversation', 'Agent Message'] 15 | }, 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/panel.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | import { Panel as PanelPrimitive } from "@xyflow/react"; 3 | import type { ComponentProps } from "react"; 4 | 5 | type PanelProps = ComponentProps; 6 | 7 | export const Panel = ({ className, ...props }: PanelProps) => ( 8 | 15 | ); 16 | -------------------------------------------------------------------------------- /huf/huf/doctype/agent_conversation/agent_conversation_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'conversation', 6 | 7 | 'transactions': [ 8 | { 9 | 'label': _('Execution'), 10 | 'items': ['Agent Run'] 11 | }, 12 | { 13 | 'label': _('Context'), 14 | 'items': ['Agent Tool Call', 'Agent Message'] 15 | }, 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Root editor config file 2 | root = true 3 | 4 | # Common settings 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | charset = utf-8 10 | 11 | # python, js indentation settings 12 | [{*.py,*.js,*.vue,*.css,*.scss,*.html}] 13 | indent_style = tab 14 | indent_size = 4 15 | max_line_length = 99 16 | 17 | # JSON files - mostly doctype schema files 18 | [{*.json}] 19 | insert_final_newline = false 20 | indent_style = space 21 | indent_size = 2 22 | -------------------------------------------------------------------------------- /frontend/src/data/doctypes.ts: -------------------------------------------------------------------------------- 1 | export const doctype = { 2 | User: "User", 3 | Agent: "Agent", 4 | "AI Provider": "AI Provider", 5 | "AI Model": "AI Model", 6 | "Agent Tool Function": "Agent Tool Function", 7 | "Agent Tool Type": "Agent Tool Type", 8 | "Agent Trigger": "Agent Trigger", 9 | "Agent Conversation": "Agent Conversation", 10 | "Agent Message": "Agent Message", 11 | "Agent Run": "Agent Run", 12 | } as const; 13 | 14 | export type DocType = typeof doctype[keyof typeof doctype]; 15 | -------------------------------------------------------------------------------- /frontend/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /frontend/src/components/AgentsHeaderActions.tsx: -------------------------------------------------------------------------------- 1 | import { Plus } from 'lucide-react'; 2 | import { useNavigate } from 'react-router-dom'; 3 | import { Button } from './ui/button'; 4 | 5 | export function AgentsHeaderActions() { 6 | const navigate = useNavigate(); 7 | 8 | const handleNewAgent = () => { 9 | navigate('/agents/new'); 10 | }; 11 | 12 | return ( 13 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /frontend/src/components/ChatHeaderActions.tsx: -------------------------------------------------------------------------------- 1 | import { Plus } from 'lucide-react'; 2 | import { useNavigate } from 'react-router-dom'; 3 | import { Button } from './ui/button'; 4 | 5 | export function ChatHeaderActions() { 6 | const navigate = useNavigate(); 7 | 8 | const handleNewChat = () => { 9 | navigate('/chat/new'); 10 | }; 11 | 12 | return ( 13 | 17 | ); 18 | } 19 | 20 | 21 | -------------------------------------------------------------------------------- /frontend/src/types/modal.types.ts: -------------------------------------------------------------------------------- 1 | export type ModalTab = 'explore' | 'ai-agents' | 'apps' | 'utility'; 2 | 3 | export interface TriggerOption { 4 | id: string; 5 | name: string; 6 | description?: string; 7 | icon?: string; 8 | category: 'popular' | 'highlight' | 'utility' | 'app'; 9 | tab: ModalTab; 10 | } 11 | 12 | export interface ActionOption { 13 | id: string; 14 | name: string; 15 | description?: string; 16 | icon?: string; 17 | category: 'transform' | 'control' | 'utility' | 'integration'; 18 | } 19 | -------------------------------------------------------------------------------- /frontend/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import react from '@vitejs/plugin-react'; 3 | import proxyOptions from './proxyOptions'; 4 | import { defineConfig } from 'vite'; 5 | 6 | export default defineConfig({ 7 | plugins: [react()], 8 | resolve: { 9 | alias: { 10 | '@': path.resolve(__dirname, './src'), 11 | }, 12 | }, 13 | build:{ 14 | outDir: '../huf/public/frontend', 15 | emptyOutDir: true, 16 | }, 17 | server: { 18 | port: 8080, 19 | proxy: proxyOptions 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /frontend/src/utils/status.ts: -------------------------------------------------------------------------------- 1 | export type AgentRunStatus = 'Started' | 'Queued' | 'Success' | 'Failed' | string; 2 | 3 | export type BadgeVariant = 'default' | 'secondary' | 'destructive' | 'outline'; 4 | 5 | export function getAgentRunStatusVariant(status?: AgentRunStatus): BadgeVariant { 6 | if (status === 'Success') return 'default'; 7 | if (status === 'Failed') return 'destructive'; 8 | if (status === 'Queued') return 'secondary'; 9 | if (status === 'Started') return 'outline'; 10 | return 'secondary'; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "name": "huf", 5 | "version": "0.0.1", 6 | "description": "Messaging Application", 7 | "main": "index.js", 8 | "scripts": { 9 | "dev": "cd frontend && yarn dev", 10 | "build": "yarn build-docs && yarn build-frontend", 11 | "build-docs": "cd docs && yarn install && yarn run build", 12 | "build-frontend": "cd frontend && yarn install && yarn build", 13 | "postinstall": "cd frontend && yarn install && yarn build" 14 | } 15 | } -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/toolbar.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | import { NodeToolbar, Position } from "@xyflow/react"; 3 | import type { ComponentProps } from "react"; 4 | 5 | type ToolbarProps = ComponentProps; 6 | 7 | export const Toolbar = ({ className, ...props }: ToolbarProps) => ( 8 | 16 | ); 17 | -------------------------------------------------------------------------------- /frontend/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "lib": ["ES2023"], 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | 8 | /* Bundler mode */ 9 | "moduleResolution": "bundler", 10 | "allowImportingTsExtensions": true, 11 | "isolatedModules": true, 12 | "moduleDetection": "force", 13 | "noEmit": true, 14 | 15 | /* Linting */ 16 | "strict": true, 17 | "noUnusedLocals": true, 18 | "noUnusedParameters": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "include": ["vite.config.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/image.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | import type { Experimental_GeneratedImage } from "ai"; 3 | 4 | export type ImageProps = Experimental_GeneratedImage & { 5 | className?: string; 6 | alt?: string; 7 | }; 8 | 9 | export const Image = ({ 10 | base64, 11 | uint8Array, 12 | mediaType, 13 | ...props 14 | }: ImageProps) => ( 15 | {props.alt} 24 | ); 25 | -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Huf AI 8 | 9 | 10 |
11 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /frontend/src/components/ProtectedRoute.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react'; 2 | import { useUser } from '@/contexts/UserContext'; 3 | import { AuthenticatingPage } from './AuthenticatingPage'; 4 | 5 | interface ProtectedRouteProps { 6 | children: ReactNode; 7 | } 8 | 9 | export function ProtectedRoute({ children }: ProtectedRouteProps) { 10 | const { isLoading, isAuthenticated } = useUser(); 11 | 12 | if (isLoading) { 13 | return ; 14 | } 15 | 16 | if (!isAuthenticated) { 17 | // The redirect will be handled by UserContext 18 | return null; 19 | } 20 | 21 | return <>{children}; 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /frontend/src/components/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | export { PageLayout } from './layouts/PageLayout'; 2 | export { PageSection } from './layouts/PageSection'; 3 | 4 | export { GridView } from './views/GridView'; 5 | export { ActiveAgentsTab } from './views/ActiveAgentsTab'; 6 | export { ActiveFlowsTab } from './views/ActiveFlowsTab'; 7 | export { RecentExecutionsTab } from './views/RecentExecutionsTab'; 8 | export { SystemAlertsTab } from './views/SystemAlertsTab'; 9 | 10 | export { FilterBar } from './filters/FilterBar'; 11 | 12 | export { BaseCard } from './cards/BaseCard'; 13 | export { StatCard } from './cards/StatCard'; 14 | export { ItemCard } from './cards/ItemCard'; 15 | -------------------------------------------------------------------------------- /frontend/src/hooks/use-mobile.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener("change", onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener("change", onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/canvas.tsx: -------------------------------------------------------------------------------- 1 | import { Background, ReactFlow, type ReactFlowProps } from "@xyflow/react"; 2 | import type { ReactNode } from "react"; 3 | import "@xyflow/react/dist/style.css"; 4 | 5 | type CanvasProps = ReactFlowProps & { 6 | children?: ReactNode; 7 | }; 8 | 9 | export const Canvas = ({ children, ...props }: CanvasProps) => ( 10 | 19 | 20 | {children} 21 | 22 | ); 23 | -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/controls.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | import { Controls as ControlsPrimitive } from "@xyflow/react"; 5 | import type { ComponentProps } from "react"; 6 | 7 | export type ControlsProps = ComponentProps; 8 | 9 | export const Controls = ({ className, ...props }: ControlsProps) => ( 10 | button]:rounded-md [&>button]:border-none! [&>button]:bg-transparent! [&>button]:hover:bg-secondary!", 14 | className 15 | )} 16 | {...props} 17 | /> 18 | ); 19 | -------------------------------------------------------------------------------- /frontend/src/components/AuthenticatingPage.tsx: -------------------------------------------------------------------------------- 1 | import { Loader2 } from 'lucide-react'; 2 | 3 | export function AuthenticatingPage() { 4 | return ( 5 |
6 |
7 | 8 |
9 |

Authenticating

10 |

11 | Please wait while we verify your session 12 |

13 |
14 |
15 |
16 | ); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /frontend/src/components/agent/types.ts: -------------------------------------------------------------------------------- 1 | import * as z from 'zod'; 2 | 3 | export const agentFormSchema = z.object({ 4 | agent_name: z.string().min(1, 'Agent name is required'), 5 | provider: z.string().min(1, 'Provider is required'), 6 | model: z.string().min(1, 'Model is required'), 7 | temperature: z.number().min(0).max(2), 8 | top_p: z.number().min(0).max(1), 9 | disabled: z.boolean(), 10 | allow_chat: z.boolean(), 11 | persist_conversation: z.boolean(), 12 | persist_user_history: z.boolean(), 13 | enable_multi_run: z.boolean(), 14 | description: z.string().optional(), 15 | instructions: z.string(), 16 | }); 17 | 18 | export type AgentFormValues = z.infer; 19 | 20 | -------------------------------------------------------------------------------- /frontend/src/components/FlowsHeaderActions.tsx: -------------------------------------------------------------------------------- 1 | import { Play, History, Upload } from 'lucide-react'; 2 | import { Button } from './ui/button'; 3 | 4 | export function FlowsHeaderActions() { 5 | return ( 6 | <> 7 | 11 | 15 | 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /frontend/src/components/ai-elements/connection.tsx: -------------------------------------------------------------------------------- 1 | import type { ConnectionLineComponent } from "@xyflow/react"; 2 | 3 | const HALF = 0.5; 4 | 5 | export const Connection: ConnectionLineComponent = ({ 6 | fromX, 7 | fromY, 8 | toX, 9 | toY, 10 | }) => ( 11 | 12 | 19 | 27 | 28 | ); 29 | -------------------------------------------------------------------------------- /huf/huf/number_card/total_cost/total_cost.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "cost", 3 | "creation": "2025-12-05 16:05:49.810655", 4 | "currency": "INR", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Agent Run", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[]", 10 | "function": "Sum", 11 | "idx": 0, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Total Cost", 15 | "modified": "2025-12-05 20:55:12.559246", 16 | "modified_by": "Administrator", 17 | "module": "Huf", 18 | "name": "Total Cost", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Weekly", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /huf/huf/doctype/agent_orchestration/test_agent_orchestration.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025, Tridz Technologies Pvt Ltd and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests import IntegrationTestCase 6 | 7 | 8 | # On IntegrationTestCase, the doctype test records and all 9 | # link-field test record dependencies are recursively loaded 10 | # Use these module variables to add/remove to/from that list 11 | EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] 12 | IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] 13 | 14 | 15 | 16 | class IntegrationTestAgentOrchestration(IntegrationTestCase): 17 | """ 18 | Integration tests for AgentOrchestration. 19 | Use this class for testing interactions between multiple components. 20 | """ 21 | 22 | pass 23 | -------------------------------------------------------------------------------- /huf/huf/number_card/total_agent_runs/total_agent_runs.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "creation": "2025-12-05 15:46:12.459144", 4 | "currency": "INR", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Agent Run", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[]", 10 | "function": "Count", 11 | "idx": 2, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Total Agent Runs", 15 | "modified": "2025-12-05 20:55:33.941815", 16 | "modified_by": "Administrator", 17 | "module": "Huf", 18 | "name": "Total Agent Runs", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Weekly", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": false, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "bundler", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "plugins": [ 18 | { 19 | "name": "next" 20 | } 21 | ], 22 | "paths": { 23 | "@/*": ["./*"] 24 | } 25 | }, 26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 27 | "exclude": ["node_modules"] 28 | } 29 | -------------------------------------------------------------------------------- /frontend/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | 23 | /* for ShadCN */ 24 | "baseUrl": ".", 25 | "paths": { 26 | "@/*": ["./src/*"] 27 | } 28 | }, 29 | "include": ["src"] 30 | } 31 | -------------------------------------------------------------------------------- /huf/huf/number_card/success_rate/success_rate.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "creation": "2025-12-05 15:50:01.603516", 4 | "currency": "INR", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Agent Run", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Agent Run\",\"status\",\"=\",\"Success\",false]]", 10 | "function": "Count", 11 | "idx": 1, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Success Rate", 15 | "modified": "2025-12-05 20:55:24.273006", 16 | "modified_by": "Administrator", 17 | "module": "Huf", 18 | "name": "Success Rate", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Weekly", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /huf/huf/doctype/agent_role/agent_role.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2025-12-05 12:55:46.295710", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "role" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "role", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Role", 17 | "options": "Role" 18 | } 19 | ], 20 | "grid_page_length": 50, 21 | "index_web_pages_for_search": 1, 22 | "istable": 1, 23 | "links": [], 24 | "modified": "2025-12-05 12:56:04.795409", 25 | "modified_by": "Administrator", 26 | "module": "Huf", 27 | "name": "Agent Role", 28 | "owner": "Administrator", 29 | "permissions": [], 30 | "row_format": "Dynamic", 31 | "sort_field": "modified", 32 | "sort_order": "DESC", 33 | "states": [] 34 | } -------------------------------------------------------------------------------- /huf/huf/doctype/agent_user/agent_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2025-12-05 12:54:20.620615", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "user" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "user", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "User", 17 | "options": "User" 18 | } 19 | ], 20 | "grid_page_length": 50, 21 | "index_web_pages_for_search": 1, 22 | "istable": 1, 23 | "links": [], 24 | "modified": "2025-12-05 12:54:49.426376", 25 | "modified_by": "Administrator", 26 | "module": "Huf", 27 | "name": "Agent User", 28 | "owner": "Administrator", 29 | "permissions": [], 30 | "row_format": "Dynamic", 31 | "sort_field": "modified", 32 | "sort_order": "DESC", 33 | "states": [] 34 | } -------------------------------------------------------------------------------- /frontend/src/contexts/IntegrationsContext.tsx: -------------------------------------------------------------------------------- 1 | import { createContext, useContext, ReactNode } from 'react'; 2 | 3 | interface IntegrationsContextType { 4 | onAddProvider: () => void; 5 | } 6 | 7 | const IntegrationsContext = createContext(undefined); 8 | 9 | export function IntegrationsProvider({ children, onAddProvider }: { children: ReactNode; onAddProvider: () => void }) { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | } 16 | 17 | export function useIntegrations() { 18 | const context = useContext(IntegrationsContext); 19 | if (context === undefined) { 20 | throw new Error('useIntegrations must be used within an IntegrationsProvider'); 21 | } 22 | return context; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /frontend/src/components/dashboard/cards/BaseCard.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react'; 2 | import { Card } from '@/components/ui/card'; 3 | import { cn } from '@/lib/utils'; 4 | 5 | interface BaseCardProps { 6 | children: ReactNode; 7 | onClick?: () => void; 8 | className?: string; 9 | hover?: boolean; 10 | } 11 | 12 | export function BaseCard({ 13 | children, 14 | onClick, 15 | className, 16 | hover = true, 17 | }: BaseCardProps) { 18 | return ( 19 | 29 | {children} 30 | 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /frontend/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import * as LabelPrimitive from '@radix-ui/react-label'; 3 | import { cva, type VariantProps } from 'class-variance-authority'; 4 | 5 | import { cn } from '@/lib/utils'; 6 | 7 | const labelVariants = cva( 8 | 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70' 9 | ); 10 | 11 | const Label = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef & 14 | VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 21 | )); 22 | Label.displayName = LabelPrimitive.Root.displayName; 23 | 24 | export { Label }; 25 | -------------------------------------------------------------------------------- /frontend/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { cn } from '@/lib/utils'; 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |