spock-cli 0.0.0-stage → 0.8.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/LICENSE +21 -0
- package/README.md +49 -2
- package/bin/spock +54 -0
- package/package.json +35 -4
- package/vendor/darwin-arm64/spock +0 -0
- package/vendor/darwin-x64/spock +0 -0
- package/vendor/linux-arm64/spock +0 -0
- package/vendor/linux-x64/spock +0 -0
- package/vendor/win32-x64/spock.exe +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leo Ostera
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# spock-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Prebuilt native binaries for [`spock`](https://github.com/leostera/spock) — a modern, statically typed, natively compiled model checking and proof language.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
bun add -D spock-cli
|
|
9
|
+
# or
|
|
10
|
+
npm install -D spock-cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
No `postinstall` scripts, no `trustedDependencies`, no platform subpackages, and no Rust toolchain required — all platform binaries are bundled directly in `spock-cli`.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Run all `.spock` specs in your repo (discovered recursively, run in parallel, cached):
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
bun run spock
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or add a script to `package.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"scripts": {
|
|
28
|
+
"specs": "spock"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Other commands:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
bun run spock specs/ # check all specs under specs/
|
|
37
|
+
bun run spock --filter shard # filter models by substring
|
|
38
|
+
bun run spock check specs/foo.spock # check one spec/model
|
|
39
|
+
bun run spock trace specs/foo.spock run.jsonl
|
|
40
|
+
bun run spock prove specs/foo.spock # inductive proof via SMT
|
|
41
|
+
bun run spock skill # print coding-agent SKILL.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Platforms
|
|
45
|
+
|
|
46
|
+
- macOS arm64 (`darwin-arm64`)
|
|
47
|
+
- macOS x64 (`darwin-x64`)
|
|
48
|
+
- Linux x64 (`linux-x64`, static musl)
|
|
49
|
+
- Linux arm64 (`linux-arm64`, static musl)
|
|
50
|
+
- Windows x64 (`win32-x64`)
|
package/bin/spock
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require("node:child_process");
|
|
5
|
+
const { existsSync } = require("node:fs");
|
|
6
|
+
const { join } = require("node:path");
|
|
7
|
+
|
|
8
|
+
const PLATFORMS = {
|
|
9
|
+
"darwin:arm64": "darwin-arm64/spock",
|
|
10
|
+
"darwin:x64": "darwin-x64/spock",
|
|
11
|
+
"linux:x64": "linux-x64/spock",
|
|
12
|
+
"linux:arm64": "linux-arm64/spock",
|
|
13
|
+
"win32:x64": "win32-x64/spock.exe",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function resolveBinary() {
|
|
17
|
+
if (process.env.SPOCK_BIN) {
|
|
18
|
+
return process.env.SPOCK_BIN;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const key = `${process.platform}:${process.arch}`;
|
|
22
|
+
const rel = PLATFORMS[key];
|
|
23
|
+
if (!rel) {
|
|
24
|
+
console.error(
|
|
25
|
+
`spock-cli: no prebuilt binary for ${process.platform}/${process.arch}.\n` +
|
|
26
|
+
"Install from source with: cargo install spock-cli"
|
|
27
|
+
);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const bin = join(__dirname, "..", "vendor", rel);
|
|
32
|
+
if (!existsSync(bin)) {
|
|
33
|
+
console.error(
|
|
34
|
+
`spock-cli: bundled binary missing at ${bin}.\n` +
|
|
35
|
+
"Reinstall spock-cli or install from source with: cargo install spock-cli"
|
|
36
|
+
);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
return bin;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const bin = resolveBinary();
|
|
43
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
44
|
+
|
|
45
|
+
if (result.error) {
|
|
46
|
+
console.error(`spock-cli: failed to run ${bin}: ${result.error.message}`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (result.signal) {
|
|
51
|
+
process.kill(process.pid, result.signal);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spock-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "A modern, statically typed, natively compiled model checking and proof language",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/leostera/spock.git",
|
|
9
|
+
"directory": "npm/spock-cli"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/leostera/spock#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/leostera/spock/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"spock",
|
|
17
|
+
"model-checker",
|
|
18
|
+
"formal-methods",
|
|
19
|
+
"proof",
|
|
20
|
+
"smt",
|
|
21
|
+
"verification",
|
|
22
|
+
"tla",
|
|
23
|
+
"tlaplus"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"spock": "bin/spock"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"bin",
|
|
30
|
+
"vendor",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|