@lichao0223/lobehub-cli 0.0.90 → 0.0.92

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
@@ -267616,7 +267616,7 @@ const execFileAsync$2 = promisify(execFile);
267616
267616
  const PROJECT_FILE_GLOB_LIMIT = 5e3;
267617
267617
  const PROJECT_FILE_SEARCH_DEFAULT_LIMIT = 100;
267618
267618
  const PROJECT_DIRECTORY_LIST_LIMIT = 1e3;
267619
- const toPosixRelativePath$1 = (filePath) => filePath.split(path.sep).join("/");
267619
+ const toPosixRelativePath = (filePath) => filePath.split(path.sep).join("/");
267620
267620
  /** Parent of a posix index path (`a/b/c.ts` → `a/b/`), or null at the root. */
267621
267621
  const getParentRelativePath = (relativePath) => {
267622
267622
  const cleaned = relativePath.endsWith("/") ? relativePath.slice(0, -1) : relativePath;
@@ -267625,7 +267625,7 @@ const getParentRelativePath = (relativePath) => {
267625
267625
  return `${cleaned.slice(0, index)}/`;
267626
267626
  };
267627
267627
  const createProjectFileEntry = (root, absolutePath, isDirectory, gitIgnored, collapsed) => {
267628
- const relativePath = toPosixRelativePath$1(path.relative(root, absolutePath));
267628
+ const relativePath = toPosixRelativePath(path.relative(root, absolutePath));
267629
267629
  return {
267630
267630
  ...collapsed ? { collapsed: true } : {},
267631
267631
  ...gitIgnored ? { gitIgnored: true } : {},
@@ -268508,7 +268508,6 @@ const prepareSkillDirectory = async (params, deps = {}) => {
268508
268508
 
268509
268509
  //#endregion
268510
268510
  //#region ../../packages/device-control/src/workspace.ts
268511
- const MAX_SKILL_FILE_COUNT = 1e3;
268512
268511
  const DEFAULT_DIRECTORY_PAGE_SIZE = 200;
268513
268512
  const MAX_DIRECTORY_PAGE_SIZE = 1e3;
268514
268513
  const SKILL_SOURCES = [
@@ -268580,30 +268579,6 @@ const createDeviceSkillRoots = () => {
268580
268579
  * before its parents, project before device.
268581
268580
  */
268582
268581
  const createSkillRoots = async (root) => [...createProjectSkillRoots(root, await resolveAgentFileDirs(root)), ...createDeviceSkillRoots()];
268583
- const toPosixRelativePath = (filePath) => filePath.split(path.sep).join("/");
268584
- const listSkillFilesRecursive = async (dir) => {
268585
- const results = [];
268586
- const stack = [dir];
268587
- while (stack.length > 0 && results.length < MAX_SKILL_FILE_COUNT) {
268588
- const current = stack.pop();
268589
- let entries;
268590
- try {
268591
- entries = await readdir(current, { withFileTypes: true });
268592
- } catch {
268593
- continue;
268594
- }
268595
- for (const entry of entries) {
268596
- if (entry.name.startsWith(".")) continue;
268597
- const full = path.join(current, entry.name);
268598
- if (entry.isDirectory()) stack.push(full);
268599
- else if (entry.isFile()) {
268600
- results.push(toPosixRelativePath(path.relative(dir, full)));
268601
- if (results.length >= MAX_SKILL_FILE_COUNT) break;
268602
- }
268603
- }
268604
- }
268605
- return results.sort();
268606
- };
268607
268582
  const readStringField = (data, field) => {
268608
268583
  const value = data[field];
268609
268584
  return typeof value === "string" ? value.trim() : void 0;
@@ -268626,7 +268601,9 @@ const parseSkillFrontmatter = (raw) => {
268626
268601
  };
268627
268602
  /**
268628
268603
  * Scan one skill source directory and return parsed frontmatter for each
268629
- * `SKILL.md`. Returns `[]` when the source directory is absent or unreadable.
268604
+ * `SKILL.md`. Once a directory contains `SKILL.md`, treat it as a skill root
268605
+ * and do not recurse into its subdirectories (`scripts/`, `references/`, etc.).
268606
+ * Returns `[]` when the source directory is absent or unreadable.
268630
268607
  * Unsorted — callers sort/merge.
268631
268608
  */
268632
268609
  const scanSkillsInSource = async ({ previewRoot, scope, source, sourceRoot }) => {
@@ -268636,17 +268613,14 @@ const scanSkillsInSource = async ({ previewRoot, scope, source, sourceRoot }) =>
268636
268613
  } catch {
268637
268614
  return [];
268638
268615
  }
268639
- return (await Promise.all(entries.filter((entry) => entry.isDirectory() || entry.isSymbolicLink()).map(async (entry) => {
268616
+ return (await Promise.all(entries.filter((entry) => !entry.name.startsWith(".") && (entry.isDirectory() || entry.isSymbolicLink())).map(async (entry) => {
268640
268617
  const skillDir = path.join(sourceRoot, entry.name);
268641
268618
  const skillFile = path.join(skillDir, "SKILL.md");
268642
268619
  try {
268643
268620
  const fields = parseSkillFrontmatter(await readFile(skillFile, "utf8"));
268644
- const files = await listSkillFilesRecursive(skillDir);
268645
268621
  return {
268646
268622
  description: fields.description || void 0,
268647
268623
  disableModelInvocation: fields.disableModelInvocation,
268648
- fileCount: files.length,
268649
- files,
268650
268624
  name: fields.name || entry.name,
268651
268625
  path: skillFile,
268652
268626
  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 "" "@lichao0223/lobehub\-cli 0.0.90" "User Commands"
3
+ .TH LH 1 "" "@lichao0223/lobehub\-cli 0.0.92" "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": "@lichao0223/lobehub-cli",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lichao0223/lobehub",
@@ -83,5 +83,5 @@
83
83
  "access": "public",
84
84
  "registry": "https://registry.npmjs.org"
85
85
  },
86
- "gitHead": "b7e180bcc0c13ce305e8476a4271de90600c2886"
86
+ "gitHead": "e81e0dab619e33ad54ffbae97bbee2b7bf57bb0d"
87
87
  }