struere 0.14.7 → 0.14.8
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/bin/struere.js
CHANGED
|
@@ -3202,6 +3202,31 @@ function validateResources(payload, resources) {
|
|
|
3202
3202
|
const warnings = [];
|
|
3203
3203
|
const errors = [];
|
|
3204
3204
|
const agentSlugs = new Set(payload.agents.map((a) => a.slug));
|
|
3205
|
+
for (const agent of payload.agents) {
|
|
3206
|
+
if (!agent.systemPrompt || !agent.systemPrompt.trim()) {
|
|
3207
|
+
errors.push(`Agent "${agent.name}" (slug: ${agent.slug}) has no system prompt. Every agent needs a system prompt \u2014 see https://docs.struere.dev/sdk/define-agent`);
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
for (const agent of payload.agents) {
|
|
3211
|
+
if (!agent.tools?.includes("voice.call"))
|
|
3212
|
+
continue;
|
|
3213
|
+
const prompt = agent.systemPrompt || "";
|
|
3214
|
+
const mentionsLiteralAgentSlug = /\bagentSlug\b|\bagent_slug\b/i.test(prompt);
|
|
3215
|
+
const mentionsKnownAgentSlug = [...agentSlugs].some((s) => s !== agent.slug && prompt.includes(s));
|
|
3216
|
+
if (!mentionsLiteralAgentSlug && !mentionsKnownAgentSlug) {
|
|
3217
|
+
errors.push(`Agent "${agent.name}" uses voice.call but its system prompt doesn't reference any agentSlug. The LLM has no instruction on which agent to spawn \u2014 calls will fall back to a vanilla model with no script. Reference the target slug literally in the prompt (e.g. 'Call voice.call with agentSlug: "voice-foo"'). See https://docs.struere.dev/integrations/voice-cookbook#why-agentslug-is-mandatory`);
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
if (payload.routers) {
|
|
3221
|
+
for (const router of payload.routers) {
|
|
3222
|
+
if (router.voiceConfig && !router.voiceConfig.auditorAgent) {
|
|
3223
|
+
errors.push(`Router "${router.name}" has voiceConfig but is missing auditorAgent. The runtime requires this field even though the SDK type marks it optional. Set auditorAgent to a valid agent slug (can self-reference for single-agent setups). See https://docs.struere.dev/integrations/voice for details`);
|
|
3224
|
+
}
|
|
3225
|
+
if (router.voiceConfig?.auditorAgent && !agentSlugs.has(router.voiceConfig.auditorAgent)) {
|
|
3226
|
+
errors.push(`Router "${router.name}" references unknown auditorAgent "${router.voiceConfig.auditorAgent}". See https://docs.struere.dev/integrations/voice`);
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3205
3230
|
if (payload.routers) {
|
|
3206
3231
|
for (const router of payload.routers) {
|
|
3207
3232
|
for (const agentRef of router.agents) {
|
|
@@ -11106,7 +11131,7 @@ keysCommand.command("revoke <id-or-prefix>").description("Revoke an API key (del
|
|
|
11106
11131
|
// package.json
|
|
11107
11132
|
var package_default = {
|
|
11108
11133
|
name: "struere",
|
|
11109
|
-
version: "0.14.
|
|
11134
|
+
version: "0.14.8",
|
|
11110
11135
|
description: "Build, test, and deploy AI agents",
|
|
11111
11136
|
keywords: [
|
|
11112
11137
|
"ai",
|
package/dist/cli/index.js
CHANGED
|
@@ -3202,6 +3202,31 @@ function validateResources(payload, resources) {
|
|
|
3202
3202
|
const warnings = [];
|
|
3203
3203
|
const errors = [];
|
|
3204
3204
|
const agentSlugs = new Set(payload.agents.map((a) => a.slug));
|
|
3205
|
+
for (const agent of payload.agents) {
|
|
3206
|
+
if (!agent.systemPrompt || !agent.systemPrompt.trim()) {
|
|
3207
|
+
errors.push(`Agent "${agent.name}" (slug: ${agent.slug}) has no system prompt. Every agent needs a system prompt \u2014 see https://docs.struere.dev/sdk/define-agent`);
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
for (const agent of payload.agents) {
|
|
3211
|
+
if (!agent.tools?.includes("voice.call"))
|
|
3212
|
+
continue;
|
|
3213
|
+
const prompt = agent.systemPrompt || "";
|
|
3214
|
+
const mentionsLiteralAgentSlug = /\bagentSlug\b|\bagent_slug\b/i.test(prompt);
|
|
3215
|
+
const mentionsKnownAgentSlug = [...agentSlugs].some((s) => s !== agent.slug && prompt.includes(s));
|
|
3216
|
+
if (!mentionsLiteralAgentSlug && !mentionsKnownAgentSlug) {
|
|
3217
|
+
errors.push(`Agent "${agent.name}" uses voice.call but its system prompt doesn't reference any agentSlug. The LLM has no instruction on which agent to spawn \u2014 calls will fall back to a vanilla model with no script. Reference the target slug literally in the prompt (e.g. 'Call voice.call with agentSlug: "voice-foo"'). See https://docs.struere.dev/integrations/voice-cookbook#why-agentslug-is-mandatory`);
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
if (payload.routers) {
|
|
3221
|
+
for (const router of payload.routers) {
|
|
3222
|
+
if (router.voiceConfig && !router.voiceConfig.auditorAgent) {
|
|
3223
|
+
errors.push(`Router "${router.name}" has voiceConfig but is missing auditorAgent. The runtime requires this field even though the SDK type marks it optional. Set auditorAgent to a valid agent slug (can self-reference for single-agent setups). See https://docs.struere.dev/integrations/voice for details`);
|
|
3224
|
+
}
|
|
3225
|
+
if (router.voiceConfig?.auditorAgent && !agentSlugs.has(router.voiceConfig.auditorAgent)) {
|
|
3226
|
+
errors.push(`Router "${router.name}" references unknown auditorAgent "${router.voiceConfig.auditorAgent}". See https://docs.struere.dev/integrations/voice`);
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3205
3230
|
if (payload.routers) {
|
|
3206
3231
|
for (const router of payload.routers) {
|
|
3207
3232
|
for (const agentRef of router.agents) {
|
|
@@ -11106,7 +11131,7 @@ keysCommand.command("revoke <id-or-prefix>").description("Revoke an API key (del
|
|
|
11106
11131
|
// package.json
|
|
11107
11132
|
var package_default = {
|
|
11108
11133
|
name: "struere",
|
|
11109
|
-
version: "0.14.
|
|
11134
|
+
version: "0.14.8",
|
|
11110
11135
|
description: "Build, test, and deploy AI agents",
|
|
11111
11136
|
keywords: [
|
|
11112
11137
|
"ai",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.test.d.ts","sourceRoot":"","sources":["../../../../src/cli/utils/__tests__/validator.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAWD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,eAAe,GACzB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAWD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,eAAe,GACzB,gBAAgB,CAuGlB"}
|