remove asterix insertion into agent files

This commit is contained in:
Brian Madison
2025-12-22 08:18:53 +08:00
parent e59c7b79ed
commit 9c268f8190
38 changed files with 482 additions and 614 deletions

View File

@@ -53,15 +53,6 @@ function agentSchema(options = {}) {
if (item.trigger) {
const triggerValue = item.trigger;
if (!TRIGGER_PATTERN.test(triggerValue)) {
ctx.addIssue({
code: 'custom',
path: ['agent', 'menu', index, 'trigger'],
message: 'agent.menu[].trigger must be kebab-case (lowercase words separated by hyphen)',
});
return;
}
if (seenTriggers.has(triggerValue)) {
ctx.addIssue({
code: 'custom',
@@ -91,15 +82,6 @@ function agentSchema(options = {}) {
}
if (triggerName) {
if (!TRIGGER_PATTERN.test(triggerName)) {
ctx.addIssue({
code: 'custom',
path: ['agent', 'menu', index, 'triggers', triggerIndex],
message: `agent.menu[].triggers[] must be kebab-case (lowercase words separated by hyphen) - got "${triggerName}"`,
});
return;
}
if (seenTriggers.has(triggerName)) {
ctx.addIssue({
code: 'custom',
@@ -395,15 +377,6 @@ function buildMenuItemSchema() {
});
}
seenTriggers.add(triggerName);
// Validate trigger name format
if (!TRIGGER_PATTERN.test(triggerName)) {
ctx.addIssue({
code: 'custom',
path: ['agent', 'menu', 'triggers', index],
message: `Trigger name "${triggerName}" must be kebab-case (lowercase words separated by hyphen)`,
});
}
}
}
});