@standardagents/sip 0.13.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,6 +17,40 @@
17
17
  pnpm add @standardagents/sip
18
18
  ```
19
19
 
20
+ ## Docs Site
21
+
22
+ The repo includes a small static documentation site built with Arrow and Vite.
23
+
24
+ ```bash
25
+ pnpm docs:dev
26
+ pnpm docs:build
27
+ pnpm docs:preview
28
+ ```
29
+
30
+ - Source files live in `docs/`
31
+ - The production build outputs to `docs-dist/`
32
+
33
+ ## Release
34
+
35
+ Publishing is handled by GitHub Actions with npm trusted publishing. The workflow
36
+ publishes from version tags and does not use an `NPM_TOKEN`.
37
+
38
+ ```bash
39
+ pnpm verify
40
+ pnpm verify:release
41
+ pnpm release
42
+ pnpm release:next
43
+ pnpm release:dev
44
+ ```
45
+
46
+ - `pnpm release` on `main` bumps `package.json`, commits the new stable version, and pushes the branch plus the `vX.Y.Z` tag
47
+ - `pnpm release:next` and `pnpm release:dev` create a temporary tagged commit like `v1.1.1-next.231fa`, push only the tag, then restore your local branch to the original version
48
+ - You can pass `--bump=major|minor|patch` and `--tag=<dist-tag>` to the release script directly
49
+ - Stable tags create GitHub release notes after a successful npm publish; pre-release tags skip that step
50
+
51
+ Trusted publishing must be configured in npm for the `standardagents/sip`
52
+ repository and `.github/workflows/publish.yml`.
53
+
20
54
  ## Usage
21
55
 
22
56
  ```typescript
@@ -131,7 +165,6 @@ cd emsdk && ./emsdk install latest && ./emsdk activate latest
131
165
  source ./emsdk_env.sh
132
166
 
133
167
  # Build WASM
134
- cd packages/sip
135
168
  pnpm build:wasm
136
169
  ```
137
170
 
@@ -141,19 +174,22 @@ This downloads libjpeg-turbo, compiles it to WASM, and generates:
141
174
 
142
175
  ### Using WASM
143
176
 
144
- To enable streaming mode, register the WASM loader before processing:
177
+ For Workers and bundlers, statically import the emitted `.wasm` asset and pass it
178
+ to `ready()` once at startup:
145
179
 
146
180
  ```typescript
147
- import { sip } from '@standardagents/sip';
148
- import createSipModule from '@standardagents/sip/dist/sip.js';
181
+ import { ready, transform, collect } from '@standardagents/sip';
182
+ import sipWasm from '@standardagents/sip/dist/sip.wasm';
149
183
 
150
- // Register WASM loader (once at startup)
151
- globalThis.__SIP_WASM_LOADER__ = async () => createSipModule();
184
+ await ready({ wasm: sipWasm });
152
185
 
153
- // Now sip.process() will use streaming for JPEG
154
- const result = await sip.process(jpegBuffer, { maxWidth: 2048 });
186
+ const image = transform(request.body ?? request, { width: 2048, height: 2048 });
187
+ const result = await collect(image);
155
188
  ```
156
189
 
190
+ The `globalThis.__SIP_WASM_LOADER__` hook still exists as an internal escape hatch,
191
+ but it is not the intended public setup API.
192
+
157
193
  ## Architecture
158
194
 
159
195
  ```