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 |
scripts/jev.mjs
View on GitHub#!/usr/bin/env node
import { execFileSync } from 'node:child_process';
import { readFileSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { executeRequest, JevError, publicError } from './lib/core.mjs';
import { executeBatch } from './lib/batch.mjs';
import { evaluateOpenRouter } from './lib/openrouter.mjs';
const MAX_INPUT_BYTES = 4 * 1024 * 1024;
// The secret reader comes from the command path; JEV_SECRET_TOOL and JEV_SECRET_REF override it.
const SECRET_TOOL = process.env.JEV_SECRET_TOOL || 'agent-secret-read';
const SECRET_REFERENCE = process.env.JEV_SECRET_REF || 'op://Foxrun/OpenRouter/credential';
function readArguments() {
const args = process.argv.slice(2);
const options = {};
let path;
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (arg === '--resume') options.resume = true;
else if (['--concurrency', '--max-attempts', '--progress'].includes(arg)) {
const value = args[++i];
if (!value) throw new JevError('invalid_input', 'The Jev request is invalid.');
if (arg === '--progress') options.progressPath = resolve(value);
else options[arg === '--concurrency' ? 'concurrency' : 'maxAttempts'] = Number(value);
} else if (arg.startsWith('--') || path) throw new JevError('invalid_input', 'The Jev request is invalid.');
else path = arg;
}
return { path, options };
}
function readInput(path) {
const data = path ? readFileSync(resolve(path)) : readFileSync(0);
if (data.length === 0 || data.length > MAX_INPUT_BYTES) {
throw new JevError('invalid_input', 'The Jev request is invalid.');
}
try {
return JSON.parse(data.toString('utf8'));
} catch {
throw new JevError('invalid_input', 'The Jev request is invalid.');
}
}
async function loadCredential() {
try {
const key = execFileSync(SECRET_TOOL, [SECRET_REFERENCE], {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
maxBuffer: 64 * 1024,
timeout: 10_000,
}).trim();
if (!key) throw new Error('empty secret');
return key;
} catch {
throw new JevError('missing_credential', 'The OpenRouter credential is unavailable.');
}
}
async function main() {
const { path, options } = readArguments();
const input = readInput(path);
const scriptDirectory = dirname(fileURLToPath(import.meta.url));
const dependencies = {
schemaPath: join(scriptDirectory, '..', 'references', 'agent-os-migration.sql'),
};
if (input.action === 'evaluate' || input.action === 'batch') {
dependencies.evaluateFn = evaluateOpenRouter;
dependencies.credentialLoader = loadCredential;
dependencies.sdkVersion = 'openrouter-direct-v1';
}
if (input.action === 'batch') {
const result = await executeBatch(input, dependencies, options);
if (!result.ok) process.exitCode = 1;
return result;
}
if (Object.keys(options).length) throw new JevError('invalid_input', 'The Jev request is invalid.');
return executeRequest(input, dependencies);
}
try {
const result = await main();
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
} catch (error) {
process.stdout.write(`${JSON.stringify(publicError(error), null, 2)}\n`);
process.exitCode = 1;
}
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 |