UNPKG

taskforce-aiagent

Version:

TaskForce is a modular, open-source, production-ready TypeScript agent framework for orchestrating AI agents, LLM-powered autonomous agents, task pipelines, dynamic toolchains, RAG workflows and memory/retrieval systems.

18 lines (17 loc) 721 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadPromptFromFile = loadPromptFromFile; const fs_1 = __importDefault(require("fs")); const path_1 = __importDefault(require("path")); function loadPromptFromFile(filePath) { const absolutePath = path_1.default.isAbsolute(filePath) ? filePath : path_1.default.join(process.cwd(), filePath); if (!fs_1.default.existsSync(absolutePath)) { throw new Error(`Prompt file not found: ${absolutePath}`); } return fs_1.default.readFileSync(absolutePath, "utf-8"); }