@lobehub/cli 0.0.141 → 0.0.143

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/index.js CHANGED
@@ -267611,7 +267611,7 @@ const execFileAsync$2 = promisify(execFile);
267611
267611
  const PROJECT_FILE_GLOB_LIMIT = 5e3;
267612
267612
  const PROJECT_FILE_SEARCH_DEFAULT_LIMIT = 100;
267613
267613
  const PROJECT_DIRECTORY_LIST_LIMIT = 1e3;
267614
- const toPosixRelativePath$1 = (filePath) => filePath.split(path.sep).join("/");
267614
+ const toPosixRelativePath = (filePath) => filePath.split(path.sep).join("/");
267615
267615
  /** Parent of a posix index path (`a/b/c.ts` → `a/b/`), or null at the root. */
267616
267616
  const getParentRelativePath = (relativePath) => {
267617
267617
  const cleaned = relativePath.endsWith("/") ? relativePath.slice(0, -1) : relativePath;
@@ -267620,7 +267620,7 @@ const getParentRelativePath = (relativePath) => {
267620
267620
  return `${cleaned.slice(0, index)}/`;
267621
267621
  };
267622
267622
  const createProjectFileEntry = (root, absolutePath, isDirectory, gitIgnored, collapsed) => {
267623
- const relativePath = toPosixRelativePath$1(path.relative(root, absolutePath));
267623
+ const relativePath = toPosixRelativePath(path.relative(root, absolutePath));
267624
267624
  return {
267625
267625
  ...collapsed ? { collapsed: true } : {},
267626
267626
  ...gitIgnored ? { gitIgnored: true } : {},
@@ -268503,7 +268503,6 @@ const prepareSkillDirectory = async (params, deps = {}) => {
268503
268503
 
268504
268504
  //#endregion
268505
268505
  //#region ../../packages/device-control/src/workspace.ts
268506
- const MAX_SKILL_FILE_COUNT = 1e3;
268507
268506
  const DEFAULT_DIRECTORY_PAGE_SIZE = 200;
268508
268507
  const MAX_DIRECTORY_PAGE_SIZE = 1e3;
268509
268508
  const SKILL_SOURCES = [
@@ -268575,30 +268574,6 @@ const createDeviceSkillRoots = () => {
268575
268574
  * before its parents, project before device.
268576
268575
  */
268577
268576
  const createSkillRoots = async (root) => [...createProjectSkillRoots(root, await resolveAgentFileDirs(root)), ...createDeviceSkillRoots()];
268578
- const toPosixRelativePath = (filePath) => filePath.split(path.sep).join("/");
268579
- const listSkillFilesRecursive = async (dir) => {
268580
- const results = [];
268581
- const stack = [dir];
268582
- while (stack.length > 0 && results.length < MAX_SKILL_FILE_COUNT) {
268583
- const current = stack.pop();
268584
- let entries;
268585
- try {
268586
- entries = await readdir(current, { withFileTypes: true });
268587
- } catch {
268588
- continue;
268589
- }
268590
- for (const entry of entries) {
268591
- if (entry.name.startsWith(".")) continue;
268592
- const full = path.join(current, entry.name);
268593
- if (entry.isDirectory()) stack.push(full);
268594
- else if (entry.isFile()) {
268595
- results.push(toPosixRelativePath(path.relative(dir, full)));
268596
- if (results.length >= MAX_SKILL_FILE_COUNT) break;
268597
- }
268598
- }
268599
- }
268600
- return results.sort();
268601
- };
268602
268577
  const readStringField = (data, field) => {
268603
268578
  const value = data[field];
268604
268579
  return typeof value === "string" ? value.trim() : void 0;
@@ -268621,7 +268596,9 @@ const parseSkillFrontmatter = (raw) => {
268621
268596
  };
268622
268597
  /**
268623
268598
  * Scan one skill source directory and return parsed frontmatter for each
268624
- * `SKILL.md`. Returns `[]` when the source directory is absent or unreadable.
268599
+ * `SKILL.md`. Once a directory contains `SKILL.md`, treat it as a skill root
268600
+ * and do not recurse into its subdirectories (`scripts/`, `references/`, etc.).
268601
+ * Returns `[]` when the source directory is absent or unreadable.
268625
268602
  * Unsorted — callers sort/merge.
268626
268603
  */
268627
268604
  const scanSkillsInSource = async ({ previewRoot, scope, source, sourceRoot }) => {
@@ -268631,17 +268608,14 @@ const scanSkillsInSource = async ({ previewRoot, scope, source, sourceRoot }) =>
268631
268608
  } catch {
268632
268609
  return [];
268633
268610
  }
268634
- return (await Promise.all(entries.filter((entry) => entry.isDirectory() || entry.isSymbolicLink()).map(async (entry) => {
268611
+ return (await Promise.all(entries.filter((entry) => !entry.name.startsWith(".") && (entry.isDirectory() || entry.isSymbolicLink())).map(async (entry) => {
268635
268612
  const skillDir = path.join(sourceRoot, entry.name);
268636
268613
  const skillFile = path.join(skillDir, "SKILL.md");
268637
268614
  try {
268638
268615
  const fields = parseSkillFrontmatter(await readFile(skillFile, "utf8"));
268639
- const files = await listSkillFilesRecursive(skillDir);
268640
268616
  return {
268641
268617
  description: fields.description || void 0,
268642
268618
  disableModelInvocation: fields.disableModelInvocation,
268643
- fileCount: files.length,
268644
- files,
268645
268619
  name: fields.name || entry.name,
268646
268620
  path: skillFile,
268647
268621
  previewRoot,
package/man/man1/lh.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .\" Code generated by `npm run man:generate`; DO NOT EDIT.
2
2
  .\" Manual command details come from the Commander command tree.
3
- .TH LH 1 "" "@lobehub/cli 0.0.141" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.143" "User Commands"
4
4
  .SH NAME
5
5
  lh \- LobeHub CLI \- manage and connect to LobeHub services
6
6
  .SH SYNOPSIS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/cli",
3
- "version": "0.0.141",
3
+ "version": "0.0.143",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lobehub/lobehub",
@@ -83,5 +83,5 @@
83
83
  "access": "public",
84
84
  "registry": "https://registry.npmjs.org"
85
85
  },
86
- "gitHead": "d46a77aa0da62fcb13cbced8dda127339ee85a0d"
86
+ "gitHead": "a09a54f41f585315bc349cd1668777fabd72fd4d"
87
87
  }