mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
fix: embed skill content instead of reading from disk (#2992)
* fix: spawn step skipped when no explicit --steps passed
The spawn skill injection condition used `enabledSteps?.has("spawn")`
which is falsy when enabledSteps is undefined (no --steps flag). Now
checks the recursive beta flag directly and falls through when no
explicit steps are selected, matching how auto-update works.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: embed skill content in spawn-skill.ts instead of reading from disk
The skills/ directory exists in the repo but isn't bundled when the CLI
is installed via npm. readSkillContent() couldn't find the files at
runtime, causing "No spawn skill file for agent" on every deploy.
Fixed by embedding all skill content directly as string constants in the
module. Removed fs-based getSkillsDir/readSkillContent/getSpawnSkillSourceFile
in favor of a single AGENT_SKILLS config map with inline content.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
17817533a4
commit
b47d6bbe1d
4 changed files with 155 additions and 168 deletions
|
|
@ -551,7 +551,14 @@ async function postInstall(
|
|||
}
|
||||
|
||||
// Spawn CLI + skill injection (recursive spawn)
|
||||
if (enabledSteps?.has("spawn") && cloud.cloudName !== "local") {
|
||||
// The "spawn" step is defaultOn when --beta recursive is active, so it should
|
||||
// run when no explicit steps are selected (!enabledSteps) AND the beta flag is set.
|
||||
const betaFeaturesPost = new Set((process.env.SPAWN_BETA ?? "").split(",").filter(Boolean));
|
||||
if (
|
||||
cloud.cloudName !== "local" &&
|
||||
betaFeaturesPost.has("recursive") &&
|
||||
(!enabledSteps || enabledSteps.has("spawn"))
|
||||
) {
|
||||
await installSpawnCli(cloud.runner);
|
||||
await delegateCloudCredentials(cloud.runner, cloud.cloudName);
|
||||
await injectSpawnSkill(cloud.runner, agentName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue