foxrun-ai/foxrun / skillwright/skills/jev
jev
VerifiedRun typed Jev judgments through OpenRouter, then log them: a choice, a score, or a yes or no, stored in the tracker. Use only when the person names Jev, or when another loaded skill calls this skill. Add-on: needs Node.js 22.18 or later and your own OpenRouter account and credit.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.4 KB |
| agents/openai.yaml | config | 208 B |
| package-lock.json | manifest | 265 B |
| package.json | manifest | 208 B |
| references/agent-os-migration.sql | other | 2.2 KB |
| references/input-schema.md | markdown | 4.9 KB |
| references/typesafe-LICENSE | other | 1.0 KB |
| references/typesafe-guide.md | markdown | 9.8 KB |
| replays/read-explicit-only.json | config | 243 B |
| replays/refuse-invalid-batch.json | config | 252 B |
| scripts/jev.mjsexecutable | script | 3.2 KB |
| scripts/lib/batch.mjs | script | 3.8 KB |
| scripts/lib/core.mjs | script | 18.8 KB |
| scripts/lib/openrouter.mjs | script | 1.3 KB |
| scripts/lib/storage.mjs | script | 5.6 KB |
| tests/batch.test.mjs | script | 5.7 KB |
| tests/jev.test.mjs | script | 11.7 KB |
| tests/openrouter.test.mjs | script | 3.8 KB |
| tests/test_node_runner.py | script | 584 B |
tests/openrouter.test.mjs
View on GitHubimport assert from 'node:assert/strict';
import test from 'node:test';
import { evaluateOpenRouter, OPENROUTER_URL } from '../scripts/lib/openrouter.mjs';
import { executeRequest, MODEL_ID, publicError } from '../scripts/lib/core.mjs';
const request = {
action: 'evaluate', request_id: 'provider-shape', use_case: 'mock provider',
request_schema_version: '1', question_set_version: '1', state_schema_version: '1',
state: { word: 'watch' },
questions: {
yes: { type: 'boolean', instructions: 'Is this a watch?' },
kind: { type: 'choice', instructions: 'Which kind?', criteria: { watch: 'Watch', other: 'Other' } },
fit: { type: 'score', instructions: 'How good?', criteria: ['Low', 'High'] },
},
};
test('posts OpenRouter shape and maps noul, choice, score, and confidence', async () => {
let called = 0;
const fetchFn = async (url, options) => {
called++;
assert.equal(url, OPENROUTER_URL);
assert.equal(options.method, 'POST');
assert.equal(options.headers.Authorization, 'Bearer fixture-key');
assert.equal(options.headers['Content-Type'], 'application/json');
assert.deepEqual(JSON.parse(options.body), {
model: MODEL_ID,
state: request.state,
questions: {
yes: { type: 'noul', instructions: 'Is this a watch?' },
kind: request.questions.kind,
fit: request.questions.fit,
},
});
return { ok: true, json: async () => ({
id: 'gen-test', model: 'typesafe/jev-1.13-20260917',
usage: { input_tokens: 10, output_tokens: 3, cost: 0.000015 },
answers: {
yes: { type: 'noul', noul: 0.82, confidence: 0.7 },
kind: { type: 'choice', choice: 'watch', probabilities: { watch: 0.9, other: 0.1 }, confidence: 0.8 },
fit: { type: 'score', score: 1, probabilities: { '0': 0.2, '1': 0.8 }, confidence: 0.6 },
},
}) };
};
const result = await executeRequest(request, {
credentialLoader: async () => 'fixture-key',
evaluateFn: input => evaluateOpenRouter(input, fetchFn),
sdkVersion: 'openrouter-direct-v1',
});
assert.equal(called, 1);
assert.deepEqual(result.answers.yes, { type: 'boolean', probability: 0.82, confidence: 0.7 });
assert.equal(result.answers.kind.confidence, 0.8);
assert.equal(result.answers.fit.confidence, 0.6);
assert.equal(result.model.returned, 'typesafe/jev-1.13-20260917');
assert.equal(result.provider.generation_id, 'gen-test');
assert.deepEqual(result.usage, { input_tokens: 10, output_tokens: 3, total_tokens: 13 });
assert.equal(result.provider_cost.amount, 0.000015);
});
test('maps HTTP 429 Retry-After and hides provider details', async () => {
const fetchFn = async () => ({ ok: false, status: 429, headers: new Headers({ 'Retry-After': '3' }) });
let error;
try {
await executeRequest(request, {
credentialLoader: async () => 'fixture-key',
evaluateFn: input => evaluateOpenRouter(input, fetchFn),
sdkVersion: 'openrouter-direct-v1',
});
} catch (caught) { error = publicError(caught); }
assert.equal(error.error.code, 'provider_rate_limited');
assert.equal(error.error.retry_after_ms, 3000);
assert.equal(JSON.stringify(error).includes('fixture-key'), false);
});
test('maps auth and malformed answers to safe errors', async () => {
for (const [fetchFn, code] of [
[async () => ({ ok: false, status: 401, headers: new Headers() }), 'provider_authentication_failed'],
[async () => ({ ok: true, json: async () => ({ answers: {} }) }), 'provider_failed'],
]) {
let error;
try {
await executeRequest(request, {
credentialLoader: async () => 'fixture-key',
evaluateFn: input => evaluateOpenRouter(input, fetchFn),
sdkVersion: 'openrouter-direct-v1',
});
} catch (caught) { error = publicError(caught); }
assert.equal(error.error.code, code);
}
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |