@runinfra/sdk 0.1.0 → 0.1.2
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/CHANGELOG.md +61 -0
- package/LICENSE +37 -0
- package/README.md +294 -364
- package/dist/index.d.ts +19 -1
- package/dist/index.js +19 -1
- package/package.json +15 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@runinfra/sdk` are documented here. This project follows
|
|
4
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
+
|
|
6
|
+
## [0.1.2] - 2026-05-23
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Hardened CI and publish gates with exact npm tarball and Python wheel/sdist
|
|
10
|
+
content verification.
|
|
11
|
+
- Added version-sync and workflow-policy checks to prevent stale SDK releases
|
|
12
|
+
and long-lived registry-token regressions.
|
|
13
|
+
- Updated public docs to match the shipped voice pipeline helper: experimental,
|
|
14
|
+
pipeline-scoped, and not yet live-canary verified.
|
|
15
|
+
|
|
16
|
+
## [0.1.1] - 2026-05-23
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **`license`**: `UNLICENSED` -> `LicenseRef-Proprietary` (aligns with Python SDK; the prior value was contradictory for a public package).
|
|
20
|
+
- **`repository.url`**: now points at `RightNow-AI/runinfra-sdk` (the public source repo). Previous value pointed at the non-existent `RunPipe` slug.
|
|
21
|
+
- **`bugs.url`**: same fix.
|
|
22
|
+
- **`description`**: now states "beta; LLM + embeddings tested, image/audio surfaces experimental" so the registry listing accurately reflects verification state.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Modality status section** in the README documenting which surfaces are
|
|
26
|
+
contract-tested vs experimental.
|
|
27
|
+
- **`@experimental` JSDoc** on `client.images.*`, `client.audio.speech.*`, and
|
|
28
|
+
`client.audio.transcriptions.*` - these surfaces match the OpenAI HTTP
|
|
29
|
+
envelope but have not been verified end-to-end against a live deployed
|
|
30
|
+
pipeline in the public-gateway canary suite. Test against your own
|
|
31
|
+
deployments before using in production.
|
|
32
|
+
- This `CHANGELOG.md`.
|
|
33
|
+
|
|
34
|
+
### Provenance
|
|
35
|
+
This is the first release published via GitHub OIDC trusted publishing
|
|
36
|
+
(`.github/workflows/publish.yml` -> `npm` environment). The published
|
|
37
|
+
tarball includes a Sigstore-backed provenance attestation that ties the
|
|
38
|
+
release to a specific CI run. Verify with:
|
|
39
|
+
```bash
|
|
40
|
+
npm view @runinfra/sdk@0.1.1 dist.attestations
|
|
41
|
+
```
|
|
42
|
+
v0.1.0 was published from a local machine to bootstrap the Trusted Publisher
|
|
43
|
+
configuration and does not have provenance. All v0.1.1+ releases will.
|
|
44
|
+
|
|
45
|
+
### Known beta gaps
|
|
46
|
+
- Live-canary coverage is currently restricted to LLM + embeddings. Image,
|
|
47
|
+
TTS, and ASR surfaces are runnable but not yet verified end-to-end.
|
|
48
|
+
- Webhook delivery routes are not shipped; `client.webhooks.create` /
|
|
49
|
+
`.list()` throw `UnsupportedOperationError`. Local signature verification
|
|
50
|
+
(`verifySignature`, `constructEvent`) works.
|
|
51
|
+
- `client.voice.pipeline.create` posts audio to the pipeline-scoped `/pipeline` route.
|
|
52
|
+
It is experimental until live canary coverage is complete.
|
|
53
|
+
|
|
54
|
+
### Toward 1.0.0 GA
|
|
55
|
+
GA requires all 5 model modalities plus voice pipeline live-canary verified and
|
|
56
|
+
public-repo release gates that block stale, missing, or bypassed canary
|
|
57
|
+
evidence.
|
|
58
|
+
|
|
59
|
+
## [0.1.0] - 2026-05-22
|
|
60
|
+
|
|
61
|
+
Initial public release. See README for the API surface.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
RunInfra SDK License
|
|
2
|
+
Copyright (c) 2026 RightNow AI, Inc.
|
|
3
|
+
|
|
4
|
+
This software is licensed under a proprietary, source-available license.
|
|
5
|
+
By installing, copying, or using this package you agree to the terms below.
|
|
6
|
+
|
|
7
|
+
1. Permitted use
|
|
8
|
+
You may use this SDK to integrate your own applications with RunInfra
|
|
9
|
+
inference services hosted at api.runinfra.ai. This includes:
|
|
10
|
+
- Calling the public gateway endpoints documented in the README.
|
|
11
|
+
- Embedding this SDK in your applications (commercial or personal),
|
|
12
|
+
provided your use does not violate Section 2.
|
|
13
|
+
|
|
14
|
+
2. Restrictions
|
|
15
|
+
You may not:
|
|
16
|
+
- Redistribute or sublicense this SDK in modified form.
|
|
17
|
+
- Use this SDK to reverse-engineer, replicate, or impair the RunInfra
|
|
18
|
+
hosted service.
|
|
19
|
+
- Remove or alter the attribution notices in this LICENSE or in package
|
|
20
|
+
metadata.
|
|
21
|
+
- Misrepresent the origin of this SDK or its packaging artifacts.
|
|
22
|
+
|
|
23
|
+
3. No warranty
|
|
24
|
+
This SDK is provided "as is", without warranty of any kind, express or
|
|
25
|
+
implied, including but not limited to merchantability, fitness for a
|
|
26
|
+
particular purpose, and non-infringement. In no event shall RightNow AI,
|
|
27
|
+
Inc. or its affiliates be liable for any claim, damages, or other
|
|
28
|
+
liability arising from the use of this SDK.
|
|
29
|
+
|
|
30
|
+
4. Termination
|
|
31
|
+
This license terminates automatically if you breach any of the
|
|
32
|
+
restrictions in Section 2. Upon termination, you must cease all use of
|
|
33
|
+
this SDK and delete all copies in your possession.
|
|
34
|
+
|
|
35
|
+
5. Contact
|
|
36
|
+
For commercial licensing inquiries, partnerships, or questions about
|
|
37
|
+
this license, contact licensing@runinfra.ai.
|
package/README.md
CHANGED
|
@@ -1,364 +1,294 @@
|
|
|
1
|
-
# RunInfra TypeScript SDK
|
|
2
|
-
|
|
3
|
-
Access optimized RunInfra deployments through the verified public gateway.
|
|
4
|
-
|
|
5
|
-
Requires Node.js 18 or newer.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @runinfra/sdk
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
`
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
##
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
against the prepared-env discovery report to validate that it is redacted, same-workspace, uses exact live env values, and only promotes callable `active_verified` targets.
|
|
296
|
-
If the output file already has `RUNINFRA_API_KEY`, `RUNINFRA_PIPELINE_API_KEY`,
|
|
297
|
-
`DATABASE_URL`, `TEST_ASR_FILE`, or local TTS reference inputs, the helper
|
|
298
|
-
preserves them and does not print them.
|
|
299
|
-
|
|
300
|
-
That gate must cover LLM, embeddings, image, TTS, and ASR endpoints before the
|
|
301
|
-
deployment is treated as production verified. Those strict modality targets must
|
|
302
|
-
be distinct deployed model IDs in the same workspace, because the promotion
|
|
303
|
-
canary uses one workspace-scoped key and then proves billing for every reported
|
|
304
|
-
model. The generated live report also records the SDK version and source digest,
|
|
305
|
-
so stale canaries cannot promote a newer SDK build.
|
|
306
|
-
Focused `pnpm test:sdk-canary -- --report ...` smoke reports also record the
|
|
307
|
-
same SDK / Docs / Engine source digest and stay redacted. The raw
|
|
308
|
-
OpenAI-compatible focused smoke writes `artifacts/sdk/openai-focused-smoke.json`
|
|
309
|
-
and the native SDK smoke writes `artifacts/sdk/native-focused-smoke.json`.
|
|
310
|
-
`verify:sdk-goal` rejects either focused smoke report when it was generated from older source,
|
|
311
|
-
so focused LLM debugging evidence cannot be reused as fresh promotion evidence.
|
|
312
|
-
Each canary result also records redacted `checks` for the required proof checks
|
|
313
|
-
it emitted. If a canary exits successfully but misses a required proof line, the
|
|
314
|
-
strict report records `missingChecks` and stays blocked. The runner only counts
|
|
315
|
-
a proof line when the child canary prints `[ OK ] <required check>`; `[FAIL]` lines do not satisfy promotion evidence. The proof set covers model discovery
|
|
316
|
-
and retrieval, LLM responses and streaming,
|
|
317
|
-
pipeline-scoped native SDK responses, OpenAI-compatible pipeline-scoped `/v1/responses`, embeddings vectors, image data, TTS audio bytes, ASR transcription text,
|
|
318
|
-
OpenAI-compatible auth and error paths, native SDK typed `AuthenticationError`
|
|
319
|
-
mapping, request ID propagation, unsupported webhook guards, API key scope, and
|
|
320
|
-
billing usage verification. OpenAI-compatible security checks also prove request tracing, HSTS, `nosniff`, path traversal blocking, invalid model 404, missing model 400, and auth failures before publish promotion can pass.
|
|
321
|
-
The live-target gate also requires checked RunPod endpoint inventory before
|
|
322
|
-
promotion. `selectedTargets.*.runpodEndpointVerified` must be true for every
|
|
323
|
-
strict modality.
|
|
324
|
-
|
|
325
|
-
Use registry trusted publishing first. Do not provide NPM or PyPI publish tokens.
|
|
326
|
-
Registry tokens are not used; publish through GitHub trusted publishing only. If
|
|
327
|
-
trusted publishing is unavailable, do not publish until the registry identity is fixed.
|
|
328
|
-
The publish-readiness report ties the local release verification,
|
|
329
|
-
goal-readiness report, live-target discovery report, and strict live canary
|
|
330
|
-
report, plus both focused smoke reports, to the same source digest.
|
|
331
|
-
The TypeScript package also runs the same publish-readiness gate from
|
|
332
|
-
`prepublishOnly`, so a direct `npm publish` is blocked until that report passes.
|
|
333
|
-
Use `pnpm prepare:sdk-publish` to build the npm package, Python wheel, and
|
|
334
|
-
Python sdist only after publish readiness passes; the command writes a
|
|
335
|
-
source-digest-tied manifest with artifact SHA-256 hashes, byte counts, and
|
|
336
|
-
checksummed release / goal / live-target / live-canary proof reports at
|
|
337
|
-
`artifacts/sdk/publish/publish-artifacts.json`.
|
|
338
|
-
Use `pnpm publish:sdk -- --dry-run` to validate that manifest and print the npm
|
|
339
|
-
trusted-publishing and PyPI action handoff without sending packages. The guarded publish wrapper
|
|
340
|
-
refuses `--execute` outside CI, validates artifact checksums again, and supports
|
|
341
|
-
npm trusted publishing through GitHub OIDC on the Node 22.14.0 publish workflow;
|
|
342
|
-
PyPI should be uploaded by `pypa/gh-action-pypi-publish` in the `SDK Publish`
|
|
343
|
-
workflow.
|
|
344
|
-
GitHub Actions has two SDK-only workflows for the same path. `SDK Release Gate`
|
|
345
|
-
runs `pnpm verify:sdk-release` and requires `RUNINFRA_SDK_CI_TOKEN` with
|
|
346
|
-
read-only access to the docs and Engine contract repositories. `SDK Publish` is
|
|
347
|
-
manual only, defaults to `publish: false`, runs `verify:sdk-release`, creates
|
|
348
|
-
the strict live SDK env from GitHub secrets, discovers `active_verified` targets,
|
|
349
|
-
prepares the modality env, runs strict live canaries, verifies goal and publish
|
|
350
|
-
readiness, prepares artifacts, runs `publish:sdk -- --dry-run`, then uploads the
|
|
351
|
-
proof reports and package artifacts. The verification job has no registry OIDC permission;
|
|
352
|
-
the npm and PyPI publish jobs download the checked artifacts and are the only
|
|
353
|
-
jobs with registry trusted publishing identity. The npm publish job uses GitHub environment `npm`;
|
|
354
|
-
the PyPI publish job revalidates the publish manifest before upload and uses GitHub environment `pypi`. The live proof secrets are
|
|
355
|
-
`RUNINFRA_SDK_LIVE_API_KEY`, `RUNINFRA_SDK_LIVE_DATABASE_URL`, `RUNPOD_API_KEY`, and
|
|
356
|
-
`RUNINFRA_SDK_LIVE_ASR_FILE_BASE64`; voice-less Base TTS canaries can also set
|
|
357
|
-
`RUNINFRA_SDK_LIVE_TTS_REF_AUDIO` and `RUNINFRA_SDK_LIVE_TTS_REF_TEXT`. Only
|
|
358
|
-
after those gates pass should a maintainer rerun it with `publish: true`; npm
|
|
359
|
-
and PyPI must use trusted publishers.
|
|
360
|
-
`pnpm verify:sdk-release` also runs SDK secret hygiene and fails if non-test
|
|
361
|
-
handoff docs or release files contain full-shaped RunInfra keys, service tokens,
|
|
362
|
-
or package publish tokens.
|
|
363
|
-
|
|
364
|
-
Co-located voice pipelines are available through the native `client.voice.pipeline.create()` helper on pipeline-scoped keys. The helper posts binary audio to the verified `/pipeline` route and returns the JSON transcript / response envelope. Public webhook create/list calls are intentionally unavailable until their gateway routes are verified, and the SDK throws `UnsupportedOperationError` locally for those webhook capabilities without making a request.
|
|
1
|
+
# RunInfra TypeScript SDK
|
|
2
|
+
|
|
3
|
+
Access optimized RunInfra deployments through the verified public gateway.
|
|
4
|
+
|
|
5
|
+
Requires Node.js 18 or newer.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @runinfra/sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Modality status (v0.1.2)
|
|
14
|
+
|
|
15
|
+
This SDK is in **beta**. The surfaces below have different verification levels:
|
|
16
|
+
|
|
17
|
+
| Modality | Surface | Status |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| LLM | `client.chat.completions.create`, `client.responses.create` | Beta, contract-tested |
|
|
20
|
+
| Embeddings | `client.embeddings.create` | Beta, contract-tested |
|
|
21
|
+
| Images | `client.images.generate` | **Experimental**, not live-canary verified |
|
|
22
|
+
| Audio (TTS) | `client.audio.speech.create` | **Experimental**, not live-canary verified |
|
|
23
|
+
| Audio (ASR) | `client.audio.transcriptions.create` | **Experimental**, not live-canary verified |
|
|
24
|
+
| Webhooks | `client.webhooks.*` | Local verification helpers only; remote delivery not shipped |
|
|
25
|
+
| Voice pipeline | `client.voice.pipeline.create` | **Experimental**, pipeline-scoped route, not live-canary verified |
|
|
26
|
+
|
|
27
|
+
Experimental surfaces match their documented gateway contracts, but we have
|
|
28
|
+
not yet completed a full end-to-end live-canary deployment for those
|
|
29
|
+
modalities in the public gateway. They will reach GA in v1.0.0 once the
|
|
30
|
+
canary suite covers all five model modalities plus voice pipeline. Test
|
|
31
|
+
against your own deployed models before using experimental surfaces in
|
|
32
|
+
production.
|
|
33
|
+
|
|
34
|
+
## Create a client
|
|
35
|
+
|
|
36
|
+
Use a workspace-scoped key to reach verified active deployments through the `model` field.
|
|
37
|
+
In RunPipe, open Settings, API Keys, Create key, and keep Scope set to Workspace.
|
|
38
|
+
|
|
39
|
+
The Deploy tab can create a pipeline-scoped key for one optimized pipeline.
|
|
40
|
+
The one-time secret is shown once after creation. Store it as `RUNINFRA_API_KEY`
|
|
41
|
+
for app snippets before leaving the page. For repo live canaries, keep the
|
|
42
|
+
workspace key in `RUNINFRA_API_KEY` and put the pipeline-scoped key for
|
|
43
|
+
`TEST_PIPELINE_ID` in `RUNINFRA_PIPELINE_API_KEY` so flat and pipeline routes
|
|
44
|
+
are verified independently.
|
|
45
|
+
|
|
46
|
+
After a runbook finishes in RunPipe, choose Open Deploy from the runbook handoff.
|
|
47
|
+
Deploy only shows SDK operations that the verified endpoint supports, so copy
|
|
48
|
+
the native or OpenAI-compatible snippet from there instead of guessing a route.
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { RunInfra } from "@runinfra/sdk";
|
|
52
|
+
|
|
53
|
+
const apiKey = process.env.RUNINFRA_API_KEY;
|
|
54
|
+
if (!apiKey) throw new Error("Set RUNINFRA_API_KEY before running this snippet.");
|
|
55
|
+
|
|
56
|
+
const client = new RunInfra({
|
|
57
|
+
apiKey,
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Use `pipelineId` when the key or integration should be locked to one optimized pipeline.
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
const apiKey = process.env.RUNINFRA_API_KEY;
|
|
65
|
+
if (!apiKey) throw new Error("Set RUNINFRA_API_KEY before running this snippet.");
|
|
66
|
+
|
|
67
|
+
const client = new RunInfra({
|
|
68
|
+
apiKey,
|
|
69
|
+
pipelineId: "pipe_123",
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The default base URL is `https://api.runinfra.ai/v1`.
|
|
74
|
+
`pipelineId` is trimmed and URL-encoded before it is added to the base URL. Use either `pipelineId` with the default base URL, or a pipeline-scoped `baseURL` such as `https://api.runinfra.ai/v1/pipe_123`. If both point to the same pipeline, the SDK keeps the URL scoped once.
|
|
75
|
+
RunPipe generated native SDK snippets prefer `pipelineId` with the root `https://api.runinfra.ai/v1` base URL. OpenAI-compatible snippets use the pipeline-scoped base URL because the OpenAI SDK has no RunInfra pipeline option.
|
|
76
|
+
Custom base URLs must use `http` or `https`. Other schemes and malformed URLs are rejected before a bearer API key can be sent.
|
|
77
|
+
Remote custom base URLs must use `https`. Plain `http` is accepted only for local development hosts: `localhost`, `127.0.0.1`, `0.0.0.0`, and `[::1]`.
|
|
78
|
+
Custom base URLs must not include usernames or passwords.
|
|
79
|
+
Custom base URLs must not include query strings or fragments.
|
|
80
|
+
|
|
81
|
+
## Server-side only
|
|
82
|
+
|
|
83
|
+
The TypeScript SDK targets Node.js 18 or newer. RunInfra API keys are bearer secrets. Do not initialize this SDK in browser code with a secret API key. The SDK fails closed when it detects a browser runtime; keep calls on a Node.js server route, API service, or backend job. If you are deliberately using a controlled non-public browser-like runtime, pass `dangerouslyAllowBrowser: true` and own that risk.
|
|
84
|
+
|
|
85
|
+
Unknown TypeScript client option keys are rejected so typos such as `baseUrl` or `api_key` do not silently change the gateway, authentication, timeout, retry, or runtime-safety behavior. Use `baseURL` for custom server-side gateway URLs.
|
|
86
|
+
|
|
87
|
+
## Responses and streaming
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
const stream = await client.responses.create({
|
|
91
|
+
model: "llama-3.1-8b",
|
|
92
|
+
input: "Hello",
|
|
93
|
+
max_output_tokens: 512,
|
|
94
|
+
stream: true,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
for await (const event of stream) {
|
|
98
|
+
if (event.type === "response.output_text.delta") {
|
|
99
|
+
process.stdout.write(event.delta ?? "");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
console.log(stream.requestId);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Supported public routes
|
|
107
|
+
|
|
108
|
+
- `models.list()`
|
|
109
|
+
- `models.retrieve(model)`
|
|
110
|
+
- `responses.create()`
|
|
111
|
+
- `chat.completions.create()`
|
|
112
|
+
- `embeddings.create()`
|
|
113
|
+
- `audio.speech.create()`
|
|
114
|
+
- `audio.transcriptions.create()`
|
|
115
|
+
- `images.generate()`
|
|
116
|
+
- `voice.pipeline.create()`
|
|
117
|
+
|
|
118
|
+
## Text to speech
|
|
119
|
+
|
|
120
|
+
TTS deployments can expose named voices or Base/reference-audio voice cloning.
|
|
121
|
+
Use `RUNINFRA_TTS_VOICE` when the deployment lists a voice or speaker. Use
|
|
122
|
+
`RUNINFRA_TTS_REF_AUDIO` and `RUNINFRA_TTS_REF_TEXT` when the deployment expects
|
|
123
|
+
reference-audio input.
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
const voice = process.env.RUNINFRA_TTS_VOICE?.trim();
|
|
127
|
+
const refAudio = process.env.RUNINFRA_TTS_REF_AUDIO?.trim();
|
|
128
|
+
const refText = process.env.RUNINFRA_TTS_REF_TEXT?.trim();
|
|
129
|
+
const taskType = process.env.RUNINFRA_TTS_TASK_TYPE?.trim() || "Base";
|
|
130
|
+
|
|
131
|
+
const speechVoice = voice
|
|
132
|
+
? { voice }
|
|
133
|
+
: refAudio && refText
|
|
134
|
+
? { ref_audio: refAudio, ref_text: refText, task_type: taskType }
|
|
135
|
+
: null;
|
|
136
|
+
|
|
137
|
+
if (!speechVoice) {
|
|
138
|
+
throw new Error("Set RUNINFRA_TTS_VOICE, or RUNINFRA_TTS_REF_AUDIO and RUNINFRA_TTS_REF_TEXT.");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const audio = await client.audio.speech.create({
|
|
142
|
+
model: "your-tts-model-id",
|
|
143
|
+
input: "Hello from your optimized RunInfra endpoint.",
|
|
144
|
+
...speechVoice,
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Timeouts and retries
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
const apiKey = process.env.RUNINFRA_API_KEY;
|
|
152
|
+
if (!apiKey) throw new Error("Set RUNINFRA_API_KEY before running this snippet.");
|
|
153
|
+
|
|
154
|
+
const client = new RunInfra({
|
|
155
|
+
apiKey,
|
|
156
|
+
timeoutMs: 60_000,
|
|
157
|
+
maxRetries: 2,
|
|
158
|
+
retryBaseMs: 250,
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The SDK retries transient transport failures and `408`, `409`, `429`, `500`, `502`, `503`, and `504` responses for safe `GET` requests. Charge-bearing `POST` inference requests retry only when you provide `idempotencyKey`, and automatic POST retries are limited to non-streaming JSON calls whose gateway responses can be replayed safely. That covers `responses.create()`, non-streaming `chat.completions.create()`, `embeddings.create()`, and `images.generate()`. Streaming calls, binary TTS responses, and multipart ASR uploads are sent once even when you provide an idempotency key. The gateway still binds idempotency keys for TTS and ASR, so a manual retry with the same key will not run or charge a second inference after the first request settles. Automatic retries honor reasonable `Retry-After` values up to 60 seconds when the header is a plain integer second value or HTTP-date, then fall back to bounded exponential backoff. The SDK does not retry authentication errors, insufficient credits, or unsupported operations.
|
|
163
|
+
|
|
164
|
+
If the gateway successfully finishes a request but the response body is too large to replay from the idempotency cache, later calls with the same `idempotencyKey` return `idempotency_replay_unavailable` without running or charging the inference again.
|
|
165
|
+
|
|
166
|
+
`timeoutMs` must be positive, `maxRetries` must be a non-negative integer, and `retryBaseMs` must be non-negative. Unknown per-request option keys are rejected so typos do not silently disable idempotency, tracing, timeout, or retry behavior. Invalid values throw `RunInfraError` with `type: "invalid_request_options"` before any network request is sent.
|
|
167
|
+
|
|
168
|
+
## Request validation
|
|
169
|
+
|
|
170
|
+
Required request fields are validated before any network request is sent. The model must be a non-blank string, chat messages must be a non-empty array, each chat message must be an object with a non-empty role, Responses input must be a non-empty string or array, Responses input array items must be objects, JSON request bodies must be serializable and contain only finite numbers, embedding input must be a non-empty string or array of non-empty strings, TTS input and image prompts must be non-empty strings, and ASR file must be a Blob. ASR multipart filenames and extra form field names and values are validated before the FormData body is built. Invalid request values throw `RunInfraError` with `type: "invalid_request_options"` and do not reach the gateway or billing path.
|
|
171
|
+
|
|
172
|
+
Use per-request options when a call needs a shorter timeout, a trace ID, or a retry-safe idempotency key.
|
|
173
|
+
Custom headers are for app metadata only. They cannot override SDK-controlled headers such as `Authorization`, `Content-Type`, `X-Client-Request-Id`, `Idempotency-Key`, `X-RunInfra-SDK`, or `X-RunInfra-SDK-Version`, and they cannot set transport or credential headers such as `Host`, `Cookie`, `Content-Length`, `Transfer-Encoding`, `Connection`, `Proxy-Authorization`, `Api-Key`, `X-API-Key`, `X-Auth-Token`, or `X-Access-Token`.
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
await client.responses.create(
|
|
177
|
+
{
|
|
178
|
+
model: "llama-3.1-8b",
|
|
179
|
+
input: "Summarize this incident.",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
clientRequestId: crypto.randomUUID(),
|
|
183
|
+
idempotencyKey: crypto.randomUUID(),
|
|
184
|
+
timeoutMs: 20_000,
|
|
185
|
+
maxRetries: 0,
|
|
186
|
+
},
|
|
187
|
+
);
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Typed errors
|
|
191
|
+
|
|
192
|
+
The SDK exposes `AuthenticationError`, `PermissionDeniedError`, `RateLimitError`, `InsufficientCreditsError`, `DeploymentError`, `ModelNotFoundError`, `RunInfraTimeoutError`, `RunInfraConnectionError`, `RunInfraStreamParseError`, and `UnsupportedOperationError`.
|
|
193
|
+
`RateLimitError` includes `retryAfterMs` when the gateway returns `Retry-After`.
|
|
194
|
+
`RunInfraStreamParseError` includes `requestId` when a malformed SSE frame came from a traced gateway response.
|
|
195
|
+
`RunInfraTimeoutError` also covers stalled streaming reads, stalled non-streaming JSON body reads, and stalled binary audio `arrayBuffer()` / `blob()` reads after headers arrive, and includes `requestId` when the response was traced.
|
|
196
|
+
`RunInfraConnectionError` also covers streaming body transport failures, non-streaming JSON body transport failures, and binary audio `arrayBuffer()` / `blob()` transport failures after headers arrive, and includes `requestId` when the response was traced.
|
|
197
|
+
|
|
198
|
+
JSON helpers return typed response objects for the public gateway contract:
|
|
199
|
+
`ModelListResponse`, `ModelObject`, `EmbeddingResponse`, `ResponsesCreateResponse`,
|
|
200
|
+
`ChatCompletionResponse`, `TranscriptionResponse`, and `ImageGenerationResponse`.
|
|
201
|
+
Binary TTS returns `RunInfraAudioResponse`, and streaming calls return `RunInfraStream`.
|
|
202
|
+
|
|
203
|
+
## Traceability
|
|
204
|
+
|
|
205
|
+
Every request includes `X-RunInfra-SDK: typescript`, `X-RunInfra-SDK-Version`, and `X-Client-Request-Id`. These headers help support trace requests without changing billing or routing.
|
|
206
|
+
|
|
207
|
+
When `idempotencyKey` is provided, the SDK sends it as `Idempotency-Key`. Use a unique value for each logical retry-safe operation. Idempotency keys must be non-blank, ASCII, 255 characters or less, and must not contain secrets or personal data.
|
|
208
|
+
|
|
209
|
+
Successful JSON object responses include `_request_id` when the gateway returns `x-request-id`. Streaming responses expose the same value as `stream.requestId`, malformed stream frames raise `RunInfraStreamParseError` with that request id, and binary audio responses expose it as `response.requestId`. Log that value with production errors and customer support reports.
|
|
210
|
+
|
|
211
|
+
## Webhook verification
|
|
212
|
+
|
|
213
|
+
Public webhook delivery routes are not shipped yet, but the SDK includes local verification helpers for signed RunInfra webhook deliveries once you receive them in your own server. Always verify the exact raw body before parsing JSON. The `RunInfra-Signature` timestamp must be a non-negative integer Unix second.
|
|
214
|
+
|
|
215
|
+
```ts
|
|
216
|
+
import {
|
|
217
|
+
WebhookVerificationError,
|
|
218
|
+
constructWebhookEvent,
|
|
219
|
+
verifyWebhookSignature,
|
|
220
|
+
} from "@runinfra/sdk";
|
|
221
|
+
|
|
222
|
+
const webhookSecret = process.env.RUNINFRA_WEBHOOK_SECRET;
|
|
223
|
+
if (!webhookSecret?.trim()) throw new Error("Set RUNINFRA_WEBHOOK_SECRET before verifying webhook events.");
|
|
224
|
+
|
|
225
|
+
const event = constructWebhookEvent({
|
|
226
|
+
payload: rawBody,
|
|
227
|
+
signatureHeader: request.headers.get("RunInfra-Signature") ?? "",
|
|
228
|
+
secret: webhookSecret,
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`constructWebhookEvent` verifies the signature, checks timestamp tolerance, and parses JSON. Use `verifyWebhookSignature` when your framework parses JSON separately and you only need to validate the raw delivery. Invalid signatures, stale timestamps, and invalid webhook JSON raise `WebhookVerificationError`.
|
|
233
|
+
|
|
234
|
+
## OpenAI-compatible clients
|
|
235
|
+
|
|
236
|
+
OpenAI-compatible clients can use the same verified base URL:
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
import OpenAI from "openai";
|
|
240
|
+
|
|
241
|
+
const apiKey = process.env.RUNINFRA_API_KEY;
|
|
242
|
+
if (!apiKey) throw new Error("Set RUNINFRA_API_KEY before running this snippet.");
|
|
243
|
+
|
|
244
|
+
const client = new OpenAI({
|
|
245
|
+
apiKey,
|
|
246
|
+
baseURL: "https://api.runinfra.ai/v1/pipe_123",
|
|
247
|
+
});
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Production promotion
|
|
251
|
+
|
|
252
|
+
Local package tests prove SDK shape, retry behavior, streaming parsing, typed
|
|
253
|
+
errors, package contents, version sync, and trusted-publishing workflow policy.
|
|
254
|
+
They do not prove that a newly optimized deployment is ready for customers.
|
|
255
|
+
This extracted public repo does not define the old monorepo live-canary
|
|
256
|
+
commands.
|
|
257
|
+
|
|
258
|
+
For production promotion from this repo, run these local checks from the
|
|
259
|
+
repository root before opening a release PR:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
node scripts/verify-workflow-policy.mjs
|
|
263
|
+
node scripts/verify-version-sync.mjs
|
|
264
|
+
pnpm --dir typescript install --lockfile=false
|
|
265
|
+
pnpm --dir typescript exec tsc -p tsconfig.json --noEmit
|
|
266
|
+
pnpm --dir typescript test
|
|
267
|
+
pnpm --dir typescript build
|
|
268
|
+
pnpm --dir typescript pack
|
|
269
|
+
node scripts/verify-npm-package.mjs typescript/runinfra-sdk-*.tgz
|
|
270
|
+
python -m pip install -e python pytest build twine
|
|
271
|
+
python -m pytest python/tests -v
|
|
272
|
+
python -m build python
|
|
273
|
+
python scripts/verify-python-package.py python/dist
|
|
274
|
+
python -m twine check python/dist/*
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Then trigger a GitHub dry-run publish from `main`:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
gh workflow run publish.yml --repo RightNow-AI/runinfra-sdk --ref main -f package=both -f dry_run=true
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Actual publishing must use the same workflow with `dry_run=false` after CI,
|
|
284
|
+
review, and environment approval. Do not use npm or PyPI tokens. OIDC trusted
|
|
285
|
+
publishing is the only supported publish path.
|
|
286
|
+
|
|
287
|
+
Run live deployment canaries from RunPipe or RunInfra-Engine against the exact
|
|
288
|
+
production gateway, workspace, pipeline keys, and RunPod inventory that will
|
|
289
|
+
serve customers. The SDK repo only proves client artifact integrity. GA still
|
|
290
|
+
requires live coverage for LLM, embeddings, image, TTS, ASR, and voice pipeline
|
|
291
|
+
surfaces, plus explicit evidence that the smoke keys and temporary canary
|
|
292
|
+
resources were removed.
|
|
293
|
+
|
|
294
|
+
Co-located voice pipelines are available through the native `client.voice.pipeline.create()` helper on pipeline-scoped keys. The helper posts binary audio to the pipeline-scoped `/pipeline` route and returns the JSON transcript / response envelope. Public webhook create/list calls are intentionally unavailable until their gateway routes are verified, and the SDK throws `UnsupportedOperationError` locally for those webhook capabilities without making a request.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const RUNINFRA_SDK_VERSION = "0.1.
|
|
1
|
+
export declare const RUNINFRA_SDK_VERSION = "0.1.2";
|
|
2
2
|
export interface RunInfraOptions {
|
|
3
3
|
apiKey: string;
|
|
4
4
|
pipelineId?: string;
|
|
@@ -252,6 +252,15 @@ export declare class RunInfra {
|
|
|
252
252
|
readonly responses: {
|
|
253
253
|
create: ResponsesCreate;
|
|
254
254
|
};
|
|
255
|
+
/**
|
|
256
|
+
* Audio surfaces (text-to-speech + speech-to-text).
|
|
257
|
+
*
|
|
258
|
+
* @experimental As of v0.1.2, these methods have NOT been verified end-to-end
|
|
259
|
+
* against a live deployed pipeline in our canary suite. The HTTP envelope
|
|
260
|
+
* matches the OpenAI Audio API contract and the request/response shapes are
|
|
261
|
+
* stable, but you should test against your own deployed model before using
|
|
262
|
+
* in production. Live-canary verification is tracked for v1.0.0 GA.
|
|
263
|
+
*/
|
|
255
264
|
readonly audio: {
|
|
256
265
|
speech: {
|
|
257
266
|
create: (request: SpeechRequest, options?: RunInfraRequestOptions) => Promise<RunInfraAudioResponse>;
|
|
@@ -264,6 +273,15 @@ export declare class RunInfra {
|
|
|
264
273
|
list: (options?: RunInfraRequestOptions) => Promise<ModelListResponse>;
|
|
265
274
|
retrieve: (model: string, options?: RunInfraRequestOptions) => Promise<ModelObject>;
|
|
266
275
|
};
|
|
276
|
+
/**
|
|
277
|
+
* Image generation surface.
|
|
278
|
+
*
|
|
279
|
+
* @experimental As of v0.1.2, this method has NOT been verified end-to-end
|
|
280
|
+
* against a live deployed pipeline in our canary suite. The HTTP envelope
|
|
281
|
+
* matches the OpenAI Images API contract, but you should test against your
|
|
282
|
+
* own deployed model before using in production. Live-canary verification
|
|
283
|
+
* is tracked for v1.0.0 GA.
|
|
284
|
+
*/
|
|
267
285
|
readonly images: {
|
|
268
286
|
generate: (request: ImageGenerateRequest, options?: RunInfraRequestOptions) => Promise<ImageGenerationResponse>;
|
|
269
287
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
2
|
-
export const RUNINFRA_SDK_VERSION = "0.1.
|
|
2
|
+
export const RUNINFRA_SDK_VERSION = "0.1.2";
|
|
3
3
|
const MAX_AUTOMATIC_RETRY_AFTER_MS = 60_000;
|
|
4
4
|
export class RunInfraError extends Error {
|
|
5
5
|
status;
|
|
@@ -896,8 +896,26 @@ export class RunInfra {
|
|
|
896
896
|
chat;
|
|
897
897
|
embeddings;
|
|
898
898
|
responses;
|
|
899
|
+
/**
|
|
900
|
+
* Audio surfaces (text-to-speech + speech-to-text).
|
|
901
|
+
*
|
|
902
|
+
* @experimental As of v0.1.2, these methods have NOT been verified end-to-end
|
|
903
|
+
* against a live deployed pipeline in our canary suite. The HTTP envelope
|
|
904
|
+
* matches the OpenAI Audio API contract and the request/response shapes are
|
|
905
|
+
* stable, but you should test against your own deployed model before using
|
|
906
|
+
* in production. Live-canary verification is tracked for v1.0.0 GA.
|
|
907
|
+
*/
|
|
899
908
|
audio;
|
|
900
909
|
models;
|
|
910
|
+
/**
|
|
911
|
+
* Image generation surface.
|
|
912
|
+
*
|
|
913
|
+
* @experimental As of v0.1.2, this method has NOT been verified end-to-end
|
|
914
|
+
* against a live deployed pipeline in our canary suite. The HTTP envelope
|
|
915
|
+
* matches the OpenAI Images API contract, but you should test against your
|
|
916
|
+
* own deployed model before using in production. Live-canary verification
|
|
917
|
+
* is tracked for v1.0.0 GA.
|
|
918
|
+
*/
|
|
901
919
|
images;
|
|
902
920
|
webhooks;
|
|
903
921
|
voice;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runinfra/sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "RunInfra SDK for optimized inference deployments",
|
|
5
|
-
"license": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "RunInfra SDK for optimized inference deployments (beta; LLM + embeddings tested, image/audio surfaces experimental)",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://runinfra.ai/docs/tools-sdks/runinfra-sdk",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/RightNow-AI/
|
|
10
|
-
"directory": "
|
|
9
|
+
"url": "git+https://github.com/RightNow-AI/runinfra-sdk.git",
|
|
10
|
+
"directory": "typescript"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/RightNow-AI/
|
|
13
|
+
"url": "https://github.com/RightNow-AI/runinfra-sdk/issues"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"runinfra",
|
|
@@ -39,14 +39,21 @@
|
|
|
39
39
|
"files": [
|
|
40
40
|
"dist",
|
|
41
41
|
"README.md",
|
|
42
|
+
"CHANGELOG.md",
|
|
43
|
+
"LICENSE",
|
|
42
44
|
"package.json"
|
|
43
45
|
],
|
|
44
46
|
"publishConfig": {
|
|
45
47
|
"access": "public"
|
|
46
48
|
},
|
|
47
49
|
"sideEffects": false,
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^22.7.5",
|
|
52
|
+
"typescript": "^5.6.3",
|
|
53
|
+
"vitest": "^2.1.3"
|
|
54
|
+
},
|
|
48
55
|
"scripts": {
|
|
49
|
-
"build": "
|
|
50
|
-
"test": "
|
|
56
|
+
"build": "tsc -p tsconfig.json",
|
|
57
|
+
"test": "vitest run src/index.test.ts"
|
|
51
58
|
}
|
|
52
59
|
}
|