pantheon-opencode 1.6.2 → 1.6.3-beta.10
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/AGENTS.global.md +1 -1
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +69 -0
- package/README.md +14 -2
- package/bin/pantheon-init.mjs +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/decision-router-budget.mjs +4 -2
- package/scripts/decision-router-v2-egress.mjs +9 -2
- package/scripts/decision-router.mjs +58 -10
- package/scripts/install/decision-router-config.mjs +94 -8
- package/scripts/install/interactive.mjs +78 -10
- package/scripts/install/opencode.mjs +20 -0
- package/scripts/install/plugin.mjs +17 -0
- package/scripts/jev-live-probe.mjs +184 -0
- package/scripts/secret-scan.mjs +1 -1
- package/scripts/sync-tui.mjs +11 -0
- package/src/agents/zeus.md +24 -0
- package/src/pantheon/j-telemetry-file.ts +96 -0
- package/src/pantheon/jev-decision-tool.ts +240 -27
- package/src/pantheon/jev-decisions.ts +78 -14
- package/src/pantheon/jev-rank-verify.ts +435 -0
- package/src/pantheon/local-decision-budget.ts +11 -3
- package/src/pantheon/local-decision-provider-matrix.ts +3 -1
- package/src/pantheon/local-decision-usage-evidence.internal.ts +2 -2
- package/src/plugin-v2.ts +12 -2
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.js +457 -4
- package/src/plugins/tui/dist/tui-v2.js.map +1 -1
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/index-v2.tsx +6 -0
- package/src/plugins/tui/src/whats-new-highlights.ts +263 -0
- package/src/plugins/tui/src/whats-new-open.ts +80 -0
- package/src/plugins/tui/src/whats-new-state.ts +128 -0
- package/src/plugins/tui/src/whats-new.tsx +119 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The v3.1 rank and verify primitives on the native Jev route (tool modes on
|
|
3
|
+
* `pantheon_jev_decide`, built after the J4 review-mode pattern).
|
|
4
|
+
*
|
|
5
|
+
* ## Rank — `mode: "rank"`, one choice + one score, `{ winner, winnerFit }`
|
|
6
|
+
*
|
|
7
|
+
* Zeus can rank 2–8 named candidates for a state in ONE typed round-trip: one
|
|
8
|
+
* `choice` question (`winner`) over the candidate ids picks the best candidate
|
|
9
|
+
* and one `score` question (`fit`, the 2..10 rubric bound) rates that
|
|
10
|
+
* candidate's fit. THE HONEST LIMITATION: the host Decisions API returns one
|
|
11
|
+
* scalar answer per question (`NativeDecisionRequest` is tied to the 2.2.5
|
|
12
|
+
* host types), so per-candidate scores are not expressible in a single
|
|
13
|
+
* round-trip — one score question per candidate would break the 4-question
|
|
14
|
+
* bound above four candidates, and one ambiguous "score each candidate"
|
|
15
|
+
* question has no per-candidate answer structure to pair back. Rank therefore
|
|
16
|
+
* returns `{ winner, winnerFit }` and NOTHING more: no runner-up, no full
|
|
17
|
+
* ordering. A caller that needs a deeper order uses the explicit-questions
|
|
18
|
+
* mode with its own typed questions.
|
|
19
|
+
*
|
|
20
|
+
* ## Verify — `mode: "verify"`, one predicate per claim, fail-closed BLOCK
|
|
21
|
+
*
|
|
22
|
+
* Zeus can check 1–4 named claims in ONE typed round-trip: one `predicate`
|
|
23
|
+
* question per claim (within the 4-question bound), the claim text riding that
|
|
24
|
+
* question's instructions. The consumer maps each answer: probability
|
|
25
|
+
* ≥ {@link VERIFY_PASS_THRESHOLD} → `PASS`, below → `FAIL`, and every refusal,
|
|
26
|
+
* timeout, duplicate or malformed answer → `BLOCK` (fail-closed: an
|
|
27
|
+
* unanswered mandatory claim must never read as verified). The tool itself
|
|
28
|
+
* never acts on a verdict — `effect` stays `none` — and a gate-chain refusal
|
|
29
|
+
* stays the standard bounded refusal JSON; a caller that REQUIRES a verdict
|
|
30
|
+
* treats every refusal as `BLOCK` at its own call site.
|
|
31
|
+
*
|
|
32
|
+
* ## Sanitization contract (the J4 criteria class)
|
|
33
|
+
*
|
|
34
|
+
* Both modes take bounded caller-provided fields only: rank's candidate ids
|
|
35
|
+
* are strict tokens (they become choice values), its state rides the same
|
|
36
|
+
* 12,000-char bound and verbatim-carriage rule as the presets, and verify's
|
|
37
|
+
* claim texts are the only free text, riding the predicate instructions. The
|
|
38
|
+
* hostility scan mirrors the J4 criteria scan (paths, credential assignments,
|
|
39
|
+
* key material, control characters, over-length): hostile shapes are REJECTED
|
|
40
|
+
* — `CANDIDATE_INVALID` / `CLAIM_INVALID` — never sanitized on the way in.
|
|
41
|
+
* Neither mode has a telemetry point (they are tool modes, not shadow gates)
|
|
42
|
+
* and both reuse the tool's strict answer consumer
|
|
43
|
+
* (`consumeJevDecisionResult`): one answer per question name, duplicates
|
|
44
|
+
* become errors, unbounded host metadata never crosses.
|
|
45
|
+
*
|
|
46
|
+
* @module jev-rank-verify
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
import { consumeJevDecisionResult } from './jev-decisions.ts'
|
|
50
|
+
import type { NativeDecisionRequest, ResolvedNativeDecisionRoute } from './v2-native-decisions.ts'
|
|
51
|
+
import { NATIVE_DECISION_MAX_PROMPT_LENGTH } from './v2-native-decisions.ts'
|
|
52
|
+
|
|
53
|
+
// ─── Bounds ──────────────────────────────────────────────────────────────
|
|
54
|
+
|
|
55
|
+
/** A ranking needs at least two candidates to choose between. */
|
|
56
|
+
export const RANK_MIN_CANDIDATES = 2
|
|
57
|
+
/** Above eight, ranking degrades to explicit questions with a real rubric. */
|
|
58
|
+
export const RANK_MAX_CANDIDATES = 8
|
|
59
|
+
|
|
60
|
+
/** Question name of the rank's choice question. */
|
|
61
|
+
export const RANK_WINNER_QUESTION_NAME = 'winner'
|
|
62
|
+
/** Question name of the rank's fit score question. */
|
|
63
|
+
export const RANK_FIT_QUESTION_NAME = 'fit'
|
|
64
|
+
|
|
65
|
+
/** The fit rubric mirrors the documented 2..10 score-question bound. */
|
|
66
|
+
export const RANK_FIT_LEVEL_COUNT = 9
|
|
67
|
+
|
|
68
|
+
/** At least one claim per verify call; one predicate question per claim. */
|
|
69
|
+
export const VERIFY_MIN_CLAIMS = 1
|
|
70
|
+
/** One predicate question per claim, within the 4-question bound. */
|
|
71
|
+
export const VERIFY_MAX_CLAIMS = 4
|
|
72
|
+
/** Each claim is a bounded 1–200-char instruction string. */
|
|
73
|
+
export const CLAIM_MAX_LENGTH = 200
|
|
74
|
+
|
|
75
|
+
/** Predicate probability at or above which a claim counts as PASS. */
|
|
76
|
+
export const VERIFY_PASS_THRESHOLD = 0.5
|
|
77
|
+
|
|
78
|
+
const CANDIDATE_ID_MAX_LENGTH = 64
|
|
79
|
+
const CLAIM_NAME_MAX_LENGTH = 64
|
|
80
|
+
const DESCRIPTION_MAX_LENGTH = 500
|
|
81
|
+
|
|
82
|
+
/** Candidate ids become choice values: strict bounded tokens only. */
|
|
83
|
+
const TOKEN_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/
|
|
84
|
+
|
|
85
|
+
const RANK_FIT_LABELS: readonly string[] = Object.freeze([
|
|
86
|
+
'unusable',
|
|
87
|
+
'poor',
|
|
88
|
+
'weak',
|
|
89
|
+
'fair',
|
|
90
|
+
'adequate',
|
|
91
|
+
'good',
|
|
92
|
+
'strong',
|
|
93
|
+
'excellent',
|
|
94
|
+
'exemplary',
|
|
95
|
+
])
|
|
96
|
+
|
|
97
|
+
const WINNER_INSTRUCTIONS =
|
|
98
|
+
'Choose the single best candidate from the listed options for the described state. ' +
|
|
99
|
+
'Answer with exactly one candidate id. Advisory only; nothing is dispatched or executed.'
|
|
100
|
+
|
|
101
|
+
const FIT_INSTRUCTIONS =
|
|
102
|
+
'Rate how well the candidate you chose as the best fits the described state. ' +
|
|
103
|
+
'Higher means a better fit; judge from the state and the candidate descriptions alone. ' +
|
|
104
|
+
'Advisory only; nothing is enforced.'
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The verify request's only input part: a fixed template with NO free-text
|
|
108
|
+
* slot — the claims ride the predicate questions' instructions, so the state
|
|
109
|
+
* part cannot carry them twice (or be mistaken for a content field).
|
|
110
|
+
*/
|
|
111
|
+
const VERIFY_STATE_TEMPLATE =
|
|
112
|
+
'Advisory claim verification. Each claim is stated in its own question below; ' +
|
|
113
|
+
'assess each claim on its own terms from the claim text alone. Nothing is enforced.'
|
|
114
|
+
|
|
115
|
+
// ─── Hostility scan (mirrors the J4 criteria scan) ───────────────────────
|
|
116
|
+
|
|
117
|
+
/** Path separators in any position: caller prose is never a location. */
|
|
118
|
+
const PATH_PATTERN = /[/\\]/
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Control characters (C0 and DEL — newlines and tabs included): these are
|
|
122
|
+
* single-line prose fields. An explicit code-point scan, not a regex, so the
|
|
123
|
+
* hostile-input check stays lint-clean without a rule suppression.
|
|
124
|
+
*/
|
|
125
|
+
function hasControlCharacter(value: string): boolean {
|
|
126
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
127
|
+
const code = value.charCodeAt(index)
|
|
128
|
+
if (code <= 0x1f || code === 0x7f) return true
|
|
129
|
+
}
|
|
130
|
+
return false
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** Key material shapes: PEM headers, AWS/SDK/Git token literals, key files. */
|
|
134
|
+
const KEY_MATERIAL_PATTERNS: readonly RegExp[] = Object.freeze([
|
|
135
|
+
/-----BEGIN/,
|
|
136
|
+
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/,
|
|
137
|
+
/\bsk-[A-Za-z0-9_-]{16,}\b/,
|
|
138
|
+
/\bgh[pousr]_[A-Za-z0-9]{20,}\b/,
|
|
139
|
+
/\b[a-z0-9._-]+\.(?:key|pem|p12|pfx|kdbx)\b/i,
|
|
140
|
+
])
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Credential ASSIGNMENT shapes only: naming a concept is prose ("handles
|
|
144
|
+
* secrets without echoing them" stays admissible); binding a value to it
|
|
145
|
+
* ("password=hunter2") is a credential shape and is rejected.
|
|
146
|
+
*/
|
|
147
|
+
const CREDENTIAL_ASSIGNMENT_PATTERN =
|
|
148
|
+
/\b(?:password|passwd|secret|token|api[-_]?key|credential)s?\s*[:=]\s*\S+/i
|
|
149
|
+
|
|
150
|
+
function isHostileProse(value: string): boolean {
|
|
151
|
+
if (PATH_PATTERN.test(value)) return true
|
|
152
|
+
if (hasControlCharacter(value)) return true
|
|
153
|
+
if (KEY_MATERIAL_PATTERNS.some((pattern) => pattern.test(value))) return true
|
|
154
|
+
return CREDENTIAL_ASSIGNMENT_PATTERN.test(value)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function isBoundedNonBlankString(value: unknown, max: number): value is string {
|
|
158
|
+
return typeof value === 'string' && value.trim().length > 0 && value.length <= max
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
162
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// ─── Rank: request building ──────────────────────────────────────────────
|
|
166
|
+
|
|
167
|
+
const RANK_ENVELOPE_KEYS: ReadonlySet<string> = new Set([
|
|
168
|
+
'schemaVersion',
|
|
169
|
+
'mode',
|
|
170
|
+
'state',
|
|
171
|
+
'candidates',
|
|
172
|
+
])
|
|
173
|
+
|
|
174
|
+
export type JevRankBuildFailure = 'RANK_INPUT_INVALID' | 'CANDIDATE_INVALID' | 'STATE_INVALID'
|
|
175
|
+
|
|
176
|
+
export type JevRankBuild =
|
|
177
|
+
| { readonly ok: true; readonly request: Omit<NativeDecisionRequest, 'model'> }
|
|
178
|
+
| { readonly ok: false; readonly reasonCode: JevRankBuildFailure }
|
|
179
|
+
|
|
180
|
+
export type JevRankPreparation =
|
|
181
|
+
| { readonly ok: true; readonly request: NativeDecisionRequest }
|
|
182
|
+
| { readonly ok: false; readonly reasonCode: JevRankBuildFailure }
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Validate the rank tool input and build the model-less request. The state is
|
|
186
|
+
* carried verbatim under the same bound and rule as the presets; the
|
|
187
|
+
* candidates ride the winner question's choice values (ids, strict tokens)
|
|
188
|
+
* and choice descriptions (bounded prose, hostility-scanned). Unknown
|
|
189
|
+
* envelope keys — `questions`, review fields, anything else — refuse the
|
|
190
|
+
* preparation: no second payload slot exists.
|
|
191
|
+
*/
|
|
192
|
+
export function buildJevRankRequest(input: unknown): JevRankBuild {
|
|
193
|
+
if (!isRecord(input)) return { ok: false, reasonCode: 'RANK_INPUT_INVALID' }
|
|
194
|
+
for (const key of Object.keys(input)) {
|
|
195
|
+
if (!RANK_ENVELOPE_KEYS.has(key)) return { ok: false, reasonCode: 'RANK_INPUT_INVALID' }
|
|
196
|
+
}
|
|
197
|
+
const state = input.state
|
|
198
|
+
if (!isBoundedNonBlankString(state, NATIVE_DECISION_MAX_PROMPT_LENGTH)) {
|
|
199
|
+
return { ok: false, reasonCode: 'STATE_INVALID' }
|
|
200
|
+
}
|
|
201
|
+
const rawCandidates = input.candidates
|
|
202
|
+
// A MISSING candidates field is a malformed rank; a PRESENT-but-hostile
|
|
203
|
+
// candidates array keeps its precise CANDIDATE_INVALID (the review-mode
|
|
204
|
+
// discipline).
|
|
205
|
+
if (rawCandidates === undefined) return { ok: false, reasonCode: 'RANK_INPUT_INVALID' }
|
|
206
|
+
if (!Array.isArray(rawCandidates)) return { ok: false, reasonCode: 'CANDIDATE_INVALID' }
|
|
207
|
+
if (rawCandidates.length < RANK_MIN_CANDIDATES || rawCandidates.length > RANK_MAX_CANDIDATES) {
|
|
208
|
+
return { ok: false, reasonCode: 'CANDIDATE_INVALID' }
|
|
209
|
+
}
|
|
210
|
+
const seen = new Set<string>()
|
|
211
|
+
const choices: Array<{ value: string; description?: string }> = []
|
|
212
|
+
for (const raw of rawCandidates) {
|
|
213
|
+
if (!isRecord(raw)) return { ok: false, reasonCode: 'CANDIDATE_INVALID' }
|
|
214
|
+
const extraKeys = Object.keys(raw).filter((key) => key !== 'id' && key !== 'description')
|
|
215
|
+
if (extraKeys.length > 0) return { ok: false, reasonCode: 'CANDIDATE_INVALID' }
|
|
216
|
+
const id = raw.id
|
|
217
|
+
if (
|
|
218
|
+
typeof id !== 'string' ||
|
|
219
|
+
id.length > CANDIDATE_ID_MAX_LENGTH ||
|
|
220
|
+
!TOKEN_PATTERN.test(id) ||
|
|
221
|
+
seen.has(id)
|
|
222
|
+
) {
|
|
223
|
+
return { ok: false, reasonCode: 'CANDIDATE_INVALID' }
|
|
224
|
+
}
|
|
225
|
+
seen.add(id)
|
|
226
|
+
const description = raw.description
|
|
227
|
+
if (description === undefined) {
|
|
228
|
+
choices.push({ value: id })
|
|
229
|
+
} else if (
|
|
230
|
+
isBoundedNonBlankString(description, DESCRIPTION_MAX_LENGTH) &&
|
|
231
|
+
!isHostileProse(description)
|
|
232
|
+
) {
|
|
233
|
+
choices.push({ value: id, description })
|
|
234
|
+
} else {
|
|
235
|
+
return { ok: false, reasonCode: 'CANDIDATE_INVALID' }
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const request = {
|
|
239
|
+
input: Object.freeze([Object.freeze({ type: 'text' as const, text: state })]),
|
|
240
|
+
questions: Object.freeze([
|
|
241
|
+
Object.freeze({
|
|
242
|
+
type: 'choice' as const,
|
|
243
|
+
name: RANK_WINNER_QUESTION_NAME,
|
|
244
|
+
instructions: WINNER_INSTRUCTIONS,
|
|
245
|
+
choices: Object.freeze(choices.map((choice) => Object.freeze(choice))),
|
|
246
|
+
}),
|
|
247
|
+
Object.freeze({
|
|
248
|
+
type: 'score' as const,
|
|
249
|
+
name: RANK_FIT_QUESTION_NAME,
|
|
250
|
+
instructions: FIT_INSTRUCTIONS,
|
|
251
|
+
levels: Object.freeze(RANK_FIT_LABELS.map((label) => Object.freeze({ label }))),
|
|
252
|
+
}),
|
|
253
|
+
]),
|
|
254
|
+
} satisfies Omit<NativeDecisionRequest, 'model'>
|
|
255
|
+
return { ok: true, request: Object.freeze(request) }
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** `prepareJevPresetRequest` contract: route plus tool input in, request out. */
|
|
259
|
+
export function prepareJevRankRequest(
|
|
260
|
+
route: ResolvedNativeDecisionRoute,
|
|
261
|
+
input: unknown,
|
|
262
|
+
): JevRankPreparation {
|
|
263
|
+
const built = buildJevRankRequest(input)
|
|
264
|
+
if (!built.ok) return built
|
|
265
|
+
return {
|
|
266
|
+
ok: true,
|
|
267
|
+
request: {
|
|
268
|
+
model: route.model,
|
|
269
|
+
input: built.request.input,
|
|
270
|
+
questions: built.request.questions,
|
|
271
|
+
},
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// ─── Verify: request building ────────────────────────────────────────────
|
|
276
|
+
|
|
277
|
+
const VERIFY_ENVELOPE_KEYS: ReadonlySet<string> = new Set(['schemaVersion', 'mode', 'claims'])
|
|
278
|
+
|
|
279
|
+
export type JevVerifyBuildFailure = 'VERIFY_INPUT_INVALID' | 'CLAIM_INVALID'
|
|
280
|
+
|
|
281
|
+
export type JevVerifyBuild =
|
|
282
|
+
| { readonly ok: true; readonly request: Omit<NativeDecisionRequest, 'model'> }
|
|
283
|
+
| { readonly ok: false; readonly reasonCode: JevVerifyBuildFailure }
|
|
284
|
+
|
|
285
|
+
export type JevVerifyPreparation =
|
|
286
|
+
| { readonly ok: true; readonly request: NativeDecisionRequest }
|
|
287
|
+
| { readonly ok: false; readonly reasonCode: JevVerifyBuildFailure }
|
|
288
|
+
|
|
289
|
+
function verifyInstructions(claim: string): string {
|
|
290
|
+
return (
|
|
291
|
+
'Assess the following claim on its own terms and answer the probability that it holds. ' +
|
|
292
|
+
`Claim: "${claim}". Higher means the claim is more likely to hold. ` +
|
|
293
|
+
'This is advisory verification; nothing is enforced.'
|
|
294
|
+
)
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Validate the verify tool input and build the model-less request: one
|
|
299
|
+
* predicate question per claim, named after the claim, the claim text riding
|
|
300
|
+
* that question's instructions. The verify mode takes NO state text — any
|
|
301
|
+
* smuggled slot (`state`, `candidates`, review fields) refuses the
|
|
302
|
+
* preparation `VERIFY_INPUT_INVALID`; hostile claim shapes keep the precise
|
|
303
|
+
* `CLAIM_INVALID`.
|
|
304
|
+
*/
|
|
305
|
+
export function buildJevVerifyRequest(input: unknown): JevVerifyBuild {
|
|
306
|
+
if (!isRecord(input)) return { ok: false, reasonCode: 'VERIFY_INPUT_INVALID' }
|
|
307
|
+
for (const key of Object.keys(input)) {
|
|
308
|
+
if (!VERIFY_ENVELOPE_KEYS.has(key)) return { ok: false, reasonCode: 'VERIFY_INPUT_INVALID' }
|
|
309
|
+
}
|
|
310
|
+
const rawClaims = input.claims
|
|
311
|
+
if (rawClaims === undefined) return { ok: false, reasonCode: 'VERIFY_INPUT_INVALID' }
|
|
312
|
+
if (!Array.isArray(rawClaims)) return { ok: false, reasonCode: 'CLAIM_INVALID' }
|
|
313
|
+
if (rawClaims.length < VERIFY_MIN_CLAIMS || rawClaims.length > VERIFY_MAX_CLAIMS) {
|
|
314
|
+
return { ok: false, reasonCode: 'CLAIM_INVALID' }
|
|
315
|
+
}
|
|
316
|
+
const seen = new Set<string>()
|
|
317
|
+
const questions: Array<{
|
|
318
|
+
type: 'predicate'
|
|
319
|
+
name: string
|
|
320
|
+
instructions: string
|
|
321
|
+
}> = []
|
|
322
|
+
for (const raw of rawClaims) {
|
|
323
|
+
if (!isRecord(raw)) return { ok: false, reasonCode: 'CLAIM_INVALID' }
|
|
324
|
+
const extraKeys = Object.keys(raw).filter((key) => key !== 'name' && key !== 'claim')
|
|
325
|
+
if (extraKeys.length > 0) return { ok: false, reasonCode: 'CLAIM_INVALID' }
|
|
326
|
+
const name = raw.name
|
|
327
|
+
if (
|
|
328
|
+
typeof name !== 'string' ||
|
|
329
|
+
name.length > CLAIM_NAME_MAX_LENGTH ||
|
|
330
|
+
!TOKEN_PATTERN.test(name) ||
|
|
331
|
+
seen.has(name)
|
|
332
|
+
) {
|
|
333
|
+
return { ok: false, reasonCode: 'CLAIM_INVALID' }
|
|
334
|
+
}
|
|
335
|
+
const claim = raw.claim
|
|
336
|
+
if (!isBoundedNonBlankString(claim, CLAIM_MAX_LENGTH) || isHostileProse(claim)) {
|
|
337
|
+
return { ok: false, reasonCode: 'CLAIM_INVALID' }
|
|
338
|
+
}
|
|
339
|
+
seen.add(name)
|
|
340
|
+
questions.push({ type: 'predicate', name, instructions: verifyInstructions(claim) })
|
|
341
|
+
}
|
|
342
|
+
const request = {
|
|
343
|
+
input: Object.freeze([Object.freeze({ type: 'text' as const, text: VERIFY_STATE_TEMPLATE })]),
|
|
344
|
+
questions: Object.freeze(questions.map((question) => Object.freeze(question))),
|
|
345
|
+
} satisfies Omit<NativeDecisionRequest, 'model'>
|
|
346
|
+
return { ok: true, request: Object.freeze(request) }
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/** `prepareJevPresetRequest` contract: route plus tool input in, request out. */
|
|
350
|
+
export function prepareJevVerifyRequest(
|
|
351
|
+
route: ResolvedNativeDecisionRoute,
|
|
352
|
+
input: unknown,
|
|
353
|
+
): JevVerifyPreparation {
|
|
354
|
+
const built = buildJevVerifyRequest(input)
|
|
355
|
+
if (!built.ok) return built
|
|
356
|
+
return {
|
|
357
|
+
ok: true,
|
|
358
|
+
request: {
|
|
359
|
+
model: route.model,
|
|
360
|
+
input: built.request.input,
|
|
361
|
+
questions: built.request.questions,
|
|
362
|
+
},
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// ─── Consumption ─────────────────────────────────────────────────────────
|
|
367
|
+
|
|
368
|
+
export interface JevRankVerdict {
|
|
369
|
+
/**
|
|
370
|
+
* The host's chosen candidate id; `null` when the answer is missing,
|
|
371
|
+
* mistyped, duplicated, an error, or outside the prepared candidate ids.
|
|
372
|
+
*/
|
|
373
|
+
readonly winner: string | null
|
|
374
|
+
/**
|
|
375
|
+
* The host's fit score for the winner, on the prepared 2..10 rubric;
|
|
376
|
+
* `null` under the same failures.
|
|
377
|
+
*/
|
|
378
|
+
readonly winnerFit: number | null
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Consume a host Decisions response against the prepared rank request.
|
|
383
|
+
* Strict validation is borrowed wholesale from the tool's consumer
|
|
384
|
+
* (`consumeJevDecisionResult`): an answer counts only when its name and type
|
|
385
|
+
* match the prepared questions, duplicates become errors, and anything else
|
|
386
|
+
* is `null`, never a guess.
|
|
387
|
+
*/
|
|
388
|
+
export function consumeJevRankResult(
|
|
389
|
+
response: unknown,
|
|
390
|
+
request: NativeDecisionRequest,
|
|
391
|
+
): JevRankVerdict {
|
|
392
|
+
const advice = consumeJevDecisionResult(response, request)
|
|
393
|
+
let winner: string | null = null
|
|
394
|
+
let winnerFit: number | null = null
|
|
395
|
+
for (const answer of advice.answers) {
|
|
396
|
+
if (answer.type === 'error') continue
|
|
397
|
+
if (answer.type === 'choice' && answer.name === RANK_WINNER_QUESTION_NAME) {
|
|
398
|
+
winner = answer.choice ?? null
|
|
399
|
+
} else if (answer.type === 'score' && answer.name === RANK_FIT_QUESTION_NAME) {
|
|
400
|
+
winnerFit = answer.score ?? null
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return Object.freeze({ winner, winnerFit })
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The verdict of one verified claim. `BLOCK` is the fail-closed answer: a
|
|
408
|
+
* host refusal, timeout, duplicate or malformed reply must never read as
|
|
409
|
+
* verified (or as refuted — an unverifiable claim is unverifiable, not
|
|
410
|
+
* false).
|
|
411
|
+
*/
|
|
412
|
+
export type VerifyClaimVerdict = 'PASS' | 'FAIL' | 'BLOCK'
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Consume a host Decisions response against the prepared verify request:
|
|
416
|
+
* one verdict per claim name. Probability ≥ {@link VERIFY_PASS_THRESHOLD} is
|
|
417
|
+
* `PASS`, below is `FAIL`; error answers, missing answers and any unusable
|
|
418
|
+
* response shape are `BLOCK` — fail-closed.
|
|
419
|
+
*/
|
|
420
|
+
export function consumeJevVerifyResult(
|
|
421
|
+
response: unknown,
|
|
422
|
+
request: NativeDecisionRequest,
|
|
423
|
+
): Readonly<Record<string, VerifyClaimVerdict>> {
|
|
424
|
+
const advice = consumeJevDecisionResult(response, request)
|
|
425
|
+
const verdicts: Record<string, VerifyClaimVerdict> = {}
|
|
426
|
+
for (const question of request.questions) {
|
|
427
|
+
const answer = advice.answers.find((candidate) => candidate.name === question.name)
|
|
428
|
+
if (answer !== undefined && answer.type === 'predicate') {
|
|
429
|
+
verdicts[question.name] = (answer.probability ?? 0) >= VERIFY_PASS_THRESHOLD ? 'PASS' : 'FAIL'
|
|
430
|
+
} else {
|
|
431
|
+
verdicts[question.name] = 'BLOCK'
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return Object.freeze(verdicts)
|
|
435
|
+
}
|
|
@@ -9,7 +9,13 @@ import {
|
|
|
9
9
|
type VerifiedUsageEvidence,
|
|
10
10
|
} from './local-decision-usage-evidence.internal.ts'
|
|
11
11
|
|
|
12
|
-
export type BudgetProvider =
|
|
12
|
+
export type BudgetProvider =
|
|
13
|
+
| 'openai-decisions'
|
|
14
|
+
| 'typesafe-jev'
|
|
15
|
+
| 'opencode-console'
|
|
16
|
+
| 'openrouter'
|
|
17
|
+
| 'vercel-ai-gateway'
|
|
18
|
+
| 'cloudflare-workers-ai'
|
|
13
19
|
|
|
14
20
|
/** Model and OpenCode Console variant keys must be configured before admission. */
|
|
15
21
|
export type BudgetModel = string
|
|
@@ -126,10 +132,12 @@ export const LOCAL_DECISION_BUDGET_PROVIDERS: readonly BudgetProvider[] = Object
|
|
|
126
132
|
'openai-decisions',
|
|
127
133
|
'typesafe-jev',
|
|
128
134
|
'opencode-console',
|
|
129
|
-
'
|
|
135
|
+
'openrouter',
|
|
136
|
+
'vercel-ai-gateway',
|
|
137
|
+
'cloudflare-workers-ai',
|
|
130
138
|
])
|
|
131
139
|
const ALLOWED_PROVIDERS = new Set<BudgetProvider>(LOCAL_DECISION_BUDGET_PROVIDERS)
|
|
132
|
-
const MODEL_KEY = /^[A-Za-z0-9][A-Za-z0-9._
|
|
140
|
+
const MODEL_KEY = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/
|
|
133
141
|
const RESERVATION_ID = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/
|
|
134
142
|
const CLOCK_ROLLBACK_TOLERANCE_MS = 60_000
|
|
135
143
|
|
|
@@ -16,7 +16,9 @@ export type DecisionProviderId =
|
|
|
16
16
|
| 'openai-decisions'
|
|
17
17
|
| 'typesafe-jev'
|
|
18
18
|
| 'opencode-console-jev'
|
|
19
|
-
| '
|
|
19
|
+
| 'openrouter-jev'
|
|
20
|
+
| 'vercel-gateway-jev'
|
|
21
|
+
| 'cloudflare-workers-jev'
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* Single provider matrix. Model and accounting IDs come from the canonical
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/** Providers that can appear in usage details: native Decisions routes. */
|
|
11
|
-
export type UsageProvider = 'typesafe-jev' | 'opencode-console'
|
|
11
|
+
export type UsageProvider = 'typesafe-jev' | 'opencode-console'
|
|
12
12
|
|
|
13
13
|
export interface ParsedUsageCounts {
|
|
14
14
|
provider: UsageProvider
|
|
@@ -47,7 +47,7 @@ const evidenceDetails = new WeakMap<object, VerifiedUsageEvidenceDetails>()
|
|
|
47
47
|
* absent: direct OpenAI has no native route, so it can never settle one.
|
|
48
48
|
*/
|
|
49
49
|
function isNativeUsageProvider(value: string): value is UsageProvider {
|
|
50
|
-
return value === 'typesafe-jev' || value === 'opencode-console'
|
|
50
|
+
return value === 'typesafe-jev' || value === 'opencode-console'
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
package/src/plugin-v2.ts
CHANGED
|
@@ -115,7 +115,9 @@ import {
|
|
|
115
115
|
} from './pantheon/delegation-enforce.ts'
|
|
116
116
|
import { GOAL_LOOP_DEFAULTS, GoalStore } from './pantheon/goal-loop.ts'
|
|
117
117
|
import { createGuardPathResolver } from './pantheon/guard-path.ts'
|
|
118
|
+
import { createJTelemetryMirror } from './pantheon/j-telemetry-file.ts'
|
|
118
119
|
import type { V2JevDecisionRuntime } from './pantheon/jev-decision-tool.ts'
|
|
120
|
+
import { specialistCallerAllowlist } from './pantheon/jev-decision-tool.ts'
|
|
119
121
|
import {
|
|
120
122
|
createJ3EscalationObserver,
|
|
121
123
|
isSubagentDispatchEvent,
|
|
@@ -679,6 +681,7 @@ function transformReferences(draft: ReferenceDraft): void {
|
|
|
679
681
|
* catalog, but the tool registration contract still feature-detects both).
|
|
680
682
|
*/
|
|
681
683
|
function buildV2JevRuntime(host: ReturnType<typeof hostDomains>): V2JevDecisionRuntime | undefined {
|
|
684
|
+
const specialistCallers = specialistCallerAllowlist(process.env.PANTHEON_JEV_SPECIALIST_CALLERS)
|
|
682
685
|
const decisionsFn = host.experimental?.generate?.decisions
|
|
683
686
|
const modelListFn = host.model?.list
|
|
684
687
|
if (typeof decisionsFn !== 'function' || typeof modelListFn !== 'function') return undefined
|
|
@@ -703,7 +706,9 @@ function buildV2JevRuntime(host: ReturnType<typeof hostDomains>): V2JevDecisionR
|
|
|
703
706
|
// it; the records are advisory and never read back by the tool path.
|
|
704
707
|
const j4Sink = createTelemetrySink()
|
|
705
708
|
j4TelemetrySink = j4Sink
|
|
709
|
+
const j4Mirror = createJTelemetryMirror({ enabled: true })
|
|
706
710
|
return {
|
|
711
|
+
specialistCallers,
|
|
707
712
|
// Every host method is invoked with its owning domain as receiver: the
|
|
708
713
|
// canary records `ctx.model.list()` (bound) succeeding on 2.2.5 while a
|
|
709
714
|
// detached reference threw in the field and surfaced only as
|
|
@@ -715,7 +720,9 @@ function buildV2JevRuntime(host: ReturnType<typeof hostDomains>): V2JevDecisionR
|
|
|
715
720
|
listSkills: async () => skillList?.call(skillDomain),
|
|
716
721
|
...(permissionAssert === undefined ? {} : { permissionAssert }),
|
|
717
722
|
shadowSink: (record) => {
|
|
718
|
-
|
|
723
|
+
const shadowRecord = { ...record, mode: 'shadow' }
|
|
724
|
+
j4Sink.emit(shadowRecord)
|
|
725
|
+
j4Mirror?.record(shadowRecord)
|
|
719
726
|
},
|
|
720
727
|
}
|
|
721
728
|
}
|
|
@@ -2006,10 +2013,13 @@ async function registerV2ToolHooks(
|
|
|
2006
2013
|
if (jevRuntime !== undefined && j3EscalationEnabledFromEnv()) {
|
|
2007
2014
|
const j3Sink = createTelemetrySink()
|
|
2008
2015
|
j3TelemetrySink = j3Sink
|
|
2016
|
+
const j3Mirror = createJTelemetryMirror({ enabled: true })
|
|
2009
2017
|
j3Observer = createJ3EscalationObserver({
|
|
2010
2018
|
runtime: jevRuntime,
|
|
2011
2019
|
sink: (record) => {
|
|
2012
|
-
|
|
2020
|
+
const shadowRecord = { ...record, mode: 'shadow' }
|
|
2021
|
+
j3Sink.emit(shadowRecord)
|
|
2022
|
+
j3Mirror?.record(shadowRecord)
|
|
2013
2023
|
},
|
|
2014
2024
|
})
|
|
2015
2025
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui-v2.d.ts","names":[],"sources":["../src/context-gauge.ts","../src/model-usage-limits.ts","../src/sidebar-width.ts","../src/index-v2.tsx"],"mappings":";;;;KAEY;qBAEC;qBACA;qBACA;wBAMG,iBAAiB,kBAAkB;wBAOnC,iBAAiB;wBAMjB,oBAAoB;wBAQpB,iBAAiB,iBAAiB;wBAOlC,WACd,oCACA;EACG;EAAgB;;wBAWL,YAAY;;;;qBCrDf;qBACA;qBACA;;;;;;;;wBCyHG,UAAU;;;;
|
|
1
|
+
{"version":3,"file":"tui-v2.d.ts","names":[],"sources":["../src/context-gauge.ts","../src/model-usage-limits.ts","../src/sidebar-width.ts","../src/index-v2.tsx"],"mappings":";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