neoctl 0.2.14 → 0.2.15
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/dist/repl/index.js +36 -5
- package/dist/repl/index.js.map +1 -1
- package/dist/web/index.d.ts +8 -1
- package/dist/web/index.js +174 -12
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
package/dist/repl/index.js
CHANGED
|
@@ -231,6 +231,40 @@ function createTaskNotificationSource(taskStore) {
|
|
|
231
231
|
},
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
+
function resolveSkillCatalogRoots(cwd) {
|
|
235
|
+
const userRoot = path.resolve(process.env.NEO_SKILL_CREATE_ROOT || path.join(getNeoctlHome(), "skills"));
|
|
236
|
+
const configuredRoots = splitPathList(process.env.NEO_SKILL_ROOTS);
|
|
237
|
+
const workspaceRoot = path.resolve(cwd, ".neo", "skills");
|
|
238
|
+
const roots = uniquePaths([
|
|
239
|
+
userRoot,
|
|
240
|
+
...configuredRoots,
|
|
241
|
+
workspaceRoot,
|
|
242
|
+
]).map((root) => ({
|
|
243
|
+
root,
|
|
244
|
+
kind: path.resolve(root) === userRoot ? "user" : "workspace",
|
|
245
|
+
}));
|
|
246
|
+
return { roots, createRoot: userRoot };
|
|
247
|
+
}
|
|
248
|
+
function splitPathList(value) {
|
|
249
|
+
return String(value || "")
|
|
250
|
+
.split(path.delimiter)
|
|
251
|
+
.map((item) => item.trim())
|
|
252
|
+
.filter(Boolean)
|
|
253
|
+
.map((item) => path.resolve(item));
|
|
254
|
+
}
|
|
255
|
+
function uniquePaths(values) {
|
|
256
|
+
const seen = new Set();
|
|
257
|
+
const result = [];
|
|
258
|
+
for (const value of values) {
|
|
259
|
+
const resolved = path.resolve(value);
|
|
260
|
+
const key = process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
261
|
+
if (seen.has(key))
|
|
262
|
+
continue;
|
|
263
|
+
seen.add(key);
|
|
264
|
+
result.push(resolved);
|
|
265
|
+
}
|
|
266
|
+
return result;
|
|
267
|
+
}
|
|
234
268
|
async function createRuntime() {
|
|
235
269
|
const envLoad = loadDefaultDotEnvFiles({ override: true });
|
|
236
270
|
const modelConfig = readModelProviderConfig(process.env);
|
|
@@ -242,12 +276,9 @@ async function createRuntime() {
|
|
|
242
276
|
const secretStore = await SecretStore.open();
|
|
243
277
|
const secretRedactions = new InMemorySecretRedactionRegistry();
|
|
244
278
|
const tools = new ToolRegistry();
|
|
245
|
-
const skillWorkspaceRoot =
|
|
279
|
+
const { roots: skillRoots, createRoot: skillWorkspaceRoot } = resolveSkillCatalogRoots(process.cwd());
|
|
246
280
|
const skills = new FileSystemSkillCatalog({
|
|
247
|
-
roots:
|
|
248
|
-
{ root: skillWorkspaceRoot, kind: "workspace" },
|
|
249
|
-
{ root: path.resolve(getNeoctlHome(), "skills"), kind: "user" },
|
|
250
|
-
],
|
|
281
|
+
roots: skillRoots,
|
|
251
282
|
createRoot: skillWorkspaceRoot,
|
|
252
283
|
});
|
|
253
284
|
tools.register(editTool);
|