@zatsepin/jigor 0.1.3 → 0.1.5
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 +81 -25
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
|
-
# jigor
|
|
1
|
+
# @zatsepin/jigor — System One decision gateway
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Installs the `jigor` binary: a CLI and an HTTP gateway over one System One
|
|
4
|
+
wire — `noul`/`choice`/`score` questions in, typed JSON answers out. `von`
|
|
5
|
+
and `laya` run locally as ONNX (no API key); `jev` runs remote on OpenRouter
|
|
6
|
+
Decisions.
|
|
7
|
+
|
|
8
|
+
Node ≥ 18 is needed once, at install time, to pick the platform package —
|
|
9
|
+
the installed `jigor` is a standalone binary with no Node runtime.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
7
12
|
|
|
8
13
|
```bash
|
|
9
|
-
|
|
10
|
-
jigor
|
|
11
|
-
jigor ask [--model <id>] [--provider <p>] # the same wire over stdin, no HTTP layer
|
|
12
|
-
jigor models # provider x model pairs
|
|
14
|
+
npm install --global @zatsepin/jigor
|
|
15
|
+
jigor --help
|
|
13
16
|
```
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
One-off, no install:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @zatsepin/jigor models
|
|
22
|
+
```
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
The binary comes from an optional dependency matched to your OS and CPU —
|
|
25
|
+
`@zatsepin/jigor-linux-x64-gnu`, `@zatsepin/jigor-linux-arm64-gnu`,
|
|
26
|
+
`@zatsepin/jigor-darwin` (universal2: Apple Silicon + Intel) or
|
|
27
|
+
`@zatsepin/jigor-win32-x64-msvc` — installed automatically, never a
|
|
28
|
+
source build.
|
|
23
29
|
|
|
24
|
-
##
|
|
30
|
+
## Quick start
|
|
25
31
|
|
|
26
32
|
```bash
|
|
27
33
|
jigor ask --model von <<'JSON'
|
|
@@ -35,14 +41,64 @@ jigor ask --model von <<'JSON'
|
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
43
|
JSON
|
|
38
|
-
|
|
44
|
+
{"answers":{"requires_intervention":{"noul":0.7822,"type":"noul"}},"backend":"local","model":"von-1.0.0"}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Every question carries `instructions` plus an optional `criteria` (object or
|
|
48
|
+
list) that spells out how to judge the state. Answer shapes are the same on
|
|
49
|
+
every backend:
|
|
50
|
+
|
|
51
|
+
- `noul` → `{"type":"noul","noul":0.7822}` — probability of **yes** in `[0, 1]`
|
|
52
|
+
- `choice` → `{"type":"choice","choice":"refund","confidence":0.91,"probabilities":{...}}`
|
|
53
|
+
- `score` → `{"type":"score","score":1.0,"confidence":0.7,"probabilities":{...},"legend":{...}}`
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"state": "Invoice charged twice for order #4471.",
|
|
58
|
+
"questions": {
|
|
59
|
+
"domain": {
|
|
60
|
+
"type": "choice",
|
|
61
|
+
"instructions": "Classify the root cause domain.",
|
|
62
|
+
"criteria": { "billing": "Invoices, payments, refunds", "infrastructure": "Database, network, hardware" }
|
|
63
|
+
},
|
|
64
|
+
"severity": {
|
|
65
|
+
"type": "score",
|
|
66
|
+
"instructions": "Assess degradation level.",
|
|
67
|
+
"criteria": ["Nominal operation", "Degraded performance", "Critical risk"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
39
71
|
```
|
|
40
72
|
|
|
41
|
-
##
|
|
73
|
+
## HTTP gateway
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
jigor serve --host 127.0.0.1 --port 8000
|
|
77
|
+
|
|
78
|
+
curl -X POST http://127.0.0.1:8000/v1/systemone \
|
|
79
|
+
-H "Content-Type: application/json" \
|
|
80
|
+
-d '{
|
|
81
|
+
"model": "von-1.0.0",
|
|
82
|
+
"state": { "error": "Disk volume /var/log at 98% capacity." },
|
|
83
|
+
"questions": {
|
|
84
|
+
"requires_intervention": {
|
|
85
|
+
"type": "noul",
|
|
86
|
+
"instructions": "Does this disk space condition require operational intervention?"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}'
|
|
90
|
+
# {"answers":{"requires_intervention":{"noul":0.7822,"type":"noul"}},"backend":"local","model":"von-1.0.0"}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`GET /healthz` returns `{"status":"ok"}`; `POST /v1/systemone` takes the same
|
|
94
|
+
body as `jigor ask`.
|
|
95
|
+
|
|
96
|
+
## Models
|
|
97
|
+
|
|
98
|
+
`--model` takes an alias (`von`, `laya`, `jev`, `jev-latest`) or a full id
|
|
99
|
+
(`von-1.0.0`, `typesafe/jev-1.13`); `jigor models` lists every provider ×
|
|
100
|
+
model pair. The local ONNX models download from Hugging Face to
|
|
101
|
+
`~/.cache/huggingface` on first use and are cached afterwards; the remote
|
|
102
|
+
`jev` backend needs `OPENROUTER_API_KEY`.
|
|
42
103
|
|
|
43
|
-
|
|
44
|
-
[`jigor`](https://crates.io/crates/jigor) crate — local ONNX backends in
|
|
45
|
-
`von`/`laya`, remote `jev` via OpenRouter Decisions, and one `answers()`
|
|
46
|
-
call for all three. Use the library directly when you want decisions inside
|
|
47
|
-
a Rust program: [crate docs](https://docs.rs/jigor) ·
|
|
48
|
-
[full project README](https://github.com/Partysun/jigor#readme).
|
|
104
|
+
Source, Rust crates and the pip package: https://github.com/Partysun/jigor
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zatsepin/jigor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "System One decision gateway CLI + server — von/laya local ONNX backends, jev on OpenRouter Decisions. One wire protocol: noul/choice/score questions in, typed answers out.",
|
|
5
5
|
"homepage": "https://github.com/Partysun/jigor",
|
|
6
6
|
"repository": "https://github.com/Partysun/jigor",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"postinstall": "node postinstall.js"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@zatsepin/jigor-darwin": "0.1.
|
|
30
|
-
"@zatsepin/jigor-linux-arm64-gnu": "0.1.
|
|
31
|
-
"@zatsepin/jigor-linux-x64-gnu": "0.1.
|
|
32
|
-
"@zatsepin/jigor-win32-x64-msvc": "0.1.
|
|
29
|
+
"@zatsepin/jigor-darwin": "0.1.5",
|
|
30
|
+
"@zatsepin/jigor-linux-arm64-gnu": "0.1.5",
|
|
31
|
+
"@zatsepin/jigor-linux-x64-gnu": "0.1.5",
|
|
32
|
+
"@zatsepin/jigor-win32-x64-msvc": "0.1.5"
|
|
33
33
|
},
|
|
34
34
|
"bin": {
|
|
35
35
|
"jigor": "jigor"
|