picocode-core 0.9.167 → 0.9.168

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picocode-core",
3
- "version": "0.9.167",
3
+ "version": "0.9.168",
4
4
  "description": "The agent runtime behind pico: sessions, tools, subagents, MCP, memory, and model access",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/controller.js CHANGED
@@ -496,7 +496,7 @@ export function createController({ boot }) {
496
496
  }
497
497
 
498
498
  async function refreshProjectIndexes() {
499
- boot.skills = await createSkillIndex(boot.root).catch(() => boot.skills) ?? boot.skills
499
+ boot.skills = await createSkillIndex(boot.root, { host: boot.hostSkills ?? [] }).catch(() => boot.skills) ?? boot.skills
500
500
  boot.commands = await createCommandIndex(boot.root).catch(() => boot.commands) ?? boot.commands
501
501
  const scan = await scanUserTools({ cwd: boot.cwd, root: boot.root }).catch(() => ({ tools: [], errors: [] }))
502
502
  for (const failure of scan.errors) {
package/src/skills.js CHANGED
@@ -136,7 +136,10 @@ Named fields and \`$ARGUMENTS\` may coexist for backwards compatibility.
136
136
  Commands are rescanned every turn, so a new command appears in the slash menu from the
137
137
  next message.`
138
138
 
139
- export async function createSkillIndex(root) {
139
+ // host skills come from whatever embeds core (a desktop app shipping its
140
+ // own built-ins); they sit between core's built-ins and the user's dirs,
141
+ // so a project skill of the same name still wins
142
+ export async function createSkillIndex(root, { host = [] } = {}) {
140
143
  const builtin = [
141
144
  {
142
145
  name: 'new-tool',
@@ -160,7 +163,7 @@ export async function createSkillIndex(root) {
160
163
  const global = await scanDir(globalSkillsDir(), 'global')
161
164
  const project = await scanDir(projectSkillsDir(root), 'project')
162
165
  const byName = new Map()
163
- for (const skill of [...builtin, ...global, ...project]) byName.set(skill.name, skill)
166
+ for (const skill of [...builtin, ...host, ...global, ...project]) byName.set(skill.name, skill)
164
167
  const skills = [...byName.values()]
165
168
 
166
169
  return {