pantheon-opencode 2.0.0-beta.5 โ†’ 2.0.0-beta.6

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/CHANGELOG.md CHANGED
@@ -69,7 +69,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
69
69
  Canonical sections (docs/RELEASING.md): ### ๐Ÿ†• What's New (curated highlights, โ‰ค6 bullets โ‰ค140 chars) โ†’
70
70
  ### Added / Changed / Deprecated / Removed / Fixed / Security โ†’ ### โš ๏ธ Known Issues / ### โœ… Closed Issues.
71
71
  `node scripts/versioning.mjs apply --notes` pre-fills the generated sections from conventional commits.
72
+ Running apply will move this section to a versioned entry and reset the template below. -->
72
73
 
74
+ ## [v2.0.0-beta.6] - 2026-11-10
75
+
76
+ ### Added
77
+
78
+ - **tui** โ€” the Autonomy tab: goal loop reachable (persisted mission, cooldown, continuation cap via `options.goal_loop`), decision budgets in-window, and the decision gradient documented
79
+ - **tui** โ€” the Decision tab configures WHICH Jev: selection mode, explicit provider/model target, egress consent toggle, and per-provider key STATUS (values never enter the window)
80
+ - **tui** โ€” a TUI tab: personalize sidebar lines/blocks, Context detail rows, gauge style, footer lines โ€” durable storage, applied live
81
+ - **skills** โ€” prompt-refinery: diagnose-first loop, blocking questions for materially-different readings (Jev `choice` when active), response format, self-check
82
+ - **skills** โ€” skill-search ranks lexical relevance before the canonical boost ('webapp-testing' buried 'contract-testing')
83
+
84
+ ### Changed
85
+
86
+ - **install** โ€” a TTY `init` is banner โ†’ preview โ†’ ONE authorization; runtime config lives in `/pantheon-settings` or explicit flags
87
+
88
+ ### Fixed
89
+
90
+ - **tui** โ€” settings closes again: composer mode layers ate escape/q, and close-with-staged dialog was invisible on a route page
91
+ - **tui** โ€” navigate-back threw "cyclic structures" (live route object): routes sanitized to the plain store shape
92
+ - **tui** โ€” header showed vunknown: the version embed is authoritative now
93
+ - **tui** โ€” Decision budgets write live; goal-loop caps bounded (1..200, cooldown โ‰ฅ1s)
94
+ - **install** โ€” every boot toasted "Plugin failed: โ€ฆ/src/plugin-v2": the dead 1.7-era bridge path is pruned on registration
73
95
  ## [v2.0.0-beta.5] - 2026-11-09
74
96
 
75
97
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pantheon-opencode",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.6",
4
4
  "description": "Multi-agent orchestration for OpenCode \u2014 14 specialized agents, TDD, Themis review gates.",
5
5
  "type": "module",
6
6
  "workspaces": [
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pantheon",
3
3
  "publisher": "ils15",
4
- "version": "2.0.0-beta.5",
4
+ "version": "2.0.0-beta.6",
5
5
  "displayName": "Pantheon",
6
6
  "description": "Conductor-Delegate orchestration platform with 14 specialized agents, 23 skills, and OpenCode support.",
7
7
  "agents": "./src/agents",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
4
4
 
5
5
  [project]
6
6
  name = "pantheon"
7
- version = "2.0.0-beta.5"
7
+ version = "2.0.0-beta.6"
8
8
  description = "Multi-agent orchestration framework"
9
9
  requires-python = ">=3.11"
10
10
  # Python sources under src/mcp/ import fastmcp/pydantic at runtime, but those
@@ -746,6 +746,12 @@ function describePluginEntry(entry) {
746
746
  // install); the installer NEVER registers it. The file spelling is an ALIAS of
747
747
  // the directory identity below, never a registration of its own.
748
748
  const PANTHEON_PLUGIN_FILE = 'src/plugin.ts'
749
+ // The 1.7-era V2-bridge entry: shipped in beta.1 only, gone from every later
750
+ // package, and still sitting in configs upgraded from 1.7 (the identity
751
+ // survives ONLY so the stale ref is stripped on registration โ€” never
752
+ // re-registered; field evidence beta.5: every boot toasted
753
+ // "Plugin failed: .../src/plugin-v2").
754
+ const PANTHEON_PLUGIN_V2_BRIDGE = 'src/plugin-v2'
749
755
  const PANTHEON_LEGACY_HOOKS = 'src/plugins/pantheon-hooks.ts'
750
756
  // Canonical entry is the plugin DIRECTORY (host loader contract: entries
751
757
  // must be dirs with a real index.ts โ€” file paths warn "must be a directory",
@@ -755,10 +761,15 @@ const PANTHEON_PLUGIN = 'src/plugin'
755
761
  // Package export spelling; recognized as the same plugin for dedup/cleanup.
756
762
  const PANTHEON_EXPORT = 'pantheon-opencode/plugin'
757
763
  const PANTHEON_PACKAGE_REF = /^pantheon-opencode(?:@[^/]+)?(?:\/(plugin|plugin))?$/
758
- const PANTHEON_PLUGIN_IDENTITIES = new Set([PANTHEON_LEGACY_HOOKS, PANTHEON_PLUGIN])
764
+ const PANTHEON_PLUGIN_IDENTITIES = new Set([
765
+ PANTHEON_LEGACY_HOOKS,
766
+ PANTHEON_PLUGIN_V2_BRIDGE,
767
+ PANTHEON_PLUGIN,
768
+ ])
759
769
 
760
770
  const INSTALLED_PANTHEON_PLUGIN_PATHS = new Map([
761
771
  [PANTHEON_LEGACY_HOOKS, resolve(ROOT, PANTHEON_LEGACY_HOOKS)],
772
+ [PANTHEON_PLUGIN_V2_BRIDGE, resolve(ROOT, PANTHEON_PLUGIN_V2_BRIDGE)],
762
773
  [PANTHEON_PLUGIN, resolve(ROOT, PANTHEON_PLUGIN)],
763
774
  ])
764
775
 
@@ -816,6 +827,7 @@ function managedPluginIdentity(ref) {
816
827
  if (markerIndex !== -1) {
817
828
  const suffix = withSlashes.slice(markerIndex + installedMarker.length)
818
829
  if (suffix === PANTHEON_LEGACY_HOOKS) return PANTHEON_LEGACY_HOOKS
830
+ if (suffix === PANTHEON_PLUGIN_V2_BRIDGE) return PANTHEON_PLUGIN
819
831
  if (suffix === PANTHEON_PLUGIN) return PANTHEON_PLUGIN
820
832
  if (suffix === PANTHEON_PLUGIN_FILE) return PANTHEON_PLUGIN
821
833
  }
@@ -31,6 +31,13 @@ const SKILL_LINE =
31
31
  /^([A-Za-z0-9._-]+\/[A-Za-z0-9._-]+@[A-Za-z0-9._-]+)\s+([\d.,]+)\s*([KM]?)\s+installs$/
32
32
  const URL_LINE = /^โ””?\s*(https:\/\/skills\.sh\/\S+)$/
33
33
 
34
+ /** Distinct query tokens the name actually matches (0 = no lexical tie). */
35
+ export function nameMatchScore(name, tokens) {
36
+ const lower = String(name).toLowerCase()
37
+ const unique = [...new Set(tokens)]
38
+ return unique.reduce((score, token) => score + (lower.includes(token) ? 1 : 0), 0)
39
+ }
40
+
34
41
  /** '578.8K' / '1.2M' / '489' โ†’ absolute integer installs (K=1e3, M=1e6). */
35
42
  export function parseInstallCount(digits, suffix) {
36
43
  const base = Number(String(digits).replaceAll(',', ''))
@@ -139,10 +146,18 @@ export function searchAnthropicCatalog(query, { limit = DEFAULT_LIMIT, spawn = s
139
146
  .split('\n')
140
147
  .map((name) => name.trim())
141
148
  .filter((name) => name.length > 0)
142
- const matched = names.filter((name) => {
143
- const lower = name.toLowerCase()
144
- return tokens.some((token) => lower.includes(token))
145
- })
149
+ // Field finding (beta.5 battery): the canonical boost must not bury the
150
+ // literal match โ€” a single weak token hit ('webapp-testing' for a
151
+ // 'contract testing' query) ranked above a two-token third-party match.
152
+ // Within the tier, order by match quality; the merge sorts cross-tier.
153
+ const scored = names.map((name) => ({
154
+ name,
155
+ score: nameMatchScore(name, tokens),
156
+ }))
157
+ const matched = scored
158
+ .filter((entry) => entry.score > 0)
159
+ .sort((left, right) => right.score - left.score)
160
+ .map((entry) => entry.name)
146
161
  return {
147
162
  ok: true,
148
163
  entries: matched.slice(0, limit).map((name) => ({
@@ -224,6 +239,26 @@ export function searchSkillSources(
224
239
  if (result.ok) out.push(...result.entries.map((entry) => ({ ...entry, source })))
225
240
  else failures.push(`${source}: ${result.error}`)
226
241
  }
242
+ // Cross-tier order: lexical relevance first (the canonical boost must not
243
+ // bury the literal match โ€” field finding, beta.5 battery: 'webapp-testing'
244
+ // outranked 'contract-testing' for a 'contract testing' query), then the
245
+ // trust cascade, then install count.
246
+ const tokens = String(query)
247
+ .toLowerCase()
248
+ .split(/[^a-z0-9]+/)
249
+ .filter((token) => token.length > 2)
250
+ const tierWeight = (source) => SKILL_SEARCH_SOURCES.indexOf(source)
251
+ const installsWeight = (entry) =>
252
+ typeof entry.installs === 'number' ? -entry.installs : Number.MAX_SAFE_INTEGER
253
+ const skillName = (entry) => String(entry.skill).split('@').at(-1) ?? ''
254
+ out.sort((left, right) => {
255
+ const lScore = nameMatchScore(skillName(left), tokens)
256
+ const rScore = nameMatchScore(skillName(right), tokens)
257
+ if (lScore !== rScore) return rScore - lScore
258
+ const tier = tierWeight(left.source) - tierWeight(right.source)
259
+ if (tier !== 0) return tier
260
+ return installsWeight(left) - installsWeight(right)
261
+ })
227
262
  return { ok: failures.length < sources.length, entries: out.slice(0, limit), failures }
228
263
  }
229
264
 
package/skills-lock.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "src/skills/memory-bank/references/storage-model.md": "728a9e5f2055ce0f74c759405072a6fe57f65587bdb7b9e5e7fa90b60528b085",
23
23
  "src/skills/memory-bank/references/structure-and-frequency.md": "09caedf905870c688401a2e58b2776a9c6187fe724c576019c58c3b80fe1b98f",
24
24
  "src/skills/memory-bank/SKILL.md": "047b3049c27e908b1d79afb14f79336e32f775385ba23956771166d445944f2f",
25
- "src/skills/prompt-refinery/SKILL.md": "a4935058aba4845ce93049113fc7f524eff31bbe3b1dbf46bbea208c6b2d5612",
25
+ "src/skills/prompt-refinery/SKILL.md": "b8c5860cd70308144bd7e6bf65e4ddb47c7f29818316fe3ddc6f3886644a7b0a",
26
26
  "src/skills/reflect/SKILL.md": "297c374f1fbc8e15d3848f51e811e0614d4a008c7d0e1daf88bbb240d605b8a8",
27
27
  "src/skills/security-hardening/SKILL.md": "6d637e122421f7bc3b751f04854ad343a5a5d35249458bc8939233138fd3f20d",
28
28
  "src/skills/session-goal/references/goal-format.md": "071f6f8f12cfbc26d4703cd5f34f839f91e586a3b969bf5f81a74b961c254a83",
@@ -0,0 +1,55 @@
1
+ /**
2
+ * goal-loop-config.ts โ€” runtime configuration for the full-auto Goal Loop.
3
+ *
4
+ * The loop's mechanics were shipped in Wave 3 (goal-store, continuation
5
+ * ladder) but hard-disabled by a constant โ€” no user could ever reach them.
6
+ * This module makes it CONFIGURABLE the same way `context_pruner` is: read
7
+ * `options.goal_loop` from the V2 config copy; malformed input yields the
8
+ * defaults (config parsing must never take the hook down).
9
+ *
10
+ * Defaults stay fail-safe: the loop is OFF unless explicitly enabled, and
11
+ * the continuation cap stays bounded (an unbounded auto-continue on a wrong
12
+ * mission would burn budget forever).
13
+ */
14
+ export interface GoalLoopConfig {
15
+ enabled: boolean
16
+ cooldownMs: number
17
+ maxContinuations: number
18
+ }
19
+
20
+ export const DEFAULT_GOAL_LOOP_CONFIG: GoalLoopConfig = {
21
+ enabled: false,
22
+ cooldownMs: 5000,
23
+ maxContinuations: 25,
24
+ }
25
+
26
+ const MIN_COOLDOWN_MS = 1000
27
+ const MIN_CONTINUATIONS = 1
28
+ const MAX_CONTINUATIONS = 200
29
+
30
+ export function resolveGoalLoopConfig(options: unknown): GoalLoopConfig {
31
+ try {
32
+ const raw = (options as { goal_loop?: unknown } | null | undefined)?.goal_loop
33
+ if (raw === null || raw === undefined || typeof raw !== 'object' || Array.isArray(raw)) {
34
+ return { ...DEFAULT_GOAL_LOOP_CONFIG }
35
+ }
36
+ const obj = raw as Record<string, unknown>
37
+ const num = (value: unknown, fallback: number, min: number, max?: number): number => {
38
+ if (typeof value !== 'number' || !Number.isFinite(value)) return fallback
39
+ const floored = Math.max(min, Math.floor(value))
40
+ return max !== undefined ? Math.min(max, floored) : floored
41
+ }
42
+ return {
43
+ enabled: typeof obj.enabled === 'boolean' ? obj.enabled : false,
44
+ cooldownMs: num(obj.cooldownMs, DEFAULT_GOAL_LOOP_CONFIG.cooldownMs, MIN_COOLDOWN_MS),
45
+ maxContinuations: num(
46
+ obj.maxContinuations,
47
+ DEFAULT_GOAL_LOOP_CONFIG.maxContinuations,
48
+ MIN_CONTINUATIONS,
49
+ MAX_CONTINUATIONS,
50
+ ),
51
+ }
52
+ } catch {
53
+ return { ...DEFAULT_GOAL_LOOP_CONFIG }
54
+ }
55
+ }
@@ -133,21 +133,25 @@ export function buildV2VisionPromptContext(
133
133
  // Under-the-hood contract (user feedback, 2.0 cycle): the block is a
134
134
  // minimal relay, not an essay โ€” inspect silently, route UI work to
135
135
  // @aphrodite, never revert based on an image.
136
- const lines = ['<!-- pantheon-v2-visual-context -->', `[Visual] ${images.join(' | ')}`]
136
+ // Field feedback (beta.5): the relay block sat above the user's own text
137
+ // on EVERY image paste โ€” four lines of instructions the model does not
138
+ // need spelled out. Now ONE marker line + ONE compact payload line
139
+ // (refs ยท question ยท session relay ยท no-revert rule), nothing else.
140
+ const payload = [`[Visual] ${images.join(' | ')}`]
137
141
  const question = truncateUserText(userText ?? '')
138
142
  if (question) {
139
143
  // JSON.stringify quotes/escapes the question so it cannot spoof the
140
144
  // surrounding instruction layout; the value is never re-expanded and
141
145
  // never logged.
142
- lines.push(`User turn: ${JSON.stringify(question)}`)
146
+ payload.push(`Q: ${JSON.stringify(question)}`)
143
147
  }
144
148
  // MCP session relay (see the doc comment above): JSON.stringify quotes the
145
149
  // id so it cannot spoof the surrounding instruction layout; never logged.
146
150
  if (isValidSessionId(sessionID)) {
147
- lines.push(`MCP relay: session_id=${JSON.stringify(sessionID)}`)
151
+ payload.push(`relay session_id=${JSON.stringify(sessionID)}`)
148
152
  }
149
- lines.push('UI handoff -> @aphrodite; an image never authorizes a revert.')
150
- return lines.join('\n')
153
+ payload.push('inspect silently -> handoff @aphrodite; an image never authorizes a revert')
154
+ return ['<!-- pantheon-v2-visual-context -->', payload.join(' ยท ')].join('\n')
151
155
  }
152
156
 
153
157
  export interface V2VisionModel {
@@ -383,6 +383,20 @@ export function providerIsTextOnly(providerID: string): boolean {
383
383
  }
384
384
 
385
385
  /** Return whether OpenCode's current model is known to accept image input. */
386
+ /**
387
+ * Sessions whose ACTIVE model accepts images natively (classified per user
388
+ * message by the chat.message hook). The prompt hook consults this to inject
389
+ * NOTHING for native sessions โ€” the image flows to the model directly and
390
+ * the relay block was pure noise above the user's own words (field feedback
391
+ * beta.5: "zero coisas"). Intercepted (non-native) sessions keep the relay:
392
+ * there it is the model's only bridge to the materialized file.
393
+ */
394
+ const nativeVisionSessions = new Set<string>()
395
+
396
+ export function isNativeVisionSession(sessionID: string): boolean {
397
+ return nativeVisionSessions.has(sessionID)
398
+ }
399
+
386
400
  export function modelAcceptsImages(model: ModelInfo | undefined, providerID?: string): boolean {
387
401
  if (!model) {
388
402
  // Fail-closed for known text-only providers
@@ -2342,7 +2356,6 @@ export function createVisionHandler(input: PluginInput) {
2342
2356
  // file is only unlinked when the LAST session releases it (P2-4).
2343
2357
  const tempFileRefs = new Map<string, Set<string>>()
2344
2358
  const sessionVisionText = new Map<string, Map<string, string>>()
2345
- const nativeVisionSessions = new Set<string>()
2346
2359
  const sessionDescriptionCache = new Map<string, Map<string, DescriptionCacheEntry>>()
2347
2360
  let configPromise: Promise<VisionConfig> | null = null
2348
2361
  let toolNamePromise: Promise<string | null> | null = null
package/src/plugin.ts CHANGED
@@ -138,7 +138,8 @@ import {
138
138
  v2ResourceTarget,
139
139
  } from './pantheon/delegation-policy.ts'
140
140
  import { createV2ExecuteAfter, resolveV2SandboxConfig } from './pantheon/execute-after.ts'
141
- import { GOAL_LOOP_DEFAULTS, GoalStore } from './pantheon/goal-store.ts'
141
+ import { resolveGoalLoopConfig } from './pantheon/goal-loop-config.ts'
142
+ import { GoalStore } from './pantheon/goal-store.ts'
142
143
  import { createGuardPathResolver } from './pantheon/guard-path.ts'
143
144
  import { runSecretScanInProcess } from './pantheon/hook-engine.ts'
144
145
  import { createJTelemetryMirror } from './pantheon/j-telemetry-file.ts'
@@ -181,7 +182,11 @@ import {
181
182
  } from './pantheon/todo-enforcer.ts'
182
183
  import { createV2ToolDefinitions, type V2ToolResult } from './pantheon/tools.ts'
183
184
  import { UNSUPPORTED_FEATURE_SEED } from './pantheon/unsupported.mjs'
184
- import { sanitizeVisionHistory } from './pantheon/vision.ts'
185
+ import {
186
+ isNativeVisionSession,
187
+ modelAcceptsImages,
188
+ sanitizeVisionHistory,
189
+ } from './pantheon/vision.ts'
185
190
  import type { HookPayload, HookResult } from './plugins/hook-runner.ts'
186
191
 
187
192
  // โ”€โ”€โ”€ Unsupported Features Registry โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
@@ -1460,8 +1465,31 @@ async function registerV2SessionHooks(context: PluginContext): Promise<boolean>
1460
1465
  typeof admission?.sessionID === 'string' && admission.sessionID.trim() !== ''
1461
1466
  ? admission.sessionID
1462
1467
  : undefined
1463
- const visualContext = buildV2VisionPromptContext(prompt.files, prompt.text, sessionID)
1464
- if (visualContext) prompt.text = `${prompt.text}\n\n${visualContext}`
1468
+ // Native-vision sessions get ZERO injected text (field feedback
1469
+ // beta.5: "zero coisas" โ€” the image flows to the model directly and
1470
+ // the relay block sat above the user's own words). The relay stays
1471
+ // ONLY for intercepted (non-native) sessions, where it is the
1472
+ // model's only bridge to the materialized file. Classification:
1473
+ // the chat.message hook's per-session set, plus a direct session
1474
+ // lookup when the host exposes one (first prompt of a session).
1475
+ const nativeByLookup = await (async () => {
1476
+ if (sessionID === undefined) return false
1477
+ try {
1478
+ const lookup = sessionCtx.get?.call(sessionCtx, { sessionID })
1479
+ const session = lookup instanceof Promise ? await lookup : (lookup as unknown)
1480
+ const model = (session as { model?: unknown } | undefined)?.model as
1481
+ | { providerID?: string; modelID?: string }
1482
+ | undefined
1483
+ if (!model || typeof model.modelID !== 'string') return false
1484
+ return modelAcceptsImages(model as never, model.providerID)
1485
+ } catch {
1486
+ return false
1487
+ }
1488
+ })()
1489
+ if (sessionID !== undefined && !isNativeVisionSession(sessionID) && !nativeByLookup) {
1490
+ const visualContext = buildV2VisionPromptContext(prompt.files, prompt.text, sessionID)
1491
+ if (visualContext) prompt.text = `${prompt.text}\n\n${visualContext}`
1492
+ }
1465
1493
  }
1466
1494
 
1467
1495
  // Local deterministic recommendations are advisory only. This path
@@ -2822,6 +2850,9 @@ export const plugin = define({
2822
2850
  // Observation must never reach the compaction request.
2823
2851
  }
2824
2852
  const prunerConfig = resolveContextPrunerConfig(context.options)
2853
+ // The Goal Loop caps ride the same read: cooldown/continuations
2854
+ // are enforced by the loop mechanics when enabled (goal-store).
2855
+ const goalLoopConfig = resolveGoalLoopConfig(context.options)
2825
2856
  loadRuntimeOverrides()
2826
2857
  if (gateDisabled('gate-context-pruner')) {
2827
2858
  logPruneFailureOnce(
@@ -2848,9 +2879,10 @@ export const plugin = define({
2848
2879
  const blocks = await buildCompactionContext({
2849
2880
  ...(sessionID === undefined ? {} : { sessionID }),
2850
2881
  goals: {
2851
- // Same gate V1 uses: the goal loop is disabled in this build,
2852
- // so `<mission_context>` is omitted on both surfaces.
2853
- enabled: GOAL_LOOP_DEFAULTS.enabled,
2882
+ // Enabled via `options.goal_loop.enabled` (beta.6): the Wave 3
2883
+ // mechanics were hard-disabled by a constant since shipping;
2884
+ // the settings window's Autonomy tab now writes this option.
2885
+ enabled: goalLoopConfig.enabled,
2854
2886
  list: (id: string) => goalStore.list(id),
2855
2887
  },
2856
2888
  ...(idleEnforcer === undefined