@taifoon/jev 0.2.4 → 0.2.6
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 +12 -3
- package/bin/run.mjs +3 -3
- package/dist/pipeline.d.ts +1 -0
- package/dist/pipeline.js +3 -3
- package/docs/PIPELINE.md +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
npx @taifoon/jev run --demo
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+

|
|
16
|
+
|
|
15
17
|
Then grade your own with your TypeSafe key from [console.typesafe.ai](https://console.typesafe.ai). No runtime
|
|
16
18
|
dependencies, no key inside, and it signs nothing. Recording a grade on chain is optional.
|
|
17
19
|
|
|
@@ -76,6 +78,16 @@ seat. The decision is anchored on the Taifoon devnet in
|
|
|
76
78
|
`npx @taifoon/jev run --demo` replays it from [`examples/jobs/base-bitagent-7287.recorded.json`](examples/jobs/base-bitagent-7287.recorded.json)
|
|
77
79
|
with no key and no network, and arrives at the same decision digest.
|
|
78
80
|
|
|
81
|
+
## In Claude Code and other agents
|
|
82
|
+
|
|
83
|
+
The repository ships a `jev-grader` skill that teaches an agent to grade a delivery the right way: the job as the buyer
|
|
84
|
+
laid it out, your own key from the environment, and needs_review surfaced instead of overruled.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
claude plugin marketplace add taifoon-io/jev && claude plugin install jev@taifoon-jev # Claude Code
|
|
88
|
+
npx skills add taifoon-io/jev --skill jev-grader # Codex, Cursor, Cline and others
|
|
89
|
+
```
|
|
90
|
+
|
|
79
91
|
## In n8n
|
|
80
92
|
|
|
81
93
|
The same grader runs in n8n through [`@taifoon/n8n-nodes-typesafe`](https://www.npmjs.com/package/@taifoon/n8n-nodes-typesafe),
|
|
@@ -144,9 +156,6 @@ npx @taifoon/jev verify <digest> --network base
|
|
|
144
156
|
npx @taifoon/jev workflows export ./jev-workflows
|
|
145
157
|
```
|
|
146
158
|
|
|
147
|
-
Pricing the next job from a seller's record is a separate package:
|
|
148
|
-
[`@taifoon/jev-wilson`](https://github.com/taifoon-io/jev-wilson).
|
|
149
|
-
|
|
150
159
|
## Licence
|
|
151
160
|
|
|
152
161
|
Independent project. Jev and TypeSafe are products of TypeSafe AI, Inc., which does not endorse this package.
|
package/bin/run.mjs
CHANGED
|
@@ -69,16 +69,16 @@ export async function run(argv) {
|
|
|
69
69
|
|
|
70
70
|
const t = createTerm({ quiet: json });
|
|
71
71
|
const rl = yes ? null : createInterface({ input: process.stdin, output: process.stdout });
|
|
72
|
-
t.info(`jev run · ${noLayer ? '
|
|
72
|
+
t.info(`jev run · ${noLayer ? 'offline' : `layer ${layer ?? 'https://coord.taifoon.dev'}`} · grade on ${demo ? `Jev's recorded answers for ${rec.job.ref} (${rec.job.task})` : ansFile ? 'supplied answers' : process.env.TYPESAFE_KEY ? 'your TypeSafe key' : 'no key: set TYPESAFE_KEY, or try --demo'} · record → ${network === 'none' ? 'none (opt in with --record devnet|base|both)' : network}${process.env.TAIFOON_RELAYER_KEY ? ' + the layer' : ''}`);
|
|
73
73
|
|
|
74
74
|
const trace = await pipeline({
|
|
75
75
|
layer, job, network, protocol, priceUsdc: price ? Number(price) : undefined,
|
|
76
|
-
evidence: rec ? { subject: rec.subject.ref, chainId: rec.subject.chainId, label: rec.subject.label, state: rec.evidence, delivered: rec.facts.delivered, checks: rec.facts.checks } : jobFile ? prepareJob(JSON.parse(readFileSync(jobFile, 'utf8'))).pack : evFile ? JSON.parse(readFileSync(evFile, 'utf8')) : undefined,
|
|
76
|
+
evidence: rec ? { subject: rec.subject.ref, from: `the recorded job ${rec.job.ref} (${rec.job.protocol}, ${rec.job.price})`, chainId: rec.subject.chainId, label: rec.subject.label, state: rec.evidence, delivered: rec.facts.delivered, checks: rec.facts.checks } : jobFile ? prepareJob(JSON.parse(readFileSync(jobFile, 'utf8'))).pack : evFile ? JSON.parse(readFileSync(evFile, 'utf8')) : undefined,
|
|
77
77
|
answers: rec ? rec.answers : ansFile ? JSON.parse(readFileSync(ansFile, 'utf8')) : undefined, ...(rec ? { model: rec.model } : {}),
|
|
78
78
|
key: process.env.TYPESAFE_KEY || null, relayerKey: process.env.TAIFOON_RELAYER_KEY || null,
|
|
79
79
|
before: async (s) => {
|
|
80
80
|
t.step(STEPS.indexOf(s) + 1, STEPS.length, s.title);
|
|
81
|
-
if (s.route) t.note(s.route);
|
|
81
|
+
if (s.route && !noLayer) t.note(s.route);
|
|
82
82
|
if (!rl) return true;
|
|
83
83
|
const r = (await rl.question(s.required ? ' enter = run · q = quit › ' : ' enter = run · s = skip · q = quit › ')).trim().toLowerCase();
|
|
84
84
|
if (r === 'q') { rl.close(); process.exit(0); }
|
package/dist/pipeline.d.ts
CHANGED
package/dist/pipeline.js
CHANGED
|
@@ -98,7 +98,7 @@ export async function pipeline(o = {}) {
|
|
|
98
98
|
await step('pick', async () => {
|
|
99
99
|
if (o.evidence) {
|
|
100
100
|
t.job = { chainId: o.evidence.chainId ?? 0, jobId: o.evidence.subject, seller: o.evidence.seller ?? null };
|
|
101
|
-
return { skip: 'your own evidence pack' };
|
|
101
|
+
return { skip: o.evidence.from ?? 'your own evidence pack' };
|
|
102
102
|
}
|
|
103
103
|
if (o.job) {
|
|
104
104
|
t.job = { ...parseJob(o.job), seller: null };
|
|
@@ -117,7 +117,7 @@ export async function pipeline(o = {}) {
|
|
|
117
117
|
await step('evidence', async () => {
|
|
118
118
|
if (o.evidence) {
|
|
119
119
|
ev = { chainId: 0, jobId: o.evidence.subject, state: o.evidence.state, facts: [] };
|
|
120
|
-
return { skip: 'your own evidence pack' };
|
|
120
|
+
return { skip: o.evidence.from ?? 'your own evidence pack' };
|
|
121
121
|
}
|
|
122
122
|
ev = await getJson(f, `${layer}/v1/judge/evidence/${t.job.chainId}/${encodeURIComponent(t.job.jobId)}`);
|
|
123
123
|
t.job.seller ??= fact(ev, /^seller$/i) ?? null;
|
|
@@ -182,7 +182,7 @@ export async function pipeline(o = {}) {
|
|
|
182
182
|
await step('premium', async () => {
|
|
183
183
|
const seller = t.job.seller;
|
|
184
184
|
if (!layer)
|
|
185
|
-
return { skip: '
|
|
185
|
+
return { skip: 'offline: the premium quote reads the seller\'s record from the layer' };
|
|
186
186
|
if (!seller)
|
|
187
187
|
return { skip: 'no seller address in the evidence' };
|
|
188
188
|
const price = o.priceUsdc ?? budget;
|
package/docs/PIPELINE.md
CHANGED
|
@@ -64,7 +64,7 @@ npx @taifoon/jev run --no-layer --evidence pack.json # your own pack, no laye
|
|
|
64
64
|
| 4 | Jev answers RUBRIC_v1, code composes the verdict | none | same |
|
|
65
65
|
| 5 | record the answers and the decision | `POST /v1/judge/answers/record` (only with `TAIFOON_RELAYER_KEY`) | unsigned calls |
|
|
66
66
|
| 6 | the evaluator call that ends the job | none | same |
|
|
67
|
-
| 7 | price the next premium from the seller record | `POST /v1/pools/quote` | skipped
|
|
67
|
+
| 7 | price the next premium from the seller record | `POST /v1/pools/quote` | skipped (the quote needs the seller's record) |
|
|
68
68
|
| 8 | re-derive the receipt (and find it on chain) | none | same |
|
|
69
69
|
|
|
70
70
|
Steps 1 to 4 are required: saying no at one stops the run. Keys come from the environment only, `TYPESAFE_KEY` (your own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taifoon/jev",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Grade AI agent jobs with TypeSafe's Jev and record the verdict on chain: code checks the facts, Jev answers a published rubric, and you get a receipt, the on-chain record and the evaluator call for ERC-8183 and Virtuals ACP. No runtime dependencies, no key inside.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jev",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"docs",
|
|
51
51
|
"examples",
|
|
52
52
|
"README.md",
|
|
53
|
-
"LICENSE"
|
|
53
|
+
"LICENSE",
|
|
54
|
+
"!docs/demo.gif"
|
|
54
55
|
],
|
|
55
56
|
"sideEffects": false,
|
|
56
57
|
"engines": {
|