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
8 changes: 4 additions & 4 deletions .github/workflows/onnx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ONNX
# Builds @leemour/cli-messaging-onnx (packages/onnx), runs a model through it on every system under
# Builds @wirecat/cli-messaging-onnx (packages/onnx), runs a model through it on every system under
# Node and Bun, and publishes it when started by hand with `publish` — npm trusts this file by name.
on:
pull_request:
Expand Down Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: package
path: leemour-cli-messaging-onnx-*.tgz
path: wirecat-cli-messaging-onnx-*.tgz
if-no-files-found: error

probe:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
working-directory: probe
run: |
echo '{"type":"module"}' > package.json
npm install --no-audit --no-fund ./leemour-cli-messaging-onnx-*.tgz
npm install --no-audit --no-fund ./wirecat-cli-messaging-onnx-*.tgz
cp ../packages/onnx/probe.mjs .
mkdir test && cp ../packages/onnx/test/multiply.onnx test/
- working-directory: probe
Expand All @@ -86,4 +86,4 @@ jobs:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: package
- run: npm publish leemour-cli-messaging-onnx-*.tgz --access public --provenance
- run: npm publish wirecat-cli-messaging-onnx-*.tgz --access public --provenance
10 changes: 5 additions & 5 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: SQLite
# Builds @leemour/cli-messaging-sqlite (packages/sqlite), checks every library on the systems it is
# Builds @wirecat/cli-messaging-sqlite (packages/sqlite), checks every library on the systems it is
# for, and publishes it when started by hand with `publish` — npm trusts this file by name.
on:
pull_request:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: package
path: packages/sqlite/leemour-cli-messaging-sqlite-*.tgz
path: packages/sqlite/wirecat-cli-messaging-sqlite-*.tgz
if-no-files-found: error

# The library as installed — unpacked from the tarball — under Bun, which loads it itself.
Expand All @@ -115,7 +115,7 @@ jobs:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: package
- run: tar -xzf leemour-cli-messaging-sqlite-*.tgz
- run: tar -xzf wirecat-cli-messaging-sqlite-*.tgz
- run: sw_vers -productVersion && uname -m
- run: bun packages/sqlite/probe.mjs "$PWD/package/lib/darwin/libsqlite3.dylib" "$SQLITE_VERSION"

Expand All @@ -141,7 +141,7 @@ jobs:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: package
- run: tar -xzf leemour-cli-messaging-sqlite-*.tgz
- run: tar -xzf wirecat-cli-messaging-sqlite-*.tgz
- run: |
docker run --rm -v "$PWD:/w" -w /w ${{ matrix.image }} sh -c '
if command -v apk >/dev/null; then apk add --no-cache nodejs >/dev/null
Expand All @@ -165,4 +165,4 @@ jobs:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: package
- run: npm publish leemour-cli-messaging-sqlite-*.tgz --access public --provenance
- run: npm publish wirecat-cli-messaging-sqlite-*.tgz --access public --provenance
6 changes: 3 additions & 3 deletions bin/publish-sqlite
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env sh
# Publishes an empty @leemour/cli-messaging-sqlite@0.0.0 once, so the package exists and npm lets its
# Publishes an empty @wirecat/cli-messaging-sqlite@0.0.0 once, so the package exists and npm lets its
# trusted publisher be set (npmjs.com → the package → Settings → Trusted Publisher: GitHub Actions,
# WireCatLabs/cli-messaging, workflow sqlite.yml, environment npm). Every version with libraries is
# published by that workflow, never from this machine.
#
# bin/publish-sqlite
set -eu

package=@leemour/cli-messaging-sqlite
package=@wirecat/cli-messaging-sqlite
if npm view "$package" version >/dev/null 2>&1; then
echo "$package is already on npm — set its trusted publisher, then run the SQLite workflow with publish"
exit 0
Expand All @@ -30,7 +30,7 @@ cat > "$work/package.json" <<JSON
{
"name": "$package",
"version": "0.0.0",
"description": "Placeholder: the SQLite builds for @leemour/cli-messaging are published from CI",
"description": "Placeholder: the SQLite builds for @wirecat/cli-messaging are published from CI",
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/WireCatLabs/cli-messaging.git", "directory": "packages/sqlite" }
}
Expand Down
6 changes: 3 additions & 3 deletions packages/onnx/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# @leemour/cli-messaging-onnx
# @wirecat/cli-messaging-onnx

[ONNX Runtime](https://onnxruntime.ai/) 1.30.0 for Node and Bun, WebAssembly only: the Node build of
`onnxruntime-web` and the one WebAssembly module it loads, about 15 MB instead of the 145 MB package
that also carries every browser build. `@leemour/cli-messaging` runs its local embedding models with it.
that also carries every browser build. `@wirecat/cli-messaging` runs its local embedding models with it.

```js
import { env, InferenceSession, Tensor } from "@leemour/cli-messaging-onnx"
import { env, InferenceSession, Tensor } from "@wirecat/cli-messaging-onnx"
```

The API is ONNX Runtime's own ([docs](https://onnxruntime.ai/docs/api/js/)). Bun picks one thread
Expand Down
4 changes: 2 additions & 2 deletions packages/onnx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@leemour/cli-messaging-onnx",
"name": "@wirecat/cli-messaging-onnx",
"version": "1.0.0",
"description": "ONNX Runtime 1.30.0 for Node and Bun, WebAssembly only — the three files @leemour/cli-messaging runs its local models with",
"description": "ONNX Runtime 1.30.0 for Node and Bun, WebAssembly only — the three files @wirecat/cli-messaging runs its local models with",
"license": "MIT",
"type": "module",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/onnx/probe.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Runs a one-node model through the package as published: `node probe.mjs` and `bun probe.mjs`.
import { readFileSync } from "node:fs"
import { env, InferenceSession, Tensor } from "@leemour/cli-messaging-onnx"
import { env, InferenceSession, Tensor } from "@wirecat/cli-messaging-onnx"

env.wasm.numThreads = Number(process.env.THREADS ?? 2)
const session = await InferenceSession.create(readFileSync(new URL("./test/multiply.onnx", import.meta.url)))
Expand Down
4 changes: 2 additions & 2 deletions packages/sqlite/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @leemour/cli-messaging-sqlite
# @wirecat/cli-messaging-sqlite

SQLite 3.53.4, built from the official amalgamation for the places `@leemour/cli-messaging` loads it
SQLite 3.53.4, built from the official amalgamation for the places `@wirecat/cli-messaging` loads it
when the runtime's own SQLite cannot hold its message store: Bun on macOS (13.0 and later, arm64 and
x86_64), and a Linux distribution's Node (x64 and arm64, glibc 2.28+ or musl).

Expand Down
4 changes: 2 additions & 2 deletions packages/sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@leemour/cli-messaging-sqlite",
"name": "@wirecat/cli-messaging-sqlite",
"version": "1.0.0",
"description": "SQLite 3.53.4 builds for @leemour/cli-messaging where the runtime's own SQLite falls short",
"description": "SQLite 3.53.4 builds for @wirecat/cli-messaging where the runtime's own SQLite falls short",
"license": "MIT",
"type": "module",
"repository": {
Expand Down
Loading