mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 00:53:28 +00:00
Agents: add skill API rate-limit guardrail (#38452)
* Agents: add rate-limit guardrail for skill API writes * Changelog: note skill API rate-limit awareness
This commit is contained in:
@@ -144,6 +144,9 @@ describe("buildAgentSystemPrompt", () => {
|
||||
|
||||
expect(prompt).toContain("## Skills (mandatory)");
|
||||
expect(prompt).toContain("<available_skills>");
|
||||
expect(prompt).toContain(
|
||||
"When a skill drives external API writes, assume rate limits: prefer fewer larger writes, avoid tight one-item loops, serialize bursts when possible, and respect 429/Retry-After.",
|
||||
);
|
||||
});
|
||||
|
||||
it("omits skills in minimal prompt mode when skillsPrompt is absent", () => {
|
||||
|
||||
@@ -29,6 +29,7 @@ function buildSkillsSection(params: { skillsPrompt?: string; readToolName: strin
|
||||
"- If multiple could apply: choose the most specific one, then read/follow it.",
|
||||
"- If none clearly apply: do not read any SKILL.md.",
|
||||
"Constraints: never read more than one skill up front; only read after selecting.",
|
||||
"- When a skill drives external API writes, assume rate limits: prefer fewer larger writes, avoid tight one-item loops, serialize bursts when possible, and respect 429/Retry-After.",
|
||||
trimmed,
|
||||
"",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user