Watch
1
0
Fork
You've already forked packages
0
Weft's official packages: weft/markdown, weft/stripe, weft/email. A snapshot of packages/ in the Weft repository; MIT OR Apache-2.0. https://pkg.weft-lang.dev/packages/weft/markdown
  • JavaScript 95%
  • Python 5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Weft packages 6f33e8ae64 packages/ at markup-kit 3204a0231bc3
A snapshot of packages/ in the Weft repository; the official packages are published from these commits.

Markup-Kit-Commit: 3204a0231bc36414478fb00270cee58b909970b8
2026-11-27 17:17:54 +00:00
ai packages/ at markup-kit 0f4beab14989 2026-11-23 09:13:30 +00:00
browser packages/ at markup-kit 5e391dac2054 2026-11-27 06:13:55 +00:00
email packages/ at markup-kit fcb44a238e7f 2026-11-24 15:39:51 +00:00
html packages/ at markup-kit 211c69ea8297 2026-11-27 14:36:26 +00:00
integration packages/ at markup-kit 6b2c4ea314df 2026-11-27 16:41:09 +00:00
lucide packages/ at markup-kit 211c69ea8297 2026-11-27 14:36:26 +00:00
markdown packages/ at markup-kit 3ae94516198e 2026-11-23 06:55:42 +00:00
pgroonga packages/ at markup-kit afd82d86ed06 2026-11-21 02:43:41 +00:00
pgtrgm packages/ at markup-kit afd82d86ed06 2026-11-21 02:43:41 +00:00
pgvector packages/ at markup-kit 5912b694d498 2026-11-21 05:19:27 +00:00
redis packages/ at markup-kit 6b2c4ea314df 2026-11-27 16:41:09 +00:00
scripts packages/ at markup-kit 211c69ea8297 2026-11-27 14:36:26 +00:00
stripe packages/ at markup-kit 0f4beab14989 2026-11-23 09:13:30 +00:00
LICENSE-APACHE packages/ at markup-kit dd1e6eb5270e 2026-11-19 20:43:26 +00:00
LICENSE-MIT packages/ at markup-kit dd1e6eb5270e 2026-11-19 20:43:26 +00:00
README.md packages/ at markup-kit 3204a0231bc3 2026-11-27 17:17:54 +00:00

Official packages

Packages published under the weft owner, written in Weft over HTTP APIs and std. There is no npm bridge (docs/packages.md, Rulings): anything an app needs from the JS ecosystem is written here instead.

package what capabilities
weft/markdown CommonMark and GFM: a syntax tree, HTML and a sanitiser none
weft/stripe Stripe's API: customers, Checkout, payments, subscriptions, prices, products, webhooks http.fetch@api.stripe.com
weft/pgvector pgvector for std/db: vector, halfvec, sparsevec columns, distance operators, HNSW and IVFFlat indexes (a descriptor package: spec/std/db.md, Extensions) none
weft/pgroonga PGroonga for std/db: full-text search for every language, scores, snippets, the pgroonga index none
weft/pgtrgm pg_trgm for std/db: trigram similarity, the % operators, gin_trgm_ops indexes none
weft/redis Redis client over std/net (RESP2, TLS): typed commands for strings, expiry, hashes, sets, sorted sets, lists and keys, pipelines, MULTI/EXEC with WATCH, Lua scripts, pub/sub; one client shared safely between tasks net
weft/email Native SMTP (STARTTLS, implicit TLS, plain), Resend and Postmark, MIME with attachments, templates rendered to HTML and text http.fetch@api.resend.com, http.fetch@api.postmarkapp.com, http.media (its Img shows the image a template names), net
weft/ai Unified AI client for Anthropic, OpenAI, Gemini and OpenAI-compatible models: text, SSE streaming, tools, typed generate<T> from Weft types http.fetch@api.anthropic.com, http.fetch@api.openai.com, http.fetch@generativelanguage.googleapis.com
weft/html An HTML5 parser like cheerio: WHATWG tokenizing and tree building, CSS selectors, text, attributes and HTML none
weft/lucide Every lucide icon (2,123), one module each so an app ships only those it imports, and a Lucide component none
weft/browser Browser automation over the Chrome DevTools Protocol, like Puppeteer: pages, scripts, the mouse and keyboard, elements through frames and shadow roots, cookies, response bodies, screenshots, PDFs, interception, typed CDP process.spawn, process.env, fs, http.fetch; requires the program chrome, so it needs a full host (not Warp or the browser)

Each folder is a Weft project with its own weft.toml. Its tests, benchmarks and scripts stay out of the published archive (include in the manifest). integration/ holds apps that use a package against something real (stripe-mock, Chrome, Redis).

Trying them against a local registry

scripts/verify-local.mjs runs the whole path on this machine: it starts apps/registry, makes a publish token and a signing key for the owner weft, publishes each package signed, and then in a fresh app runs weft add, check, run, build --target js and install --frozen.

cargo build --release -p weft-cli          # in core/
node packages/scripts/verify-local.mjs     # every package, or name some: markdown stripe email

Publishing for real

In order (the first four are done, 2026-11-19; five and six for weft/markdown 0.1.0 and 0.1.1, 2026-11-20, for weft/browser, weft/pgvector, weft/pgroonga and weft/pgtrgm 0.1.0, 2026-11-21, and for weft/browser 0.2.0, weft/html, weft/lucide and weft/redis 0.1.0, 2026-11-27):

  1. Deploy the registry at pkg.weft-lang.dev (apps/registry/README.md, What a deploy needs). Done: docs/deploy.md, The package registry.

  2. Make the owner's token: POST /v1/tokens with { "owners": ["weft"] } and the operator's REGISTRY_ADMIN_TOKEN. weft is a reserved owner, so only the operator can grant it. Done: on the NAS in ~/apps/weft-registry/weft-owner.token (600), label weft official packages.

  3. Make the signing key offline: weft publish --new-key, keep the secret out of the repository, and register the public key with PUT /v1/owners/weft/key. From then on the registry takes only versions signed by it. Done: the key pair is in ~/weft-keys/ on the NAS (public pvVcSGcd/g2mOV2EkhVNw321+/xh3sNTGrak2HGG9FY=), registered by the operator.

  4. Each manifest's repository is the public source, https://git.weft-lang.dev/weft/packages: a snapshot of this folder that deploy/packages/sync.sh pushes (docs/deploy.md, The packages repository). A signed statement records it for good.

  5. Publish from a clean clone of that repository, so the commit a version records is public. On the NAS, with the secrets read into the command only:

    commit=$(~/apps/weft-registry/src/deploy/packages/sync.sh)     # the weft/packages commit holding main's packages/
    rm -rf ~/apps/weft-registry/publish
    git clone -q https://git.weft-lang.dev/weft/packages.git ~/apps/weft-registry/publish
    cd ~/apps/weft-registry/publish && git checkout -q --detach "$commit"
    WEFT_TOKEN=$(cat ~/apps/weft-registry/weft-owner.token) WEFT_SIGNING_KEY=$(cat ~/weft-keys/weft-signing.secret) \
      WEFT_COMMIT=$commit ~/apps/weft-registry/weft/current/bin/weft publish --sign --dir <name>
    

    A breaking change the owner has ruled may go inside its line (weft/markdown 0.1.1) adds --allow-breaking and the operator's token, and goes to the registry's own address, since the registry refuses the override through Relay (apps/registry/README.md, A breaking change the operator allows). Then yank the version it replaces, signed:

    WEFT_REGISTRY=http://172.24.0.1:4873 WEFT_ADMIN_TOKEN=$(sed -n 's/^REGISTRY_ADMIN_TOKEN=//p' ~/apps/weft-registry/registry.env) \
      WEFT_TOKEN=… WEFT_SIGNING_KEY=… WEFT_COMMIT=$commit weft publish --sign --allow-breaking --dir <name>
    WEFT_TOKEN=… WEFT_SIGNING_KEY=… weft yank weft/<name>@<old> --reason '<why, and what to use>'
    
  6. Look at the generated pages (/packages/weft/<name>) before announcing a version: published versions can be yanked but never changed.

Before each package's first real release:

package still to do
weft/markdown released: 0.1.1, 2026-11-20, from weft/packages d91eb95, with the operator's breaking-change override; 0.1.0 (b98a996) is yanked
weft/stripe run its calls against a Stripe test-mode key: so far they have met only stripe-mock and a scripted server
weft/redis released: 0.1.0, 2026-11-27, from weft/packages c34fac1; before it, every command family, Manga's circuit-breaker and request-gate Lua scripts and pub/sub ran against Redis 7.4.11 (integration/redis, 162 checks); Manga then swaps its kv_store stand-in (lib/server/db/redis.weft) for it
weft/email send a message through Resend and Postmark with test keys: so far they have met only a scripted server
weft/ai run text, stream, generate<T> and runTools against live Anthropic, OpenAI and Gemini keys: so far they have met only unit tests and a loopback mock server
weft/browser released: 0.1.0, 2026-11-21, from weft/packages 5b20e55; its page shows it needs a full host; its title-and-links example ran against Chromium 156 from a fresh install. 0.2.0 (protocolTimeout, setJavaScriptEnabled, response.buffer(), page.mouse, pierce and box; its Page and PageResponse types grew, so a new line) released 2026-11-27, from weft/packages f25c700; a fresh weft add weft/browser locks it
weft/html released: 0.1.0, 2026-11-27, from weft/packages 805fc31 (it needs a Weft from 2026-11-27 or later: the registry moved to main to check it); 1,959 of html5lib's 1,967 tree-construction tests pass on the VM and the JS backend (the README says why the 8 don't)
weft/lucide released: 0.1.0, 2026-11-27, from weft/packages 805fc31; every icon's pixels checked against lucide's SVG (scripts/compare.mjs)
weft/pgvector, weft/pgroonga, weft/pgtrgm released: 0.1.0 each, 2026-11-21, from weft/packages 9ad80df; on a fresh install the manga search project (core/crates/weft-cli/tests/db/manga) checks with all three