pantheon-opencode 1.6.0-beta.12 β 1.6.0-beta.14
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 +40 -5
- package/README.md +30 -1
- package/README.pt-BR.md +3 -1
- package/bin/pantheon-init.mjs +41 -50
- package/package.json +2 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/check-plugin-v2-coverage.mjs +4 -1
- package/scripts/install/agents-md.mjs +2 -2
- package/scripts/install/cli-ui.mjs +32 -71
- package/scripts/install/component-selection.mjs +61 -0
- package/scripts/install/health-check.mjs +3 -3
- package/scripts/install/interactive.mjs +75 -394
- package/scripts/install/migrate.mjs +13 -19
- package/scripts/install/model-picker.mjs +155 -228
- package/scripts/install/opencode.mjs +66 -27
- package/scripts/install/prompt-result.mjs +2 -0
- package/scripts/install/shared.mjs +11 -9
- package/scripts/install/strings.mjs +6 -6
- package/scripts/install/venv.mjs +5 -5
- package/scripts/node-engine-policy.mjs +11 -0
- package/scripts/postinstall.mjs +25 -24
- package/scripts/sync-tui.mjs +5 -1
- package/src/agents/apollo.md +3 -3
- 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/src/routing.yml +45 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,18 +5,53 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
## [Unreleased
|
|
8
|
+
## [v1.6.0-beta.14] - Unreleased
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
move this section to a versioned entry and reset the template below. -->
|
|
10
|
+
_Pre-release candidate; not yet published._
|
|
12
11
|
|
|
13
12
|
## π What's New
|
|
14
13
|
|
|
14
|
+
- **Installer model profiles:** choose Inherit, OpenCode Go (hybrid), OpenAI, or
|
|
15
|
+
Anthropic. Inherit leaves the active preset unset; OpenCode Go combines the
|
|
16
|
+
premium lineup for Zeus, Athena, Themis, and Hephaestus with the Go lineup for
|
|
17
|
+
other agents. Existing `go-free`, `go-fast`, and `go-premium` preset IDs remain
|
|
18
|
+
available for compatibility.
|
|
19
|
+
- **Anthropic key guidance:** the profile identifies `ANTHROPIC_API_KEY` as the
|
|
20
|
+
required environment variable. The installer does not collect or inspect API
|
|
21
|
+
keys; configure the key in your environment.
|
|
22
|
+
- **Modernized installer progress and terminal safety:** Clack spinners are used
|
|
23
|
+
in interactive TTYs, with readable output in headless/non-TTY runs. Canceling
|
|
24
|
+
or selecting no components stops safely without writes; `--no-mcp` continues
|
|
25
|
+
to exclude runtime, and `--yes` does not override an explicit decline.
|
|
26
|
+
- **Proportional delegation guidance:** prompts now route bounded work directly
|
|
27
|
+
to the relevant specialist and call for planning, broad discovery, review, or
|
|
28
|
+
parallel work only when the request, uncertainty, dependencies, or risk
|
|
29
|
+
warrant it.
|
|
30
|
+
|
|
15
31
|
## π Fixed
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
- **Reduce duplicated CI work:** plugin V2 coverage now measures one focused
|
|
34
|
+
TypeScript contract test while retaining its required 80% line-coverage
|
|
35
|
+
threshold. The hook canary has one CI owner (`test:node`); its duplicate
|
|
36
|
+
standalone CI invocation was removed. This records the CI configuration
|
|
37
|
+
change, not a claim that the current CI run passed.
|
|
18
38
|
|
|
19
|
-
##
|
|
39
|
+
## [v1.6.0-beta.13] - 2026-10-17
|
|
40
|
+
|
|
41
|
+
## π What's New
|
|
42
|
+
|
|
43
|
+
- **Modernize interactive TTY setup** with `@clack/prompts` while keeping the
|
|
44
|
+
existing component, install-location, authorization, and worktree guidance
|
|
45
|
+
choices. Canceling the setup wizard leaves configuration unchanged; headless,
|
|
46
|
+
`--yes`, dry-run, and non-TTY behavior remain available.
|
|
47
|
+
|
|
48
|
+
## π Fixed
|
|
49
|
+
|
|
50
|
+
- **Let npm finish on an unsupported Node runtime:** postinstall now warns and
|
|
51
|
+
skips Node-dependent TUI/config sync, leaving the CLI to show its explicit
|
|
52
|
+
Node >=26.4.0 hard gate and user-managed upgrade instructions.
|
|
53
|
+
- **Synchronize Beta 13 package and release metadata** across manifests and
|
|
54
|
+
lockfiles without changing the Node >=26.4.0 engine floor.
|
|
20
55
|
|
|
21
56
|
## [v1.6.0-beta.12] - 2026-10-17
|
|
22
57
|
|
package/README.md
CHANGED
|
@@ -27,6 +27,10 @@ way to plan work, make progress, check results, and keep useful project context.
|
|
|
27
27
|
collaborators.
|
|
28
28
|
- **You stay in charge:** Pantheon supports your decisions; it does not replace
|
|
29
29
|
your judgment or your review of generated code.
|
|
30
|
+
- **Right-sized coordination:** bounded work goes to the correct specialist;
|
|
31
|
+
planning, discovery, parallel work, and review are added when scope and risk
|
|
32
|
+
call for them. `/pantheon-deepwork` remains the checkpointed workflow for
|
|
33
|
+
heavy multi-phase work.
|
|
30
34
|
|
|
31
35
|
## Start in 2 minutes
|
|
32
36
|
|
|
@@ -43,6 +47,18 @@ asserted here. The optional `pantheon_cost` SQLite backend has its own capabilit
|
|
|
43
47
|
threshold, `node:sqlite` on Node >= 22.5; that feature threshold does not lower
|
|
44
48
|
Pantheon's package or CLI support floor.
|
|
45
49
|
|
|
50
|
+
With npm's default configuration, an unsupported Node version may produce an
|
|
51
|
+
`EBADENGINE` warning during install. Pantheon's postinstall then skips Node-based
|
|
52
|
+
sync without changing OpenCode configuration, and the CLI itself exits with a
|
|
53
|
+
clear error before setup. If needed, switch using a user-managed version
|
|
54
|
+
managerβno system-wide install is required:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
nvm install 26.4.0 && nvm use 26.4.0
|
|
58
|
+
# or: fnm install 26.4.0 && fnm use 26.4.0
|
|
59
|
+
# or: volta install node@26.4.0
|
|
60
|
+
```
|
|
61
|
+
|
|
46
62
|
From the project where you want to use Pantheon:
|
|
47
63
|
|
|
48
64
|
```bash
|
|
@@ -50,10 +66,23 @@ npx pantheon-opencode init
|
|
|
50
66
|
opencode
|
|
51
67
|
```
|
|
52
68
|
|
|
53
|
-
|
|
69
|
+
In a TTY, the interactive setup uses Clack prompts to choose components and a
|
|
70
|
+
global or project location before reviewing the apply. Canceling writes nothing.
|
|
71
|
+
`--yes`, `--headless`, `--dry-run`, and non-TTY workflows retain their existing
|
|
72
|
+
behavior. The installer guides you through the available setup. For optional MCP servers,
|
|
54
73
|
project-local installation, or non-interactive setup, see the
|
|
55
74
|
[installation guide](docs/INSTALLATION.md).
|
|
56
75
|
|
|
76
|
+
In the interactive **V1 model setup**, the profile choices are **Inherit**,
|
|
77
|
+
**OpenCode Go**, **OpenAI**, and **Anthropic**. OpenCode Go saves the internal
|
|
78
|
+
`go-hybrid` profile (premium routes for Zeus, Athena, Themis, and Hephaestus;
|
|
79
|
+
the existing fast Go routes for the other agents). Anthropic uses
|
|
80
|
+
`anthropic/claude-sonnet-5-5`; configure `ANTHROPIC_API_KEY` in your environment
|
|
81
|
+
yourself. The installer does not read or validate API keys or contact provider
|
|
82
|
+
catalogs. Legacy `go-free`, `go-fast`, and `go-premium` presets remain available
|
|
83
|
+
for existing saved settings and explicit `--preset` use. V2 continues to ignore
|
|
84
|
+
static presets and uses explicit per-agent model overrides instead.
|
|
85
|
+
|
|
57
86
|
In an interactive TTY setup summary, Pantheon recommends the persistent
|
|
58
87
|
external worktree location
|
|
59
88
|
`<project-parent>/.pantheon-worktrees/<exact-repository-directory-basename>/<task>`
|
package/README.pt-BR.md
CHANGED
|
@@ -33,6 +33,8 @@ de planejar o trabalho, avanΓ§ar, conferir resultados e preservar o contexto
|
|
|
33
33
|
|
|
34
34
|
Requisitos: [OpenCode 1.18.4+](https://opencode.ai/docs/) e Node.js `>=26.4.0` para a CLI, o instalador e as ferramentas Node do Pantheon. Node 22, Node 24 e Node 26.0β26.3 nΓ£o sΓ£o compatΓveis com esta versΓ£o.
|
|
35
35
|
|
|
36
|
+
Com a configuraΓ§Γ£o padrΓ£o do npm, versΓ΅es incompatΓveis podem gerar um aviso `EBADENGINE`; o postinstall pula a sincronizaΓ§Γ£o Node/config, e a CLI bloqueia a configuraΓ§Γ£o antes de gravar arquivos. Para atualizar sem instalaΓ§Γ£o de sistema, use um gerenciador de Node do usuΓ‘rio: `nvm install 26.4.0 && nvm use 26.4.0`, `fnm install 26.4.0 && fnm use 26.4.0` ou `volta install node@26.4.0`.
|
|
37
|
+
|
|
36
38
|
Esse requisito do pacote nΓ£o significa que todo host OpenCode execute Node: o OpenCode V2.0.31 oficial oferece um caminho de runtime Bun e um build Node separado fixado em Node 26.4.0. NΓ£o hΓ‘ aqui um requisito mΓnimo para Bun. O backend SQLite opcional de `pantheon_cost` tem um limite de capacidade distinto (`node:sqlite` requer Node >=22.5), que nΓ£o reduz o requisito de suporte do pacote.
|
|
37
39
|
|
|
38
40
|
No projeto em que vocΓͺ quer usar o Pantheon:
|
|
@@ -77,7 +79,7 @@ verificaΓ§Γ΅es repetΓveis e passagens claras entre etapas do trabalho.
|
|
|
77
79
|
|
|
78
80
|
## Status
|
|
79
81
|
|
|
80
|
-
VersΓ£o operacional neste checkout: **v1.6.0-beta.
|
|
82
|
+
VersΓ£o operacional neste checkout: **v1.6.0-beta.14** (esta pΓ‘gina nΓ£o afirma publicaΓ§Γ£o). O Pantheon foi feito para OpenCode e depende da
|
|
81
83
|
disponibilidade e da configuraΓ§Γ£o do OpenCode e dos serviΓ§os opcionais que vocΓͺ
|
|
82
84
|
escolher. Veja as [releases](https://github.com/ils15/pantheon-opencode/releases)
|
|
83
85
|
e o [changelog](CHANGELOG.md) para acompanhar as mudanΓ§as publicadas.
|
package/bin/pantheon-init.mjs
CHANGED
|
@@ -20,15 +20,17 @@ import fs from 'node:fs'
|
|
|
20
20
|
import os from 'node:os'
|
|
21
21
|
import path from 'node:path'
|
|
22
22
|
import { fileURLToPath } from 'node:url'
|
|
23
|
+
import { resolveComponentSelection } from '../scripts/install/component-selection.mjs'
|
|
23
24
|
import { resolveInstallExitCode } from '../scripts/install/exit-codes.mjs'
|
|
24
25
|
import {
|
|
25
26
|
createPlanArtifact,
|
|
26
27
|
loadPlanArtifact,
|
|
27
28
|
savePlanArtifact,
|
|
28
29
|
} from '../scripts/install/plan-artifact.mjs'
|
|
30
|
+
import { PROMPT_CANCELED } from '../scripts/install/prompt-result.mjs'
|
|
29
31
|
import {
|
|
30
32
|
isSupportedNodeVersion,
|
|
31
|
-
|
|
33
|
+
unsupportedNodeVersionMessage,
|
|
32
34
|
} from '../scripts/node-engine-policy.mjs'
|
|
33
35
|
import { runUpdate } from '../scripts/update.mjs'
|
|
34
36
|
|
|
@@ -36,10 +38,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
36
38
|
const ROOT = path.resolve(__dirname, '..')
|
|
37
39
|
|
|
38
40
|
if (!isSupportedNodeVersion(process.versions.node)) {
|
|
39
|
-
console.error(
|
|
40
|
-
`β Pantheon requires Node.js >= ${MIN_SUPPORTED_NODE_VERSION} (current: ${process.versions.node})`,
|
|
41
|
-
)
|
|
42
|
-
console.error(' Install a newer Node via nvm: https://github.com/nvm-sh/nvm')
|
|
41
|
+
console.error(unsupportedNodeVersionMessage(process.versions.node))
|
|
43
42
|
process.exit(1)
|
|
44
43
|
}
|
|
45
44
|
|
|
@@ -111,14 +110,8 @@ async function authorizeReviewedPlan(plan) {
|
|
|
111
110
|
for (const operation of operations) {
|
|
112
111
|
console.log(` ${operation.action.padEnd(9)} ${operation.path}`)
|
|
113
112
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
try {
|
|
117
|
-
const answer = await prompt.question('Apply this reviewed plan? [y/N] ')
|
|
118
|
-
return ['y', 'yes'].includes(answer.trim().toLowerCase())
|
|
119
|
-
} finally {
|
|
120
|
-
prompt.close()
|
|
121
|
-
}
|
|
113
|
+
const { promptReview } = await import('../scripts/install/interactive.mjs')
|
|
114
|
+
return promptReview('Apply this reviewed plan?', { default: false })
|
|
122
115
|
}
|
|
123
116
|
|
|
124
117
|
async function main() {
|
|
@@ -328,7 +321,6 @@ async function main() {
|
|
|
328
321
|
}
|
|
329
322
|
const isProject = reviewedPlan ? reviewedPlan.options.isProject : args.includes('--project')
|
|
330
323
|
const isDryRun = reviewedPlan ? false : args.includes('--dry-run')
|
|
331
|
-
const skipMCP = args.includes('--no-mcp')
|
|
332
324
|
// --clean is an alias of --force (both wipe component dirs + recreate venv).
|
|
333
325
|
const forceReinstall = reviewedPlan
|
|
334
326
|
? reviewedPlan.options.clean
|
|
@@ -406,11 +398,22 @@ async function main() {
|
|
|
406
398
|
}
|
|
407
399
|
|
|
408
400
|
const presetIndex = args.indexOf('--preset')
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
|
|
401
|
+
const inlinePreset = args.find((arg) => arg.startsWith('--preset='))
|
|
402
|
+
const hasPresetOption = presetIndex >= 0 || inlinePreset !== undefined
|
|
403
|
+
const parsedPreset =
|
|
404
|
+
presetIndex >= 0
|
|
412
405
|
? (args[presetIndex + 1] ?? null)
|
|
413
|
-
: null
|
|
406
|
+
: (inlinePreset?.slice('--preset='.length) ?? null)
|
|
407
|
+
if (
|
|
408
|
+
hasPresetOption &&
|
|
409
|
+
(typeof parsedPreset !== 'string' ||
|
|
410
|
+
parsedPreset.trim() === '' ||
|
|
411
|
+
parsedPreset.startsWith('--'))
|
|
412
|
+
) {
|
|
413
|
+
console.error('β --preset requires a non-empty value')
|
|
414
|
+
process.exit(1)
|
|
415
|
+
}
|
|
416
|
+
const presetOpt = reviewedPlan ? (reviewedPlan.options.preset ?? null) : parsedPreset
|
|
414
417
|
// Explicit top-level model overrides for the generated config.
|
|
415
418
|
const modelIndex = args.indexOf('--model')
|
|
416
419
|
const modelOpt = reviewedPlan
|
|
@@ -447,29 +450,18 @@ async function main() {
|
|
|
447
450
|
process.exit(1)
|
|
448
451
|
}
|
|
449
452
|
|
|
450
|
-
//
|
|
451
|
-
//
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
if (!reviewedPlan && componentsOpt !== null) {
|
|
461
|
-
requestedComponents = componentsOpt
|
|
462
|
-
.split(',')
|
|
463
|
-
.map((c) => c.trim())
|
|
464
|
-
.filter(Boolean)
|
|
465
|
-
const unknown = requestedComponents.filter((c) => !KNOWN_COMPONENTS.includes(c))
|
|
466
|
-
if (requestedComponents.length === 0 || unknown.length > 0) {
|
|
467
|
-
console.error(
|
|
468
|
-
`β Invalid --components "${componentsOpt}" β expected comma-separated names from: ${KNOWN_COMPONENTS.join(', ')}`,
|
|
469
|
-
)
|
|
470
|
-
process.exit(1)
|
|
471
|
-
}
|
|
453
|
+
// Resolve the user's explicit selection separately from the defaults. An
|
|
454
|
+
// unscoped install gets runtime by default; explicit --components does not.
|
|
455
|
+
let componentSelection
|
|
456
|
+
try {
|
|
457
|
+
componentSelection = resolveComponentSelection(args, {
|
|
458
|
+
reviewedComponents: reviewedPlan?.options.components ?? null,
|
|
459
|
+
})
|
|
460
|
+
} catch (err) {
|
|
461
|
+
console.error(`β ${err.message}`)
|
|
462
|
+
process.exit(1)
|
|
472
463
|
}
|
|
464
|
+
const { components, requestedComponentsForPrompt, noMcp: skipMCP } = componentSelection
|
|
473
465
|
|
|
474
466
|
// --merge-dev-config <path> opts IN to merging a contributor's personal
|
|
475
467
|
// OpenCode config into the generated one. Only third-party plugin/provider/
|
|
@@ -490,8 +482,14 @@ async function main() {
|
|
|
490
482
|
|
|
491
483
|
if (reviewedPlan && !autoYes) {
|
|
492
484
|
if (!forceHeadless && process.stdin.isTTY && process.stdout.isTTY) {
|
|
493
|
-
|
|
485
|
+
const authorization = await authorizeReviewedPlan(reviewedPlan)
|
|
486
|
+
if (authorization === PROMPT_CANCELED) {
|
|
494
487
|
console.log('β Install canceled; no files were written.')
|
|
488
|
+
process.exitCode = 130
|
|
489
|
+
return
|
|
490
|
+
}
|
|
491
|
+
if (!authorization) {
|
|
492
|
+
console.log('β Install declined; no files were written.')
|
|
495
493
|
return
|
|
496
494
|
}
|
|
497
495
|
} else {
|
|
@@ -501,15 +499,6 @@ async function main() {
|
|
|
501
499
|
autoYes = true
|
|
502
500
|
}
|
|
503
501
|
|
|
504
|
-
const components = reviewedPlan
|
|
505
|
-
? requestedComponents
|
|
506
|
-
: (requestedComponents ?? ['agents', 'skills', 'instructions', 'commands', 'plugins'])
|
|
507
|
-
if (!reviewedPlan && !skipMCP && !components.includes('runtime')) components.push('runtime')
|
|
508
|
-
if (!reviewedPlan && skipMCP) {
|
|
509
|
-
const runtimeIndex = components.indexOf('runtime')
|
|
510
|
-
if (runtimeIndex >= 0) components.splice(runtimeIndex, 1)
|
|
511
|
-
}
|
|
512
|
-
|
|
513
502
|
// Version info
|
|
514
503
|
const version = readVersion()
|
|
515
504
|
const { strings } = await import('../scripts/install/strings.mjs')
|
|
@@ -541,6 +530,8 @@ async function main() {
|
|
|
541
530
|
version: versionOpt ?? 'auto',
|
|
542
531
|
mergeDevConfig: mergeDevConfigOpt,
|
|
543
532
|
expectedPlan: reviewedPlan,
|
|
533
|
+
requestedComponents: requestedComponentsForPrompt,
|
|
534
|
+
noMcp: skipMCP,
|
|
544
535
|
planTimestamp,
|
|
545
536
|
quiet: isJson,
|
|
546
537
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-opencode",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.14",
|
|
4
4
|
"description": "Multi-agent orchestration for OpenCode β 14 specialized agents, TDD, Themis review gates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"!**/*.pyc"
|
|
100
100
|
],
|
|
101
101
|
"dependencies": {
|
|
102
|
+
"@clack/prompts": "1.8.1",
|
|
102
103
|
"@opencode-ai/plugin": "1.18.33",
|
|
103
104
|
"js-yaml": "^5.4.2",
|
|
104
105
|
"zod": "4.1.8",
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon",
|
|
3
3
|
"publisher": "ils15",
|
|
4
|
-
"version": "1.6.0-beta.
|
|
4
|
+
"version": "1.6.0-beta.14",
|
|
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
|
@@ -135,8 +135,11 @@ function formatMetric(metric) {
|
|
|
135
135
|
|
|
136
136
|
function listTypeScriptTests(repoRoot) {
|
|
137
137
|
const directory = join(repoRoot, 'tests', 'pantheon')
|
|
138
|
+
// This is the only TypeScript test file that imports src/plugin-v2.ts. Its
|
|
139
|
+
// isolated measured coverage matches the full-suite baseline; `test:ts`
|
|
140
|
+
// remains the separate full TypeScript suite.
|
|
138
141
|
return readdirSync(directory)
|
|
139
|
-
.filter((file) => file
|
|
142
|
+
.filter((file) => file === 'plugin-v2-contract.test.ts')
|
|
140
143
|
.sort()
|
|
141
144
|
.map((file) => join(directory, file))
|
|
142
145
|
}
|
|
@@ -208,9 +208,9 @@ if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
|
208
208
|
try {
|
|
209
209
|
const content = generateAgentsMdForPlatform(targetDir, platformName, extraSections)
|
|
210
210
|
const agentCount = (content.match(/^\| @/gm) || []).length
|
|
211
|
-
console.log(
|
|
211
|
+
console.log(`[OK] Generated AGENTS.md in ${targetDir} (${agentCount} agents)`)
|
|
212
212
|
} catch (err) {
|
|
213
|
-
console.error(
|
|
213
|
+
console.error(`[ERROR] Failed to generate AGENTS.md: ${err.message}`)
|
|
214
214
|
process.exit(1)
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { basename, dirname, join, resolve } from 'node:path'
|
|
2
|
+
import { spinner as clackSpinner } from '@clack/prompts'
|
|
2
3
|
import { strings } from './strings.mjs'
|
|
3
4
|
|
|
4
5
|
export const icons = {
|
|
5
|
-
success: '
|
|
6
|
-
warning: '
|
|
7
|
-
error: '
|
|
8
|
-
info: '
|
|
9
|
-
progress: '
|
|
10
|
-
done: '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
star: '\u2b50',
|
|
14
|
-
wrench: '\u{1F527}',
|
|
15
|
-
rocket: '\u{1F680}',
|
|
16
|
-
package: '\u{1F4E6}',
|
|
17
|
-
gear: '\u2699\ufe0f',
|
|
6
|
+
success: '[OK]',
|
|
7
|
+
warning: '[WARN]',
|
|
8
|
+
error: '[ERROR]',
|
|
9
|
+
info: '[INFO]',
|
|
10
|
+
progress: '[RUNNING]',
|
|
11
|
+
done: '[DONE]',
|
|
12
|
+
bullet: '*',
|
|
13
|
+
rocket: '[OK]',
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
export const colors = {
|
|
@@ -55,18 +51,27 @@ export function section(title) {
|
|
|
55
51
|
console.log(tag(line))
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
} else if (!_quiet) {
|
|
67
|
-
process.stdout.write(`\r${doneText}\n`)
|
|
54
|
+
function progress(message) {
|
|
55
|
+
if (tty() && !_quiet) {
|
|
56
|
+
const indicator = clackSpinner()
|
|
57
|
+
indicator.start(tag(message))
|
|
58
|
+
return (ok = true) => {
|
|
59
|
+
const doneText = tag(`${message} β ${ok ? 'complete' : 'failed'}`)
|
|
60
|
+
if (ok) indicator.stop(doneText)
|
|
61
|
+
else indicator.error(doneText)
|
|
68
62
|
}
|
|
69
63
|
}
|
|
64
|
+
|
|
65
|
+
if (!_quiet) console.log(tag(`${icons.progress} ${message}`))
|
|
66
|
+
return (ok = true) => {
|
|
67
|
+
const doneText = tag(`${ok ? icons.done : icons.error} ${message}`)
|
|
68
|
+
if (_quiet && !ok) console.warn(doneText)
|
|
69
|
+
else if (!_quiet) console.log(doneText)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function step(message) {
|
|
74
|
+
return progress(message)
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
export function success(message) {
|
|
@@ -74,7 +79,7 @@ export function success(message) {
|
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
export function warning(message) {
|
|
77
|
-
console.warn(tag(`${icons.warning}${message}`))
|
|
82
|
+
console.warn(tag(`${icons.warning} ${message}`))
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
export function error(message) {
|
|
@@ -83,7 +88,7 @@ export function error(message) {
|
|
|
83
88
|
|
|
84
89
|
export function info(message) {
|
|
85
90
|
if (_quiet) return
|
|
86
|
-
console.log(tag(`${icons.info}${message}`))
|
|
91
|
+
console.log(tag(`${icons.info} ${message}`))
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
export function bullet(text, indent = 0) {
|
|
@@ -118,51 +123,7 @@ export function summaryTable(items) {
|
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
export function spinner(message) {
|
|
121
|
-
|
|
122
|
-
'\u280b',
|
|
123
|
-
'\u2819',
|
|
124
|
-
'\u2839',
|
|
125
|
-
'\u2838',
|
|
126
|
-
'\u283c',
|
|
127
|
-
'\u2834',
|
|
128
|
-
'\u2826',
|
|
129
|
-
'\u2827',
|
|
130
|
-
'\u2807',
|
|
131
|
-
'\u280f',
|
|
132
|
-
]
|
|
133
|
-
let i = 0
|
|
134
|
-
let running = true
|
|
135
|
-
|
|
136
|
-
if (tty() && !_quiet) {
|
|
137
|
-
const interval = setInterval(() => {
|
|
138
|
-
if (!running) {
|
|
139
|
-
clearInterval(interval)
|
|
140
|
-
return
|
|
141
|
-
}
|
|
142
|
-
process.stdout.write(`\r${frames[i % frames.length]} ${tag(message)}...`)
|
|
143
|
-
i++
|
|
144
|
-
}, 80)
|
|
145
|
-
process.stdout.write(`\r${frames[0]} ${tag(message)}...`)
|
|
146
|
-
|
|
147
|
-
return (ok = true) => {
|
|
148
|
-
running = false
|
|
149
|
-
clearInterval(interval)
|
|
150
|
-
const icon = ok ? icons.success : icons.error
|
|
151
|
-
process.stdout.write(`\r${icon} ${tag(message)}\n`)
|
|
152
|
-
}
|
|
153
|
-
} else {
|
|
154
|
-
const text = tag(`${icons.progress} ${message}...`)
|
|
155
|
-
if (!_quiet) process.stdout.write(text)
|
|
156
|
-
return (ok = true) => {
|
|
157
|
-
const icon = ok ? icons.success : icons.error
|
|
158
|
-
const doneText = tag(`${icon} ${message}`)
|
|
159
|
-
if (_quiet && !ok) {
|
|
160
|
-
console.warn(doneText)
|
|
161
|
-
} else if (!_quiet) {
|
|
162
|
-
process.stdout.write(`\r${doneText}\n`)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
126
|
+
return progress(message)
|
|
166
127
|
}
|
|
167
128
|
|
|
168
129
|
export function printSummary(target, _platforms, stats) {
|
|
@@ -192,7 +153,7 @@ export function printSummary(target, _platforms, stats) {
|
|
|
192
153
|
console.log('')
|
|
193
154
|
}
|
|
194
155
|
|
|
195
|
-
console.log(tag(` ${
|
|
156
|
+
console.log(tag(` ${S.summaryNext.trim()}`))
|
|
196
157
|
console.log(tag(S.summaryNextAgents))
|
|
197
158
|
console.log(tag(S.summaryNextMcp))
|
|
198
159
|
console.log(tag(S.summaryNextDoctor))
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const DEFAULT_INSTALL_COMPONENTS = ['agents', 'skills', 'instructions', 'commands', 'plugins']
|
|
2
|
+
const KNOWN_COMPONENTS = ['agents', 'skills', 'instructions', 'commands', 'plugins', 'runtime']
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolve CLI component flags without widening an explicit component selection.
|
|
6
|
+
*
|
|
7
|
+
* @param {string[]} args CLI arguments
|
|
8
|
+
* @param {{ reviewedComponents?: string[] | null }} [options]
|
|
9
|
+
* @returns {{ components: string[], requestedComponentsForPrompt: string[] | null }}
|
|
10
|
+
*/
|
|
11
|
+
export function resolveComponentSelection(args, { reviewedComponents = null } = {}) {
|
|
12
|
+
const noMcp = args.includes('--no-mcp')
|
|
13
|
+
if (reviewedComponents !== null) {
|
|
14
|
+
return {
|
|
15
|
+
components: [...reviewedComponents],
|
|
16
|
+
requestedComponentsForPrompt: null,
|
|
17
|
+
noMcp,
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const componentsIndex = args.indexOf('--components')
|
|
22
|
+
const inlineComponents = args.find((arg) => arg.startsWith('--components='))
|
|
23
|
+
const componentsOpt =
|
|
24
|
+
componentsIndex >= 0
|
|
25
|
+
? (args[componentsIndex + 1] ?? null)
|
|
26
|
+
: (inlineComponents?.split('=', 2)[1] ?? null)
|
|
27
|
+
|
|
28
|
+
let explicitComponents = null
|
|
29
|
+
if (componentsOpt !== null) {
|
|
30
|
+
explicitComponents = componentsOpt
|
|
31
|
+
.split(',')
|
|
32
|
+
.map((component) => component.trim())
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
const unknown = explicitComponents.filter((component) => !KNOWN_COMPONENTS.includes(component))
|
|
35
|
+
if (explicitComponents.length === 0 || unknown.length > 0) {
|
|
36
|
+
throw new Error(
|
|
37
|
+
`Invalid --components "${componentsOpt}" β expected comma-separated names from: ${KNOWN_COMPONENTS.join(', ')}`,
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const components = explicitComponents ? [...explicitComponents] : [...DEFAULT_INSTALL_COMPONENTS]
|
|
43
|
+
if (noMcp) {
|
|
44
|
+
return {
|
|
45
|
+
components: components.filter((component) => component !== 'runtime'),
|
|
46
|
+
requestedComponentsForPrompt: explicitComponents
|
|
47
|
+
? explicitComponents.filter((component) => component !== 'runtime')
|
|
48
|
+
: null,
|
|
49
|
+
noMcp,
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Runtime is a default only for an unscoped install. Explicit --components
|
|
54
|
+
// remains the user's exact scope; runtime can still be requested by name.
|
|
55
|
+
if (explicitComponents === null && !components.includes('runtime')) components.push('runtime')
|
|
56
|
+
return {
|
|
57
|
+
components,
|
|
58
|
+
requestedComponentsForPrompt: explicitComponents ? [...explicitComponents] : null,
|
|
59
|
+
noMcp,
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -269,9 +269,9 @@ function main() {
|
|
|
269
269
|
const results = healthCheck(target, { dryRun })
|
|
270
270
|
|
|
271
271
|
console.log('\n π Health Check:')
|
|
272
|
-
for (const p of results.passed) console.log(`
|
|
273
|
-
for (const w of results.warnings) console.log(`
|
|
274
|
-
for (const f of results.failed) console.log(`
|
|
272
|
+
for (const p of results.passed) console.log(` [OK] ${p.check}: ${p.detail}`)
|
|
273
|
+
for (const w of results.warnings) console.log(` [WARN] ${w.check}: ${w.detail}`)
|
|
274
|
+
for (const f of results.failed) console.log(` [ERROR] ${f.check}: ${f.detail}`)
|
|
275
275
|
|
|
276
276
|
console.log(
|
|
277
277
|
`\n Summary: ${results.passed.length} passed, ${results.warnings.length} warnings, ${results.failed.length} failed`,
|