pantheon-opencode 2.0.0-beta.5 → 2.0.0-rc.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.
Files changed (63) hide show
  1. package/AGENTS.global.md +6 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +67 -0
  4. package/README.md +169 -510
  5. package/README.pt-BR.md +177 -149
  6. package/bin/pantheon-init.mjs +1 -1
  7. package/commands/pantheon-deepwork.md +6 -1
  8. package/commands/pantheon.md +10 -5
  9. package/package.json +1 -1
  10. package/plugin.json +2 -2
  11. package/prompts/orchestrate-with-zeus.prompt.md +82 -290
  12. package/prompts/subtask.prompt.md +1 -1
  13. package/pyproject.toml +1 -1
  14. package/scripts/doctor.mjs +27 -11
  15. package/scripts/hooks/format-multi-language.sh +30 -48
  16. package/scripts/install/opencode.mjs +13 -1
  17. package/scripts/jev-live-probe.mjs +1 -1
  18. package/scripts/release-gates.mjs +19 -5
  19. package/scripts/skill-search.mjs +66 -7
  20. package/scripts/test-opencode-sandbox.sh +44 -15
  21. package/scripts/update.mjs +9 -2
  22. package/skills-lock.json +5 -3
  23. package/src/agents/aphrodite.md +2 -0
  24. package/src/agents/apollo.md +8 -206
  25. package/src/agents/athena.md +25 -29
  26. package/src/agents/hermes.md +3 -1
  27. package/src/agents/mnemosyne.md +1 -1
  28. package/src/agents/nyx.md +1 -1
  29. package/src/agents/prometheus.md +0 -203
  30. package/src/agents/talos.md +2 -0
  31. package/src/agents/themis.md +8 -3
  32. package/src/agents/zeus.md +18 -12
  33. package/src/instructions/memory-protocol.instructions.md +4 -0
  34. package/src/instructions/test-economy.instructions.md +1 -0
  35. package/src/instructions/zeus-council-synthesis.instructions.md +13 -1
  36. package/src/pantheon/goal-loop-config.ts +55 -0
  37. package/src/pantheon/native-vision.ts +9 -5
  38. package/src/pantheon/pantheon-decision-catalog.ts +8 -0
  39. package/src/pantheon/skill-search-tool.ts +193 -0
  40. package/src/pantheon/tools.ts +2 -0
  41. package/src/pantheon/vision.ts +14 -1
  42. package/src/plugin.ts +39 -7
  43. package/src/plugins/tui/dist/tui.d.ts +12 -2
  44. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  45. package/src/plugins/tui/dist/tui.js +1399 -365
  46. package/src/plugins/tui/dist/tui.js.map +1 -1
  47. package/src/plugins/tui/package-lock.json +2 -2
  48. package/src/plugins/tui/package.json +1 -1
  49. package/src/plugins/tui/src/autonomy-state.ts +149 -0
  50. package/src/plugins/tui/src/context-gauge.ts +64 -5
  51. package/src/plugins/tui/src/decision-router-state.ts +175 -6
  52. package/src/plugins/tui/src/index.tsx +25 -3
  53. package/src/plugins/tui/src/pantheon-settings-state.ts +99 -0
  54. package/src/plugins/tui/src/pantheon-settings.tsx +647 -103
  55. package/src/plugins/tui/src/tui-prefs.ts +161 -9
  56. package/src/plugins/tui/src/update-status.ts +27 -8
  57. package/src/routing.yml +9 -0
  58. package/src/skills/README.md +35 -25
  59. package/src/skills/fast-path-execution/SKILL.md +54 -0
  60. package/src/skills/prompt-refinery/SKILL.md +53 -37
  61. package/src/skills/tdd-with-agents/SKILL.md +22 -10
  62. package/src/skills/test-slicing/SKILL.md +56 -0
  63. package/src/skills/verification-planning/SKILL.md +4 -3
@@ -11,55 +11,37 @@ REPO_ROOT="$(cd -- "$SCRIPT_DIR/../.." && pwd)"
11
11
  # Extracts file_path from Edit/Write or file paths from Bash commands.
12
12
  if [ -p /dev/stdin ]; then
13
13
  STDIN_JSON=$(cat)
14
- TOOL_NAME=$(echo "$STDIN_JSON" | python3 -c "
15
- import sys, json
16
- d = json.load(sys.stdin)
17
- print(d.get('tool_name', ''))
18
- " 2>/dev/null || echo "")
19
- # Normalize to lowercase — opencode sends lowercase (edit/write/bash),
20
- # Claude Code protocol may send capitalized (Edit/Write/Bash).
21
- TOOL_NAME_LOWER=$(echo "$TOOL_NAME" | tr '[:upper:]' '[:lower:]')
22
-
23
- case "$TOOL_NAME_LOWER" in
24
- edit|write)
25
- JSON_PATH=$(echo "$STDIN_JSON" | python3 -c "
26
- import sys, json
27
- d = json.load(sys.stdin)
28
- print(d.get('tool_input', {}).get('file_path', ''))
29
- " 2>/dev/null || echo "")
30
- if [ -n "$JSON_PATH" ]; then
31
- FILE_PATH="$JSON_PATH"
32
- fi
33
- ;;
34
- bash)
35
- COMMAND=$(echo "$STDIN_JSON" | python3 -c "
36
- import sys, json
37
- d = json.load(sys.stdin)
38
- print(d.get('tool_input', {}).get('command', ''))
39
- " 2>/dev/null || echo "")
40
- if [ -n "$COMMAND" ]; then
41
- # Extract first file-like path from bash command (supports relative and quoted paths)
42
- CANDIDATE=$(python3 -c "
43
- import re, shlex, sys
44
- command = sys.argv[1]
14
+ EXTRACTED_PATH=$(python3 -c "
15
+ import sys, json, re, shlex
45
16
  try:
46
- tokens = shlex.split(command)
47
- except ValueError:
48
- tokens = command.split()
49
- path_re = re.compile(r'^([^\\n]+\\.[A-Za-z0-9]+)$')
50
- for token in tokens:
51
- if token.startswith('-'):
52
- continue
53
- if path_re.match(token):
54
- print(token)
55
- break
56
- " "$COMMAND" 2>/dev/null || echo "")
57
- if [ -n "$CANDIDATE" ]; then
58
- FILE_PATH="$CANDIDATE"
59
- fi
60
- fi
61
- ;;
62
- esac
17
+ d = json.load(sys.stdin)
18
+ t = str(d.get('tool_name', '')).lower()
19
+ inp = d.get('tool_input', {})
20
+ if not isinstance(inp, dict):
21
+ inp = {}
22
+ fp = ''
23
+ if t in ('edit', 'write', 'hashline_edit'):
24
+ fp = inp.get('file_path', '') or inp.get('filePath', '') or inp.get('path', '')
25
+ elif t == 'bash':
26
+ cmd = inp.get('command', '')
27
+ if cmd:
28
+ try:
29
+ tokens = shlex.split(cmd)
30
+ except ValueError:
31
+ tokens = cmd.split()
32
+ path_re = re.compile(r'^([^\\n]+\\.[A-Za-z0-9]+)$')
33
+ for tok in tokens:
34
+ if not tok.startswith('-') and path_re.match(tok):
35
+ fp = tok
36
+ break
37
+ if fp:
38
+ print(fp)
39
+ except Exception:
40
+ pass
41
+ " <<< "$STDIN_JSON" 2>/dev/null || echo "")
42
+ if [ -n "$EXTRACTED_PATH" ]; then
43
+ FILE_PATH="$EXTRACTED_PATH"
44
+ fi
63
45
  fi
64
46
 
65
47
  FILE_PATH="${FILE_PATH:-${1:-}}"
@@ -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
  }
@@ -168,7 +168,7 @@ function main(args = process.argv.slice(2)) {
168
168
  rows.push({ state: scenario.state, expect: scenario.expect, got: `ERROR: ${r.raw}` })
169
169
  continue
170
170
  }
171
- const cost = r.data?.cost ?? 0
171
+ const cost = r.data?.data?.cost ?? r.data?.cost ?? 0
172
172
  totalCost += Number(cost) || 0
173
173
  rows.push({ state: scenario.state, expect: scenario.expect, got: answerChoice(r.data), cost })
174
174
  }
@@ -301,8 +301,22 @@ function hostGate(options) {
301
301
  const tarball = singleTarball(options)
302
302
  const matrix = matrixFromEnv()
303
303
  validateMatrix(matrix)
304
+ // PANTHEON_RELEASE_HOST_ONLY lets the workflow run the matrix CONCURRENTLY
305
+ // (one invocation per host — the sandbox roots and ports are already
306
+ // per-index disjoint). The full matrix is validated first; the filter only
307
+ // chooses which rows THIS invocation executes.
308
+ const only = process.env.PANTHEON_RELEASE_HOST_ONLY ?? ''
309
+ const selected = only ? matrix.filter((row) => row.host === only) : matrix
310
+ if (only && selected.length === 0) {
311
+ throw new Error(`PANTHEON_RELEASE_HOST_ONLY="${only}" matches no matrix row`)
312
+ }
304
313
  const checks = []
305
- matrix.forEach((row, index) => {
314
+ selected.forEach((row) => {
315
+ // Port derives from the ORIGINAL matrix index — the concurrent
316
+ // PANTHEON_RELEASE_HOST_ONLY invocations each re-run this gate, and a
317
+ // filtered forEach index would collide both sandboxes on 49380 (field
318
+ // evidence: MCP-handshake timeout on the split-host CI run).
319
+ const matrixIndex = matrix.indexOf(row)
306
320
  const root = join(runnerTemp(), `pantheon-release-host-${safeName(row.host)}`)
307
321
  rmSync(root, { recursive: true, force: true })
308
322
  checks.push(
@@ -311,12 +325,12 @@ function hostGate(options) {
311
325
  'bash',
312
326
  ['scripts/test-opencode-sandbox.sh', '--prepare', '--run', 'v2'],
313
327
  {
314
- env: sandboxEnv(root, row.host, tarball, 49380 + index),
328
+ env: sandboxEnv(root, row.host, tarball, 49380 + matrixIndex),
315
329
  },
316
330
  ),
317
331
  )
318
332
  })
319
- const measuredFamilies = [...new Set(matrix.map((row) => row.line))]
333
+ const measuredFamilies = [...new Set(selected.map((row) => row.line))]
320
334
  const unmeasuredFamilies = SUPPORTED_FAMILIES.filter(
321
335
  (family) => !measuredFamilies.includes(family),
322
336
  )
@@ -513,7 +527,7 @@ function metadataGate(options) {
513
527
  throw new Error(`--version ${options.version} does not match package.json`)
514
528
  }
515
529
  const stable = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
516
- const beta = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)-beta\.[1-9]\d*$/
530
+ const beta = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)-(?:beta|rc)\.[1-9]\d*$/
517
531
  if (!['stable', 'beta'].includes(options.channel)) {
518
532
  throw new Error(`unknown channel ${options.channel}`)
519
533
  }
@@ -521,7 +535,7 @@ function metadataGate(options) {
521
535
  throw new Error(`stable channel requires X.Y.Z, found ${options.version}`)
522
536
  }
523
537
  if (options.channel === 'beta' && !beta.test(options.version)) {
524
- throw new Error(`beta channel requires X.Y.Z-beta.N, found ${options.version}`)
538
+ throw new Error(`beta channel requires X.Y.Z-beta.N or X.Y.Z-rc.N, found ${options.version}`)
525
539
  }
526
540
  const checks = [
527
541
  run('version-manifests', 'node', ['scripts/version-check.mjs']),
@@ -23,7 +23,7 @@
23
23
  import { spawnSync } from 'node:child_process'
24
24
  import { pathToFileURL } from 'node:url'
25
25
 
26
- const FIND_TIMEOUT_MS = 60_000
26
+ const FIND_TIMEOUT_MS = 15_000
27
27
  const DEFAULT_LIMIT = 5
28
28
  /** SGR escape sequences are matched via the ESC codepoint (lint-clean, same semantics). */
29
29
  const ANSI_SGR = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, 'g')
@@ -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(',', ''))
@@ -112,7 +119,7 @@ export function searchSkills(query, { limit = DEFAULT_LIMIT, owner, spawn = spaw
112
119
  return { ok: true, entries, raw, emptyIsAmbiguous: false }
113
120
  }
114
121
 
115
- const GITHUB_TIMEOUT_MS = 30_000
122
+ const GITHUB_TIMEOUT_MS = 10_000
116
123
  const ANTHROPIC_SKILLS_REPO = 'anthropics/skills'
117
124
 
118
125
  /**
@@ -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) => ({
@@ -205,10 +220,26 @@ export function searchGithubSkills(query, { limit = DEFAULT_LIMIT, spawn = spawn
205
220
  */
206
221
  export const SKILL_SEARCH_SOURCES = Object.freeze(['anthropic', 'skills-sh', 'github'])
207
222
 
223
+ const SEARCH_CACHE = new Map()
224
+ const CACHE_TTL_MS = 24 * 60 * 60 * 1000 // 24 hours
225
+
208
226
  export function searchSkillSources(
209
227
  query,
210
228
  { limit = DEFAULT_LIMIT, owner, sources = SKILL_SEARCH_SOURCES, spawn = spawnSync } = {},
211
229
  ) {
230
+ const cacheKey = JSON.stringify({
231
+ query: String(query).toLowerCase().trim(),
232
+ limit,
233
+ owner,
234
+ sources,
235
+ })
236
+ if (spawn === spawnSync && SEARCH_CACHE.has(cacheKey)) {
237
+ const cached = SEARCH_CACHE.get(cacheKey)
238
+ if (Date.now() - cached.timestamp < CACHE_TTL_MS) {
239
+ return cached.result
240
+ }
241
+ }
242
+
212
243
  const perTier = Math.max(1, Math.ceil(limit / sources.length))
213
244
  const out = []
214
245
  const failures = []
@@ -224,7 +255,35 @@ export function searchSkillSources(
224
255
  if (result.ok) out.push(...result.entries.map((entry) => ({ ...entry, source })))
225
256
  else failures.push(`${source}: ${result.error}`)
226
257
  }
227
- return { ok: failures.length < sources.length, entries: out.slice(0, limit), failures }
258
+ // Cross-tier order: lexical relevance first (the canonical boost must not
259
+ // bury the literal match — field finding, beta.5 battery: 'webapp-testing'
260
+ // outranked 'contract-testing' for a 'contract testing' query), then the
261
+ // trust cascade, then install count.
262
+ const tokens = String(query)
263
+ .toLowerCase()
264
+ .split(/[^a-z0-9]+/)
265
+ .filter((token) => token.length > 2)
266
+ const tierWeight = (source) => SKILL_SEARCH_SOURCES.indexOf(source)
267
+ const installsWeight = (entry) =>
268
+ typeof entry.installs === 'number' ? -entry.installs : Number.MAX_SAFE_INTEGER
269
+ const skillName = (entry) => String(entry.skill).split('@').at(-1) ?? ''
270
+ out.sort((left, right) => {
271
+ const lScore = nameMatchScore(skillName(left), tokens)
272
+ const rScore = nameMatchScore(skillName(right), tokens)
273
+ if (lScore !== rScore) return rScore - lScore
274
+ const tier = tierWeight(left.source) - tierWeight(right.source)
275
+ if (tier !== 0) return tier
276
+ return installsWeight(left) - installsWeight(right)
277
+ })
278
+ const finalResult = {
279
+ ok: failures.length < sources.length,
280
+ entries: out.slice(0, limit),
281
+ failures,
282
+ }
283
+ if (spawn === spawnSync && finalResult.ok) {
284
+ SEARCH_CACHE.set(cacheKey, { timestamp: Date.now(), result: finalResult })
285
+ }
286
+ return finalResult
228
287
  }
229
288
 
230
289
  function main(args = process.argv.slice(2)) {
@@ -310,7 +310,7 @@ wait_for_v2_mcp_registrations() {
310
310
  print_v2_diagnostics
311
311
  return 1
312
312
  fi
313
- if SERVICE_LOG="$V2_SERVER_LOG" RUNTIME_DIR="$runtime_dir" MCP_PYTHON="$python_bin" \
313
+ if SERVICE_LOG="$V2_SERVER_LOG" RUNTIME_DIR="$runtime_dir" MCP_PYTHON="$python_bin" RUNTIME_LOG="$LOG_PATH" \
314
314
  python3 - <<'PY'
315
315
  import os
316
316
  import re
@@ -319,7 +319,7 @@ from pathlib import Path
319
319
  try:
320
320
  log = Path(os.environ["SERVICE_LOG"]).read_text(encoding="utf-8")
321
321
  except OSError:
322
- raise SystemExit(1)
322
+ log = ""
323
323
  expected = {
324
324
  "code_mode.py",
325
325
  "memory_mcp.py",
@@ -335,8 +335,8 @@ pattern = re.compile(
335
335
  re.DOTALL,
336
336
  )
337
337
  records = list(pattern.finditer(log))
338
- runtime_dir = os.environ["RUNTIME_DIR"]
339
- python_bin = os.environ["MCP_PYTHON"]
338
+ runtime_dir = os.environ.get("RUNTIME_DIR", "")
339
+ python_bin = os.environ.get("MCP_PYTHON", "")
340
340
  registered = set()
341
341
  for record in records:
342
342
  command = record.group("command")
@@ -345,11 +345,24 @@ for record in records:
345
345
  if command != python_bin or cwd != runtime_dir or script not in expected:
346
346
  raise SystemExit(1)
347
347
  registered.add(script)
348
- # OpenCode can initialize the same configured workspace more than once during
349
- # service startup and `mcp list`. Count the logical server set here; the later
350
- # `mcp list` assertion still requires exactly five connected MCP names.
351
- if registered != expected:
352
- raise SystemExit(1)
348
+ if registered == expected:
349
+ raise SystemExit(0)
350
+ runtime_log_path = os.environ.get("RUNTIME_LOG")
351
+ if runtime_log_path and Path(runtime_log_path).is_file():
352
+ try:
353
+ rlog = Path(runtime_log_path).read_text(encoding="utf-8")
354
+ expected_servers = {
355
+ "pantheon-code-mode",
356
+ "pantheon-memory",
357
+ "pantheon-persistence",
358
+ "pantheon-resources",
359
+ "pantheon-vision",
360
+ }
361
+ if all(f'message="mcp connected" server={s}' in rlog for s in expected_servers):
362
+ raise SystemExit(0)
363
+ except OSError:
364
+ pass
365
+ raise SystemExit(1)
353
366
  PY
354
367
  then
355
368
  return 0
@@ -717,7 +730,7 @@ wait_for_v2_mcp_registrations() {
717
730
  print_v2_diagnostics
718
731
  return 1
719
732
  fi
720
- if SERVICE_LOG="$V2_SERVER_LOG" RUNTIME_DIR="$runtime_dir" MCP_PYTHON="$python_bin" \
733
+ if SERVICE_LOG="$V2_SERVER_LOG" RUNTIME_DIR="$runtime_dir" MCP_PYTHON="$python_bin" RUNTIME_LOG="$LOG_PATH" \
721
734
  python3 - <<'PY'
722
735
  import os
723
736
  import re
@@ -726,7 +739,7 @@ from pathlib import Path
726
739
  try:
727
740
  log = Path(os.environ["SERVICE_LOG"]).read_text(encoding="utf-8")
728
741
  except OSError:
729
- raise SystemExit(1)
742
+ log = ""
730
743
  expected = {
731
744
  "code_mode.py",
732
745
  "memory_mcp.py",
@@ -742,8 +755,8 @@ pattern = re.compile(
742
755
  re.DOTALL,
743
756
  )
744
757
  records = list(pattern.finditer(log))
745
- runtime_dir = os.environ["RUNTIME_DIR"]
746
- python_bin = os.environ["MCP_PYTHON"]
758
+ runtime_dir = os.environ.get("RUNTIME_DIR", "")
759
+ python_bin = os.environ.get("MCP_PYTHON", "")
747
760
  registered = set()
748
761
  for record in records:
749
762
  command = record.group("command")
@@ -752,8 +765,24 @@ for record in records:
752
765
  if command != python_bin or cwd != runtime_dir or script not in expected:
753
766
  raise SystemExit(1)
754
767
  registered.add(script)
755
- if len(records) != len(expected) or registered != expected:
756
- raise SystemExit(1)
768
+ if registered == expected:
769
+ raise SystemExit(0)
770
+ runtime_log_path = os.environ.get("RUNTIME_LOG")
771
+ if runtime_log_path and Path(runtime_log_path).is_file():
772
+ try:
773
+ rlog = Path(runtime_log_path).read_text(encoding="utf-8")
774
+ expected_servers = {
775
+ "pantheon-code-mode",
776
+ "pantheon-memory",
777
+ "pantheon-persistence",
778
+ "pantheon-resources",
779
+ "pantheon-vision",
780
+ }
781
+ if all(f'message="mcp connected" server={s}' in rlog for s in expected_servers):
782
+ raise SystemExit(0)
783
+ except OSError:
784
+ pass
785
+ raise SystemExit(1)
757
786
  PY
758
787
  then
759
788
  return 0
@@ -171,9 +171,16 @@ export function runUpdate(
171
171
  }
172
172
 
173
173
  const globalEntry = path.join(refreshedPackageRoot, 'bin', 'pantheon-init.mjs')
174
+ const forwardedFlags = []
175
+ if (args.includes('--project')) forwardedFlags.push('--project')
176
+ if (args.includes('--no-mcp')) forwardedFlags.push('--no-mcp')
177
+ if (args.includes('--verbose')) forwardedFlags.push('--verbose')
178
+
174
179
  const init = refresh
175
- ? refresh(globalEntry)
176
- : spawnSync(execPath, [globalEntry, 'init', '--yes', '--headless'], { stdio: 'inherit' })
180
+ ? refresh(globalEntry, forwardedFlags)
181
+ : spawnSync(execPath, [globalEntry, 'init', '--yes', '--headless', ...forwardedFlags], {
182
+ stdio: 'inherit',
183
+ })
177
184
  if (init.status !== 0 || init.error) {
178
185
  console.error(
179
186
  '⚠️ Updated, but the config refresh did not complete — run `npx pantheon-opencode init` manually.',
package/skills-lock.json CHANGED
@@ -10,6 +10,7 @@
10
10
  "src/skills/code-review-checklist/SKILL.md": "cdca3dbd7393cd8b379297be8bf68d456e7217b0238eaeea13b35a96d553414f",
11
11
  "src/skills/codemap/SKILL.md": "d21b3fa66b931b29dcf1ec0f0fcf1ec28514642a9f33f96e4b2901a0be74c72d",
12
12
  "src/skills/context-compression/SKILL.md": "4d8368309ec72fefac69ad5cddd43650647d0bc684b6f8bf3cacc004edb56ef5",
13
+ "src/skills/fast-path-execution/SKILL.md": "040bb97ac5d930dcee47d5d0e2fc1ef637a4762998990475d876ec7f17977c69",
13
14
  "src/skills/git-workflow-and-versioning/SKILL.md": "685a94041f1b4ce2a430301f517b89102055696267c369a7e8fb191606659276",
14
15
  "src/skills/incremental-implementation/SKILL.md": "7065ddb45da3c6b6751de07f290e92e6cb072e949a2e3aaae13ee7762f0a70fc",
15
16
  "src/skills/instruction-forge/references/agents-md-doctrine.md": "23623cc40e830ba5f2f11b7b005e85b3f4d260428f1c31cb9840e7b9baa81360",
@@ -22,7 +23,7 @@
22
23
  "src/skills/memory-bank/references/storage-model.md": "728a9e5f2055ce0f74c759405072a6fe57f65587bdb7b9e5e7fa90b60528b085",
23
24
  "src/skills/memory-bank/references/structure-and-frequency.md": "09caedf905870c688401a2e58b2776a9c6187fe724c576019c58c3b80fe1b98f",
24
25
  "src/skills/memory-bank/SKILL.md": "047b3049c27e908b1d79afb14f79336e32f775385ba23956771166d445944f2f",
25
- "src/skills/prompt-refinery/SKILL.md": "a4935058aba4845ce93049113fc7f524eff31bbe3b1dbf46bbea208c6b2d5612",
26
+ "src/skills/prompt-refinery/SKILL.md": "1efbe6700dbcf357c1eab38662ff9572b163abb262915ce615694829682922c5",
26
27
  "src/skills/reflect/SKILL.md": "297c374f1fbc8e15d3848f51e811e0614d4a008c7d0e1daf88bbb240d605b8a8",
27
28
  "src/skills/security-hardening/SKILL.md": "6d637e122421f7bc3b751f04854ad343a5a5d35249458bc8939233138fd3f20d",
28
29
  "src/skills/session-goal/references/goal-format.md": "071f6f8f12cfbc26d4703cd5f34f839f91e586a3b969bf5f81a74b961c254a83",
@@ -32,8 +33,9 @@
32
33
  "src/skills/spec-driven-development/SKILL.md": "ccfbc0c32116a1d144f5c12a4187c053322ed31625a622a58c59739a57a86743",
33
34
  "src/skills/tdd-with-agents/references/advanced-testing-patterns.md": "4aac82748bb670a61d67732168f8a265d5e66895a9183029e3da03de8e024788",
34
35
  "src/skills/tdd-with-agents/references/testing-by-layer.md": "545291301661e57d846b2db2acca1edb1219a102dce4aad7e0c3cc1a250b570a",
35
- "src/skills/tdd-with-agents/SKILL.md": "10ad9b489df22544d5697ec69dfeaa2c83b565787979bea6e88781556caacd8c",
36
- "src/skills/verification-planning/SKILL.md": "14186446ef51e1ba2c87b337e8d5f86e566d805156ab21fba2a75f8c4a99df3f",
36
+ "src/skills/tdd-with-agents/SKILL.md": "825d5e5eadbe487db382918a2181a4a993d8f722c38bd7f104f89b00004d6223",
37
+ "src/skills/test-slicing/SKILL.md": "ff70cddc66261049250b82f7aeabbfd6bcd00f9abe34cc8d5f20aa35333b1590",
38
+ "src/skills/verification-planning/SKILL.md": "6a3c6cb5bd5076862d369885bf0b3ba086b625495fe7a42f3f5116d07b470f3e",
37
39
  "src/skills/visual-review-pipeline/references/findings-schema.md": "776511757c0d8387fab232fced8ac9ce031a03f62b6ca539e3c38b0d45035c8e",
38
40
  "src/skills/visual-review-pipeline/references/workflow-steps.md": "1f763f39d9218263bfb10f575d739d9eb62d89cd9f00d38c21cd729b078b44c8",
39
41
  "src/skills/visual-review-pipeline/SKILL.md": "7f66f0426868535db891bccd8e21c719b7dcbb16625ea75edbf436ccb1896ac1",
@@ -16,11 +16,13 @@ permission:
16
16
  "*": deny
17
17
  temperature: 0.3
18
18
  skills:
19
+ - fast-path-execution
19
20
  - incremental-implementation
20
21
  - loop-engineering
21
22
  - reflect
22
23
  - simplify
23
24
  - tdd-with-agents
25
+ - test-slicing
24
26
  - visual-review-pipeline
25
27
  - worktrees
26
28
  mcp_tools: