π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π§ chore: stop prettier from rewriting shell blocks in Markdown (#20016)
YuTengjing769c006afcc6
diff --git a/.agents/skills/cli/references/agent.md b/.agents/skills/cli/references/agent.mdindex a111dcaf9f4..38a256df2cd 100644--- a/.agents/skills/cli/references/agent.md+++ b/.agents/skills/cli/references/agent.md@@ -8,7 +8,7 @@ Manage AI agents: create, edit, delete, list, run, and check status.List all agents.-```text+```bashlh agent list [-L <n>] [-k <keyword>] [--json [fields]]```@@ -26,7 +26,7 @@ lh agent list [-L <n>] [-k <keyword>] [--json [fields]]View agent configuration details. `agentId` may be omitted when `-s, --slug` is given instead.-```text+```bashlh agent view [agentId] [-s <slug>] [--json [fields]]```@@ -38,7 +38,7 @@ lh agent view [agentId] [-s <slug>] [--json [fields]]Create a new agent.-```text+```bashlh agent create [-t <title>] [-d <desc>] [-m <model>] [-p <provider>] [-s <role>] [--group <groupId>]```@@ -61,7 +61,7 @@ Update an existing agent. `agentId` may be omitted when `--slug` is given instea`create`/`view`, this flag has no `-s` short alias here because `-s` is used for `--system-role`).Only specified fields are updated.-```text+```bashlh agent edit [agentId] [--slug <slug>] [-t <title>] [-d <desc>] [-m <model>] [-p <provider>] [-s <role>] [--graph-file <path>] [--enable-graph] [--disable-graph] [--agency-config-file <path>] [--config-file <path>] [--json [fields]]```@@ -86,7 +86,7 @@ lh agent edit [agentId] [--slug <slug>] [-t <title>] [-d <desc>] [-m <model>] [-Delete an agent.-```text+```bashlh agent delete <agentId> [--yes]```@@ -98,7 +98,7 @@ Requires confirmation unless `--yes` is provided.Duplicate an existing agent.-```text+```bashlh agent duplicate <agentId> [-t <title>]```@@ -115,7 +115,7 @@ lh agent duplicate <agentId> [-t <title>]Start an agent execution. Streams over the agent gateway WebSocket by default, or via SSE with`--sse`.-```text+```bashlh agent run [-a <id>] [-s <slug>] [-p <text>] [-t <id>] [--no-auto-start] [--device <target>] [--no-headless] [--json] [-v] [--replay <file>] [--sse]```@@ -154,7 +154,7 @@ falls back to polling `agent status` every 10 seconds until the run reaches a teCheck agent operation status.-```text+```bashlh agent status <operationId> [--json [fields]] [--history] [--history-limit <n>]```diff --git a/.agents/skills/cli/references/conversation.md b/.agents/skills/cli/references/conversation.mdindex 0b16ef45567..39bc592e113 100644--- a/.agents/skills/cli/references/conversation.md+++ b/.agents/skills/cli/references/conversation.md@@ -8,7 +8,7 @@ Manage conversation topics (threads).### `lh topic list`-```text+```bashlh topic list [--agent-id <id>] [-L <n>] [-P <n>] [--json [fields]]```@@ -22,13 +22,13 @@ lh topic list [--agent-id <id>] [-L <n>] [-P <n>] [--json [fields]]### `lh topic search <keywords>`-```text+```bashlh topic search <keywords> [--agent-id <id>] [--json [fields]]```### `lh topic create`-```text+```bashlh topic create -t <title> [--agent-id <id>] [--favorite]```@@ -40,7 +40,7 @@ lh topic create -t <title> [--agent-id <id>] [--favorite]### `lh topic edit <id>`-```text+```bashlh topic edit <id> [-t <title>] [--favorite] [--no-favorite]```@@ -49,13 +49,13 @@ lh topic edit <id> [-t <title>] [--favorite] [--no-favorite]IDs may be passed as arguments, read from a file with `-f, --file <path>` (one per line, or aJSON array), or both combined; at least one ID must resolve or the command errors.-```text+```bashlh topic delete [id1] [id2...] [-f <path>] [--yes]```### `lh topic recent`-```text+```bashlh topic recent [-L <n>] [--json [fields]]```@@ -73,7 +73,7 @@ Manage chat messages within topics.### `lh message list`-```text+```bashlh message list [--topic-id <id>] [--agent-id <id>] [--role <role>] [--start <date>] [--end <date>] [-L <n>] [-P <n>] [--user] [--json [fields]]```@@ -94,7 +94,7 @@ lh message list [--topic-id <id>] [--agent-id <id>] [--role <role>] [--start <da### `lh message search <keywords>`-```text+```bashlh message search <keywords> [--json [fields]]```@@ -102,13 +102,13 @@ Full-text search across all messages.### `lh message delete <ids...>`-```text+```bashlh message delete <id1> [id2...] [--yes]```### `lh message count`-```text+```bashlh message count [--topic-id <id>] [--agent-id <id>] [--role <role>] [--start <date>] [--end <date>] [--group-by <field>] [--json]```@@ -126,7 +126,7 @@ lh message count [--topic-id <id>] [--agent-id <id>] [--role <role>] [--start <d### `lh message heatmap`-```text+```bashlh message heatmap [--json]```diff --git a/.agents/skills/cli/references/generate.md b/.agents/skills/cli/references/generate.mdindex f8e90a2c6b4..419d3721efe 100644--- a/.agents/skills/cli/references/generate.md+++ b/.agents/skills/cli/references/generate.md@@ -31,7 +31,7 @@ Generate text completion.**Source**: `apps/cli/src/commands/generate/text.ts`-```text+```bashlh gen text <prompt> [-m <model>] [-p <provider>] [-s <prompt>] [--temperature <n>] [--max-tokens <n>] [--stream] [--json] [--pipe]```@@ -66,7 +66,7 @@ Generate images from text prompt. This is an async operation β the command sub**Source**: `apps/cli/src/commands/generate/image.ts`-```text+```bashlh gen image <prompt> [-m <model>] [-p <provider>] [-n <n>] [--width <px>] [--height <px>] [--steps <n>] [--seed <n>] [--json]```@@ -117,7 +117,7 @@ Generate video from text prompt. This is an async operation.**Source**: `apps/cli/src/commands/generate/video.ts`-```text+```bashlh gen video <prompt> -m <model> -p <provider> [--aspect-ratio <ratio>] [--duration <sec>] [--resolution <res>] [--seed <n>] [--image <url>] [--images <urls...>] [--end-image <url>] [--json]```@@ -171,7 +171,7 @@ Text-to-speech generation.**Source**: `apps/cli/src/commands/generate/tts.ts`-```text+```bashlh gen tts <text> [-o <file>] [--voice <voice>] [--speed <n>] [--model <model>]```@@ -190,7 +190,7 @@ Audio-to-text transcription (Automatic Speech Recognition). Accepts a local path**Source**: `apps/cli/src/commands/generate/asr.ts`-```text+```bashlh gen asr <audio-file> [--model <model>] [--provider <provider>] [--language <lang>] [--json]```@@ -216,7 +216,7 @@ Wait for an async generation task to complete and download the result file.> β οΈ `<asyncTaskId>` is the UUID printed after "β Task" in the video/image output.> Do **not** pass the generation ID (`gen_xxx`) here β that will cause a server error.-```text+```bashlh gen download <generationId> <asyncTaskId> [-o <path>] [--interval <sec>] [--timeout <sec>]```@@ -247,7 +247,7 @@ Check the status of an async generation task.> β οΈ `<asyncTaskId>` is the UUID printed after "β Task" in the video/image output.> Do **not** pass the generation ID (`gen_xxx`) here β that will cause a server error.-```text+```bashlh gen status <generationId> <asyncTaskId> [--json]```@@ -271,7 +271,7 @@ lh gen status gen_xxx 7ad0eb13-xxxx-xxxx-xxxx-xxxxxxxxxxxxList all generation topics.-```text+```bashlh gen list [--json [fields]]```diff --git a/.agents/skills/cli/references/knowledge.md b/.agents/skills/cli/references/knowledge.mdindex 2f3035f4559..6cbbc928410 100644--- a/.agents/skills/cli/references/knowledge.md+++ b/.agents/skills/cli/references/knowledge.md@@ -16,7 +16,7 @@ lh kb list [--json [fields]]### `lh kb view <id>`-```text+```bashlh kb view <id> [--json [fields]]```@@ -26,7 +26,7 @@ lh kb view <id> [--json [fields]]### `lh kb create`-```text+```bashlh kb create -n <name> [-d <desc>] [--avatar <url>]```@@ -40,7 +40,7 @@ lh kb create -n <name> [-d <desc>] [--avatar <url>]### `lh kb edit <id>`-```text+```bashlh kb edit <id> [-n <name>] [-d <desc>] [--avatar <url>]```@@ -48,7 +48,7 @@ Requires at least one change flag. Errors if none specified.### `lh kb delete <id>`-```text+```bashlh kb delete <id> [--remove-files] [--yes]```@@ -59,7 +59,7 @@ lh kb delete <id> [--remove-files] [--yes]### `lh kb add-files <knowledgeBaseId>`-```text+```bashlh kb add-files <kbId> --ids <fileId1> [fileId2...]```@@ -67,7 +67,7 @@ Link existing files to a knowledge base.### `lh kb remove-files <knowledgeBaseId>`-```text+```bashlh kb remove-files <kbId> --ids <fileId1> [fileId2...] [--yes]```@@ -75,7 +75,7 @@ Unlink files from a knowledge base.### `lh kb mkdir <knowledgeBaseId>`-```text+```bashlh kb mkdir <kbId> -n <name> [--parent <folderId>]```@@ -88,7 +88,7 @@ Create a folder in a knowledge base. Uses `document.createDocument` with `fileTy### `lh kb create-doc <knowledgeBaseId>`-```text+```bashlh kb create-doc <kbId> -t <title> [-c <content>] [--parent <folderId>]```@@ -102,7 +102,7 @@ Create a document in a knowledge base. Uses `document.createDocument` with `file### `lh kb move <id>`-```text+```bashlh kb move <id> [--type <file|doc>] [--parent <folderId>]```@@ -117,7 +117,7 @@ Uses `document.updateDocument` for docs, `file.updateFile` for files.### `lh kb upload <knowledgeBaseId> <filePath>`-```text+```bashlh kb upload <kbId> <filePath> [--parent <folderId>]```@@ -139,7 +139,7 @@ Manage uploaded files.### `lh file list`-```text+```bashlh file list [--kb-id <id>] [-L <n>] [--json [fields]]```@@ -152,7 +152,7 @@ lh file list [--kb-id <id>] [-L <n>] [--json [fields]]### `lh file view <id>`-```text+```bashlh file view <id> [--json [fields]]```@@ -160,7 +160,7 @@ lh file view <id> [--json [fields]]### `lh file delete <ids...>`-```text+```bashlh file delete <id1> [id2...] [--yes]```@@ -168,7 +168,7 @@ Supports deleting multiple files at once.### `lh file recent`-```text+```bashlh file recent [-L <n>] [--json [fields]]```@@ -186,7 +186,7 @@ Manage text documents (notes, wiki pages).### `lh doc list`-```text+```bashlh doc list [-L <n>] [--file-type <type>] [--source-type <type>] [--json [fields]]```@@ -200,7 +200,7 @@ lh doc list [-L <n>] [--file-type <type>] [--source-type <type>] [--json [fields### `lh doc view <id>`-```text+```bashlh doc view <id> [--json [fields]]```@@ -208,7 +208,7 @@ lh doc view <id> [--json [fields]]### `lh doc create`-```text+```bashlh doc create -t <title> [-b <content>] [-F <path>] [--parent <id>] [--slug <slug>] [--kb <id>] [--file-type <type>]```@@ -236,13 +236,13 @@ Each object in the array can have: `title`, `content`, `fileType`, `knowledgeBas### `lh doc edit <id>`-```text+```bashlh doc edit <id> [-t <title>] [-b <content>] [-F <path>] [--parent <id>] [--file-type <type>]```### `lh doc delete <ids...>`-```text+```bashlh doc delete <id1> [id2...] [--yes]```@@ -250,7 +250,7 @@ lh doc delete <id1> [id2...] [--yes]Parse an uploaded file into a document.-```text+```bashlh doc parse <fileId> [--with-pages] [--json [fields]]```@@ -264,7 +264,7 @@ lh doc parse <fileId> [--with-pages] [--json [fields]]Associate a document with a topic. Creates a linked copy via the notebook router.-```text+```bashlh doc link-topic <docId> <topicId>```@@ -272,7 +272,7 @@ lh doc link-topic <docId> <topicId>List documents associated with a topic.-```text+```bashlh doc topic-docs <topicId> [--type <type>] [--json [fields]]```diff --git a/.agents/skills/cli/references/memory.md b/.agents/skills/cli/references/memory.mdindex 81aa590163a..e308d79d737 100644--- a/.agents/skills/cli/references/memory.md+++ b/.agents/skills/cli/references/memory.md@@ -38,7 +38,7 @@ lh memory list preference # Only preferencesCreate a new identity memory entry.-```text+```bashlh memory create [--type <type>] [--role <role>] [--relationship <rel>] [-d <desc>] [--labels <labels...>]```@@ -56,7 +56,7 @@ lh memory create [--type <type>] [--role <role>] [--relationship <rel>] [-d <desEdit a memory entry. Options vary by category:-```text+```bashlh memory edit identity <id> [--type <type>] [--role <role>] [--relationship <rel>] [-d <desc>] [--labels <labels...>]lh memory edit activity <id> [--narrative <text>] [--notes <text>] [--status <status>]lh memory edit context <id> [--title <title>] [--description <desc>] [--status <status>]@@ -90,7 +90,7 @@ lh memory edit preference <id> [--directives <text>] [--suggestions <text>]## `lh memory delete <category> <id>`-```text+```bashlh memory delete <category> <id> [--yes]```@@ -100,7 +100,7 @@ lh memory delete <category> <id> [--yes]Display the compiled memory persona summary.-```text+```bashlh memory persona [--json [fields]]```@@ -112,7 +112,7 @@ lh memory persona [--json [fields]]Trigger async memory extraction from chat history.-```text+```bashlh memory extract [--from <date>] [--to <date>]```@@ -129,7 +129,7 @@ Starts a background task that analyzes chat history and creates new memory entriCheck the status of a memory extraction task.-```text+```bashlh memory extract-status [--task-id <id>] [--json [fields]]```diff --git a/.agents/skills/cli/references/models-providers.md b/.agents/skills/cli/references/models-providers.mdindex 02bc2a7761d..b55fc1419c6 100644--- a/.agents/skills/cli/references/models-providers.md+++ b/.agents/skills/cli/references/models-providers.md@@ -29,7 +29,7 @@ lh model list lobehub --type video --json### `lh model view <id>`-```text+```bashlh model view <id> [--json [fields]]```@@ -37,7 +37,7 @@ lh model view <id> [--json [fields]]### `lh model create`-```text+```bashlh model create --id <id> --provider <providerId> [--display-name <name>] [--type <type>]```@@ -50,7 +50,7 @@ lh model create --id <id> --provider <providerId> [--display-name <name>] [--typ### `lh model edit <id>`-```text+```bashlh model edit <id> --provider <providerId> [--display-name <name>] [--type <type>]```@@ -58,7 +58,7 @@ lh model edit <id> --provider <providerId> [--display-name <name>] [--type <typeEnable or disable a model.-```text+```bashlh model toggle <id> --provider <providerId> --enablelh model toggle <id> --provider <providerId> --disable```@@ -79,7 +79,7 @@ lh model batch-toggle model1 model2 model3 --provider openai --enable### `lh model delete <id>`-```text+```bashlh model delete <id> --provider <providerId> [--yes]```@@ -87,7 +87,7 @@ lh model delete <id> --provider <providerId> [--yes]Clear all models (or only remote/fetched models) for a provider.-```text+```bashlh model clear --provider <providerId> [--remote] [--yes]```@@ -101,7 +101,7 @@ Manage AI service providers.### `lh provider list`-```text+```bashlh provider list [--json [fields]]```@@ -109,7 +109,7 @@ lh provider list [--json [fields]]### `lh provider view <id>`-```text+```bashlh provider view <id> [--json [fields]]```@@ -117,7 +117,7 @@ lh provider view <id> [--json [fields]]### `lh provider create`-```text+```bashlh provider create --id <id> -n <name> [-s <source>] [-d <desc>] [--logo <url>] [--sdk-type <type>]```@@ -132,7 +132,7 @@ lh provider create --id <id> -n <name> [-s <source>] [-d <desc>] [--logo <url>]### `lh provider edit <id>`-```text+```bashlh provider edit <id> [-n <name>] [-d <desc>] [--logo <url>] [--sdk-type <type>]```@@ -174,13 +174,13 @@ lh provider test openai -m gpt-4o --json### `lh provider toggle <id>`-```text+```bashlh provider toggle <id> --enablelh provider toggle <id> --disable```### `lh provider delete <id>`-```text+```bashlh provider delete <id> [--yes]```diff --git a/.agents/skills/cli/references/search-config.md b/.agents/skills/cli/references/search-config.mdindex d4aeccd7a74..b5a6b07bd41 100644--- a/.agents/skills/cli/references/search-config.md+++ b/.agents/skills/cli/references/search-config.md@@ -11,7 +11,7 @@ Search across local resources, or the web with `--web`.`-q, --query` is not a positional argument β it's an option. If omitted, the command prints helpand exits instead of erroring.-```text+```bashlh search -q <query> [-w] [-t <type>] [-L <n>] [-e <engines>] [-c <categories>] [-T <range>] [--json [fields]]```@@ -55,7 +55,7 @@ results are printed as a table of TITLE, URL, SCORE, CONTENT.View details of a single result: a URL crawls the page (web result); `type:id` (e.g.`agent:abc123`) looks up a local resource.-```text+```bashlh search view <target> [-i <impls>] [--json [fields]]```@@ -76,7 +76,7 @@ lh search view <target> [-i <impls>] [--json [fields]]Display current authenticated user information.-```text+```bashlh whoami [--json [fields]]```@@ -86,7 +86,7 @@ lh whoami [--json [fields]]Display usage statistics.-```text+```bashlh usage [--month <YYYY-MM>] [--agent-id <id>] [--daily] [--json [fields]]```diff --git a/.agents/skills/cli/references/skills-plugins.md b/.agents/skills/cli/references/skills-plugins.mdindex 3c246598aaa..7f3c620fc46 100644--- a/.agents/skills/cli/references/skills-plugins.md+++ b/.agents/skills/cli/references/skills-plugins.md@@ -8,7 +8,7 @@ Manage agent skills (custom instructions and capabilities).### `lh skill list`-```text+```bashlh skill list [--source <source>] [--json [fields]]```@@ -20,7 +20,7 @@ lh skill list [--source <source>] [--json [fields]]### `lh skill view <id>`-```text+```bashlh skill view <id> [--json [fields]]```@@ -28,7 +28,7 @@ lh skill view <id> [--json [fields]]### `lh skill create`-```text+```bashlh skill create -n <name> -d <desc> -c <content> [-i <id>]```@@ -43,19 +43,19 @@ lh skill create -n <name> -d <desc> -c <content> [-i <id>]Requires at least one of `-c`/`-n`/`-d`; errors if none specified.-```text+```bashlh skill edit <id> [-n <name>] [-d <desc>] [-c <content>]```### `lh skill delete <id>`-```text+```bashlh skill delete <id> [--yes]```### `lh skill search <query>`-```text+```bashlh skill search <query> [--json [fields]]```@@ -93,7 +93,7 @@ lh skill i my-cool-skillList files/resources within a skill.-```text+```bashlh skill resources <id> [--json [fields]]```@@ -103,7 +103,7 @@ lh skill resources <id> [--json [fields]]Read a specific resource file from a skill.-```text+```bashlh skill read-resource <id> <path>```@@ -119,7 +119,7 @@ Install and manage plugins (external tool integrations).### `lh plugin list`-```text+```bashlh plugin list [--json [fields]]```@@ -127,7 +127,7 @@ lh plugin list [--json [fields]]### `lh plugin install`-```text+```bashlh plugin install -i <id> --manifest <json> [--type <type>] [--settings <json>]```@@ -140,7 +140,7 @@ lh plugin install -i <id> --manifest <json> [--type <type>] [--settings <json>]### `lh plugin uninstall <id>`-```text+```bashlh plugin uninstall <id> [--yes]```@@ -148,6 +148,6 @@ lh plugin uninstall <id> [--yes]Requires `--manifest` or `--settings` (at least one); errors if neither is specified.-```text+```bashlh plugin update <id> [--manifest <json>] [--settings <json>]```diff --git a/AGENTS.md b/AGENTS.mdindex cd220823936..426aab27e4a 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -15,8 +15,6 @@ Guidelines for using AI coding agents in this opensource LobeHub repository.`AGENTS.md` owns repository-wide architecture and workflow. Keep detailed implementation rules in skills so they have one source of truth.-In skill and agent Markdown, put command synopses or shell snippets containing `<placeholder>` or `[optional]` syntax in ` ```text ` fences. Prettier's shell plugin formats ` ```bash ` fences and rewrites those placeholders as redirections and globs, e.g. `<id>` becomes `< id >`.-The `acceptance` skill is generated from the default branch of [lobehub/acceptance](https://github.com/lobehub/acceptance). Maintain its source there; update the committed `.agents/skills/acceptance/` copy using `bun apps/cli/src/index.ts acceptance update`. Repository-specific acceptance setup stays in `.agents/acceptance/`.- **React and TSX**: Before editing components, component state, render boundaries, or memoization, read the `react` skill. It owns component selection, styling, state locality, and render-performance rules.diff --git a/prettier.config.mjs b/prettier.config.mjsindex 9e4f773a4e0..28c65bd9591 100644--- a/prettier.config.mjs+++ b/prettier.config.mjs@@ -1,3 +1,17 @@import { prettier } from '@lobehub/lint';-export default prettier;+export default {+ ...prettier,+ overrides: [+ ...prettier.overrides,+ {+ /**+ * Leave shell code blocks in docs untouched. prettier-plugin-sh parses command synopses such as+ * `lh model view <id> [--json]` as real shell and rewrites `<id>` into a redirection and+ * `[--json]` into a glob. Standalone `.sh` files keep the shell formatter.+ */+ files: ['*.md', '*.mdx'],+ options: { plugins: prettier.plugins.filter((plugin) => plugin !== 'prettier-plugin-sh') },+ },+ ],+};