pantheon-opencode 1.6.2-beta.12 → 1.6.2-beta.13
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 +9 -0
- package/bin/pantheon-init.mjs +16 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/install/npx-cache-sweep.mjs +103 -0
- package/scripts/install/strings.mjs +4 -0
- package/src/plugins/tui/dist/tui-v2.js +2 -2
- 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/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
10
10
|
<!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
|
|
11
11
|
move this section to a versioned entry and reset the template below. -->
|
|
12
12
|
|
|
13
|
+
## [v1.6.2-beta.13] - 2026-11-03
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **install** — `init` now sweeps stale `pantheon-opencode` copies out of the npm cache's `_npx/` after a successful install (only the package subtree; unrelated packages and the just-installed copy survive). Field evidence: a 1.6.1 npx copy beside the registered 1.6.2-beta.12 made a bare `npx pantheon-opencode doctor` report the registered plugin as outdated, and old copies accumulate forever because npm never prunes them. Removal failures are swallowed and retried by the next init.
|
|
18
|
+
- **routing** — `ROUTE_UNRESOLVED` refusals now carry the inner verdict in `detail` (`MODEL_NOT_IN_CATALOG`, `AMBIGUOUS_MODEL`, `MODEL_NOT_DECISION`): the class alone does not tell whether the configured decision model is absent from the host catalog or present but not decision-typed, and those have different fixes. Field-measured on 2.2.5: a host catalog without the Console Jev model (no OpenCode Console credential) reports `MODEL_NOT_IN_CATALOG`.
|
|
19
|
+
|
|
20
|
+
<!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
|
|
21
|
+
move this section to a versioned entry and reset the template below. -->
|
|
13
22
|
## [v1.6.2-beta.12] - 2026-11-03
|
|
14
23
|
|
|
15
24
|
### Added
|
package/bin/pantheon-init.mjs
CHANGED
|
@@ -1077,6 +1077,22 @@ async function main() {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
|
+
// Old-version residue: every `npx pantheon-opencode` invocation materializes
|
|
1081
|
+
// a full copy under the npm cache's _npx/ and nothing in npm removes old
|
|
1082
|
+
// ones. The registration points at THIS run's copy, so every other copy is
|
|
1083
|
+
// unreferenced residue — sweep it (only the pantheon-opencode subtree;
|
|
1084
|
+
// failures are swallowed and retried by the next init).
|
|
1085
|
+
try {
|
|
1086
|
+
const { sweepStalePantheonNpxCaches } = await import('../scripts/install/npx-cache-sweep.mjs')
|
|
1087
|
+
const sweep = await sweepStalePantheonNpxCaches({ keep: ROOT })
|
|
1088
|
+
if (sweep.removed.length > 0) {
|
|
1089
|
+
console.log('')
|
|
1090
|
+
console.log(` ${S.sweptNpxCaches(sweep.removed.length)}`)
|
|
1091
|
+
}
|
|
1092
|
+
} catch {
|
|
1093
|
+
// Diagnostics-only: a failed sweep never fails the install.
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1080
1096
|
console.log('')
|
|
1081
1097
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')
|
|
1082
1098
|
console.log(` ${S.installedTitle(version)}`)
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon",
|
|
3
3
|
"publisher": "ils15",
|
|
4
|
-
"version": "1.6.2-beta.
|
|
4
|
+
"version": "1.6.2-beta.13",
|
|
5
5
|
"displayName": "Pantheon",
|
|
6
6
|
"description": "Conductor-Delegate orchestration platform with 14 specialized agents, 20 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 = "1.6.2-beta.
|
|
7
|
+
version = "1.6.2-beta.13"
|
|
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
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npx-cache-sweep.mjs — stale pantheon-opencode copy detection and removal.
|
|
3
|
+
*
|
|
4
|
+
* `npx pantheon-opencode` materializes a full package copy under
|
|
5
|
+
* `<npm-cache>/_npx/<hash>/node_modules/pantheon-opencode` and reuses it per
|
|
6
|
+
* spec+version. Old copies accumulate across versions (field evidence: a
|
|
7
|
+
* 1.6.1 copy next to the registered 1.6.2-beta.12 made `npx
|
|
8
|
+
* pantheon-opencode doctor` report the registered plugin as outdated), and
|
|
9
|
+
* nothing in npm removes them. This module finds and removes those copies —
|
|
10
|
+
* ONLY the `pantheon-opencode` subtree, never a whole `_npx/<hash>` entry,
|
|
11
|
+
* which may hold unrelated packages.
|
|
12
|
+
*
|
|
13
|
+
* After a successful init the registration in the user's opencode config
|
|
14
|
+
* points at the freshly installed copy, so every other copy is unreferenced:
|
|
15
|
+
* removing it only costs a re-download if that exact spec is invoked again.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { execFile } from 'node:child_process'
|
|
19
|
+
import { existsSync, readdirSync, readFileSync, rmSync } from 'node:fs'
|
|
20
|
+
import { homedir } from 'node:os'
|
|
21
|
+
import { join, resolve } from 'node:path'
|
|
22
|
+
import { promisify } from 'node:util'
|
|
23
|
+
|
|
24
|
+
const execFileAsync = promisify(execFile)
|
|
25
|
+
|
|
26
|
+
const PACKAGE_DIR_NAME = 'pantheon-opencode'
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Resolve the npm cache root that holds `_npx/`. Injection first (tests),
|
|
30
|
+
* then `npm config get cache` (portable across Linux/macOS/Windows), then the
|
|
31
|
+
* POSIX default. A resolvable cache root is never guaranteed: callers must
|
|
32
|
+
* treat a missing `_npx` as "nothing to do".
|
|
33
|
+
* @param {{ npmCache?: string }} [options]
|
|
34
|
+
* @returns {Promise<string>}
|
|
35
|
+
*/
|
|
36
|
+
export async function resolveNpxCacheRoot({ npmCache } = {}) {
|
|
37
|
+
if (npmCache) return resolve(npmCache)
|
|
38
|
+
try {
|
|
39
|
+
const { stdout } = await execFileAsync('npm', ['config', 'get', 'cache'], { timeout: 15000 })
|
|
40
|
+
const value = String(stdout).trim()
|
|
41
|
+
if (value) return resolve(value)
|
|
42
|
+
} catch {
|
|
43
|
+
// npm missing or slow — the POSIX default covers the common case.
|
|
44
|
+
}
|
|
45
|
+
return join(homedir(), '.npm')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** True when the directory looks like an installed pantheon-opencode copy. */
|
|
49
|
+
function isPantheonCopy(dir) {
|
|
50
|
+
return existsSync(join(dir, 'package.json'))
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* List every installed pantheon-opencode copy under the npm cache's `_npx/`.
|
|
55
|
+
* @param {{ cacheRoot?: string }} [options]
|
|
56
|
+
* @returns {Promise<Array<{ dir: string, version: string | null }>>}
|
|
57
|
+
*/
|
|
58
|
+
export async function findPantheonNpxCacheCopies({ cacheRoot } = {}) {
|
|
59
|
+
const root = cacheRoot ?? (await resolveNpxCacheRoot())
|
|
60
|
+
const npxDir = join(root, '_npx')
|
|
61
|
+
if (!existsSync(npxDir)) return []
|
|
62
|
+
const copies = []
|
|
63
|
+
for (const entry of readdirSync(npxDir, { withFileTypes: true })) {
|
|
64
|
+
if (!entry.isDirectory()) continue
|
|
65
|
+
const dir = resolve(join(npxDir, entry.name, 'node_modules', PACKAGE_DIR_NAME))
|
|
66
|
+
if (!isPantheonCopy(dir)) continue
|
|
67
|
+
let version = null
|
|
68
|
+
try {
|
|
69
|
+
version = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8')).version ?? null
|
|
70
|
+
} catch {
|
|
71
|
+
// An unreadable package.json still marks a sweepable copy.
|
|
72
|
+
version = null
|
|
73
|
+
}
|
|
74
|
+
copies.push({ dir, version })
|
|
75
|
+
}
|
|
76
|
+
return copies
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Remove every installed pantheon-opencode copy under `_npx/` except `keep`.
|
|
81
|
+
* `keep: null` is the defensive no-op: without an explicit survivor, nothing
|
|
82
|
+
* is removed.
|
|
83
|
+
* @param {{ keep?: string | null, cacheRoot?: string }} options
|
|
84
|
+
* @returns {Promise<{ removed: string[] }>}
|
|
85
|
+
*/
|
|
86
|
+
export async function sweepStalePantheonNpxCaches({ keep = null, cacheRoot } = {}) {
|
|
87
|
+
const keepResolved = keep ? resolve(keep) : null
|
|
88
|
+
if (keepResolved === null) return { removed: [] }
|
|
89
|
+
const copies = await findPantheonNpxCacheCopies({ cacheRoot })
|
|
90
|
+
const removed = []
|
|
91
|
+
for (const copy of copies) {
|
|
92
|
+
if (copy.dir === keepResolved) continue
|
|
93
|
+
try {
|
|
94
|
+
rmSync(copy.dir, { recursive: true, force: true })
|
|
95
|
+
} catch {
|
|
96
|
+
// A copy that cannot be removed (locked by a running host) is left in
|
|
97
|
+
// place; the next init retries. Never rethrow into the install flow.
|
|
98
|
+
continue
|
|
99
|
+
}
|
|
100
|
+
if (!existsSync(copy.dir)) removed.push(copy.dir)
|
|
101
|
+
}
|
|
102
|
+
return { removed }
|
|
103
|
+
}
|
|
@@ -51,6 +51,8 @@ const TABLE = {
|
|
|
51
51
|
healthCheckExit: (seconds, status) =>
|
|
52
52
|
`Health check finished in ${seconds}s and reported problems (exit ${status}); the installation itself completed`,
|
|
53
53
|
installedTitle: (v) => `Pantheon OpenCode v${v} installed.`,
|
|
54
|
+
sweptNpxCaches: (n) =>
|
|
55
|
+
`Removed ${n} stale pantheon-opencode npx cache cop${n === 1 ? 'y' : 'ies'} (old-version residue).`,
|
|
54
56
|
nextSteps: 'Next steps:',
|
|
55
57
|
nextVerify: '1. Verify installation:\n npx pantheon-opencode doctor',
|
|
56
58
|
nextLaunch: '2. Launch OpenCode',
|
|
@@ -149,6 +151,8 @@ const TABLE = {
|
|
|
149
151
|
healthCheckExit: (seconds, status) =>
|
|
150
152
|
`Verificação de saúde concluída em ${seconds}s e reportou problemas (exit ${status}); a instalação em si foi concluída`,
|
|
151
153
|
installedTitle: (v) => `Pantheon OpenCode v${v} instalado.`,
|
|
154
|
+
sweptNpxCaches: (n) =>
|
|
155
|
+
`Removida${n === 1 ? '' : 's'} ${n} cópia${n === 1 ? '' : 's'} velha${n === 1 ? '' : 's'} de pantheon-opencode do cache npx.`,
|
|
152
156
|
nextSteps: 'Próximos passos:',
|
|
153
157
|
nextVerify: '1. Verifique a instalação:\n npx pantheon-opencode doctor',
|
|
154
158
|
nextLaunch: '2. Abra o OpenCode',
|
|
@@ -3197,7 +3197,7 @@ function Sidebar(props) {
|
|
|
3197
3197
|
setProp(_el$12, "width", "100%");
|
|
3198
3198
|
setProp(_el$12, "padding", 1);
|
|
3199
3199
|
setProp(_el$13, "attributes", 1);
|
|
3200
|
-
insert(_el$13, `Pantheon v1.6.2-beta.
|
|
3200
|
+
insert(_el$13, `Pantheon v1.6.2-beta.13`);
|
|
3201
3201
|
insert(_el$14, () => presetHeaderLine(model.preset().name ?? "", model.provider()));
|
|
3202
3202
|
insert(_el$12, createComponent(Show, {
|
|
3203
3203
|
get when() {
|
|
@@ -3918,7 +3918,7 @@ function HomeStatus(props) {
|
|
|
3918
3918
|
const muted = () => props.context.theme?.text?.muted ?? props.context.theme?.text?.base;
|
|
3919
3919
|
return (() => {
|
|
3920
3920
|
var _el$72 = createElement("text");
|
|
3921
|
-
insert(_el$72, () => `Pantheon v1.6.2-beta.
|
|
3921
|
+
insert(_el$72, () => `Pantheon v1.6.2-beta.13${preset().name ? ` ▸ ${preset().name}` : ""}`);
|
|
3922
3922
|
effect((_$p) => setProp(_el$72, "fg", muted(), _$p));
|
|
3923
3923
|
return _el$72;
|
|
3924
3924
|
})();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
|
-
"version": "1.6.2-beta.
|
|
3
|
+
"version": "1.6.2-beta.13",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pantheon-tui",
|
|
9
|
-
"version": "1.6.2-beta.
|
|
9
|
+
"version": "1.6.2-beta.13",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@opencode-ai/plugin": "1.18.33",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.6.2-beta.
|
|
4
|
+
"version": "1.6.2-beta.13",
|
|
5
5
|
"description": "Pantheon TUI plugin — V1 rich sidebar and usage gauges; native V2 status, session and delegation sidebar",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|