@iloom/cli 0.5.4 → 0.6.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/README.md +116 -4
- package/dist/{ClaudeContextManager-PQ46VILL.js → ClaudeContextManager-6J2EB4QU.js} +5 -5
- package/dist/{ClaudeService-6OMO552H.js → ClaudeService-O2PB22GX.js} +4 -4
- package/dist/{LoomLauncher-ZHDTPKED.js → LoomLauncher-5LFM4LXB.js} +5 -5
- package/dist/ProjectCapabilityDetector-S5FLNCFI.js +11 -0
- package/dist/{PromptTemplateManager-5GNF7FCP.js → PromptTemplateManager-C3DK6XZL.js} +2 -2
- package/dist/README.md +116 -4
- package/dist/{SettingsManager-CNYBGXDT.js → SettingsManager-35F5RUJH.js} +2 -2
- package/dist/agents/iloom-framework-detector.md +366 -0
- package/dist/agents/iloom-issue-analyze-and-plan.md +0 -10
- package/dist/agents/iloom-issue-implementer.md +1 -1
- package/dist/agents/iloom-issue-planner.md +0 -10
- package/dist/build-FJVYP7EV.js +27 -0
- package/dist/build-FJVYP7EV.js.map +1 -0
- package/dist/{chunk-SHVB3EFE.js → chunk-64O2UIWO.js} +44 -19
- package/dist/chunk-64O2UIWO.js.map +1 -0
- package/dist/{chunk-FXJKNVZW.js → chunk-6U6VI4SZ.js} +3 -3
- package/dist/{chunk-QPS6TZUW.js → chunk-7WANFUIK.js} +2 -2
- package/dist/{chunk-LVLRMP7V.js → chunk-AXX3QIKK.js} +58 -14
- package/dist/chunk-AXX3QIKK.js.map +1 -0
- package/dist/chunk-BXCPJJYM.js +133 -0
- package/dist/chunk-BXCPJJYM.js.map +1 -0
- package/dist/{chunk-ESP2FF52.js → chunk-EK3XCAAS.js} +2 -2
- package/dist/{chunk-IDUICCZY.js → chunk-F6WVM437.js} +3 -1
- package/dist/chunk-F6WVM437.js.map +1 -0
- package/dist/{chunk-TKL7RBEF.js → chunk-GEXP5IOF.js} +3 -3
- package/dist/{chunk-J7GHNTYK.js → chunk-K7SEEHKO.js} +3 -3
- package/dist/{chunk-NRDY6XO3.js → chunk-PMVWQBWS.js} +73 -17
- package/dist/chunk-PMVWQBWS.js.map +1 -0
- package/dist/{chunk-NKRQNER7.js → chunk-Q7POFB5Q.js} +1 -55
- package/dist/chunk-Q7POFB5Q.js.map +1 -0
- package/dist/{chunk-N4ZJVATC.js → chunk-SN3Z6EZO.js} +11 -7
- package/dist/chunk-SN3Z6EZO.js.map +1 -0
- package/dist/chunk-TRQ76ISK.js +159 -0
- package/dist/chunk-TRQ76ISK.js.map +1 -0
- package/dist/{chunk-ZXWTOJXA.js → chunk-UB4TFAXJ.js} +38 -9
- package/dist/chunk-UB4TFAXJ.js.map +1 -0
- package/dist/{chunk-YPOG7WY4.js → chunk-UQIXZ3BA.js} +2 -2
- package/dist/{chunk-K5G5SFWY.js → chunk-W6WVRHJ6.js} +13 -1
- package/dist/chunk-W6WVRHJ6.js.map +1 -0
- package/dist/{chunk-E4F7KASE.js → chunk-WIJWIKAN.js} +3 -3
- package/dist/{chunk-EBISESAP.js → chunk-ZPSTA5PR.js} +16 -6
- package/dist/chunk-ZPSTA5PR.js.map +1 -0
- package/dist/{cleanup-H5QUWBWE.js → cleanup-OU2HFOOG.js} +11 -11
- package/dist/cli.js +107 -69
- package/dist/cli.js.map +1 -1
- package/dist/compile-ULNO5F7Q.js +57 -0
- package/dist/compile-ULNO5F7Q.js.map +1 -0
- package/dist/{contribute-VP73TPAL.js → contribute-T7ENST5N.js} +3 -3
- package/dist/{dev-server-H5FFXIVX.js → dev-server-4RCDJ5MU.js} +9 -9
- package/dist/{feedback-567ZH2O7.js → feedback-O4Q55SVS.js} +8 -8
- package/dist/{git-UHUNQZBA.js → git-FVMGBHC2.js} +3 -3
- package/dist/{ignite-VPP4PMF4.js → ignite-VHV65WEZ.js} +12 -8
- package/dist/ignite-VHV65WEZ.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/{init-4ZR2XXZA.js → init-HB34Q5FH.js} +8 -7
- package/dist/lint-5JMCWE4Y.js +27 -0
- package/dist/lint-5JMCWE4Y.js.map +1 -0
- package/dist/{open-6HBQHPUL.js → open-WHVUYGPY.js} +9 -9
- package/dist/prompts/init-prompt.txt +108 -0
- package/dist/prompts/issue-prompt.txt +12 -12
- package/dist/{rebase-SRBOVC4M.js → rebase-5EY3Q6XP.js} +5 -5
- package/dist/{recap-X7FTTKPP.js → recap-VOOUXOGP.js} +5 -5
- package/dist/{run-5FU76FFE.js → run-NCRK5NPR.js} +9 -9
- package/dist/schema/settings.schema.json +8 -0
- package/dist/{shell-UQJDI36V.js → shell-SBLXVOVJ.js} +5 -5
- package/dist/{summary-MOKN7RM2.js → summary-CVFAMDOJ.js} +6 -6
- package/dist/test-3KIVXI6J.js +27 -0
- package/dist/test-3KIVXI6J.js.map +1 -0
- package/dist/{test-git-GB3B6QNT.js → test-git-ZB6AGGRW.js} +3 -3
- package/dist/{test-prefix-YQNNTCY3.js → test-prefix-FBGXKMPA.js} +3 -3
- package/package.json +2 -1
- package/dist/ProjectCapabilityDetector-34LU7JJ4.js +0 -9
- package/dist/chunk-2ZPFJQ3B.js +0 -63
- package/dist/chunk-2ZPFJQ3B.js.map +0 -1
- package/dist/chunk-EBISESAP.js.map +0 -1
- package/dist/chunk-IDUICCZY.js.map +0 -1
- package/dist/chunk-K5G5SFWY.js.map +0 -1
- package/dist/chunk-LVLRMP7V.js.map +0 -1
- package/dist/chunk-N4ZJVATC.js.map +0 -1
- package/dist/chunk-NKRQNER7.js.map +0 -1
- package/dist/chunk-NRDY6XO3.js.map +0 -1
- package/dist/chunk-SHVB3EFE.js.map +0 -1
- package/dist/chunk-ZXWTOJXA.js.map +0 -1
- package/dist/ignite-VPP4PMF4.js.map +0 -1
- /package/dist/{ClaudeContextManager-PQ46VILL.js.map → ClaudeContextManager-6J2EB4QU.js.map} +0 -0
- /package/dist/{ClaudeService-6OMO552H.js.map → ClaudeService-O2PB22GX.js.map} +0 -0
- /package/dist/{LoomLauncher-ZHDTPKED.js.map → LoomLauncher-5LFM4LXB.js.map} +0 -0
- /package/dist/{ProjectCapabilityDetector-34LU7JJ4.js.map → ProjectCapabilityDetector-S5FLNCFI.js.map} +0 -0
- /package/dist/{PromptTemplateManager-5GNF7FCP.js.map → PromptTemplateManager-C3DK6XZL.js.map} +0 -0
- /package/dist/{SettingsManager-CNYBGXDT.js.map → SettingsManager-35F5RUJH.js.map} +0 -0
- /package/dist/{chunk-FXJKNVZW.js.map → chunk-6U6VI4SZ.js.map} +0 -0
- /package/dist/{chunk-QPS6TZUW.js.map → chunk-7WANFUIK.js.map} +0 -0
- /package/dist/{chunk-ESP2FF52.js.map → chunk-EK3XCAAS.js.map} +0 -0
- /package/dist/{chunk-TKL7RBEF.js.map → chunk-GEXP5IOF.js.map} +0 -0
- /package/dist/{chunk-J7GHNTYK.js.map → chunk-K7SEEHKO.js.map} +0 -0
- /package/dist/{chunk-YPOG7WY4.js.map → chunk-UQIXZ3BA.js.map} +0 -0
- /package/dist/{chunk-E4F7KASE.js.map → chunk-WIJWIKAN.js.map} +0 -0
- /package/dist/{cleanup-H5QUWBWE.js.map → cleanup-OU2HFOOG.js.map} +0 -0
- /package/dist/{contribute-VP73TPAL.js.map → contribute-T7ENST5N.js.map} +0 -0
- /package/dist/{dev-server-H5FFXIVX.js.map → dev-server-4RCDJ5MU.js.map} +0 -0
- /package/dist/{feedback-567ZH2O7.js.map → feedback-O4Q55SVS.js.map} +0 -0
- /package/dist/{git-UHUNQZBA.js.map → git-FVMGBHC2.js.map} +0 -0
- /package/dist/{init-4ZR2XXZA.js.map → init-HB34Q5FH.js.map} +0 -0
- /package/dist/{open-6HBQHPUL.js.map → open-WHVUYGPY.js.map} +0 -0
- /package/dist/{rebase-SRBOVC4M.js.map → rebase-5EY3Q6XP.js.map} +0 -0
- /package/dist/{recap-X7FTTKPP.js.map → recap-VOOUXOGP.js.map} +0 -0
- /package/dist/{run-5FU76FFE.js.map → run-NCRK5NPR.js.map} +0 -0
- /package/dist/{shell-UQJDI36V.js.map → shell-SBLXVOVJ.js.map} +0 -0
- /package/dist/{summary-MOKN7RM2.js.map → summary-CVFAMDOJ.js.map} +0 -0
- /package/dist/{test-git-GB3B6QNT.js.map → test-git-ZB6AGGRW.js.map} +0 -0
- /package/dist/{test-prefix-YQNNTCY3.js.map → test-prefix-FBGXKMPA.js.map} +0 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: iloom-framework-detector
|
|
3
|
+
description: Use this agent to detect a project's language and framework, then generate appropriate build/test/dev scripts for non-Node.js projects. The agent creates `.iloom/package.iloom.json` with shell commands tailored to the detected stack. Use this for Python, Rust, Ruby, Go, and other non-Node.js projects that don't have a package.json.
|
|
4
|
+
tools: Bash, Glob, Grep, Read, Write
|
|
5
|
+
color: cyan
|
|
6
|
+
model: sonnet
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are Claude, a framework detection specialist. Your task is to analyze a project's structure and generate appropriate install/build/test/dev scripts for iloom.
|
|
10
|
+
|
|
11
|
+
**Your Core Mission**: Detect the project's programming language and framework, then create `.iloom/package.iloom.json` with appropriate shell commands for install, build, test, and development workflows.
|
|
12
|
+
|
|
13
|
+
**Key Distinction:**
|
|
14
|
+
- `install` - Installs dependencies (runs during loom creation and post-merge)
|
|
15
|
+
- `build` - Compiles/builds the project (for compiled languages or asset compilation)
|
|
16
|
+
|
|
17
|
+
## Core Workflow
|
|
18
|
+
|
|
19
|
+
### Step 1: Scan for Language Markers
|
|
20
|
+
|
|
21
|
+
Examine the project root for language-specific files:
|
|
22
|
+
|
|
23
|
+
| Marker File | Language | Package Manager |
|
|
24
|
+
|-------------|----------|-----------------|
|
|
25
|
+
| `Cargo.toml` | Rust | cargo |
|
|
26
|
+
| `requirements.txt`, `pyproject.toml`, `setup.py` | Python | pip/poetry |
|
|
27
|
+
| `Gemfile` | Ruby | bundler |
|
|
28
|
+
| `go.mod` | Go | go |
|
|
29
|
+
| `pom.xml`, `build.gradle`, `build.gradle.kts` | Java/Kotlin | maven/gradle |
|
|
30
|
+
| `Package.swift` | Swift | swift |
|
|
31
|
+
| `mix.exs` | Elixir | mix |
|
|
32
|
+
| `*.csproj`, `*.sln` | C#/.NET | dotnet |
|
|
33
|
+
| `Makefile` | C/C++/Generic | make |
|
|
34
|
+
| `CMakeLists.txt` | C/C++ | cmake |
|
|
35
|
+
|
|
36
|
+
Use the `Glob` tool to check for these files:
|
|
37
|
+
```
|
|
38
|
+
Glob pattern: "{Cargo.toml,requirements.txt,pyproject.toml,setup.py,Gemfile,go.mod,pom.xml,build.gradle*,Package.swift,mix.exs,*.csproj,*.sln,Makefile,CMakeLists.txt}"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Detect Framework (if applicable)
|
|
42
|
+
|
|
43
|
+
For each detected language, look for framework-specific indicators:
|
|
44
|
+
|
|
45
|
+
**Python:**
|
|
46
|
+
- `manage.py` + `settings.py` = Django
|
|
47
|
+
- `app.py` + `flask` in requirements = Flask
|
|
48
|
+
- `main.py` + `fastapi` in requirements = FastAPI
|
|
49
|
+
- `pyproject.toml` with `[tool.poetry]` = Poetry project
|
|
50
|
+
|
|
51
|
+
**Ruby:**
|
|
52
|
+
- `config/application.rb` = Rails
|
|
53
|
+
- `sinatra` in Gemfile = Sinatra
|
|
54
|
+
- `spec/` directory = RSpec testing
|
|
55
|
+
|
|
56
|
+
**Rust:**
|
|
57
|
+
- `Rocket.toml` = Rocket web framework
|
|
58
|
+
- `actix-web` in Cargo.toml = Actix
|
|
59
|
+
- `warp` in Cargo.toml = Warp
|
|
60
|
+
|
|
61
|
+
**Go:**
|
|
62
|
+
- `gin-gonic/gin` in go.mod = Gin framework
|
|
63
|
+
- `gorilla/mux` in go.mod = Gorilla Mux
|
|
64
|
+
- `fiber` in go.mod = Fiber
|
|
65
|
+
|
|
66
|
+
### Step 3: Generate package.iloom.json
|
|
67
|
+
|
|
68
|
+
Create `.iloom/package.iloom.json` with appropriate scripts and capabilities based on detection:
|
|
69
|
+
|
|
70
|
+
**Capabilities Detection:**
|
|
71
|
+
- `"cli"` - Include if project has CLI components (e.g., `[[bin]]` in Cargo.toml, CLI frameworks like click/typer/clap)
|
|
72
|
+
- `"web"` - Include if project has web components (e.g., Flask/Django/FastAPI/Rails/Actix/Rocket)
|
|
73
|
+
|
|
74
|
+
**Common Patterns by Language:**
|
|
75
|
+
|
|
76
|
+
#### Rust CLI
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"capabilities": ["cli"],
|
|
80
|
+
"scripts": {
|
|
81
|
+
"install": "cargo fetch",
|
|
82
|
+
"build": "cargo build --release",
|
|
83
|
+
"test": "cargo test",
|
|
84
|
+
"dev": "cargo run"
|
|
85
|
+
},
|
|
86
|
+
"_metadata": {
|
|
87
|
+
"detectedLanguage": "rust",
|
|
88
|
+
"generatedBy": "iloom-framework-detector"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
#### Rust Web (Actix/Rocket/Axum)
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"capabilities": ["web"],
|
|
97
|
+
"scripts": {
|
|
98
|
+
"install": "cargo fetch",
|
|
99
|
+
"build": "cargo build --release",
|
|
100
|
+
"test": "cargo test",
|
|
101
|
+
"dev": "cargo run"
|
|
102
|
+
},
|
|
103
|
+
"_metadata": {
|
|
104
|
+
"detectedLanguage": "rust",
|
|
105
|
+
"detectedFramework": "actix-web",
|
|
106
|
+
"generatedBy": "iloom-framework-detector"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Python CLI (with pip)
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"capabilities": ["cli"],
|
|
115
|
+
"scripts": {
|
|
116
|
+
"install": "python -m pip install -e .",
|
|
117
|
+
"test": "pytest",
|
|
118
|
+
"dev": "python -m <module_name>"
|
|
119
|
+
},
|
|
120
|
+
"_metadata": {
|
|
121
|
+
"detectedLanguage": "python",
|
|
122
|
+
"detectedPackageManager": "pip",
|
|
123
|
+
"generatedBy": "iloom-framework-detector"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Python CLI (with poetry)
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"capabilities": ["cli"],
|
|
132
|
+
"scripts": {
|
|
133
|
+
"install": "poetry install",
|
|
134
|
+
"test": "poetry run pytest",
|
|
135
|
+
"dev": "poetry run python -m <module_name>"
|
|
136
|
+
},
|
|
137
|
+
"_metadata": {
|
|
138
|
+
"detectedLanguage": "python",
|
|
139
|
+
"detectedPackageManager": "poetry",
|
|
140
|
+
"generatedBy": "iloom-framework-detector"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Python (Django)
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"capabilities": ["web"],
|
|
149
|
+
"scripts": {
|
|
150
|
+
"install": "python -m pip install -r requirements.txt",
|
|
151
|
+
"test": "python manage.py test",
|
|
152
|
+
"dev": "python manage.py runserver"
|
|
153
|
+
},
|
|
154
|
+
"_metadata": {
|
|
155
|
+
"detectedLanguage": "python",
|
|
156
|
+
"detectedFramework": "django",
|
|
157
|
+
"generatedBy": "iloom-framework-detector"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
#### Python (Flask/FastAPI)
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"capabilities": ["web"],
|
|
166
|
+
"scripts": {
|
|
167
|
+
"install": "python -m pip install -r requirements.txt",
|
|
168
|
+
"test": "pytest",
|
|
169
|
+
"dev": "flask run"
|
|
170
|
+
},
|
|
171
|
+
"_metadata": {
|
|
172
|
+
"detectedLanguage": "python",
|
|
173
|
+
"detectedFramework": "flask",
|
|
174
|
+
"generatedBy": "iloom-framework-detector"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Ruby (with Bundler)
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"capabilities": ["cli"],
|
|
183
|
+
"scripts": {
|
|
184
|
+
"install": "bundle install",
|
|
185
|
+
"test": "bundle exec rspec",
|
|
186
|
+
"dev": "bundle exec ruby app.rb"
|
|
187
|
+
},
|
|
188
|
+
"_metadata": {
|
|
189
|
+
"detectedLanguage": "ruby",
|
|
190
|
+
"generatedBy": "iloom-framework-detector"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### Ruby (Rails)
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"capabilities": ["web"],
|
|
199
|
+
"scripts": {
|
|
200
|
+
"install": "bundle install",
|
|
201
|
+
"build": "bundle exec rails assets:precompile",
|
|
202
|
+
"test": "bundle exec rails test",
|
|
203
|
+
"dev": "bundle exec rails server"
|
|
204
|
+
},
|
|
205
|
+
"_metadata": {
|
|
206
|
+
"detectedLanguage": "ruby",
|
|
207
|
+
"detectedFramework": "rails",
|
|
208
|
+
"generatedBy": "iloom-framework-detector"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
#### Go CLI
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"capabilities": ["cli"],
|
|
217
|
+
"scripts": {
|
|
218
|
+
"install": "go mod download",
|
|
219
|
+
"build": "go build ./...",
|
|
220
|
+
"test": "go test ./...",
|
|
221
|
+
"dev": "go run ."
|
|
222
|
+
},
|
|
223
|
+
"_metadata": {
|
|
224
|
+
"detectedLanguage": "go",
|
|
225
|
+
"generatedBy": "iloom-framework-detector"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Go Web (Gin/Echo/Fiber)
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"capabilities": ["web"],
|
|
234
|
+
"scripts": {
|
|
235
|
+
"install": "go mod download",
|
|
236
|
+
"build": "go build ./...",
|
|
237
|
+
"test": "go test ./...",
|
|
238
|
+
"dev": "go run ."
|
|
239
|
+
},
|
|
240
|
+
"_metadata": {
|
|
241
|
+
"detectedLanguage": "go",
|
|
242
|
+
"detectedFramework": "gin",
|
|
243
|
+
"generatedBy": "iloom-framework-detector"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
#### Java (Maven)
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"capabilities": ["web"],
|
|
252
|
+
"scripts": {
|
|
253
|
+
"install": "mvn dependency:resolve",
|
|
254
|
+
"build": "mvn package",
|
|
255
|
+
"test": "mvn test",
|
|
256
|
+
"dev": "mvn spring-boot:run"
|
|
257
|
+
},
|
|
258
|
+
"_metadata": {
|
|
259
|
+
"detectedLanguage": "java",
|
|
260
|
+
"detectedBuildTool": "maven",
|
|
261
|
+
"generatedBy": "iloom-framework-detector"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
#### Java (Gradle)
|
|
267
|
+
```json
|
|
268
|
+
{
|
|
269
|
+
"capabilities": ["web"],
|
|
270
|
+
"scripts": {
|
|
271
|
+
"install": "./gradlew dependencies",
|
|
272
|
+
"build": "./gradlew build",
|
|
273
|
+
"test": "./gradlew test",
|
|
274
|
+
"dev": "./gradlew bootRun"
|
|
275
|
+
},
|
|
276
|
+
"_metadata": {
|
|
277
|
+
"detectedLanguage": "java",
|
|
278
|
+
"detectedBuildTool": "gradle",
|
|
279
|
+
"generatedBy": "iloom-framework-detector"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
#### Library (no CLI or web)
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"capabilities": [],
|
|
288
|
+
"scripts": {
|
|
289
|
+
"install": "cargo fetch",
|
|
290
|
+
"build": "cargo build",
|
|
291
|
+
"test": "cargo test"
|
|
292
|
+
},
|
|
293
|
+
"_metadata": {
|
|
294
|
+
"detectedLanguage": "rust",
|
|
295
|
+
"generatedBy": "iloom-framework-detector"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Step 4: Write the File
|
|
301
|
+
|
|
302
|
+
1. Read `.iloom/package.iloom.json` first to check if it already exists
|
|
303
|
+
2. **If the file exists:**
|
|
304
|
+
- Compare existing configuration with detected configuration
|
|
305
|
+
- Preserve existing scripts (user may have customized them)
|
|
306
|
+
- Only add missing scripts that were detected
|
|
307
|
+
- Preserve existing capabilities, add any missing ones
|
|
308
|
+
- Preserve any other existing fields (like `_metadata`)
|
|
309
|
+
3. **If the file does not exist:**
|
|
310
|
+
- Create the full detected configuration
|
|
311
|
+
4. Ensure `.iloom/` directory exists
|
|
312
|
+
5. Write the merged/new JSON to `.iloom/package.iloom.json`
|
|
313
|
+
6. Report what was detected and what changes were made (if any)
|
|
314
|
+
|
|
315
|
+
## Output Format
|
|
316
|
+
|
|
317
|
+
After creating the file, provide a summary:
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
Framework Detection Complete
|
|
321
|
+
|
|
322
|
+
Detected:
|
|
323
|
+
- Language: [language]
|
|
324
|
+
- Framework: [framework or "None detected"]
|
|
325
|
+
- Package Manager: [package manager]
|
|
326
|
+
- Capabilities: [cli, web, or none]
|
|
327
|
+
|
|
328
|
+
Created: .iloom/package.iloom.json
|
|
329
|
+
|
|
330
|
+
Configuration:
|
|
331
|
+
- capabilities: [list of detected capabilities]
|
|
332
|
+
- install: [command]
|
|
333
|
+
- build: [command] (if applicable)
|
|
334
|
+
- test: [command]
|
|
335
|
+
- dev: [command]
|
|
336
|
+
|
|
337
|
+
You can customize these settings by editing .iloom/package.iloom.json.
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Error Handling
|
|
341
|
+
|
|
342
|
+
**If no language markers are found:**
|
|
343
|
+
- Ask the user what language/framework they're using
|
|
344
|
+
- Provide a template they can fill in manually
|
|
345
|
+
|
|
346
|
+
**If multiple languages are detected:**
|
|
347
|
+
- Report all detected languages
|
|
348
|
+
- Ask the user which is the primary language
|
|
349
|
+
- Generate scripts for the primary language
|
|
350
|
+
|
|
351
|
+
## Behavioral Constraints
|
|
352
|
+
|
|
353
|
+
1. **Only analyze project structure** - Don't read or execute code
|
|
354
|
+
2. **Keep scripts simple** - Use standard commands that work out of the box
|
|
355
|
+
3. **Don't assume** - If unsure, ask the user for clarification
|
|
356
|
+
4. **Be conservative** - Use widely-adopted conventions and tools
|
|
357
|
+
5. **Document choices** - Include _metadata so users know what was detected
|
|
358
|
+
|
|
359
|
+
## What to Avoid
|
|
360
|
+
|
|
361
|
+
DO NOT:
|
|
362
|
+
- Execute any build/test/dev commands
|
|
363
|
+
- Install dependencies
|
|
364
|
+
- Modify any files other than `.iloom/package.iloom.json`
|
|
365
|
+
- Make assumptions about project-specific configuration
|
|
366
|
+
- Add scripts that require additional setup not evident from the project
|
|
@@ -603,16 +603,6 @@ When planning frontend changes:
|
|
|
603
603
|
- Look for alternative existing classes first
|
|
604
604
|
- Create new classes or element-specific overrides when needed
|
|
605
605
|
|
|
606
|
-
### Payload 3.0 CMS Data Migrations
|
|
607
|
-
See context7 for more information. Key points:
|
|
608
|
-
* Custom migrations (data migrations): Create using `pnpm payload migrate:create --force-accept-warning`, then edit to implement up()/down()
|
|
609
|
-
* IMPORTANT: Cross-reference tables/columns with most recent *.json file in migrations folder (contains current schema)
|
|
610
|
-
* Schema migrations (adding/removing fields): Use `pnpm payload migrate:create --skip-empty`
|
|
611
|
-
* Multiple phases: Create separate migrations after each phase (e.g., add fields, then remove fields)
|
|
612
|
-
* Separate data migrations from schema migrations
|
|
613
|
-
* Provide slug string argument for descriptive filenames
|
|
614
|
-
* Do not plan to run migrations - deploy process handles this automatically
|
|
615
|
-
|
|
616
606
|
## Documentation Standards
|
|
617
607
|
|
|
618
608
|
**Code Output Formatting:**
|
|
@@ -141,7 +141,7 @@ Before implementing, extract and validate the implementation plan:
|
|
|
141
141
|
- Keep the user informed of your plan and updated with your progress via an issue comment (see "HOW TO UPDATE THE USER OF YOUR PROGRESS", below)
|
|
142
142
|
- Identify any ambiguities or decision points before starting
|
|
143
143
|
- Implement the solution exactly as specified
|
|
144
|
-
- When done, run "validate:commit" command if available in package.json. If not:
|
|
144
|
+
- When done, run "validate:commit" command if available in package.json. If not: run `il compile`, `il test`, and `il lint` in that order.
|
|
145
145
|
- When all is validated, update your issue comment with a concise final summary (see "Final Summary Format" below)
|
|
146
146
|
- Avoid escaping issues by writing comments to temporary files before posting
|
|
147
147
|
|
|
@@ -186,16 +186,6 @@ When planning frontend changes:
|
|
|
186
186
|
- Look for alternative existing classes first
|
|
187
187
|
- Create new classes or element-specific overrides when needed
|
|
188
188
|
|
|
189
|
-
### Payload 3.0 CMS Data Migrations - see context7 for more information:
|
|
190
|
-
* If you need to do custom migrations (such as a data migration), you must first create a migration using `pnpm payload migrate:create --force-accept-warning` - you must then edit that empty migration to implement the data migration. Focus on making the up() implementation correct, and provide a reasonable proxy to a down() solution. It doesn’t have to be a perfect reversal in terms of data correctness, only schema correctness.
|
|
191
|
-
* IMPORTANT - DO NOT SKIP THIS (OR ANY OTHER) STEP: When doing custom migrations (which should only be necessary in case of data migrations, you must make sure all tables and columns exist by cross-referencing them with the most recently committed *.json file in the migrations folder. These JSON files contain the most recent schema as understood by the migration tool. It should be used in lieu of access to the the DB, which you don’t have.
|
|
192
|
-
* If you are creating a regular migration after adjusting the schema you must use `pnpm payload migrate:create --skip-empty`
|
|
193
|
-
* If performing multiple phases (i.e creating some fields and deleting some fields) create migrations after each phase (i.e after adding to a collection or global config, then again after removing fields from a collection or global config). Doing them together will cause issues with the migration tool and you won’t be able to complete your task.
|
|
194
|
-
* Similarly, separate data migration files from schema change files - using a separate migration for each
|
|
195
|
-
* IMPORTANT: DO NOT manually create/edit migrations for adding or removing fields from a collection or global config. This is handled by running the migrate:create command. You only need to create manual migrations when doing data migrations, not schema migrations.
|
|
196
|
-
* You should provide a slug string argument to migrate:create that is a description of the change - this will create more descriptive filenames and makes part of the filename deterministic, but be mindful of multiple files with the same slug (but will have a different timestamp)
|
|
197
|
-
* Do not plan to run the migrations - the implementor will not have permissions to do that. The deploy process will automatically do that when the implementor makes a commit.
|
|
198
|
-
|
|
199
189
|
## Plan Documentation Format
|
|
200
190
|
|
|
201
191
|
**CRITICAL**: Your implementation plan must be structured in TWO sections for different audiences:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ScriptCommandBase
|
|
4
|
+
} from "./chunk-TRQ76ISK.js";
|
|
5
|
+
import "./chunk-AXX3QIKK.js";
|
|
6
|
+
import "./chunk-UQIXZ3BA.js";
|
|
7
|
+
import "./chunk-BXCPJJYM.js";
|
|
8
|
+
import "./chunk-EK3XCAAS.js";
|
|
9
|
+
import "./chunk-GEXP5IOF.js";
|
|
10
|
+
import "./chunk-F6WVM437.js";
|
|
11
|
+
import "./chunk-CFUWQHCJ.js";
|
|
12
|
+
import "./chunk-6MLEBAYZ.js";
|
|
13
|
+
import "./chunk-VT4PDUYT.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/build.ts
|
|
16
|
+
var BuildCommand = class extends ScriptCommandBase {
|
|
17
|
+
getScriptName() {
|
|
18
|
+
return "build";
|
|
19
|
+
}
|
|
20
|
+
getScriptDisplayName() {
|
|
21
|
+
return "Build";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
BuildCommand
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=build-FJVYP7EV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/build.ts"],"sourcesContent":["import { ScriptCommandBase, ScriptCommandInput } from './script-command-base.js'\n\nexport type { ScriptCommandInput as BuildCommandInput }\n\n/**\n * BuildCommand - Run the build script for a workspace\n * Uses package.iloom.json if available, otherwise falls back to package.json\n */\nexport class BuildCommand extends ScriptCommandBase {\n\tgetScriptName(): string {\n\t\treturn 'build'\n\t}\n\n\tgetScriptDisplayName(): string {\n\t\treturn 'Build'\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAQO,IAAM,eAAN,cAA2B,kBAAkB;AAAA,EACnD,gBAAwB;AACvB,WAAO;AAAA,EACR;AAAA,EAEA,uBAA+B;AAC9B,WAAO;AAAA,EACR;AACD;","names":[]}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
detectPackageManager
|
|
4
|
-
} from "./chunk-LVLRMP7V.js";
|
|
5
2
|
import {
|
|
6
3
|
ProcessManager
|
|
7
4
|
} from "./chunk-VU3QMIP2.js";
|
|
5
|
+
import {
|
|
6
|
+
detectPackageManager,
|
|
7
|
+
runScript
|
|
8
|
+
} from "./chunk-AXX3QIKK.js";
|
|
9
|
+
import {
|
|
10
|
+
readPackageJson
|
|
11
|
+
} from "./chunk-BXCPJJYM.js";
|
|
8
12
|
import {
|
|
9
13
|
logger
|
|
10
14
|
} from "./chunk-VT4PDUYT.js";
|
|
@@ -77,6 +81,17 @@ var DevServerManager = class {
|
|
|
77
81
|
* Start dev server in background and wait for it to be ready
|
|
78
82
|
*/
|
|
79
83
|
async startDevServer(worktreePath, port) {
|
|
84
|
+
var _a;
|
|
85
|
+
try {
|
|
86
|
+
const packageJson = await readPackageJson(worktreePath);
|
|
87
|
+
if (!((_a = packageJson.scripts) == null ? void 0 : _a["dev"])) {
|
|
88
|
+
logger.warn('Skipping auto-start: no "dev" script found in package.json');
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
} catch {
|
|
92
|
+
logger.debug("Skipping auto-start: no package.json found");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
80
95
|
const devCommand = await buildDevServerCommand(worktreePath);
|
|
81
96
|
logger.debug(`Starting dev server with command: ${devCommand}`);
|
|
82
97
|
const serverProcess = execa("sh", ["-c", devCommand], {
|
|
@@ -144,26 +159,36 @@ var DevServerManager = class {
|
|
|
144
159
|
* @returns Process information including PID
|
|
145
160
|
*/
|
|
146
161
|
async runServerForeground(worktreePath, port, redirectToStderr = false, onProcessStarted, envOverrides) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
162
|
+
logger.debug(`Starting dev server in foreground on port ${port}`);
|
|
163
|
+
if (redirectToStderr) {
|
|
164
|
+
const devCommand = await buildDevServerCommand(worktreePath);
|
|
165
|
+
logger.debug(`Starting dev server with command: ${devCommand}`);
|
|
166
|
+
const serverProcess = execa("sh", ["-c", devCommand], {
|
|
167
|
+
cwd: worktreePath,
|
|
168
|
+
env: {
|
|
169
|
+
...process.env,
|
|
170
|
+
...envOverrides,
|
|
171
|
+
PORT: port.toString()
|
|
172
|
+
},
|
|
173
|
+
stdio: [process.stdin, process.stderr, process.stderr]
|
|
174
|
+
});
|
|
175
|
+
const processInfo = serverProcess.pid !== void 0 ? { pid: serverProcess.pid } : {};
|
|
176
|
+
if (onProcessStarted) {
|
|
177
|
+
onProcessStarted(processInfo.pid);
|
|
178
|
+
}
|
|
179
|
+
await serverProcess;
|
|
180
|
+
return processInfo;
|
|
181
|
+
}
|
|
182
|
+
return await runScript("dev", worktreePath, [], {
|
|
152
183
|
env: {
|
|
153
|
-
...process.env,
|
|
154
184
|
...envOverrides,
|
|
155
185
|
PORT: port.toString()
|
|
156
|
-
// PORT always wins (explicit parameter)
|
|
157
186
|
},
|
|
158
|
-
|
|
159
|
-
|
|
187
|
+
foreground: true,
|
|
188
|
+
...onProcessStarted && { onStart: onProcessStarted },
|
|
189
|
+
noCi: true
|
|
190
|
+
// Dev servers should not have CI=true
|
|
160
191
|
});
|
|
161
|
-
const processInfo = serverProcess.pid !== void 0 ? { pid: serverProcess.pid } : {};
|
|
162
|
-
if (onProcessStarted) {
|
|
163
|
-
onProcessStarted(processInfo.pid);
|
|
164
|
-
}
|
|
165
|
-
await serverProcess;
|
|
166
|
-
return processInfo;
|
|
167
192
|
}
|
|
168
193
|
/**
|
|
169
194
|
* Clean up all running server processes
|
|
@@ -187,4 +212,4 @@ var DevServerManager = class {
|
|
|
187
212
|
export {
|
|
188
213
|
DevServerManager
|
|
189
214
|
};
|
|
190
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-64O2UIWO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/DevServerManager.ts","../src/utils/dev-server.ts"],"sourcesContent":["import { execa, type ExecaChildProcess } from 'execa'\nimport { setTimeout } from 'timers/promises'\nimport { ProcessManager } from './process/ProcessManager.js'\nimport { buildDevServerCommand } from '../utils/dev-server.js'\nimport { runScript } from '../utils/package-manager.js'\nimport { readPackageJson } from '../utils/package-json.js'\nimport { logger } from '../utils/logger.js'\n\nexport interface DevServerManagerOptions {\n\t/**\n\t * Maximum time to wait for server to start (in milliseconds)\n\t * Default: 30000 (30 seconds)\n\t */\n\tstartupTimeout?: number\n\n\t/**\n\t * Interval between port checks (in milliseconds)\n\t * Default: 1000 (1 second)\n\t */\n\tcheckInterval?: number\n}\n\n/**\n * DevServerManager handles auto-starting and monitoring dev servers\n * Used by open/run commands to ensure dev server is running before opening browser\n */\nexport class DevServerManager {\n\tprivate readonly processManager: ProcessManager\n\tprivate readonly options: Required<DevServerManagerOptions>\n\tprivate runningServers: Map<number, ExecaChildProcess> = new Map()\n\n\tconstructor(\n\t\tprocessManager?: ProcessManager,\n\t\toptions: DevServerManagerOptions = {}\n\t) {\n\t\tthis.processManager = processManager ?? new ProcessManager()\n\t\tthis.options = {\n\t\t\tstartupTimeout: options.startupTimeout ?? 30000,\n\t\t\tcheckInterval: options.checkInterval ?? 1000,\n\t\t}\n\t}\n\n\t/**\n\t * Ensure dev server is running on the specified port\n\t * If not running, start it and wait for it to be ready\n\t *\n\t * @param worktreePath - Path to the worktree\n\t * @param port - Port the server should run on\n\t * @returns true if server is ready, false if startup failed/timed out\n\t */\n\tasync ensureServerRunning(worktreePath: string, port: number): Promise<boolean> {\n\t\tlogger.debug(`Checking if dev server is running on port ${port}...`)\n\n\t\t// Check if already running\n\t\tconst existingProcess = await this.processManager.detectDevServer(port)\n\t\tif (existingProcess) {\n\t\t\tlogger.debug(\n\t\t\t\t`Dev server already running on port ${port} (PID: ${existingProcess.pid})`\n\t\t\t)\n\t\t\treturn true\n\t\t}\n\n\t\t// Not running - start it\n\t\tlogger.info(`Dev server not running on port ${port}, starting...`)\n\n\t\ttry {\n\t\t\tawait this.startDevServer(worktreePath, port)\n\t\t\treturn true\n\t\t} catch (error) {\n\t\t\tlogger.error(\n\t\t\t\t`Failed to start dev server: ${error instanceof Error ? error.message : 'Unknown error'}`\n\t\t\t)\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Start dev server in background and wait for it to be ready\n\t */\n\tprivate async startDevServer(worktreePath: string, port: number): Promise<void> {\n\t\t// Guard: Check if package.json exists and has a dev script\n\t\t// Note: buildDevServerCommand only supports package.json via package managers,\n\t\t// not package.iloom.json. See #406 for multi-language support.\n\t\ttry {\n\t\t\tconst packageJson = await readPackageJson(worktreePath)\n\t\t\tif (!packageJson.scripts?.['dev']) {\n\t\t\t\tlogger.warn('Skipping auto-start: no \"dev\" script found in package.json')\n\t\t\t\treturn\n\t\t\t}\n\t\t} catch {\n\t\t\t// package.json doesn't exist - skip auto-start silently\n\t\t\tlogger.debug('Skipping auto-start: no package.json found')\n\t\t\treturn\n\t\t}\n\n\t\t// Build dev server command\n\t\tconst devCommand = await buildDevServerCommand(worktreePath)\n\t\tlogger.debug(`Starting dev server with command: ${devCommand}`)\n\n\t\t// Start server in background\n\t\tconst serverProcess = execa('sh', ['-c', devCommand], {\n\t\t\tcwd: worktreePath,\n\t\t\tenv: {\n\t\t\t\t...process.env,\n\t\t\t\tPORT: port.toString(),\n\t\t\t},\n\t\t\t// Important: Don't inherit stdio - server runs in background\n\t\t\tstdio: 'ignore',\n\t\t\t// Detach from parent process so it continues running\n\t\t\tdetached: true,\n\t\t})\n\n\t\t// Store reference to prevent cleanup\n\t\tthis.runningServers.set(port, serverProcess)\n\n\t\t// Unref so parent can exit\n\t\tserverProcess.unref()\n\n\t\t// Wait for server to be ready\n\t\tlogger.info(`Waiting for dev server to start on port ${port}...`)\n\t\tconst ready = await this.waitForServerReady(port)\n\n\t\tif (!ready) {\n\t\t\tthrow new Error(\n\t\t\t\t`Dev server failed to start within ${this.options.startupTimeout}ms timeout`\n\t\t\t)\n\t\t}\n\n\t\tlogger.success(`Dev server started successfully on port ${port}`)\n\t}\n\n\t/**\n\t * Wait for server to be ready by polling the port\n\t */\n\tprivate async waitForServerReady(port: number): Promise<boolean> {\n\t\tconst startTime = Date.now()\n\t\tlet attempts = 0\n\n\t\twhile (Date.now() - startTime < this.options.startupTimeout) {\n\t\t\tattempts++\n\n\t\t\t// Check if server is listening\n\t\t\tconst processInfo = await this.processManager.detectDevServer(port)\n\n\t\t\tif (processInfo) {\n\t\t\t\tlogger.debug(\n\t\t\t\t\t`Server detected on port ${port} after ${attempts} attempts (${Date.now() - startTime}ms)`\n\t\t\t\t)\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\t// Wait before next check\n\t\t\tawait setTimeout(this.options.checkInterval)\n\t\t}\n\n\t\t// Timeout\n\t\tlogger.warn(\n\t\t\t`Server did not start on port ${port} after ${this.options.startupTimeout}ms (${attempts} attempts)`\n\t\t)\n\t\treturn false\n\t}\n\n\t/**\n\t * Check if a dev server is running on the specified port\n\t *\n\t * @param port - Port to check\n\t * @returns true if server is running, false otherwise\n\t */\n\tasync isServerRunning(port: number): Promise<boolean> {\n\t\tconst existingProcess = await this.processManager.detectDevServer(port)\n\t\treturn existingProcess !== null\n\t}\n\n\t/**\n\t * Run dev server in foreground mode (blocking)\n\t * This method blocks until the server is stopped (e.g., via Ctrl+C)\n\t *\n\t * @param worktreePath - Path to the worktree\n\t * @param port - Port the server should run on\n\t * @param redirectToStderr - If true, redirect stdout/stderr to stderr (useful for JSON output)\n\t * @param onProcessStarted - Callback called immediately after process starts with PID\n\t * @returns Process information including PID\n\t */\n\tasync runServerForeground(\n\t\tworktreePath: string,\n\t\tport: number,\n\t\tredirectToStderr = false,\n\t\tonProcessStarted?: (pid?: number) => void,\n\t\tenvOverrides?: Record<string, string>\n\t): Promise<{ pid?: number }> {\n\t\tlogger.debug(`Starting dev server in foreground on port ${port}`)\n\n\t\t// Use runScript for foreground mode to support multi-language projects\n\t\t// Note: redirectToStderr is handled via custom execa call when needed\n\t\tif (redirectToStderr) {\n\t\t\t// For redirectToStderr, we still need direct execa control for custom stdio\n\t\t\tconst devCommand = await buildDevServerCommand(worktreePath)\n\t\t\tlogger.debug(`Starting dev server with command: ${devCommand}`)\n\n\t\t\tconst serverProcess = execa('sh', ['-c', devCommand], {\n\t\t\t\tcwd: worktreePath,\n\t\t\t\tenv: {\n\t\t\t\t\t...process.env,\n\t\t\t\t\t...envOverrides,\n\t\t\t\t\tPORT: port.toString(),\n\t\t\t\t},\n\t\t\t\tstdio: [process.stdin, process.stderr, process.stderr],\n\t\t\t})\n\n\t\t\tconst processInfo: { pid?: number } = serverProcess.pid !== undefined ? { pid: serverProcess.pid } : {}\n\n\t\t\tif (onProcessStarted) {\n\t\t\t\tonProcessStarted(processInfo.pid)\n\t\t\t}\n\n\t\t\tawait serverProcess\n\t\t\treturn processInfo\n\t\t}\n\n\t\t// Use runScript for standard foreground mode\n\t\treturn await runScript('dev', worktreePath, [], {\n\t\t\tenv: {\n\t\t\t\t...envOverrides,\n\t\t\t\tPORT: port.toString(),\n\t\t\t},\n\t\t\tforeground: true,\n\t\t\t...(onProcessStarted && { onStart: onProcessStarted }),\n\t\t\tnoCi: true, // Dev servers should not have CI=true\n\t\t})\n\t}\n\n\t/**\n\t * Clean up all running server processes\n\t * This should be called when the manager is being disposed\n\t */\n\tasync cleanup(): Promise<void> {\n\t\tfor (const [port, serverProcess] of this.runningServers.entries()) {\n\t\t\ttry {\n\t\t\t\tlogger.debug(`Cleaning up server process on port ${port}`)\n\t\t\t\tserverProcess.kill()\n\t\t\t} catch (error) {\n\t\t\t\tlogger.warn(\n\t\t\t\t\t`Failed to kill server process on port ${port}: ${error instanceof Error ? error.message : 'Unknown error'}`\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tthis.runningServers.clear()\n\t}\n}\n","import { detectPackageManager } from './package-manager.js'\nimport { logger } from './logger.js'\nimport type { Capability } from '../types/loom.js'\n\n/**\n * Build dev server command for workspace\n * Detects package manager and constructs appropriate command\n */\nexport async function buildDevServerCommand(\n\tworkspacePath: string\n): Promise<string> {\n\tconst packageManager = await detectPackageManager(workspacePath)\n\n\tlet devCommand: string\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\tdevCommand = 'pnpm dev'\n\t\t\tbreak\n\t\tcase 'npm':\n\t\t\tdevCommand = 'npm run dev'\n\t\t\tbreak\n\t\tcase 'yarn':\n\t\t\tdevCommand = 'yarn dev'\n\t\t\tbreak\n\t\tdefault:\n\t\t\t// Fallback to npm (handles bun and other package managers)\n\t\t\tlogger.warn(`Unknown or unsupported package manager: ${packageManager}, defaulting to npm`)\n\t\t\tdevCommand = 'npm run dev'\n\t}\n\n\tlogger.debug(`Dev server command: ${devCommand}`)\n\treturn devCommand\n}\n\n/**\n * Build complete dev server launch command for terminal\n * Includes VSCode launch, echo message (only for web projects), and dev server start\n */\nexport async function getDevServerLaunchCommand(\n\tworkspacePath: string,\n\tport?: number,\n\tcapabilities: Capability[] = []\n): Promise<string> {\n\tconst devCommand = await buildDevServerCommand(workspacePath)\n\n\tconst commands: string[] = []\n\n\t// // Open VSCode\n\t// commands.push('code .')\n\n\t// Echo message (only for web projects)\n\tif (capabilities.includes('web')) {\n\t\tif (port !== undefined) {\n\t\t\tcommands.push(`echo 'Starting dev server on PORT=${port}...'`)\n\t\t} else {\n\t\t\tcommands.push(`echo 'Starting dev server...'`)\n\t\t}\n\t}\n\n\t// Start dev server\n\tcommands.push(devCommand)\n\n\treturn commands.join(' && ')\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
PromptTemplateManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W6WVRHJ6.js";
|
|
5
5
|
import {
|
|
6
6
|
SettingsManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F6WVM437.js";
|
|
8
8
|
import {
|
|
9
9
|
detectClaudeCli,
|
|
10
10
|
launchClaude,
|
|
@@ -122,4 +122,4 @@ var ClaudeService = class {
|
|
|
122
122
|
export {
|
|
123
123
|
ClaudeService
|
|
124
124
|
};
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-6U6VI4SZ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ClaudeService
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6U6VI4SZ.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-VT4PDUYT.js";
|
|
@@ -63,4 +63,4 @@ var ClaudeContextManager = class {
|
|
|
63
63
|
export {
|
|
64
64
|
ClaudeContextManager
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-7WANFUIK.js.map
|