pantheon-opencode 1.2.1 → 1.3.0
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.md +10 -0
- package/README.md +53 -15
- package/bin/pantheon-init.mjs +14 -0
- package/opencode.json +17 -1
- package/package.json +13 -4
- package/scripts/changelog-extract.mjs +112 -0
- package/scripts/doctor.mjs +303 -13
- package/scripts/hooks/audit-imports.sh +43 -0
- package/scripts/hooks/format-multi-language.sh +96 -0
- package/scripts/hooks/log-session-start.sh +42 -0
- package/scripts/hooks/on-subagent-delegation-start.sh +201 -0
- package/scripts/hooks/on-subagent-delegation-stop.sh +419 -0
- package/scripts/hooks/run-type-check.sh +21 -0
- package/scripts/hooks/scan-secrets.sh +97 -0
- package/scripts/hooks/validate-post-conditions.sh +21 -0
- package/scripts/hooks/validate-talos-scope.sh +50 -0
- package/scripts/hooks/validate-tool-safety.sh +46 -0
- package/scripts/install/opencode.mjs +58 -29
- package/scripts/install/plugin.mjs +4 -2
- package/scripts/install-mcp.mjs +104 -56
- package/scripts/mcp_persistence_server.py +1 -0
- package/scripts/prune.mjs +359 -0
- package/scripts/version-check.mjs +146 -0
- package/scripts/versioning.mjs +13 -14
- package/src/agents/zeus.md +33 -5
- package/src/mcp/requirements-mcp.txt +8 -5
- package/src/mcp/requirements-vision.txt +3 -3
- package/src/plugins/hook-runner.ts +186 -0
- package/src/plugins/pantheon-hooks.ts +1503 -0
- package/src/plugins/tui/dist/tui.d.ts +8 -0
- package/src/plugins/tui/dist/tui.d.ts.map +1 -0
- package/src/plugins/tui/dist/tui.js +1198 -0
- package/src/plugins/tui/dist/tui.js.map +1 -0
- package/src/plugins/tui/dist/tui.tsx +1204 -0
- package/src/plugins/tui/package.json +2 -2
- package/src/plugins/tui/src/index.tsx +16 -1
- package/src/mcp/requirements-mcp-core.txt +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"description": "Pantheon TUI plugin
|
|
4
|
+
"version": "1.3.0",
|
|
5
|
+
"description": "Pantheon TUI plugin — sidebar (agents, sessions, commands, config, memory, active preset) + AI subscription usage gauges incl. OpenCode Go/Zen dollar limits (vendored, MIT)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
8
8
|
"./tui": "./dist/tui.tsx"
|
|
@@ -49,6 +49,7 @@ import { Buffer } from 'node:buffer'
|
|
|
49
49
|
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
|
50
50
|
import { homedir } from 'node:os'
|
|
51
51
|
import { dirname, join } from 'node:path'
|
|
52
|
+
import { fileURLToPath } from 'node:url'
|
|
52
53
|
import type { TuiPlugin, TuiPluginApi, TuiPluginModule } from '@opencode-ai/plugin/tui'
|
|
53
54
|
import { createMemo, createResource, createSignal, For, onCleanup, onMount, Show } from 'solid-js'
|
|
54
55
|
|
|
@@ -166,6 +167,20 @@ async function resolvePresetForTui(
|
|
|
166
167
|
* 4. null */
|
|
167
168
|
|
|
168
169
|
async function detectVersion(api: TuiPluginApi): Promise<string | null> {
|
|
170
|
+
// Try 0: package.json do PACOTE PANTHEON instalado. O TUI é carregado de
|
|
171
|
+
// <pacote>/src/plugins/tui/dist/tui.tsx (fix #32 garante esse path) →
|
|
172
|
+
// 4 níveis acima (dist → tui → plugins → src → raiz) está o package.json
|
|
173
|
+
// do pacote. Funciona em QUALQUER cwd (ex: sandbox sem package.json/git) e
|
|
174
|
+
// também em dev (source no repo). Se falhar, cai para os tries abaixo.
|
|
175
|
+
try {
|
|
176
|
+
const pkgUrl = new URL('../../../../package.json', import.meta.url)
|
|
177
|
+
const pkgContent = await readFile(fileURLToPath(pkgUrl), 'utf8')
|
|
178
|
+
const match = pkgContent.match(/"version":\s*"([^"]+)"/)
|
|
179
|
+
if (match?.[1]) return match[1]
|
|
180
|
+
} catch {
|
|
181
|
+
/* fall through */
|
|
182
|
+
}
|
|
183
|
+
|
|
169
184
|
// Try 1: package.json do projeto (via worktree path)
|
|
170
185
|
try {
|
|
171
186
|
const wt = ((api.state as any).path?.worktree ?? '') as string
|
|
@@ -192,7 +207,7 @@ async function detectVersion(api: TuiPluginApi): Promise<string | null> {
|
|
|
192
207
|
.trim()
|
|
193
208
|
.replace(/^v/, '')
|
|
194
209
|
.replace(/-\d+-g[0-9a-f]+$/, '')
|
|
195
|
-
if (tag
|
|
210
|
+
if (tag) return tag
|
|
196
211
|
}
|
|
197
212
|
} catch {
|
|
198
213
|
/* fall through */
|