@vfarcic/dot-ai 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core/schema.js
CHANGED
|
@@ -299,7 +299,7 @@ class ResourceRecommender {
|
|
|
299
299
|
Namespaced: ${resource.namespaced}`).join('\n\n');
|
|
300
300
|
const fs = await Promise.resolve().then(() => __importStar(require('fs')));
|
|
301
301
|
const path = await Promise.resolve().then(() => __importStar(require('path')));
|
|
302
|
-
const promptPath = path.join(
|
|
302
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'resource-selection.md');
|
|
303
303
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
304
304
|
const selectionPrompt = template
|
|
305
305
|
.replace('{intent}', intent)
|
|
@@ -412,7 +412,7 @@ class ResourceRecommender {
|
|
|
412
412
|
async loadPromptTemplate(intent, schemas) {
|
|
413
413
|
const fs = await Promise.resolve().then(() => __importStar(require('fs')));
|
|
414
414
|
const path = await Promise.resolve().then(() => __importStar(require('path')));
|
|
415
|
-
const promptPath = path.join(
|
|
415
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'resource-solution-ranking.md');
|
|
416
416
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
417
417
|
// Format resources for the prompt
|
|
418
418
|
const resourcesText = schemas.map((schema, index) => `${index}: ${schema.kind} (${schema.apiVersion})
|
|
@@ -621,7 +621,7 @@ Available Node Labels: ${clusterOptions.nodeLabels.length > 0 ? clusterOptions.n
|
|
|
621
621
|
// Load and format the question generation prompt
|
|
622
622
|
const fs = await Promise.resolve().then(() => __importStar(require('fs')));
|
|
623
623
|
const path = await Promise.resolve().then(() => __importStar(require('path')));
|
|
624
|
-
const promptPath = path.join(
|
|
624
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'question-generation.md');
|
|
625
625
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
626
626
|
const questionPrompt = template
|
|
627
627
|
.replace('{intent}', intent)
|
|
@@ -301,7 +301,7 @@ function getStageGuidance(stage) {
|
|
|
301
301
|
* Phase 1: Analyze what resources are needed for the user request
|
|
302
302
|
*/
|
|
303
303
|
async function analyzeResourceNeeds(currentSolution, openResponse, context) {
|
|
304
|
-
const promptPath = path.join(
|
|
304
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'resource-analysis.md');
|
|
305
305
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
306
306
|
// Get available resources from solution or use defaults
|
|
307
307
|
const availableResources = currentSolution.availableResources || {
|
|
@@ -357,7 +357,7 @@ async function applySolutionEnhancement(solution, openResponse, analysisResult,
|
|
|
357
357
|
* Auto-populate existing questions based on user requirements
|
|
358
358
|
*/
|
|
359
359
|
async function autoPopulateQuestions(solution, openResponse, analysisResult) {
|
|
360
|
-
const promptPath = path.join(
|
|
360
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'solution-enhancement.md');
|
|
361
361
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
362
362
|
const enhancementPrompt = template
|
|
363
363
|
.replace('{current_solution}', JSON.stringify(solution, null, 2))
|
|
@@ -218,7 +218,7 @@ async function validateManifests(yamlPath) {
|
|
|
218
218
|
*/
|
|
219
219
|
async function generateManifestsWithAI(solution, dotAI, logger, errorContext) {
|
|
220
220
|
// Load prompt template
|
|
221
|
-
const promptPath = path.join(
|
|
221
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'manifest-generation.md');
|
|
222
222
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
223
223
|
// Retrieve schemas for solution resources
|
|
224
224
|
const resourceSchemas = await retrieveResourceSchemas(solution, dotAI, logger);
|
package/dist/tools/recommend.js
CHANGED
|
@@ -59,7 +59,7 @@ exports.RECOMMEND_TOOL_INPUT_SCHEMA = {
|
|
|
59
59
|
async function validateIntentWithAI(intent, claudeIntegration) {
|
|
60
60
|
try {
|
|
61
61
|
// Load prompt template
|
|
62
|
-
const promptPath = path.join(
|
|
62
|
+
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'intent-validation.md');
|
|
63
63
|
const template = fs.readFileSync(promptPath, 'utf8');
|
|
64
64
|
// Replace template variables
|
|
65
65
|
const validationPrompt = template.replace('{intent}', intent);
|