88 lines
3.7 KiB
JSON
88 lines
3.7 KiB
JSON
{
|
||
"schema": 1,
|
||
"id": "file-explorer",
|
||
"name": "File explorer",
|
||
"version": "1.2.0",
|
||
"description": "Browse and read the files of your projects — the reports, notes and tables a conversation names open here (markdown rendered, CSV as a table, code, downloads; images, videos, PDFs… open in their viewer plugin), plus a project's Files card",
|
||
"category": "dev",
|
||
"languages": ["en", "fr"],
|
||
"i18n": "i18n",
|
||
"icon": "icon.svg",
|
||
"color": "#61718a",
|
||
"author": "gabrielvidal",
|
||
"seed": true,
|
||
"managed": { "defaultForGuests": true },
|
||
"capabilities": ["hostfiles.read"],
|
||
"ui": {
|
||
"pages": [
|
||
{
|
||
"id": "files",
|
||
"label": "Files",
|
||
"nav": "projects",
|
||
"icon": "folder-open",
|
||
"html": "ui/files.html",
|
||
"fill": true,
|
||
"opens": ["host-file"]
|
||
}
|
||
],
|
||
"slots": [
|
||
{ "id": "project-files", "where": "project.detail", "html": "ui/project-files.html", "height": 160 }
|
||
]
|
||
},
|
||
"actions": {
|
||
"roots": {
|
||
"script": "handlers/roots.py", "timeoutSec": 20, "readOnly": true,
|
||
"description": "Where you may start browsing: your projects (the owner: also ~/homelab and the worktrees)"
|
||
},
|
||
"dir": {
|
||
"script": "handlers/dir.py", "timeoutSec": 20, "readOnly": true,
|
||
"description": "One folder's entries, folders first (secrets and noise folders never listed)"
|
||
},
|
||
"file": {
|
||
"script": "handlers/file.py", "timeoutSec": 20, "readOnly": true,
|
||
"description": "One file's card and, for a text file, its content (512 KB at most)"
|
||
},
|
||
"recent": {
|
||
"script": "handlers/recent.py", "timeoutSec": 30, "readOnly": true,
|
||
"description": "A project's documents (reports, notes, tables), newest first"
|
||
},
|
||
"ls": {
|
||
"script": "handlers/ls.py", "timeoutSec": 20, "readOnly": true,
|
||
"description": "A folder's entries — or, with no path, where you may start browsing"
|
||
}
|
||
},
|
||
"commands": {
|
||
"ls": {
|
||
"action": "ls",
|
||
"summary": "List a folder of your projects (no path: the places you may browse)",
|
||
"description": "One folder of a project you may read — ~/projects/<name>/… (the owner: also ~/homelab/… and ~/worktrees/<dir>/…), folders first. Without a path, the places you may start from. Secrets (.env, keys…) and noise folders (.git, node_modules…) are never listed.",
|
||
"args": [
|
||
{ "name": "path", "positional": true, "help": "A folder, as ~/projects/<name>/… or /home/<you>/projects/<name>/…" }
|
||
],
|
||
"output": { "rows": "entries", "columns": ["name", "kind", "size", "mtime", "path"] },
|
||
"mcp": true
|
||
},
|
||
"read": {
|
||
"action": "file",
|
||
"summary": "Read one file of your projects (text up to 512 KB)",
|
||
"description": "The text of one file you may read — a report, notes, a table, code. A binary file (an image, a PDF) answers what it is instead; --json gives its card (kind, size, modified).",
|
||
"args": [
|
||
{ "name": "path", "positional": true, "required": true, "help": "The file, as ~/projects/<name>/… or the full path a message names." }
|
||
],
|
||
"output": { "text": "text" },
|
||
"mcp": true
|
||
},
|
||
"recent": {
|
||
"action": "recent",
|
||
"summary": "A project's documents, newest first",
|
||
"description": "The documents of one project (markdown, CSV, PDF, text, office files), most recently changed first.",
|
||
"args": [
|
||
{ "name": "project", "positional": true, "required": true, "help": "The project's folder name under ~/projects." },
|
||
{ "name": "limit", "type": "integer", "default": 12, "help": "How many (1–50)." }
|
||
],
|
||
"output": { "rows": "entries", "columns": ["name", "mtime", "size", "path"] },
|
||
"mcp": true
|
||
}
|
||
}
|
||
}
|