
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="adcd3e9a-7a73-5a55-b95c-25a1eff50a55")}catch(e){}}();
import { fixedAjvCompile } from '../tools/utils.js';
import { ajv } from '../utils/ajv.js';
/**
 * Prompt MCP arguments list.
 */
const args = [
    {
        name: 'topic',
        description: 'The topic to retrieve the latest news on.',
        required: true,
    },
    {
        name: 'timespan',
        description: 'The timespan for which to retrieve news articles. Defaults to "7 days". For example "1 day", "3 days", "7 days", "1 month", etc.',
        required: false,
    },
];
/**
 * Prompt AJV arguments schema for validation.
 */
const argsSchema = fixedAjvCompile(ajv, {
    type: 'object',
    properties: {
        ...Object.fromEntries(args.map((arg) => [arg.name, {
                type: 'string',
                description: arg.description,
            }])),
    },
    required: [...args.filter((arg) => arg.required).map((arg) => arg.name)],
});
/**
 * Actual prompt definition.
 */
export const latestNewsOnTopicPrompt = {
    name: 'GetLatestNewsOnTopic',
    description: 'This prompt retrieves the latest news articles on a selected topic.',
    arguments: args,
    ajvValidate: argsSchema,
    render: (data) => {
        const currentDateUtc = new Date().toISOString().split('T')[0];
        const timespan = data.timespan && data.timespan.trim() !== '' ? data.timespan : '7 days';
        return `I want you to use the RAG web browser to search the web for the latest news on the "${data.topic}" topic. Retrieve news from the last ${timespan}. The RAG web browser accepts a query parameter that supports all Google input, including filters and flags—be sure to use them to accomplish my goal. Today is ${currentDateUtc} UTC.`;
    },
};
//# sourceMappingURL=latest_news_on_topic.js.map
//# debugId=adcd3e9a-7a73-5a55-b95c-25a1eff50a55
