judge
v0.2.3Provider-neutral evaluation hub (judge::evaluate, judge::cancel, and the internal judge::models::list) that forwards typed Noul, Choice and Score questions to the selected judge-<provider> worker; the default provider is a Console setting seeded from JUDGE_PROVIDER (typesafe). Also resolves worker-defined @<name>(id=…) chat mentions for agents (judge::mentions::resolve and a harness pre-generate hook).
Install
iii trigger compose::add worker=judge@0.2.3Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.
skill doc
judge
judge::evaluate evaluates supplied state with mixed Noul, Choice and Score
questions. judge::cancel signals cancellation of an identified evaluation owned
by the same caller. Each call is forwarded to judge-:
the Default provider under Console Settings → Workers → judge (seeded from
JUDGE_PROVIDER, default typesafe) or a top-level provider field selects it. Credentials and the default model live with the
provider: for TypeSafe, configure api_key in the judge-typesafe entry under
Console Settings → Workers or supply TYPESAFE_API_KEY to that worker process.
An unregistered provider returns code: "provider_unavailable".
Invocation
- Read the registered contract with
iii trigger engine::functions::info --json '{"function_id":"judge::evaluate"}'. Usejudge::cancelasfunction_idfor that contract. For unfamiliar question/reply shapes, read the mixed request and typed response examples. - For evaluation, supply 1–512 evaluations with unique nonblank IDs, JSON state
and a nonempty map of distinct question IDs. Choose primitives using the table
below. Supply a positive
timeout_mswithin the operator'smax_timeout_ms(default 300000). For queued work, also setexpires_at_unix_ms, an absolute Unix deadline in milliseconds. Omitmodelto use the worker default.options.attempt_timeout_msbounds each network attempt; retries are the provider's fixed policy, see Request options and retries. - Invoke using the positional function name and
--json, then inspectstatusbefore reading results. Completion requires all requested typed answers or a reported failure; keepstats.usage_completewith the observed usage.
| Primitive | Question criteria | Typed answer |
|---|---|---|
noul |
Optional true and/or false descriptions; omitted, null or empty criteria are accepted. |
noul in [0, 1]. |
choice |
1–255 named options. | choice, probabilities, confidence. |
score |
2–10 ordered, non-null levels. | score in [0, levels - 1], probabilities, confidence, legend. |
For all primitives, instructions may be omitted or contain strings, objects, arrays or null. Noul and Choice descriptions accept those same forms. Score levels accept strings, objects or arrays; null Score levels are invalid (confirmed by a provider 422 and the SDK schema, despite the advanced guide). Structured values remain structured in Score legends. Noul can describe just one endpoint. Bare numbers and booleans are not top-level descriptions. A minimal mixed call:
iii trigger judge::evaluate --json '{
"timeout_ms": 3000,
"evaluations": [{
"id": "ticket-42",
"state": {"ticket": "Production checkout is down for all customers."},
"questions": {
"urgent": {
"type": "noul",
"instructions": "Does this ticket describe an urgent production outage?"
},
"department": {"type": "choice", "criteria": {"billing": null, "technical": null}},
"severity": {"type": "score", "criteria": ["Routine", {"impact": "Production blocked"}]}
}
}]
}'On status: "ok", read results["ticket-42"].answers, selecting the field matching
each answer's type. Choice probabilities use option IDs; Score probabilities
and legends use zero-based index strings. Treat confidence as returned by the
provider; it is not a caller-defined threshold or a formula to recompute.
Cancel an active call
Start the evaluation with a top-level request_id (≤128 printable
ASCII characters, unique among the caller's active calls), then invoke
judge::cancel with {"request_id":"..."} from the same caller connection:
ownership comes from the engine's _caller_worker_id, and separate CLI
invocations may get different ids. cancelled: true means the signal was
accepted, not that the provider rolled anything back; still await the original
call, which answers code: "cancelled". Absent, finished or other callers' ids
return cancelled: false. Details and the bus example:
cancellation.
Result and operational boundaries
- Success carries the effective
model, allresultsandstats; errors carrystatus: "error",code, optionalhttp_status, a bounded and key-redactedprovider_error,retry_after_msandstats, with no partial answers. Bus invocation failures are separate. See results and failures. usagecounters are independently nullable;stats.usage_completeis false whenever any counter is unknown, so zero never means free.- Deadlines, retries, permits and byte limits are in limits and compatibility. Credentials stay in the provider's configuration or environment; requests never carry keys, provider URLs or extra headers.