streamtrust 0.1.0-preview.1 → 0.1.1
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 +9 -9
- package/package.json +2 -2
- package/src/index.js +4 -1
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# StreamTrust CLI
|
|
1
|
+
# StreamTrust CLI
|
|
2
2
|
|
|
3
3
|
Adapter-driven CI checks for streaming applications: compare observed output with authoritative state, exercise cancellation, and verify retry identity.
|
|
4
4
|
|
|
5
|
-
**Status:** `0.1.
|
|
5
|
+
**Status:** `0.1.1`, an early 0.x release for independent teams. APIs and report formats may change before 1.0. The CLI is dependency-free, ESM, and requires Node.js 22+. MIT licensed. Browser and database libraries belong to your adapter and are not installed by StreamTrust.
|
|
6
6
|
|
|
7
|
-
## Install
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install --save-dev streamtrust
|
|
10
|
+
npm install --save-dev streamtrust
|
|
11
11
|
npx streamtrust init
|
|
12
12
|
npx streamtrust verify --adapter ./streamtrust/adapter.mjs
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
For reproducible CI, pin `streamtrust@0.1.
|
|
15
|
+
For reproducible CI, pin `streamtrust@0.1.1` and commit your lockfile. The generated adapter initially exercises the bundled demonstration; map it to your application before using its results as application evidence.
|
|
16
16
|
|
|
17
17
|
## Run from source
|
|
18
18
|
|
|
@@ -32,7 +32,7 @@ Build the tarball with `npm pack` in this repository.
|
|
|
32
32
|
Put the supplied tarball in your project's `vendor/` directory, then:
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
|
-
npm install --save-dev ./vendor/streamtrust-0.1.
|
|
35
|
+
npm install --save-dev ./vendor/streamtrust-0.1.1.tgz
|
|
36
36
|
npx streamtrust init
|
|
37
37
|
npx streamtrust verify --adapter ./streamtrust/adapter.mjs
|
|
38
38
|
```
|
|
@@ -123,7 +123,7 @@ node --import tsx ./node_modules/streamtrust/bin/streamtrust.js verify \
|
|
|
123
123
|
|
|
124
124
|
## CI
|
|
125
125
|
|
|
126
|
-
Install the pinned
|
|
126
|
+
Install the pinned version and commit package.json and package-lock.json so CI can use `npm ci`. If using a locally built tarball instead, keep it in `vendor/` so the committed file dependency can be resolved. The example workflow assumes the application under test is already running; add its start/wait commands before verification. Omit the base URL only when intentionally testing the bundled demonstration.
|
|
127
127
|
|
|
128
128
|
```yaml
|
|
129
129
|
name: Streaming application verification
|
|
@@ -159,10 +159,10 @@ jobs:
|
|
|
159
159
|
|
|
160
160
|
Use a unique output directory per concurrent job. The CLI takes an exclusive lock and records a fresh run ID; it cannot reuse an old passing report after setup failure. Reports are overwritten on subsequent runs. If a process was forcibly killed, remove a stale `.streamtrust.lock` only after confirming that process has stopped. Invalid arguments and lock contention fail before a run starts and do not replace existing evidence.
|
|
161
161
|
|
|
162
|
-
`--timeout-ms` bounds the entire invocation, including factory setup and cleanup (default five minutes), followed by up to one second of termination grace. On Linux/macOS the CLI terminates its worker process group, including ordinary child processes. Adapters that detach external services must arrange their own cleanup. Windows process-tree cleanup is not validated in this
|
|
162
|
+
`--timeout-ms` bounds the entire invocation, including factory setup and cleanup (default five minutes), followed by up to one second of termination grace. On Linux/macOS the CLI terminates its worker process group, including ordinary child processes. Adapters that detach external services must arrange their own cleanup. Windows process-tree cleanup is not validated in this release. An outer CI timeout remains useful.
|
|
163
163
|
|
|
164
164
|
## Scope and attribution
|
|
165
165
|
|
|
166
166
|
StreamTrust checks what an adapter asserts. It does not prove exactly-once external effects, AI factuality, automatic recovery, production incident rates or adoption. The HTTP demo is synthetic. Separate development experiments have tested pinned Vercel Chatbot and LibreChat applications; their adapters and dependencies are not bundled here.
|
|
167
167
|
|
|
168
|
-
Local preparation: `npm pack` in this package directory runs the package tests and creates the tarball. The public repository runs tests and a clean tarball installation on Node.js 22 and 24. This
|
|
168
|
+
Local preparation: `npm pack` in this package directory runs the package tests and creates the tarball. The public repository runs tests and a clean tarball installation on Node.js 22 and 24. This release is published interactively; npm build provenance is not configured.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "streamtrust",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Adapter-driven CI verification for streaming application lifecycle guarantees",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|
|
48
|
-
"tag": "
|
|
48
|
+
"tag": "latest",
|
|
49
49
|
"registry": "https://registry.npmjs.org/"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { mkdir, writeFile, rename, access } from 'node:fs/promises';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
|
|
4
|
+
import { readFileSync } from 'node:fs';
|
|
5
|
+
export const VERSION = JSON.parse(
|
|
6
|
+
readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
|
|
7
|
+
).version;
|
|
5
8
|
const object = (value) =>
|
|
6
9
|
value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
7
10
|
const nonempty = (value) =>
|