jev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesejev
jev
jevnoulchoicescorejevnoulchoicescoreSetup
安装配置
- Run . If the command is missing, the CLI ships with this skill at
jev --version(Python 3.9+, standard library only). Link it withscripts/jev, or call it by its absolute path.mkdir -p ~/.local/bin && ln -sf "<this skill's directory>/scripts/jev" ~/.local/bin/jev - Keys: (default provider) or
TYPESAFE_API_KEY, read from the environment, thenOPENROUTER_API_KEY, then$JEV_ENV_FILE. Provider:<config dir>/.env→--provider→ the default pinned with$JEV_PROVIDER→ auto (TypeSafe if its key exists, else OpenRouter).jev provider default ID,jev provider listandjev auth statusare read-only and never print a key — run them freely. On a missing key or a 401/403, ask the user to runjev auth check(plusjev auth setfor that key) in their own terminal: it needs a TTY and hidden input, so you cannot run it for them. Never ask for a key in chat, pass one as an argument, pipe one into--provider openrouter, read or print a key file, or runauth set --stdinunless the user asks.jev auth remove
For designing the questions themselves (choosing //, writing ,
confidence and calibration semantics), see TypeSafe's own docs:
primitives, confidence,
full index at llms.txt.
noulchoicescorecriteria- 运行 。如果找不到该命令,本skill附带的CLI位于
jev --version(仅需Python 3.9+ 标准库)。可通过以下命令创建软链:scripts/jev,也可直接使用绝对路径调用。mkdir -p ~/.local/bin && ln -sf "<本skill的目录>/scripts/jev" ~/.local/bin/jev - 密钥配置:优先从环境变量读取 (默认服务商)或
TYPESAFE_API_KEY,其次读取OPENROUTER_API_KEY,最后读取$JEV_ENV_FILE。服务商选择优先级:<config dir>/.env参数 →--provider环境变量 → 通过$JEV_PROVIDER设置的默认值 → 自动选择(存在TypeSafe密钥则用TypeSafe,否则用OpenRouter)。jev provider default ID、jev provider list和jev auth status都是只读命令,绝不会输出密钥——可放心运行。如果缺少密钥或返回401/403错误,请让用户在自己的终端运行jev auth check(如果是OpenRouter密钥需加上jev auth set):该命令需要TTY和隐藏输入,因此你无法代用户执行。绝不要在聊天中索要密钥、将密钥作为参数传递、通过管道输入到--provider openrouter、读取或打印密钥文件,除非用户要求,否则也不要运行auth set --stdin。jev auth remove
关于如何设计问题(选择 // 类型、编写 、置信度与校准语义),请参考TypeSafe官方文档:primitives、confidence,完整索引见 llms.txt。
noulchoicescorecriteriaChoose the verb
选择对应命令
| Need | Command | Plain stdout | Exit code |
|---|---|---|---|
| Yes/no | | | 0 yes · 1 no · 2 error |
| One of N | | | 0 · 1 below |
| Ordinal score | | | 0 · 2 error |
| Keep matching lines | | the matching input lines | 0 some · 1 none · 2 error |
| Several questions at once | | aligned table | 0 · 2 error |
| Raw API body | | response JSON | 0 · 2 error |
- Input comes from stdin, or
-s "TEXT". JSON objects and arrays go out as structured state (-s @fileturns that off).--text - makes one decision per input line: concurrent (
-l), order preserved, streamed. For JSONL,-j 8names the field to judge.--field KEYalways works per line.filter - Add whenever you parse results (JSONL with
--json): each answer has-lplustypeandnoul, oryes, orchoiceandscore;labelandchoicealso carryscoreandprobabilities. Plain output suits humans and shell tests.confidence - prints provider, model, latency, tokens and cost to stderr (
--verbosewhen the cost is an estimate).≈$ - Speed: a single call opens a new connection, about 0.5–1 s in total. keeps each worker's connection open, so later calls take about 0.3–0.4 s. For more than a handful of items use
-lor-linstead of looping single calls; raisefilterfor large batches (≤16).-j - and
yestakefilter(threshold, default 0.5) and-t P/--trueto spell out what yes and no mean.--falseandpick -pprint the whole distribution.score -p
bash
jev yes "用户在要求退款吗?" -s "Zipic 一打开就闪退,钱退我!" # yes 0.97
jev pick "该交给谁处理" code="写代码或改项目" research="需要联网查资料" --other -s "$request" --json
jev score "这条评价给几星" --range 1-5 -s @review.txt # 3.30 3
tail -f app.log | jev filter "日志表示用户可见的故障" --false "调试信息、正常请求"
jev run feedback -l --field text --json < tickets.jsonl > labeled.jsonl| 需求 | 命令 | 标准输出 | 退出码 |
|---|---|---|---|
| 是/否判断 | | | 0 表示是 · 1 表示否 · 2 表示错误 |
| N选1 | | | 0 成功 · 1 低于 |
| 序数评分 | | | 0 成功 · 2 表示错误 |
| 保留匹配行 | | 匹配的输入行 | 0 有匹配 · 1 无匹配 · 2 表示错误 |
| 同时判断多个问题 | | 对齐的表格 | 0 成功 · 2 表示错误 |
| 原始API请求体 | | 响应JSON | 0 成功 · 2 表示错误 |
- 输入可来自标准输入、参数或
-s "TEXT"。JSON对象和数组会作为结构化状态传入(使用-s @文件路径可关闭该特性)。--text - 参数会对每一行输入分别执行一次判断:并发处理(
-l指定并发数)、保持顺序、流式输出。对于JSONL格式,可通过-j 8指定要判断的字段。--field KEY命令始终按行处理。filter - 如果需要解析结果,请添加 参数(搭配
--json时输出JSONL):每个答案包含-l字段,以及对应类型的字段(type类型有noul字段,yes类型有对应选项字段,choice类型有score和score字段);label和choice类型还会返回score和probabilities字段。纯文本输出适合人工阅读和shell测试。confidence - 参数会将服务商、模型、延迟、token数和成本输出到标准错误流(成本为估算时会显示
--verbose)。≈$ - 速度说明:单次调用会新建连接,总耗时约0.5-1秒。模式下每个工作进程会保持连接,因此后续调用仅需约0.3-0.4秒。如果需要处理多个条目,请使用
-l或-l而非循环调用单次命令;大批量处理时可提高filter并发数(最高16)。-j - 和
yes命令支持filter参数(阈值,默认0.5),以及-t P/--true参数来明确定义“是”和“否”的含义。--false和pick -p会输出完整的概率分布。score -p
bash
jev yes "用户在要求退款吗?" -s "Zipic 一打开就闪退,钱退我!" # yes\t0.97
jev pick "该交给谁处理" code="写代码或改项目" research="需要联网查资料" --other -s "$request" --json
jev score "这条评价给几星" --range 1-5 -s @review.txt # 3.30\t3
tail -f app.log | jev filter "日志表示用户可见的故障" --false "调试信息、正常请求"
jev run feedback -l --field text --json < tickets.jsonl > labeled.jsonlWrite questions Jev can answer
编写Jev可回答的问题
Jev reads conditions literally and does not infer intent. In testing, passed an ad ("加微信领取免费 AI 课程,限时三天") at about 0.9, because an ad is literally actionable. excluded it.
filter "包含具体可行动的信息"filter "消息给出了具体的技术、产品或行业信息" --false "闲聊、问候、广告、引流、卖课"- State observable conditions, not goals. Define both sides with /
--true.--false - Describe every option (); add
name="description"when the list may not cover every input. Order score labels low to high, 2–10 of them.--other - Put questions about the same input into one spec: one call answers all of them for that input (still makes one call per line).
-l - Trim the state to what the question needs, well below the context limit — irrelevant text dilutes the signal; do math and date arithmetic in code and put the result into the state.
- Gate actions on certainty: act on high or probability, ask the user or escalate on low ones (
confidence,pick --min-confidence 0.7). Jev only decides — narrow the set with it, then read, write or summarize the survivors yourself.yes -t 0.8
Jev会按字面意思理解条件,不会推断意图。在测试中, 对一条广告(“加微信领取免费 AI 课程,限时三天”)的通过率约为0.9,因为广告从字面上看确实是可行动的。而 则会排除该广告。
filter "包含具体可行动的信息"filter "消息给出了具体的技术、产品或行业信息" --false "闲聊、问候、广告、引流、卖课"- 描述可观察的条件,而非目标。使用 /
--true明确定义正反两面。--false - 描述每个选项();如果选项列表可能无法覆盖所有输入,添加
name="描述"。评分标签按从低到高排序,数量为2-10个。--other - 将针对同一输入的多个问题放到同一个spec中:一次调用即可回答该输入的所有问题(模式下仍为每行一次调用)。
-l - 将输入状态裁剪为问题所需的内容,远低于上下文长度限制——无关文本会稀释信号;数学和日期运算请在代码中完成,再将结果放入状态中。
- 根据置信度决定是否执行操作:高或高概率时直接执行,低置信度时询问用户或升级处理(可使用
confidence、pick --min-confidence 0.7等参数)。Jev仅负责判断——用它缩小范围后,再由你自己对筛选后的内容进行读写或总结。yes -t 0.8
Specs
规格配置
jev runjev run NAMEjev run path/to/spec.jsonmailfeedbacksignalcommitgit diff --cachedroutemodelA spec mirrors the API body. Save new ones under ( unless is set), which survives reinstalling the skill. JSON works on every supported Python; TOML needs Python 3.11+ () and errors clearly below that:
<config dir>/specs/~/.config/jev/specs/XDG_CONFIG_HOMEtomllibjson
{
"description": "One line shown by `jev run`",
"threshold": 0.5,
"questions": {
"category": { "type": "choice", "instructions": "Which kind of request is this?",
"criteria": { "bug": "Crash or broken feature", "billing": "Payment or license problem", "other": "None of the above" } },
"urgency": { "type": "score", "instructions": "How soon must someone act?",
"criteria": ["can wait", "this week", "today", "now"] },
"needs_reply": { "type": "noul", "instructions": "The sender expects a personal reply",
"criteria": { "true": "Asks a question or waits for a decision", "false": "Notice or receipt only" } }
}
}criteriachoicenoul{name: description}noultruefalsescoretypeinstructionscriteriajev runjev run 名称jev run path/to/spec.jsonmailfeedbacksignalcommitgit diff --cachedroutemodelspec的结构与API请求体一致。新的spec可保存到 目录下(未设置 时默认为 ),重新安装skill后仍会保留。JSON格式支持所有受支持的Python版本;TOML格式需要Python 3.11+(库),低于该版本会明确报错:
<config dir>/specs/XDG_CONFIG_HOME~/.config/jev/specs/tomllibjson
{
"description": "One line shown by `jev run`",
"threshold": 0.5,
"questions": {
"category": { "type": "choice", "instructions": "Which kind of request is this?",
"criteria": { "bug": "Crash or broken feature", "billing": "Payment or license problem", "other": "None of the above" } },
"urgency": { "type": "score", "instructions": "How soon must someone act?",
"criteria": ["can wait", "this week", "today", "now"] },
"needs_reply": { "type": "noul", "instructions": "The sender expects a personal reply",
"criteria": { "true": "Asks a question or waits for a decision", "false": "Notice or receipt only" } }
}
}criteriachoicenoul{名称: 描述}noultruefalsescoretypeinstructionscriteriaLimits
使用限制
- Decisions only: no text, no field extraction. allows at most 10 levels.
score - TypeSafe native: 64K token context per request, 32K for state + the longest question, about 1,200 requests/min. OpenRouter: is an alpha endpoint and may move — override with
https://openrouter.ai/api/alpha/decisionsif it does.JEV_BASE_URL - The CLI retries 429/5xx with backoff on both providers; errors go to stderr as , exit code 2.
jev: API 错误 (HTTP n): …
Full option reference, provider table, exit codes, error shapes and recipes: references/cli.md.
- 仅支持判断功能:不生成文本,不支持字段提取。最多支持10个等级。
score - TypeSafe原生接口:单次请求上下文为64K token,其中状态+最长问题占32K,请求速率约1200次/分钟。OpenRouter接口:是alpha阶段端点,可能会变动——如果变动可通过
https://openrouter.ai/api/alpha/decisions覆盖。JEV_BASE_URL - CLI对两个服务商的429/5xx错误都会采用退避重试策略;错误会以 的格式输出到标准错误流,退出码为2。
jev: API 错误 (HTTP n): …
完整的选项参考、服务商对比表、退出码、错误格式和使用示例:references/cli.md。