pantheon-opencode 1.6.3-beta.6 → 1.7.0-beta.1
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 +201 -0
- package/README.md +16 -2
- package/README.pt-BR.md +1 -1
- package/bin/pantheon-init.mjs +46 -28
- package/package.json +2 -2
- package/plugin.json +2 -2
- package/pyproject.toml +1 -1
- package/scripts/decision-router-budget.mjs +102 -2
- package/scripts/decision-router-v2-budget.mjs +2 -2
- package/scripts/decision-router.mjs +82 -25
- package/scripts/doctor.mjs +4 -1
- package/scripts/install/cli-ui.mjs +2 -1
- package/scripts/install/decision-router-config.mjs +12 -4
- package/scripts/install/interactive.mjs +45 -28
- package/scripts/install/opencode.mjs +151 -30
- package/scripts/jev-live-probe.mjs +212 -0
- package/scripts/skill-search.mjs +273 -0
- package/skills-lock.json +3 -1
- package/src/agents/aphrodite.md +34 -1
- package/src/agents/apollo.md +227 -0
- package/src/agents/athena.md +26 -0
- package/src/agents/demeter.md +33 -0
- package/src/agents/gaia.md +24 -0
- package/src/agents/hephaestus.md +24 -0
- package/src/agents/hermes.md +33 -0
- package/src/agents/iris.md +24 -0
- package/src/agents/mnemosyne.md +25 -3
- package/src/agents/nyx.md +50 -22
- package/src/agents/prometheus.md +242 -1
- package/src/agents/talos.md +24 -0
- package/src/agents/themis.md +24 -0
- package/src/agents/zeus.md +81 -6
- package/src/pantheon/j1-approvals.ts +123 -0
- package/src/pantheon/jev-decision-tool.ts +293 -35
- package/src/pantheon/jev-decisions.ts +95 -12
- package/src/pantheon/jev-escalation.ts +1 -1
- package/src/pantheon/jev-quality-score.ts +45 -10
- package/src/pantheon/jev-rank-verify.ts +665 -0
- package/src/pantheon/jev-risk-gate.ts +82 -12
- package/src/pantheon/local-decision-budget.ts +169 -2
- package/src/pantheon/local-decision-prompt.ts +2 -0
- package/src/pantheon/local-decision-router.ts +16 -0
- package/src/pantheon/local-decision-turn.ts +110 -4
- package/src/pantheon/local-decision-usage-evidence.internal.ts +2 -2
- package/src/pantheon/pantheon-decision-catalog.ts +9 -2
- package/src/pantheon/v2-decision-budget.ts +4 -2
- package/src/pantheon/v2-tools.ts +42 -0
- package/src/plugin-v2.ts +85 -5
- package/src/plugins/tui/dist/server-v2.d.ts +14 -6
- package/src/plugins/tui/dist/server-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/server-v2.js +16 -9
- package/src/plugins/tui/dist/server-v2.js.map +1 -1
- package/src/plugins/tui/dist/tui-v2.js +128 -25
- 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/server-v2.ts +14 -7
- package/src/plugins/tui/src/whats-new-highlights.ts +59 -5
- package/src/plugins/tui/src/whats-new-open.ts +41 -1
- package/src/plugins/tui/src/whats-new.tsx +61 -8
- package/src/routing.yml +2 -0
- package/src/skills/README.md +1 -1
- package/src/skills/agent-forge/SKILL.md +76 -0
- package/src/skills/auto-continue/SKILL.md +12 -163
- package/src/skills/auto-continue/references/auto-continue-details.md +175 -0
- package/src/skills/prompt-refinery/SKILL.md +60 -0
|
@@ -63,10 +63,33 @@ export const J4_QUALITY_SCORE_POINT = 'J4'
|
|
|
63
63
|
|
|
64
64
|
/** Question names of the two prepared questions, matched on consumption. */
|
|
65
65
|
export const QUALITY_QUESTION_NAME = 'quality'
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Field report (beta.13→16): the review question was literally named 'noul'
|
|
68
|
+
* — the decision model's internal archetype leaked into a user-visible
|
|
69
|
+
* payload. The name is ours to choose; `quality` says what it measures.
|
|
70
|
+
*/
|
|
71
|
+
export const REVIEW_QUESTION_NAME = 'needs_review'
|
|
67
72
|
|
|
68
73
|
/** DSH hard-cap mirror: at most 4 criteria per review request. */
|
|
69
74
|
export const J4_MAX_CRITERIA = 4
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Normalize one criterion: a plain string, or a `{ id?, description }` record
|
|
78
|
+
* (field report beta.24 #10 — the object form is the natural caller shape and
|
|
79
|
+
* was refused by a strings-only check; both are accepted, the DESCRIPTION is
|
|
80
|
+
* what rides the request, the id is caller bookkeeping).
|
|
81
|
+
*/
|
|
82
|
+
export function normalizeJevCriterion(raw: unknown): string | null {
|
|
83
|
+
if (typeof raw === 'string') return raw
|
|
84
|
+
if (raw !== null && typeof raw === 'object' && !Array.isArray(raw)) {
|
|
85
|
+
const record = raw as { id?: unknown; description?: unknown }
|
|
86
|
+
if (record.id !== undefined && (typeof record.id !== 'string' || record.id.length > 64)) {
|
|
87
|
+
return null
|
|
88
|
+
}
|
|
89
|
+
if (typeof record.description === 'string') return record.description
|
|
90
|
+
}
|
|
91
|
+
return null
|
|
92
|
+
}
|
|
70
93
|
/** A rubric needs at least one named criterion. */
|
|
71
94
|
export const J4_MIN_CRITERIA = 1
|
|
72
95
|
/** Each criterion is a bounded instruction string (1–120 chars). */
|
|
@@ -114,7 +137,12 @@ export type QualityScorePreparedRequest =
|
|
|
114
137
|
/** The request body; the caller attaches the resolved route's `model`. */
|
|
115
138
|
readonly request: Omit<NativeDecisionRequest, 'model'>
|
|
116
139
|
}
|
|
117
|
-
| {
|
|
140
|
+
| {
|
|
141
|
+
readonly ok: false
|
|
142
|
+
readonly reasonCode: QualityScoreRequestFailure
|
|
143
|
+
/** Per-cause token (e.g. CRITERIA_SHAPE) so the caller can fix the input. */
|
|
144
|
+
readonly detail?: string
|
|
145
|
+
}
|
|
118
146
|
|
|
119
147
|
const QUALITY_LABELS = [
|
|
120
148
|
'unusable',
|
|
@@ -220,16 +248,23 @@ export function buildQualityScoreRequest(
|
|
|
220
248
|
if (criteria.length < J4_MIN_CRITERIA || criteria.length > J4_MAX_CRITERIA) {
|
|
221
249
|
return { ok: false, reasonCode: 'CRITERIA_INVALID' }
|
|
222
250
|
}
|
|
251
|
+
const normalized: string[] = []
|
|
223
252
|
for (const criterion of criteria) {
|
|
253
|
+
const text = normalizeJevCriterion(criterion)
|
|
224
254
|
if (
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
isHostileCriterion(
|
|
255
|
+
text === null ||
|
|
256
|
+
text.length < 1 ||
|
|
257
|
+
text.length > J4_CRITERIA_MAX_LENGTH ||
|
|
258
|
+
text.trim().length === 0 ||
|
|
259
|
+
isHostileCriterion(text)
|
|
230
260
|
) {
|
|
231
|
-
return {
|
|
261
|
+
return {
|
|
262
|
+
ok: false,
|
|
263
|
+
reasonCode: 'CRITERIA_INVALID',
|
|
264
|
+
detail: 'CRITERIA_SHAPE — cada critério é uma string (1-120) ou {id?, description}',
|
|
265
|
+
}
|
|
232
266
|
}
|
|
267
|
+
normalized.push(text)
|
|
233
268
|
}
|
|
234
269
|
|
|
235
270
|
const state =
|
|
@@ -244,7 +279,7 @@ export function buildQualityScoreRequest(
|
|
|
244
279
|
}
|
|
245
280
|
const qualityInstructions =
|
|
246
281
|
QUALITY_INSTRUCTIONS_PREFIX +
|
|
247
|
-
` Criteria: ${
|
|
282
|
+
` Criteria: ${normalized.map((criterion, index) => `(${index + 1}) ${criterion}`).join('; ')}.`
|
|
248
283
|
return {
|
|
249
284
|
ok: true,
|
|
250
285
|
request: Object.freeze({
|
|
@@ -356,7 +391,7 @@ export function encodeQualityScoreReason(input: {
|
|
|
356
391
|
* ANY other key — `state`, `questions`, or a smuggled content field — refuses
|
|
357
392
|
* the preparation, so no content slot exists even at the input boundary.
|
|
358
393
|
*/
|
|
359
|
-
const REVIEW_ENVELOPE_KEYS: ReadonlySet<string> = new Set([
|
|
394
|
+
export const REVIEW_ENVELOPE_KEYS: ReadonlySet<string> = new Set([
|
|
360
395
|
'schemaVersion',
|
|
361
396
|
'mode',
|
|
362
397
|
'delegateId',
|