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
2 changes: 1 addition & 1 deletion .dsh-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"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.",
"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. and for a repo that is cached it sizes the LOAD too - parameters implied by the weight bytes, KV cache as `2 x layers x kv_heads x head_dim x dtype_bytes` per token, and a context table with a FITS column against the `freeBytes` given - with the dtype read from the safetensors HEADER rather than the config (MEASURED: `all-mpnet-base-v2` states none and stores F32). 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)",
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +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-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. For a cached repo `hf_repo` also sizes the LOAD from the files alone - parameters implied by the weight bytes, KV cache as `2 x layers x kv_heads x head_dim x dtype_bytes` per token, and a context table with a FITS column against the `freeBytes` given - with the dtype read from the safetensors HEADER rather than the config, because MEASURED `all-mpnet-base-v2` states none and stores F32, which an fp16 assumption reports as twice the parameters and half the KV cache. 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +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-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. For a repo already cached it also sizes the LOAD — parameters from the weight bytes, the KV cache per token from the checkpoint's own attention heads, and a context table that says FITS against the `freeBytes` you pass — without loading the model. 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
14 changes: 13 additions & 1 deletion packages/dsh-huggingface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ Measured on the machine that wrote this: `hf` is **1.26.1**, the cache holds
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`.
`absent`. For a repo that is **cached** it also answers the half a download size
does not: **WILL IT FIT** — the parameters the weight bytes imply, the KV cache
per token from the checkpoint's own attention heads, and a context-by-context
VRAM table that says `FITS` against the `freeBytes` you pass. Read from the
files, with no model loaded.
- **`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
Expand Down Expand Up @@ -63,6 +67,14 @@ directory).
at all: the plan says so instead of inventing a number, and the ceiling is
applied only to a measured size.

**A checkpoint's dtype is in its safetensors HEADER, not in its config.** The
parameter estimate and the KV size both divide or multiply by bytes-per-parameter,
so trusting `config.torch_dtype` — or defaulting to fp16 — misreports a whole
class of models. MEASURED: `sentence-transformers/all-mpnet-base-v2` states no
dtype and stores **F32**; assumed fp16 it reported *~219M parameters at 109M* and
**half** its real 72 KB/token KV cache. Reading the header's own `dtype` field
fixed both, and the answer names where the dtype came from.

## How it plugs in

| Piece | Value |
Expand Down
Loading