Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .dsh-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,27 @@
"NOTHING is vendored, downloaded or installed: the daemon is the user's own service, and this package ships the HTTP client, one argv for `ollama --version`, and the arithmetic"
]
},
"dsh-huggingface": {
"version": "0.1.0-alpha.1",
"rows": [
"huggingface"
],
"rowOverrides": [],
"role": "The Hugging Face Hub as a surface the agent can interrogate before it downloads: five `hf_*` tools over the machine's own `hf` CLI and the cache on disk - `hf_status` (the CLI and its version, the cache root with the variable that chose it, every repo with BYTE-EXACT sizes, and the split between complete repos and metadata-only stubs), `hf_search` (models / datasets / spaces, ranked), `hf_repo` (one repo's licence, gated flag, architecture, parameter count, weight with the MEASURE named, the files each consumer would fetch, and whether the local copy is complete / stub / stale / absent), `hf_cache` (list without any CLI, plus verify / prune / rm, where an UNCONFIRMED removal is the CLI's own --dry-run, rm needs the repo id repeated back and prune the word \"prune\") and `hf_download` (the only bytes-moving call: the weight first, a byte ceiling it will not cross, the repo id repeated back, and the bytes the cache actually GAINED) - plus two bundled skills (the CLI, the cache layout) whose examples the package check parses. The cache scan walks the directory tree because the CLI's own JSON answers \"17.9G\" and \"3 months ago\", and it is what makes the finding reportable: MEASURED on this machine, 42 of 49 cached repos are a config.json and nothing else. Auth is reported as a PRESENCE only: no token is ever read, echoed or accepted as an argument. Host-only: one row, no route, no browser half, zero npm dependencies, no bundled engine, no socket. See packages/dsh-huggingface/README.md.",
"uses": [
"@deepseek-ai/dsh-tools (the registry the five tools are registered into)",
"@deepseek-ai/dsh-skill (ctx.skills, resolved lazily; the two skills are also copied into $DSH_HOME/skills by both installers)",
"the user's own `hf` CLI from huggingface_hub (`DSH_HF_CLI` pins a binary PATH does not carry), argv-only with a deadline and a byte cap per stream"
],
"requires": [
"`hf` installed for everything except the cache scan, `hf_cache` action list and `hf_repo` in offline mode - `hf_status` names the install line when it is missing",
"a person to accept a gated repo's licence in a browser before any token can fetch it - `hf_repo` names the page",
"`HF_HUB_OFFLINE=1` / `TRANSFORMERS_OFFLINE=1` is HONOURED: search, info and download refuse before a process starts"
],
"vendors": [
"NOTHING is vendored, downloaded or installed: `hf` is the user's own program, the cache is the user's own directory, and this package ships the cache scanner, the argv builder and the JSON reader"
]
},
"dsh-comfyui": {
"version": "0.1.0-alpha.1",
"rows": [
Expand Down
1 change: 1 addition & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ disable/replace a core row **in its own layer** — a later layer wins per row.
| `dsh-docker` | `docker` | Docker (or Podman) as a surface: nine `docker_*` tools over the machine's CLI, a `docker_start` that launches Docker Desktop or a podman machine and waits for its **daemon**, and a Docker tab of containers and images. argv-only and validated; no `exec`, no `system prune`, no free-form `run` |
| `dsh-sql-server` | `sqlserver` | SQL Server as a surface: seven `sql_*` tools over a container this row owns (2022 image, 1433, named volume) or the `sqlcmd` on PATH, keeping apart a **server** / a **client** / a **listening port** / the machine-wide **ODBC driver** an application connects with; `start` waits until the server ANSWERS a statement, and a dump loads through `-i` (stdin silently dropped rows) with BOM-aware code pages and an optional filter for the dump's own `CREATE DATABASE` header. Host-only, no route, no browser half |
| `dsh-ollama` | `ollama` | Ollama as a **measured** surface: five `ollama_*` tools over the machine's own daemon — status (models on disk, what is loaded, and `ollama serve` when nothing answers), one bounded inference with the daemon's token counts and nanosecond durations, a benchmark that **refuses fewer than 3 runs** and reports a median with spread (cold vs warm stated at the first token), models with pull/delete confirmed by repeating the tag, embeddings with cosine similarity — three skills whose examples a check parses, and a **loopback fence** that refuses a daemon on another machine before any request. Host-only, no route, no browser half |
| `dsh-huggingface` | `huggingface` | the Hub as a surface the agent can interrogate before it downloads: five `hf_*` tools over the machine's own `hf` CLI and the cache on disk. `hf_status` resolves the cache root through the library's own precedence (`HF_HUB_CACHE` > `HUGGINGFACE_HUB_CACHE` > `HF_HOME/hub` > default, with `TRANSFORMERS_CACHE` flagged deprecated) and counts every repo with BYTE-EXACT sizes, separating complete repos from the metadata-only stubs that look identical in a listing; `hf_repo` answers one repo's licence, gated flag, architecture, parameter count, weight (the Hub's `used_storage`, labelled as the measure it is, because this CLI line reports no per-file sizes), which files each consumer would fetch, and whether the local copy is complete / a stub / stale by revision / absent; `hf_cache` lists, verifies, prunes and removes — an UNCONFIRMED removal is the CLI's own `--dry-run`, `rm` needs the repo id repeated back and `prune` the word "prune"; `hf_download` reports the weight, refuses over a byte ceiling, needs the id repeated back, and answers with the bytes the cache actually GAINED. The cache scan is of the directory tree because the CLI's JSON answers `"size": "17.9G"` and `"last_accessed": "3 months ago"`, and it is what makes the finding reportable: MEASURED on this machine, 42 of 49 cached repos are a `config.json` and nothing else. Two skills (`huggingface-hub`, `huggingface-cache`) whose examples the package check parses. Host-only: one row, no route, no browser half, zero npm dependencies, no bundled engine, no socket, and no token ever read |
| `dsh-proto-lab` | `proto-lab` | the **prototyping lab**: five `lab_*` tools write a run into the lab root (`~/Desktop/vncode-lab/runs/<runtime>/<slug>/` on a machine with a Desktop, `<workspace>/lab` otherwise, `DSH_PROTO_LAB_ROOT` to move it; gitignored — the bundle ships the generator, not the runs), a runtime registry (`p5js`, `openframeworks`, and a template for the third) whose every module the checks drive, a committed example library beside each skill, an offline-vendored p5.js, and verification as an explicit ladder — `t0-structure` → `t4-measure` — that always names the tier it reached |
| `dsh-browser` | `browser` | web surface: the host fetches and renders a page in a disposable sandboxed browser (**currently disabled by the master**) |
| `dsh-themes` | `themes` | extra palettes (Nord, Monokai, Hacker, Cyber), header controls, branding, account-menu trimming |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ way and what it touches. The exact versions are in
| [`dsh-editor`](packages/dsh-editor/README.md) | Text and code tabs over a vendored CodeMirror 6, with save/create and a Markdown preview. Every extension is mapped through a guard, so an older engine opens the document unhighlighted instead of killing the tab. It also backs the `.scd`, diagram-source and research-document editors. |
| [`dsh-frontend-craft`](packages/dsh-frontend-craft/README.md) | Front-end design craft: Impeccable's Apache-2.0 corpus vendored at a pinned commit, plus its 61-rule detector built to WebAssembly inside the package. Five `fe_*` tools include `fe_render`, which renders a page in headless Chrome or Edge and measures contrast, tap targets and overflow. There is no `npx impeccable`, no engine download and no network. A Frontend tab shows findings, artifacts and the direction round. |
| [`dsh-gittree`](packages/dsh-gittree/README.md) | A read-only History tab: the workspace commits as a graph rail with lanes, merges and PR chips. Each commit lists the files it touched. It never runs a write. |
| [`dsh-huggingface`](packages/dsh-huggingface/README.md) | The Hub as a surface the agent can interrogate before it downloads: five `hf_*` tools over the machine's own `hf` CLI and the cache on disk. `hf_repo` gives one repo's licence, gated flag, weight (the Hub's `used_storage`, labelled as such) and whether this disk already has it — complete, metadata-only, stale or absent; `hf_status` counts the stubs that look cached and cannot load; `hf_cache` verifies and reclaims, with an unconfirmed removal being the CLI's own dry run; `hf_download` reports the weight, refuses over a ceiling, and needs the repo id repeated back. Two skills teach the CLI and the cache layout. Host-only, zero npm dependencies, no bundled engine. |
| [`dsh-image`](packages/dsh-image/README.md) | An image viewer that fits, zooms and pans, and reads the source pixel under the pointer. It opens from the Files tab and the Media panel. |
| [`dsh-image-upscale`](packages/dsh-image-upscale/README.md) | Four `upscale_*` tools over Real-ESRGAN, through the Python and torch this machine already has. It writes a NEW file and never the original, a manifest batch is a dry run by default, and the weight fetch refuses without `confirm`. Host-only, with no engine bundled. |
| [`dsh-media`](packages/dsh-media/README.md) | The pack ffmpeg owner: `media_probe`, `media_run` and `media_frames` over a pinned, SHA-256-verified ffmpeg copy. It also serves the Range routes the video tab streams through. No other package ships ffmpeg. |
Expand Down
57 changes: 57 additions & 0 deletions assets/banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>vncode banner</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 1280px; height: 320px; overflow: hidden; }
body {
position: relative;
background: #08110d;
font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
color: #ffffff;
-webkit-font-smoothing: antialiased;
}
.wash {
position: absolute; inset: 0;
background:
radial-gradient(120% 190% at 88% 118%, rgba(34, 197, 94, 0.42) 0%, rgba(16, 92, 58, 0.22) 34%, rgba(8, 17, 13, 0) 62%),
linear-gradient(96deg, #070f0b 0%, #0a1712 42%, #0d2419 72%, #10301f 100%);
}
.rings { position: absolute; right: -180px; top: -260px; width: 900px; height: 900px; }
.rings span {
position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
border-radius: 50%; border: 1px solid rgba(74, 222, 128, 0.16);
}
.rings span:nth-child(1) { width: 210px; height: 210px; border-color: rgba(74, 222, 128, 0.22); }
.rings span:nth-child(2) { width: 330px; height: 330px; }
.rings span:nth-child(3) { width: 460px; height: 460px; border-color: rgba(74, 222, 128, 0.12); }
.rings span:nth-child(4) { width: 600px; height: 600px; border-color: rgba(74, 222, 128, 0.09); }
.rings span:nth-child(5) { width: 750px; height: 750px; border-color: rgba(74, 222, 128, 0.07); }
.content { position: absolute; left: 72px; top: 64px; }
.eyebrow {
font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
font-size: 13px; letter-spacing: 0.42em; text-transform: uppercase;
color: #7f968a; font-weight: 500;
}
h1 {
margin-top: 18px;
font-size: 62px; line-height: 1.04; font-weight: 700; letter-spacing: -0.015em;
}
h1 .n { color: #4ade80; }
h2 { margin-top: 10px; font-size: 25px; line-height: 1.2; font-weight: 700; color: #f4f7f5; }
.stack { margin-top: 12px; font-size: 19px; line-height: 1.42; font-weight: 400; color: #93a89c; }
</style>
</head>
<body>
<div class="wash"></div>
<div class="rings"><span></span><span></span><span></span><span></span><span></span></div>
<div class="content">
<p class="eyebrow">VNCODE &middot; ADE</p>
<h1><span class="n">35</span> plugins, <span class="n">59</span> skills.</h1>
<h2>Node application.</h2>
<p class="stack">PDF, OCR, diagrams, media, lab, editor<br />docker, wsl, research, huggingface, skills, themes</p>
</div>
</body>
</html>
Binary file modified assets/vncode-banner6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions packages/dsh-huggingface/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# dsh-huggingface (alpha.1)

**The Hub as a surface the agent can interrogate before it downloads.** Five
`hf_*` tools over the machine's own `hf` CLI and the cache on this disk:
`hf_status`, `hf_search`, `hf_repo`, `hf_cache`, `hf_download`. Plus the two
skills that teach the CLI and the cache layout.

Why it earns a row: a Hub repo is a directory like any other, so a listing says
`models--lukey03--Qwen3.5-9B-abliterated` and stops. It does not say that the
entry is 16.7 GB, that **42 of the 49 entries on this machine are a `config.json`
and nothing else**, that a repo's licence is gated, or that the cached copy sits
three commits behind the Hub. Those are exactly the facts a person needs before
18 GB of bandwidth — and nothing in the pack read them. The CLI's own
`cache ls --json` answers in human strings (`"size": "17.9G"`,
`"last_accessed": "3 months ago"`), which is why the scan here walks the
directory tree.

Measured on the machine that wrote this: `hf` is **1.26.1**, the cache holds
**49 repos / 19.8 GB**, and **7 are complete** while **42 are metadata only**.

## What it adds

- **`hf_status`** — the CLI and its version, the cache root and **which variable
chose it** (`HF_HUB_CACHE` > `HUGGINGFACE_HUB_CACHE` > `HF_HOME/hub` >
default, with the deprecated `TRANSFORMERS_CACHE` flagged), every repo with
byte-exact size, and the split between complete repos and the metadata-only
stubs that look identical in a listing. Auth is a **presence** only — the token
is never read, echoed or logged. One process (`hf --version`), no network.
- **`hf_search`** — models / datasets / spaces by query, author, tag and sort,
parsed from `--json`. Refused with a code on a machine in offline mode, before
any process starts.
- **`hf_repo`** — the decision, one repo at a time: licence, gated flag and the
page that accepts it, architecture and parameter count, the repo weight **with
the measure named**, which files each consumer would fetch (transformers,
sentence-transformers, diffusers, GGUF quants, ONNX), and the local verdict —
`complete`, `stub`, `stale` (cached revision vs the Hub's current `sha`) or
`absent`.
- **`hf_cache`** — `list` (no CLI, no network), `verify`, `prune`, `rm`. An
**unconfirmed removal is the CLI's own `--dry-run`**, so the answer is a real
preview with the bytes it would cost; `rm` needs the repo id repeated back and
`prune` needs the word `prune`.
- **`hf_download`** — the only bytes-moving call: the Hub's weight first, a
ceiling it will not cross (8 GiB default), then `confirm: "<repo id>"`, then
the fetch — answered with **the bytes the cache actually gained**, measured by
rescanning the repo directory rather than trusting a transfer log.

## The three findings it is engineered around

**A blob is named by its hash.** In a canonical cache, `blobs/9f3c…` has no
extension, so a weight test by extension reports every repo weightless. The
names that say what a file IS live in `snapshots/<rev>/` — and that is where a
copy is real.

**Both sides of the layout hold the same bytes.** Summing `blobs` *and*
`snapshots` doubles a cache. Exactly one side is summed — and the side that
counts is `snapshots` on a machine where Xet or Windows wrote copies and `blobs/`
is empty, which is the layout measured here (a 418 MB repo with a 0-byte blobs
directory).

**This CLI line gives no per-file sizes.** `--expand siblings` carries
`rfilename` only, and there is no `--blobs` flag, so the repo weight comes from
`used_storage` and is labelled as such. A narrowed selection cannot be measured
at all: the plan says so instead of inventing a number, and the ceiling is
applied only to a measured size.

## How it plugs in

| Piece | Value |
|---|---|
| row / tools | `huggingface` / `hf_status`, `hf_search`, `hf_repo`, `hf_cache`, `hf_download` |
| host | one row, no route, no browser half (`package.json` declares no `dsh.client`) |
| engine | the user's own `hf` (huggingface_hub); `DSH_HF_CLI` pins a binary PATH does not carry |
| transport | argv-only child processes, a deadline per call, a byte cap per stream; **no socket in this package** |
| state | none on disk; only the resolved CLI is cached per boot |
| skills | `huggingface-hub`, `huggingface-cache` - registered at boot, copied into `$DSH_HOME/skills` by both installers |
| credentials | none read: `HF_TOKEN` / the stored token file are reported as *present*, never read back |

## Limits

| | |
|---|---|
| `hf` | must be installed for everything except `hf_status`'s cache scan, `hf_cache` action "list" and `hf_repo` in offline mode |
| sizes | per-file sizes are not available on this CLI line; the repo total is `used_storage` |
| downloads | `hf_download` never accepts a token and never runs `hf update`; a gated repo must be accepted in a browser first |
| network | only a call the caller asked for reaches it; `HF_HUB_OFFLINE=1` is honoured and refuses before a process starts |
| UI | none - a tool surface plus skills, not a second conversation |

## Verify

```sh
node checks/check-huggingface-node.mjs # 217 checks, no network, no real cache touched
```

The cache is a fixture tree in a temp directory built to the real layout,
including the two cases that make a naive size rule wrong. The CLI is a fake
runner that **records the exact argv**, which is how the `-y` / `--dry-run`
decisions and the "no download over the ceiling" rule are asserted rather than
hoped for; a download in the check writes real bytes, so `addedBytes` is measured.

The pack-wide checks still own the row: `check-node-routes.mjs` (the row, the
manifest, the skill registration), `check-no-secrets.mjs`, and the root
README/ARCHITECTURE rows.

## Install

Both installers pick it up from `packages/`; as a new bundle the profile learns
it once, then a restart of `npx @deepseek-ai/dsh web` and a hard refresh.
Loading