mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
fix: add cursor to AGENT_SKILLS and add pi/cursor to spawn-skill tests (#3164)
cursor was missing from the AGENT_SKILLS map in spawn-skill.ts, causing spawn skill injection to silently skip cursor VMs when --beta recursive is active. pi was present in AGENT_SKILLS but missing from all test arrays in spawn-skill.test.ts. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a31a821e8a
commit
e26d65cd65
2 changed files with 21 additions and 0 deletions
|
|
@ -34,10 +34,18 @@ describe("getSpawnSkillPath", () => {
|
|||
"hermes",
|
||||
"~/.hermes/SOUL.md",
|
||||
],
|
||||
[
|
||||
"cursor",
|
||||
"~/.cursor/rules/spawn.md",
|
||||
],
|
||||
[
|
||||
"junie",
|
||||
"~/.junie/AGENTS.md",
|
||||
],
|
||||
[
|
||||
"pi",
|
||||
"~/.pi/agent/skills/spawn/SKILL.md",
|
||||
],
|
||||
];
|
||||
|
||||
it("returns correct remote path for each known agent", () => {
|
||||
|
|
@ -65,7 +73,9 @@ describe("isAppendMode", () => {
|
|||
"openclaw",
|
||||
"opencode",
|
||||
"kilocode",
|
||||
"cursor",
|
||||
"junie",
|
||||
"pi",
|
||||
];
|
||||
for (const agent of overwriteAgents) {
|
||||
expect(isAppendMode(agent), `agent "${agent}"`).toBe(false);
|
||||
|
|
@ -83,7 +93,9 @@ describe("getSkillContent", () => {
|
|||
"opencode",
|
||||
"kilocode",
|
||||
"hermes",
|
||||
"cursor",
|
||||
"junie",
|
||||
"pi",
|
||||
];
|
||||
|
||||
for (const agent of agents) {
|
||||
|
|
@ -110,7 +122,9 @@ describe("getSkillContent", () => {
|
|||
for (const agent of [
|
||||
"opencode",
|
||||
"kilocode",
|
||||
"cursor",
|
||||
"junie",
|
||||
"pi",
|
||||
]) {
|
||||
it(`${agent} content is plain markdown (no YAML frontmatter)`, () => {
|
||||
const content = getSkillContent(agent);
|
||||
|
|
@ -180,7 +194,9 @@ describe("injectSpawnSkill", () => {
|
|||
"opencode",
|
||||
"kilocode",
|
||||
"hermes",
|
||||
"cursor",
|
||||
"junie",
|
||||
"pi",
|
||||
];
|
||||
for (const agent of agents) {
|
||||
let capturedCmd = "";
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ const AGENT_SKILLS: Record<string, SkillConfig> = {
|
|||
content: HERMES_SNIPPET,
|
||||
append: true,
|
||||
},
|
||||
cursor: {
|
||||
remotePath: "~/.cursor/rules/spawn.md",
|
||||
content: SKILL_BODY,
|
||||
append: false,
|
||||
},
|
||||
junie: {
|
||||
remotePath: "~/.junie/AGENTS.md",
|
||||
content: SKILL_BODY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue