@codewizard-dt/bootstrap 2.11.1 → 2.11.2
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.
|
@@ -28,10 +28,27 @@ echo "Bootstrapping Serena for: $PROJECT_DIR"
|
|
|
28
28
|
cd "$PROJECT_DIR"
|
|
29
29
|
|
|
30
30
|
if [ ! -f ".serena/project.yml" ]; then
|
|
31
|
+
# Fresh machines: serena's first launch via uvx clones the repo and builds a
|
|
32
|
+
# venv, which can exceed Claude Code's MCP startup timeout. Prewarm the uvx
|
|
33
|
+
# cache outside claude so the real launch is fast.
|
|
34
|
+
if command -v uvx &>/dev/null; then
|
|
35
|
+
echo "Prewarming Serena (first run downloads the package — may take a few minutes)..."
|
|
36
|
+
uvx --from git+https://github.com/oraios/serena serena --help >/dev/null 2>&1 || true
|
|
37
|
+
fi
|
|
31
38
|
echo "Triggering Claude Code to initialize Serena (.serena/ will be created)..."
|
|
32
|
-
|
|
39
|
+
if [ -f ".mcp.json" ]; then
|
|
40
|
+
# Project-scoped .mcp.json servers need one-time interactive approval that a
|
|
41
|
+
# headless --print run can never grant; --mcp-config + --strict-mcp-config
|
|
42
|
+
# loads serena explicitly, bypassing the approval gate.
|
|
43
|
+
claude --print --mcp-config .mcp.json --strict-mcp-config "exit" >/dev/null 2>&1 || true
|
|
44
|
+
else
|
|
45
|
+
claude --print "exit" >/dev/null 2>&1 || true
|
|
46
|
+
fi
|
|
33
47
|
if [ ! -f ".serena/project.yml" ]; then
|
|
34
|
-
echo "Error: .serena/project.yml was not created by 'claude --print'.
|
|
48
|
+
echo "Error: .serena/project.yml was not created by 'claude --print'."
|
|
49
|
+
echo "Ensure Serena MCP is registered for this project — run 'npx @codewizard-dt/bootstrap setup' and answer Yes to the Serena prompt,"
|
|
50
|
+
echo "or register it manually: claude mcp add --scope project serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context claude-code --project \"$PROJECT_DIR\""
|
|
51
|
+
echo "If it IS registered, open 'claude' interactively in $PROJECT_DIR once to approve the project MCP servers, then re-run 'npx @codewizard-dt/bootstrap update'."
|
|
35
52
|
exit 1
|
|
36
53
|
fi
|
|
37
54
|
else
|
|
@@ -82,10 +99,12 @@ REQUIRED = ['markdown', 'python', 'typescript', 'yaml']
|
|
|
82
99
|
p = pathlib.Path(sys.argv[1])
|
|
83
100
|
text = p.read_text()
|
|
84
101
|
|
|
85
|
-
# Match the languages
|
|
86
|
-
#
|
|
102
|
+
# Match the languages block including list items at ANY indentation (0-indent is valid YAML).
|
|
103
|
+
# Newer Serena versions renamed the key `languages:` -> `language_servers:`; accept both
|
|
104
|
+
# and preserve whichever the file uses. The trailing alternative allows a final item
|
|
105
|
+
# with no trailing newline.
|
|
87
106
|
LANG_BLOCK = re.compile(
|
|
88
|
-
r'^(languages:[ \t]*\n)'
|
|
107
|
+
r'^((?:languages|language_servers):[ \t]*\n)'
|
|
89
108
|
r'((?:[ \t]*-[ \t]+[^\n]+\n)*(?:[ \t]*-[ \t]+[^\n]+)?)',
|
|
90
109
|
re.MULTILINE
|
|
91
110
|
)
|
|
@@ -108,10 +127,10 @@ if bm:
|
|
|
108
127
|
print('added:' + ','.join(missing) if missing else 'present')
|
|
109
128
|
sys.exit(0)
|
|
110
129
|
|
|
111
|
-
# languages: [] inline form
|
|
112
|
-
m = re.search(r'^languages:[ \t]*\[\][ \t]*\n?', text, re.MULTILINE)
|
|
130
|
+
# languages: [] / language_servers: [] inline form
|
|
131
|
+
m = re.search(r'^((?:languages|language_servers):)[ \t]*\[\][ \t]*\n?', text, re.MULTILINE)
|
|
113
132
|
if m:
|
|
114
|
-
block = '
|
|
133
|
+
block = m.group(1) + '\n' + ''.join(f' - {lang}\n' for lang in REQUIRED)
|
|
115
134
|
p.write_text(text[:m.start()] + block + text[m.end():])
|
|
116
135
|
print('added:' + ','.join(REQUIRED))
|
|
117
136
|
sys.exit(0)
|
|
@@ -141,5 +160,5 @@ elif [[ "$LANG_RESULT" == added:* ]]; then
|
|
|
141
160
|
echo "Serena not running — updated config will apply on next start."
|
|
142
161
|
fi
|
|
143
162
|
else
|
|
144
|
-
echo "Warning: could not find 'languages:' key in .serena/project.yml — add markdown, python, typescript, yaml manually."
|
|
163
|
+
echo "Warning: could not find a 'languages:' or 'language_servers:' key in .serena/project.yml — add markdown, python, typescript, yaml manually."
|
|
145
164
|
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codewizard-dt/bootstrap",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "Bootstrap Claude Code projects with an LLM Wiki, reusable skills, hooks, and MCP setup",
|
|
5
5
|
"homepage": "https://github.com/codewizard-dt/bootstrap-wiki#readme",
|
|
6
6
|
"bugs": {
|