feat(engine): add remote skill loading support#88
Open
Conversation
Allows the engine to fetch skills from one or more HTTP endpoints at
initialization time, merging them with locally discovered SKILL.md files
(local skills take priority on name collision).
Key changes:
- Add `remote-skill-loader.ts`: typed fetch helpers that call a remote
endpoint (GET → { skills: [...] }) with configurable timeout and headers.
Errors are caught gracefully so engine startup is never interrupted.
- Extend `BuiltInSkillRegistry.loadRemoteEndpoints()` to pull remote skills
into the registry after local scan is complete.
- Convert `builtInSkillsPlugin` constant to `createBuiltInSkillsPlugin()`
factory so remote config can be injected at construction time; the legacy
`builtInSkillsPlugin` export is kept as a zero-config default instance.
- Add `remoteSkills?: RemoteSkillConfig` to `EngineOptions`; the engine
passes it to the skills-plugin factory during `prepareEnginePlugins()`.
- Export `RemoteSkillConfig`, `BuiltInSkillsPluginOptions`, and
`createBuiltInSkillsPlugin` from the engine's public API.
Usage:
const engine = new Engine({
remoteSkills: {
endpoints: 'https://skills.example.com/api/skills',
headers: { Authorization: 'Bearer <token>' },
timeout: 8000,
}
});
https://claude.ai/code/session_01GUYBJParncC2gYCv84EBT5
Skills plugin now auto-discovers .pulse-coder/remote-skills.{json,yaml,yml}
(and legacy .coder/, user-level ~/.pulse-coder/, ~/.coder/ paths) at engine
initialization time, so remote endpoints can be declared without any code
changes.
- Add readRemoteSkillsConfigFile(cwd): scans standard paths and parses the
first found config file (JSON or YAML), with ${ENV_VAR} / ${VAR:-default}
substitution support.
- Add mergeRemoteSkillConfigs(fileConfig, programmaticConfig): deduplicates
endpoints from both sources; programmatic headers/timeout take priority
over file-level values.
- Update createBuiltInSkillsPlugin.initialize() to call both helpers and
pass the merged config to loadRemoteEndpoints().
Config file format (.pulse-coder/remote-skills.json):
{
"endpoints": ["https://skills.example.com/api/skills"],
"headers": { "Authorization": "Bearer ${SKILL_API_TOKEN}" },
"timeout": 8000
}
https://claude.ai/code/session_01GUYBJParncC2gYCv84EBT5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows the engine to fetch skills from one or more HTTP endpoints at
initialization time, merging them with locally discovered SKILL.md files
(local skills take priority on name collision).
Key changes:
remote-skill-loader.ts: typed fetch helpers that call a remoteendpoint (GET → { skills: [...] }) with configurable timeout and headers.
Errors are caught gracefully so engine startup is never interrupted.
BuiltInSkillRegistry.loadRemoteEndpoints()to pull remote skillsinto the registry after local scan is complete.
builtInSkillsPluginconstant tocreateBuiltInSkillsPlugin()factory so remote config can be injected at construction time; the legacy
builtInSkillsPluginexport is kept as a zero-config default instance.remoteSkills?: RemoteSkillConfigtoEngineOptions; the enginepasses it to the skills-plugin factory during
prepareEnginePlugins().RemoteSkillConfig,BuiltInSkillsPluginOptions, andcreateBuiltInSkillsPluginfrom the engine's public API.Usage:
const engine = new Engine({
remoteSkills: {
endpoints: 'https://skills.example.com/api/skills',
headers: { Authorization: 'Bearer ' },
timeout: 8000,
}
});
https://claude.ai/code/session_01GUYBJParncC2gYCv84EBT5