oh-my-claudecode 0.2.7 → 0.2.9
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/README.md +170 -68
- package/commands/cthulhu.md +9 -1
- package/commands/invoke-shub.md +8 -2
- package/commands/shoggoth.md +15 -25
- package/commands/yog-sothoth.md +18 -25
- package/dist/agents/render.d.ts +11 -0
- package/dist/agents/render.d.ts.map +1 -0
- package/dist/agents/render.js +69 -0
- package/dist/agents/render.js.map +1 -0
- package/dist/cli/dashboard.d.ts +12 -0
- package/dist/cli/dashboard.d.ts.map +1 -0
- package/dist/cli/dashboard.js +58 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/cli/doctor.d.ts +11 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +163 -9
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.js +72 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/install.d.ts +6 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +211 -44
- package/dist/cli/install.js.map +1 -1
- package/dist/cli/lint.d.ts +26 -0
- package/dist/cli/lint.d.ts.map +1 -0
- package/dist/cli/lint.js +86 -0
- package/dist/cli/lint.js.map +1 -0
- package/dist/cli/stats.d.ts +56 -0
- package/dist/cli/stats.d.ts.map +1 -0
- package/dist/cli/stats.js +197 -0
- package/dist/cli/stats.js.map +1 -0
- package/dist/cli/sync.d.ts +44 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +154 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/config/schema.d.ts +337 -331
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +14 -10
- package/dist/config/schema.js.map +1 -1
- package/dist/features/block-summarizer/index.js +1 -0
- package/dist/features/block-summarizer/index.js.map +1 -1
- package/dist/features/yith-archive/config.d.ts.map +1 -1
- package/dist/features/yith-archive/config.js +11 -15
- package/dist/features/yith-archive/config.js.map +1 -1
- package/dist/features/yith-archive/eval/schemas.d.ts +2 -2
- package/dist/features/yith-archive/functions/migrate.d.ts.map +1 -1
- package/dist/features/yith-archive/functions/migrate.js +7 -3
- package/dist/features/yith-archive/functions/migrate.js.map +1 -1
- package/dist/features/yith-archive/functions/opencode-import.d.ts.map +1 -1
- package/dist/features/yith-archive/functions/opencode-import.js +54 -27
- package/dist/features/yith-archive/functions/opencode-import.js.map +1 -1
- package/dist/features/yith-archive/functions/smart-search.js.map +1 -1
- package/dist/features/yith-archive/functions/temporal-graph.d.ts.map +1 -1
- package/dist/features/yith-archive/functions/temporal-graph.js +1 -0
- package/dist/features/yith-archive/functions/temporal-graph.js.map +1 -1
- package/dist/features/yith-archive/providers/embedding/local.d.ts +17 -6
- package/dist/features/yith-archive/providers/embedding/local.d.ts.map +1 -1
- package/dist/features/yith-archive/providers/embedding/local.js +32 -14
- package/dist/features/yith-archive/providers/embedding/local.js.map +1 -1
- package/dist/features/yith-archive/state/fake-sdk.d.ts.map +1 -1
- package/dist/features/yith-archive/state/fake-sdk.js.map +1 -1
- package/dist/features/yith-archive/state/reranker.d.ts.map +1 -1
- package/dist/features/yith-archive/state/reranker.js +9 -2
- package/dist/features/yith-archive/state/reranker.js.map +1 -1
- package/dist/features/yith-archive/state/vector-index.d.ts.map +1 -1
- package/dist/features/yith-archive/state/vector-index.js +1 -0
- package/dist/features/yith-archive/state/vector-index.js.map +1 -1
- package/dist/hooks/agent-sync.d.ts +16 -0
- package/dist/hooks/agent-sync.d.ts.map +1 -0
- package/dist/hooks/agent-sync.js +42 -0
- package/dist/hooks/agent-sync.js.map +1 -0
- package/dist/hooks/comment-checker.d.ts +1 -1
- package/dist/hooks/comment-checker.d.ts.map +1 -1
- package/dist/hooks/comment-checker.js +10 -0
- package/dist/hooks/comment-checker.js.map +1 -1
- package/dist/hooks/cthulhu-auto.d.ts +1 -1
- package/dist/hooks/cthulhu-auto.d.ts.map +1 -1
- package/dist/hooks/cthulhu-auto.js +77 -8
- package/dist/hooks/cthulhu-auto.js.map +1 -1
- package/dist/hooks/cthulhu-preflight.d.ts.map +1 -1
- package/dist/hooks/cthulhu-preflight.js +6 -5
- package/dist/hooks/cthulhu-preflight.js.map +1 -1
- package/dist/hooks/design-detector-hook.d.ts +6 -5
- package/dist/hooks/design-detector-hook.d.ts.map +1 -1
- package/dist/hooks/design-detector-hook.js +27 -8
- package/dist/hooks/design-detector-hook.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +43 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/web-research-hook.d.ts +6 -5
- package/dist/hooks/web-research-hook.d.ts.map +1 -1
- package/dist/hooks/web-research-hook.js +30 -9
- package/dist/hooks/web-research-hook.js.map +1 -1
- package/dist/hooks/write-guard.d.ts +1 -1
- package/dist/hooks/write-guard.d.ts.map +1 -1
- package/dist/hooks/write-guard.js +10 -0
- package/dist/hooks/write-guard.js.map +1 -1
- package/dist/hooks/yith-capture.d.ts +9 -3
- package/dist/hooks/yith-capture.d.ts.map +1 -1
- package/dist/hooks/yith-capture.js +43 -14
- package/dist/hooks/yith-capture.js.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/linters/type-safety-ast.d.ts.map +1 -1
- package/dist/linters/type-safety-ast.js +42 -24
- package/dist/linters/type-safety-ast.js.map +1 -1
- package/dist/shared/ascii-logo.d.ts +24 -0
- package/dist/shared/ascii-logo.d.ts.map +1 -0
- package/dist/shared/ascii-logo.js +77 -0
- package/dist/shared/ascii-logo.js.map +1 -0
- package/dist/shared/model-resolution.d.ts +19 -6
- package/dist/shared/model-resolution.d.ts.map +1 -1
- package/dist/shared/model-resolution.js +25 -12
- package/dist/shared/model-resolution.js.map +1 -1
- package/package.json +9 -6
- package/tui/dashboard.tsx +504 -0
- package/tui/data.ts +178 -0
- package/tui/theme.ts +51 -0
- package/tui/tsconfig.json +15 -0
- package/tui/wizard.tsx +219 -0
- package/dist/plugin-handlers/config-handler.d.ts +0 -21
- package/dist/plugin-handlers/config-handler.d.ts.map +0 -1
- package/dist/plugin-handlers/config-handler.js +0 -33
- package/dist/plugin-handlers/config-handler.js.map +0 -1
- package/dist/plugin-handlers/index.d.ts +0 -2
- package/dist/plugin-handlers/index.d.ts.map +0 -1
- package/dist/plugin-handlers/index.js +0 -2
- package/dist/plugin-handlers/index.js.map +0 -1
package/tui/theme.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gruvbox dark (soft contrast) — warm parchment text on a low-contrast
|
|
3
|
+
* umber ground. One accent (ember orange) used sparingly; semantic colors
|
|
4
|
+
* stay muted so the dashboard reads calm, not busy. Every color in the
|
|
5
|
+
* TUI comes from here.
|
|
6
|
+
*/
|
|
7
|
+
export const theme = {
|
|
8
|
+
bg: "#32302f", // bg0_soft
|
|
9
|
+
bgAlt: "#3c3836", // bg1
|
|
10
|
+
bgHi: "#504945", // bg2
|
|
11
|
+
fg: "#ebdbb2", // fg1 — parchment
|
|
12
|
+
muted: "#bdae93", // fg3
|
|
13
|
+
dim: "#928374", // gray
|
|
14
|
+
faint: "#665c54", // bg3
|
|
15
|
+
accent: "#fe8019", // ember orange — the one accent
|
|
16
|
+
gold: "#fabd2f",
|
|
17
|
+
ok: "#b8bb26",
|
|
18
|
+
warn: "#fabd2f",
|
|
19
|
+
err: "#fb4934",
|
|
20
|
+
aqua: "#8ec07c",
|
|
21
|
+
blue: "#83a598",
|
|
22
|
+
} as const
|
|
23
|
+
|
|
24
|
+
export function statusColor(status: "ok" | "warn" | "error"): string {
|
|
25
|
+
return status === "ok" ? theme.ok : status === "warn" ? theme.warn : theme.err
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function statusIcon(status: "ok" | "warn" | "error"): string {
|
|
29
|
+
return status === "ok" ? "●" : status === "warn" ? "◐" : "○"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function formatBytes(n: number): string {
|
|
33
|
+
if (n <= 0) return "0 B"
|
|
34
|
+
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`
|
|
35
|
+
if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`
|
|
36
|
+
return `${(n / 1024 / 1024 / 1024).toFixed(2)} GB`
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function formatAge(epochSeconds: number | null): string {
|
|
40
|
+
if (!epochSeconds) return "never"
|
|
41
|
+
const seconds = Math.max(0, Math.floor(Date.now() / 1000) - epochSeconds)
|
|
42
|
+
if (seconds < 90) return "just now"
|
|
43
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ago`
|
|
44
|
+
if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`
|
|
45
|
+
return `${Math.floor(seconds / 86400)}d ago`
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function formatCount(n: number): string {
|
|
49
|
+
if (n >= 10000) return `${(n / 1000).toFixed(1)}k`
|
|
50
|
+
return String(n)
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ESNext"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"jsxImportSource": "@opentui/react",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"types": ["bun-types"]
|
|
13
|
+
},
|
|
14
|
+
"include": ["./**/*"]
|
|
15
|
+
}
|
package/tui/wizard.tsx
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Install wizard — OpenTUI form launched by `oh-my-claudecode install`
|
|
3
|
+
* when Bun is available (falls back to plain prompts otherwise). Collects
|
|
4
|
+
* the install choices and writes them as JSON to the path given by
|
|
5
|
+
* `--out`; the node installer consumes that and performs the actual
|
|
6
|
+
* install with its own progress output.
|
|
7
|
+
*
|
|
8
|
+
* Exit codes: 0 = confirmed, 2 = cancelled.
|
|
9
|
+
*/
|
|
10
|
+
import { createCliRenderer } from "@opentui/core"
|
|
11
|
+
import { createRoot, useKeyboard } from "@opentui/react"
|
|
12
|
+
import { useState } from "react"
|
|
13
|
+
import * as fs from "node:fs"
|
|
14
|
+
import { theme } from "./theme.ts"
|
|
15
|
+
import { renderWordRows, LOGO_SEGMENTS, LOGO_TAGLINE } from "../dist/shared/ascii-logo.js"
|
|
16
|
+
|
|
17
|
+
const outFlagIndex = process.argv.indexOf("--out")
|
|
18
|
+
const OUT_PATH = outFlagIndex >= 0 ? process.argv[outFlagIndex + 1] : null
|
|
19
|
+
if (!OUT_PATH) {
|
|
20
|
+
console.error("wizard: missing --out <path>")
|
|
21
|
+
process.exit(2)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const PROVIDERS = ["local", "gemini", "openai", "voyage"] as const
|
|
25
|
+
type Provider = (typeof PROVIDERS)[number]
|
|
26
|
+
|
|
27
|
+
const PROVIDER_HINTS: Record<Provider, string> = {
|
|
28
|
+
local: "private, on-device, no API key — recommended",
|
|
29
|
+
gemini: "hosted — requires GEMINI_API_KEY",
|
|
30
|
+
openai: "hosted — requires OPENAI_API_KEY",
|
|
31
|
+
voyage: "hosted — requires VOYAGE_API_KEY",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface Choices {
|
|
35
|
+
provider: Provider
|
|
36
|
+
apiKey?: string
|
|
37
|
+
cron: boolean
|
|
38
|
+
retention: boolean
|
|
39
|
+
model: boolean
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function Wizard() {
|
|
43
|
+
const [provider, setProvider] = useState<Provider>("local")
|
|
44
|
+
const [apiKey, setApiKey] = useState("")
|
|
45
|
+
const [cron, setCron] = useState(true)
|
|
46
|
+
const [retention, setRetention] = useState(true)
|
|
47
|
+
const [model, setModel] = useState(true)
|
|
48
|
+
const [cursor, setCursor] = useState(0)
|
|
49
|
+
|
|
50
|
+
const needsKey = provider !== "local"
|
|
51
|
+
// Row layout: 0 provider · (1 api key when hosted) · cron · retention ·
|
|
52
|
+
// model (hidden for hosted) · install
|
|
53
|
+
const rowIds: string[] = [
|
|
54
|
+
"provider",
|
|
55
|
+
...(needsKey ? ["apiKey"] : []),
|
|
56
|
+
"cron",
|
|
57
|
+
"retention",
|
|
58
|
+
...(provider === "local" ? ["model"] : []),
|
|
59
|
+
"install",
|
|
60
|
+
]
|
|
61
|
+
const active = rowIds[Math.min(cursor, rowIds.length - 1)]
|
|
62
|
+
|
|
63
|
+
const confirm = () => {
|
|
64
|
+
const choices: Choices = {
|
|
65
|
+
provider,
|
|
66
|
+
apiKey: needsKey && apiKey.trim() ? apiKey.trim() : undefined,
|
|
67
|
+
cron,
|
|
68
|
+
retention,
|
|
69
|
+
model: provider === "local" ? model : false,
|
|
70
|
+
}
|
|
71
|
+
fs.writeFileSync(OUT_PATH!, JSON.stringify(choices), "utf-8")
|
|
72
|
+
process.exit(0)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
useKeyboard((key) => {
|
|
76
|
+
if (key.name === "escape") process.exit(2)
|
|
77
|
+
if (active === "apiKey" && key.name !== "up" && key.name !== "down") return
|
|
78
|
+
if (key.name === "up") setCursor((c) => Math.max(0, c - 1))
|
|
79
|
+
if (key.name === "down") setCursor((c) => Math.min(rowIds.length - 1, c + 1))
|
|
80
|
+
if (key.name === "return" || key.name === "space" || key.name === "left" || key.name === "right") {
|
|
81
|
+
if (active === "provider") {
|
|
82
|
+
const delta = key.name === "left" ? PROVIDERS.length - 1 : 1
|
|
83
|
+
setProvider((p) => PROVIDERS[(PROVIDERS.indexOf(p) + delta) % PROVIDERS.length])
|
|
84
|
+
} else if (active === "cron") setCron((v) => !v)
|
|
85
|
+
else if (active === "retention") setRetention((v) => !v)
|
|
86
|
+
else if (active === "model") setModel((v) => !v)
|
|
87
|
+
else if (active === "install" && key.name === "return") confirm()
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
const marker = (id: string) => (active === id ? "▍" : " ")
|
|
92
|
+
const rowFg = (id: string) => (active === id ? theme.fg : theme.dim)
|
|
93
|
+
const toggleText = (value: boolean) => (value ? " on " : " off ")
|
|
94
|
+
const toggleFg = (value: boolean) => (value ? theme.ok : theme.faint)
|
|
95
|
+
const logoSegments = LOGO_SEGMENTS.map((s) => ({ ...s, rows: renderWordRows(s.text) }))
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<box
|
|
99
|
+
style={{
|
|
100
|
+
backgroundColor: theme.bg,
|
|
101
|
+
flexDirection: "column",
|
|
102
|
+
flexGrow: 1,
|
|
103
|
+
paddingTop: 1,
|
|
104
|
+
paddingBottom: 1,
|
|
105
|
+
paddingLeft: 3,
|
|
106
|
+
paddingRight: 3,
|
|
107
|
+
gap: 1,
|
|
108
|
+
}}
|
|
109
|
+
>
|
|
110
|
+
<box style={{ flexDirection: "column" }}>
|
|
111
|
+
{[0, 1, 2].map((row) => (
|
|
112
|
+
<text key={row}>
|
|
113
|
+
{logoSegments.map((segment, i) => (
|
|
114
|
+
<span key={i} style={{ fg: segment.color }}>
|
|
115
|
+
{segment.rows[row] + " "}
|
|
116
|
+
</span>
|
|
117
|
+
))}
|
|
118
|
+
</text>
|
|
119
|
+
))}
|
|
120
|
+
</box>
|
|
121
|
+
<text style={{ fg: theme.dim }}>{LOGO_TAGLINE}</text>
|
|
122
|
+
<text> </text>
|
|
123
|
+
|
|
124
|
+
<box
|
|
125
|
+
style={{
|
|
126
|
+
border: true,
|
|
127
|
+
borderStyle: "rounded",
|
|
128
|
+
borderColor: theme.bgHi,
|
|
129
|
+
backgroundColor: theme.bgAlt,
|
|
130
|
+
padding: 1,
|
|
131
|
+
flexDirection: "column",
|
|
132
|
+
gap: 1,
|
|
133
|
+
}}
|
|
134
|
+
title=" setup "
|
|
135
|
+
titleColor={theme.dim}
|
|
136
|
+
>
|
|
137
|
+
<box style={{ flexDirection: "column" }}>
|
|
138
|
+
<text>
|
|
139
|
+
<span style={{ fg: active === "provider" ? theme.accent : theme.bgAlt }}>
|
|
140
|
+
{marker("provider")}
|
|
141
|
+
</span>
|
|
142
|
+
<span style={{ fg: rowFg("provider") }}> Embeddings </span>
|
|
143
|
+
<span style={{ fg: theme.gold }}>{`‹ ${provider} ›`.padEnd(12)}</span>
|
|
144
|
+
<span style={{ fg: theme.faint }}>{PROVIDER_HINTS[provider]}</span>
|
|
145
|
+
</text>
|
|
146
|
+
{needsKey ? (
|
|
147
|
+
<box style={{ flexDirection: "row", paddingLeft: 2 }}>
|
|
148
|
+
<text style={{ fg: rowFg("apiKey") }}>
|
|
149
|
+
{marker("apiKey")} API key{" "}
|
|
150
|
+
</text>
|
|
151
|
+
<box
|
|
152
|
+
style={{
|
|
153
|
+
border: true,
|
|
154
|
+
borderStyle: "rounded",
|
|
155
|
+
borderColor: active === "apiKey" ? theme.accent : theme.bgHi,
|
|
156
|
+
width: 44,
|
|
157
|
+
height: 3,
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<input
|
|
161
|
+
placeholder="paste key (empty → falls back to local)"
|
|
162
|
+
onInput={setApiKey}
|
|
163
|
+
focused={active === "apiKey"}
|
|
164
|
+
/>
|
|
165
|
+
</box>
|
|
166
|
+
</box>
|
|
167
|
+
) : null}
|
|
168
|
+
</box>
|
|
169
|
+
|
|
170
|
+
<text>
|
|
171
|
+
<span style={{ fg: active === "cron" ? theme.accent : theme.bgAlt }}>{marker("cron")}</span>
|
|
172
|
+
<span style={{ fg: toggleFg(cron) }}>{toggleText(cron)}</span>
|
|
173
|
+
<span style={{ fg: rowFg("cron") }}>Background ingestion cron (every 6h)</span>
|
|
174
|
+
<span style={{ fg: theme.faint }}> — captures even when Claude Code is closed</span>
|
|
175
|
+
</text>
|
|
176
|
+
|
|
177
|
+
<text>
|
|
178
|
+
<span style={{ fg: active === "retention" ? theme.accent : theme.bgAlt }}>{marker("retention")}</span>
|
|
179
|
+
<span style={{ fg: toggleFg(retention) }}>{toggleText(retention)}</span>
|
|
180
|
+
<span style={{ fg: rowFg("retention") }}>Raise transcript retention to 365 days</span>
|
|
181
|
+
<span style={{ fg: theme.faint }}> — history never deleted before ingestion</span>
|
|
182
|
+
</text>
|
|
183
|
+
|
|
184
|
+
{provider === "local" ? (
|
|
185
|
+
<text>
|
|
186
|
+
<span style={{ fg: active === "model" ? theme.accent : theme.bgAlt }}>{marker("model")}</span>
|
|
187
|
+
<span style={{ fg: toggleFg(model) }}>{toggleText(model)}</span>
|
|
188
|
+
<span style={{ fg: rowFg("model") }}>Download embedding model now (~137 MB)</span>
|
|
189
|
+
<span style={{ fg: theme.faint }}> — otherwise lazy on first use</span>
|
|
190
|
+
</text>
|
|
191
|
+
) : null}
|
|
192
|
+
|
|
193
|
+
<text>
|
|
194
|
+
<span style={{ fg: active === "install" ? theme.accent : theme.bgAlt }}>{marker("install")}</span>
|
|
195
|
+
<span
|
|
196
|
+
style={{
|
|
197
|
+
fg: active === "install" ? theme.bg : theme.accent,
|
|
198
|
+
bg: active === "install" ? theme.accent : undefined,
|
|
199
|
+
}}
|
|
200
|
+
>
|
|
201
|
+
{" install "}
|
|
202
|
+
</span>
|
|
203
|
+
</text>
|
|
204
|
+
</box>
|
|
205
|
+
|
|
206
|
+
<text>
|
|
207
|
+
<span style={{ fg: theme.accent }}>↑↓</span>
|
|
208
|
+
<span style={{ fg: theme.dim }}> move </span>
|
|
209
|
+
<span style={{ fg: theme.accent }}>enter/←→</span>
|
|
210
|
+
<span style={{ fg: theme.dim }}> change </span>
|
|
211
|
+
<span style={{ fg: theme.accent }}>esc</span>
|
|
212
|
+
<span style={{ fg: theme.dim }}> cancel</span>
|
|
213
|
+
</text>
|
|
214
|
+
</box>
|
|
215
|
+
)
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const renderer = await createCliRenderer({ exitOnCtrlC: true })
|
|
219
|
+
createRoot(renderer).render(<Wizard />)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { OhMyClaudeCodeConfig } from "../config/schema.js";
|
|
2
|
-
import type { AvailableSkill, AvailableCategory } from "../agents/types.js";
|
|
3
|
-
export interface ConfigHandlerDeps {
|
|
4
|
-
pluginConfig: OhMyClaudeCodeConfig;
|
|
5
|
-
projectDirectory: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Applies the full 5-phase config pipeline:
|
|
9
|
-
* Phase 1: providers
|
|
10
|
-
* Phase 2: plugin components (skills, categories)
|
|
11
|
-
* Phase 3: agents — build and register all Elder God agents
|
|
12
|
-
* Phase 4: tools — register/disable tools
|
|
13
|
-
* Phase 5: commands — register built-in commands
|
|
14
|
-
*
|
|
15
|
-
* Returns agent configs for consumption by the plugin host.
|
|
16
|
-
*/
|
|
17
|
-
export declare function applyConfig(deps: ConfigHandlerDeps, discoveredSkills?: AvailableSkill[]): Promise<{
|
|
18
|
-
agents: Record<string, object>;
|
|
19
|
-
availableCategories: AvailableCategory[];
|
|
20
|
-
}>;
|
|
21
|
-
//# sourceMappingURL=config-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-handler.d.ts","sourceRoot":"","sources":["../../src/plugin-handlers/config-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3E,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,oBAAoB,CAAA;IAClC,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,iBAAiB,EACvB,gBAAgB,GAAE,cAAc,EAAO,GACtC,OAAO,CAAC;IACT,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,mBAAmB,EAAE,iBAAiB,EAAE,CAAA;CACzC,CAAC,CAuBD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { buildBuiltinAgents } from "../agents/builtin-agents.js";
|
|
2
|
-
import { log } from "../shared/log.js";
|
|
3
|
-
/**
|
|
4
|
-
* Applies the full 5-phase config pipeline:
|
|
5
|
-
* Phase 1: providers
|
|
6
|
-
* Phase 2: plugin components (skills, categories)
|
|
7
|
-
* Phase 3: agents — build and register all Elder God agents
|
|
8
|
-
* Phase 4: tools — register/disable tools
|
|
9
|
-
* Phase 5: commands — register built-in commands
|
|
10
|
-
*
|
|
11
|
-
* Returns agent configs for consumption by the plugin host.
|
|
12
|
-
*/
|
|
13
|
-
export async function applyConfig(deps, discoveredSkills = []) {
|
|
14
|
-
const { pluginConfig } = deps;
|
|
15
|
-
// Phase 2: resolve categories
|
|
16
|
-
const availableCategories = Object.entries(pluginConfig.categories ?? {})
|
|
17
|
-
.filter(([, cfg]) => !cfg?.disable)
|
|
18
|
-
.map(([name, cfg]) => ({
|
|
19
|
-
name,
|
|
20
|
-
description: cfg?.description ?? name,
|
|
21
|
-
}));
|
|
22
|
-
// Phase 3: build agents
|
|
23
|
-
const agents = buildBuiltinAgents({
|
|
24
|
-
disabledAgents: pluginConfig.disabled_agents ?? [],
|
|
25
|
-
agentOverrides: pluginConfig.agents ?? {},
|
|
26
|
-
discoveredSkills,
|
|
27
|
-
availableCategories,
|
|
28
|
-
useTaskSystem: pluginConfig.cthulhu_agent?.use_task_system ?? false,
|
|
29
|
-
});
|
|
30
|
-
log("[config-handler] Agents registered", { count: Object.keys(agents).length, names: Object.keys(agents) });
|
|
31
|
-
return { agents, availableCategories };
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=config-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-handler.js","sourceRoot":"","sources":["../../src/plugin-handlers/config-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAQtC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,IAAuB,EACvB,mBAAqC,EAAE;IAKvC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IAE7B,8BAA8B;IAC9B,MAAM,mBAAmB,GAAwB,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,IAAI,EAAE,CAAC;SAC3F,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QACrB,IAAI;QACJ,WAAW,EAAE,GAAG,EAAE,WAAW,IAAI,IAAI;KACtC,CAAC,CAAC,CAAA;IAEL,wBAAwB;IACxB,MAAM,MAAM,GAAG,kBAAkB,CAAC;QAChC,cAAc,EAAE,YAAY,CAAC,eAAe,IAAI,EAAE;QAClD,cAAc,EAAE,YAAY,CAAC,MAAM,IAAI,EAAE;QACzC,gBAAgB;QAChB,mBAAmB;QACnB,aAAa,EAAE,YAAY,CAAC,aAAa,EAAE,eAAe,IAAI,KAAK;KACpE,CAAC,CAAA;IAEF,GAAG,CAAC,oCAAoC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAE5G,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;AACxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin-handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin-handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|