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
19 changes: 19 additions & 0 deletions .ai/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ The common worker lifecycle is implemented by `src/utils/worker-protocol.ts`,
both request and response envelopes; replacement, cancellation, timeout, and
unmount terminate the physical worker.

Local LLM Playground is a narrow route-owned exception to the shared worker
helpers because Transformers.js owns streaming callbacks and interruption. Its
typed client still validates every envelope, permits one operation, applies
timeouts and physical replacement, and creates the 4.2.0 runtime worker only
after explicit Load. The worker accepts three fixed Qwen3.5 model IDs, loads q4
text-only decoder/embed artifacts on WebGPU, and never loads the vision encoder.
Each tier is pinned to a reviewed upstream commit and fetched exclusively from
the same-origin `assets/local-llm-models/<revision>/` mirror. Remote model
fallback is disabled. `pnpm models:download` materializes the untracked mirror;
`pnpm models:check` is the pre-deployment completeness/size gate.

Production caches the shell and demand-caches opened lazy assets. Development
does not register a service worker and removes only IT Tools-owned stale PWA
state. Storage and privacy rules are in `PERSISTENCE.md`.
Expand All @@ -54,6 +65,14 @@ in memory, and sends downloads and external links to the parent through
`EXPORT` and `OPEN_URL` messages. None of these choices affect the normal
`dist/` build.

The normal generated registry contains 134 tools. Local LLM Playground is
excluded from standalone because DataLens denies workers and network access and
because the inference runtime alone exceeds the single-file budget. Its worker,
ONNX Runtime WASM, and model files are also absent from mandatory PWA precache.
Normal builds copy an available 4.98 GiB server-side model mirror into `dist/`,
but build statistics intentionally exclude that separately versioned static
payload from JavaScript/shell budgets.

Standalone worker compatibility is executable policy: the CSP sandbox test
runs a valid operation through all 48 included worker clients in Chromium,
Firefox, and WebKit, while a source-inventory test requires exact case coverage.
Expand Down
18 changes: 12 additions & 6 deletions .ai/FEATURES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Feature State

The approved browser-only catalog is implemented. The generated registry
currently contains 133 lazy tools across Crypto, Converter, Web, Images and
currently contains 134 lazy tools across Crypto, Converter, Web, Images and
videos, Development, Network, Math, Measurement, Text, and Data.

The catalog includes the final approved additions: local mock data, IPv6/CIDR,
Expand All @@ -10,16 +10,22 @@ cron schedules, barcode workflows, JWK/JWKS and asymmetric JWT verification,
OpenAPI inspection, PKCS#12/public PEM inspection, offline GeoIP, and the local
encrypted OTP vault.

Local LLM Playground is the only model-inference tool. It offers fixed
text-only Qwen3.5 Lite 0.8B, Standard 2B, and Quality 4B tiers through local
WebGPU inference with explicit same-origin downloads, per-file parallel
progress, streaming stop, and removable cache. Runtime model traffic never
falls back to Hugging Face or a model API.

The definitive inventory is generated from `src/tools/*/index.ts`; do not keep
a second hand-maintained list here. Every tool keeps its own icon and lazy route
component.

The optional single-file build contains 126 tools. Its reviewed exclusions are
Camera Recorder, DNS over HTTPS Query, Local Encrypted OTP Vault, Mermaid
Diagram, Offline GeoIP Inspector, PDF Signature Checker, and Text Diff. The
reasons are sandbox permissions/network policy, unavailable opaque-origin
storage, or the strict 10 MiB artifact budget. These tools remain present in
the normal 133-tool application.
Camera Recorder, DNS over HTTPS Query, Local Encrypted OTP Vault, Local LLM
Playground, Mermaid Diagram, Offline GeoIP Inspector, PDF Signature Checker,
and Text Diff. The reasons are sandbox permissions/network policy, unavailable
opaque-origin storage, unsupported workers, or the strict 10 MiB artifact
budget. These tools remain present in the normal 134-tool application.

No new feature backlog is approved. Server-dependent products, account/cloud
features, network scanning, remote GeoIP/API services, heavy OCR/PDF workspaces,
Expand Down
9 changes: 8 additions & 1 deletion .ai/FIXES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Resolved Engineering State

The approved correctness, security, delivery, persistence, and performance
work is complete as of 2026-08-16.
work is complete as of 2026-08-27.

- Production dependency audit has no known advisory in the approved graph.
- Scoped transitive overrides keep the browser-only Transformers dependency's
unused Node branches on `sharp` 0.35.0 and `adm-zip` 0.6.0; composerize uses
security-fixed `deepmerge-ts` 8.0.2 with its conversion tests retained.
- Crypto, YAML, i18n, Ajv, forge/PKI, nginx, and container concerns were fixed or
replaced with bounded browser-local implementations and executable gates.
- Registry generation keeps routes lazy and preserves each tool's individual
icon; category-wide icon substitution is explicitly a regression.
- Large transforms and sensitive operations have bounded worker lifecycles.
- Local LLM parallel downloads render one monotonic bar per file instead of
interleaving aggregate and per-file percentages. Its pinned q4 artifacts are
served same-origin only; Transformers.js remote fallback is disabled and a
focused browser regression rejects Hugging Face runtime traffic.
- Root, subpath, reverse-proxy, security-header, PWA, Firefox, WebKit, Chromium,
and Long Task coverage exists in the repository.
- Storage migrations, quota failure, rollback, and stale-cache cleanup are
Expand Down
40 changes: 28 additions & 12 deletions .ai/HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
## State

The final approved product package is implemented. There is no remaining
feature plan. The application is a browser-only static SPA/PWA with 133 lazy
feature plan. The application is a browser-only static SPA/PWA with 134 lazy
tool routes, generated from per-tool typed metadata. Unique tool icons are a
product requirement and are preserved by the registry generator.

The repository may be intentionally dirty; inspect `git status` and never
overwrite unrelated local-fork work. Do not merge, rebase, or cherry-pick
upstream automatically.

Current checkpoint: branch `feat-ai-research`, base commit
`2530780ffb46bd309172aa21ff38d0881cd45cd1`. The 2026-08-24 standalone worker
compatibility audit is present as uncommitted local work at handoff time; keep
the whole worktree together when committing or transferring it.
Current checkpoint: branch `feat/ai-tools-local-llm-1842`, based on commit
`5395615c0c9537ebf78b20e6c7b275f4ab3fa794`. The branch tip packages the final
approved browser-tool catalog, persistence/UI/performance work, standalone
delivery, and the 2026-08-27 Local LLM same-origin model mirror. Keep the whole
branch together when reviewing or transferring it.

## Resume

Expand All @@ -38,8 +39,8 @@ the touched surface.

## Standalone/DataLens

The final artifact is `dist-standalone/it-tools.html`: one 7,989,122-byte file
(7.62 MiB; 7,991,173-byte JSON upload envelope) with 126 tools and no runtime
The final artifact is `dist-standalone/it-tools.html`: one 7,994,866-byte file
(7.62 MiB; 7,996,917-byte JSON upload envelope) with 126 tools and no runtime
network resources. `pnpm test:standalone` rebuilds it from current sources and
runs Chromium, Firefox, and WebKit serially.

Expand All @@ -62,11 +63,26 @@ plain router-link menu is intentional; the normal application still uses
`NMenu`. Do not add intermediate-reuse flags to the build—the fresh build and
unconditional cleanup are part of the stale-cache defense.

Green gates for the 2026-08-24 audit: `pnpm test:standalone` (4 Node tests and
6 Playwright tests; 48/48 worker operations in Chromium, Firefox, and WebKit),
`pnpm lint`, `pnpm test:unit` (262 files / 1,466 tests), and `pnpm build`.
The final normal build restored full generated component declarations, including
the camera-specific icons excluded only from standalone.
Local LLM Playground is normal-build-only. It provides fixed Qwen3.5 Lite 0.8B,
Standard 2B, and Quality 4B q4 text models through a lazy Transformers.js 4.2.0
WebGPU worker with explicit download, storage/hardware preflight, streaming,
cancellation, bounds, unload, and scoped cache deletion. Prompts and output are
ephemeral. The 23.6 MB raw inference WASM and 4.98 GiB pinned q4 mirror are
absent from shell, Workbox, and standalone. Runtime requests use only the
same-origin revision path; Hugging Face fallback is disabled. The generated
mirror is intentionally untracked: run `pnpm models:download`, then
`pnpm models:check`, before publishing the normal build. Actual GPU/model
acceptance remains a hardware-manual non-claim.

Green focused gates on 2026-08-27: lint, typecheck, 267 Vitest files / 1,482
tests, production build, all 430 build budgets, 28-file / 4.98 GiB model mirror
completeness check, and four Chromium Local LLM route/privacy/same-origin
smokes. The 2026-08-25 release gates also include a clean production dependency
audit, Docker converter compatibility after security overrides, Firefox/WebKit
route coverage, strict dev runtime, and standalone (4 Node + 6 browser tests;
48/48 included worker paths).
The Orca desktop runtime was unavailable after the documented open retry, so
interactive visual/model acceptance was not claimed.

## Invariants

Expand Down
25 changes: 18 additions & 7 deletions .ai/PERFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

## Current baseline

The generated registry contains 133 lazy routes. The accepted normal build on
2026-08-17 measured a 687,421-byte raw / 186,417-byte gzip main entry, a
716,733-byte raw / 192,710-byte gzip shell including the document, and a
53-file, 970,294-byte raw / 313,252-byte gzip Workbox payload. All 426 build
budget checks passed with unique tool icons preserved.
The generated registry contains 134 lazy routes. The accepted normal build on
2026-08-25 measured a 719,149-byte raw / 193,054-byte gzip shell including the
document and a 53-file, 972,710-byte raw / 313,568-byte gzip Workbox payload.
All 430 build budget checks passed with unique tool icons preserved.

The accepted standalone artifact contains 126 tools in one HTML file. It is
7,989,122 bytes (7.62 MiB); the JSON upload envelope `{ "html": ... }` is
7,991,173 bytes. Both are below the strict 10 MiB limit. The build fails if
7,994,866 bytes (7.62 MiB); the JSON upload envelope `{ "html": ... }` is
7,996,917 bytes. Both are below the strict 10 MiB limit. The build fails if
either measurement exceeds that limit and always removes its intermediate
directory to prevent stale-build reuse. The increase records the exhaustive
standalone-only 48-client compatibility audit and its small XLSX fixture; it
Expand All @@ -23,6 +22,18 @@ Emoji search is worker-backed and virtualized. Monaco remains accepted for Text
Diff: the smaller CodeMirror spike lost focus, undo, and history when publishing
async diff results.

Local LLM Playground adds a 23,351-byte raw / 7,960-byte gzip route UI and a
503,343-byte raw / 147,220-byte gzip explicit-action worker; its measured
additional route closure is 607,745/182,692 bytes raw/gzip. Its separate ONNX
Runtime WASM is 23,567,050 bytes raw / 5,699,349 bytes gzip. Neither runtime
asset enters the shell, Workbox precache, or standalone build. The pinned
same-origin q4 mirror is 4.98 GiB total (0.62/1.45/2.91 GiB); one selected tier
downloads only after Load and parallel files render as independent progress
bars. The mirror is copied as separately versioned static delivery data and is
excluded from JS/shell build statistics. On the 2026-08-25
production Chromium run, first client-side route readiness was 171 ms with a
0.0 ms longest observed task and no worker/model request before Load.

## Gates

`.ai/baselines/build-budgets.json` is the sole detailed budget source. It
Expand Down
9 changes: 9 additions & 0 deletions .ai/PERSISTENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ in memory only while unlocked, and there are no accounts or synchronization.
Locking, timeout, close, migration failure, or cryptographic failure clears
decrypted state.

Local LLM Playground has a separate non-content cache exception. After an
explicit Load, Transformers.js may store only fixed public model/runtime
responses plus a completion marker in `it-tools-local-llm-models-v1`. The user
can remove the selected model from the tool. Prompts, system instructions,
generated text, model selection, and generation options remain memory-only;
unmount terminates the worker and clears text state. Model responses originate
only from the same-origin pinned static mirror; no tool content or model request
is sent to Hugging Face at runtime.

Development PWA cleanup may unregister only the root IT Tools `sw.js` and delete
only `workbox-precache-*`, `it-tools-lazy-assets-*`, and `figlet-fonts-*`. It
must not clear local/session content or unrelated origins/caches.
16 changes: 13 additions & 3 deletions .ai/TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Approved Work

There is no remaining approved feature backlog. Do not invent additional tools
or revive removed upstream lists.
## Active approved work

There is no active feature backlog. The approved Local LLM Playground is
implemented in the normal build with Lite 0.8B, Standard 2B, and Quality 4B;
Max, vision, automatic downloads, PWA precaching, and standalone inclusion are
deliberately absent. The three approved q4 tiers are mirrored same-origin from
pinned revisions; runtime Hugging Face fallback is prohibited.

Do not invent additional tools or revive removed upstream lists.

Future work begins only from an explicit user request or a locally reproduced
regression. Before implementation, record the narrow scope here, including any
Expand All @@ -24,4 +31,7 @@ privacy defaults, worker limits/cancellation, and build budgets intact.

## Upstream adaptations

None are currently approved or pending.
No upstream application code or design is approved for adaptation. The local
implementation consumes exact Apache-2.0 `@huggingface/transformers` 4.2.0 and
the three fixed Qwen3.5 ONNX model repositories; integration code and UI remain
local-fork work.
16 changes: 13 additions & 3 deletions .ai/baselines/build-budgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"rationale": "The measured 466,920 B raw / 85,086 B gzip demand-loaded search worker owns Fuse plus the updated 1,914-entry Unicode Emoji 16.0 and emojilib 4.0.3 keyword catalogs. It remains below the 500 kB chunk gate, is fetched only after a query, and feeds a truly windowed grid with physical replacement, cancellation, a three-second deadline, exact query/result bounds, and a strict 4x-CPU sub-50-ms Long Task gate."
},
"assets/docker-converter.worker-<hash>.js": {
"rawBytes": 215000,
"gzipBytes": 66000,
"rationale": "The measured 206,522 B raw / 63,261 B gzip route-owned worker contains the existing composerize-ts path plus YAML parsing for the new reverse Compose-to-run direction. Both directions share strict 16 KiB live, 256 KiB input, 512 KiB output, message-count/size, four-second, cancellation, stale-result, and disposal bounds; the worker remains demand-loaded and below the 500 kB chunk gate."
"rawBytes": 220000,
"gzipBytes": 68000,
"rationale": "The measured 215,146 B raw / 66,380 B gzip route-owned worker contains the existing composerize-ts path plus YAML parsing for the reverse Compose-to-run direction. Its small increase records the scoped deepmerge-ts 8.0.2 security override that closes GHSA-ggr8-5vv4-36mx. Both directions share strict 16 KiB live, 256 KiB input, 512 KiB output, message-count/size, four-second, cancellation, stale-result, and disposal bounds; the worker remains demand-loaded and below the 500 kB chunk gate."
},
"assets/devops-config-workspace.worker-<hash>.js": {
"rawBytes": 155000,
Expand Down Expand Up @@ -134,6 +134,11 @@
"gzipBytes": 3000,
"rationale": "The measured 5,074 B raw / 2,171 B gzip route-owned worker reads bounded 4 MiB file windows, detects common magic signatures, streams CRC-32, and emits only a 4 KiB hex preview. It never buffers the whole file and is terminated on completion, cancellation, timeout, replacement, or disposal."
},
"assets/local-llm.worker-<hash>.js": {
"rawBytes": 520000,
"gzipBytes": 155000,
"rationale": "The measured 503,343 B raw / 147,220 B gzip explicit-action worker contains exact Transformers.js 4.2.0 and the bounded Qwen3.5 text-only WebGPU runtime. It accepts only the three fixed 0.8B/2B/4B q4 model IDs, loads no vision encoder, streams bounded output, validates cumulative transport bounds, supports interruption and physical replacement, keeps prompts ephemeral, and uses a dedicated removable Cache Storage namespace. Pinned model files are same-origin-only with remote fallback disabled. The runtime is absent from the initial shell, mandatory Workbox precache, and standalone build; its separately emitted 23,567,050 B raw / 5,699,349 B gzip ONNX Runtime WASM is fetched only after Load."
},
"assets/mock-data-generator.worker-<hash>.js": {
"rawBytes": 8000,
"gzipBytes": 4000,
Expand Down Expand Up @@ -266,6 +271,11 @@
"gzipBytes": 80000,
"rationale": "The measured 168,815 B raw / 71,948 B gzip additional closure includes the 4,927/2,021 B diff worker plus existing markdown-it and patched DOMPurify 3.4.13 loaded only with this route. Preview is explicit-result-only, limited to 64 KiB per side, disables raw HTML/linkification/active links/images, and uses a static HTML-only no-attribute sanitizer allow-list. No Monaco, CodeMirror, second Markdown parser, or new diff dependency is included."
},
"src/tools/local-llm-playground/local-llm-playground.vue": {
"rawBytes": 625000,
"gzipBytes": 190000,
"rationale": "The measured 607,745 B raw / 182,692 B gzip additional closure consists primarily of the separately budgeted 503,343/147,220 B route worker plus a 23,351/7,960 B route UI and shared dependencies. The ONNX Runtime WASM is a separate 23,567,050/5,699,349 B demand asset. Pinned q4 model files are served only from a same-origin 4.98 GiB static mirror after explicit confirmation; remote fallback is disabled. Runtime and weights remain outside the initial shell, mandatory Workbox precache, standalone build, and JavaScript build statistics. The narrow exception records the unavoidable browser inference runtime instead of weakening the global 500 kB route gate."
},
"src/tools/openapi-inspector/openapi-inspector.vue": {
"rawBytes": 130000,
"gzipBytes": 45000,
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ coverage
/test-results/
/playwright-report/
/playwright/.cache/
# Generated, pinned Local LLM weights; keep the small tracked README only.
/public/assets/local-llm-models/*/
/public/assets/local-llm-models/.download-manifest.json
/public/assets/local-llm-models/*.part
# Webkit with playwright creates a salt file
salt
1 change: 1 addition & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ declare module '@vue/runtime-core' {
LocalEncryptedOtpVault: typeof import('./src/tools/local-encrypted-otp-vault/local-encrypted-otp-vault.vue')['default']
LocaleSelector: typeof import('./src/modules/i18n/components/locale-selector.vue')['default']
LocalFileInspector: typeof import('./src/tools/local-file-inspector/local-file-inspector.vue')['default']
LocalLlmPlayground: typeof import('./src/tools/local-llm-playground/local-llm-playground.vue')['default']
LoremIpsumGenerator: typeof import('./src/tools/lorem-ipsum-generator/lorem-ipsum-generator.vue')['default']
MacAddressGenerator: typeof import('./src/tools/mac-address-generator/mac-address-generator.vue')['default']
MacAddressLookup: typeof import('./src/tools/mac-address-lookup/mac-address-lookup.vue')['default']
Expand Down
3 changes: 3 additions & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ tools:
mock-data-generator:
title: Mock data generator
description: Generate reproducible people, addresses, dates, internet values, identifiers, and JSON or CSV fixtures locally in your browser.
local-llm-playground:
title: Local LLM playground
description: Run Qwen3.5 Lite, Standard, or Quality entirely in your browser with WebGPU, streaming output, and removable local model caches.
percentage-calculator:
title: Percentage calculator
description: Easily calculate percentages from a value to another value, or from a percentage to a value.
Expand Down
Loading
Loading