@ulpi/cli 0.1.6 → 0.1.8

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.
@@ -0,0 +1,591 @@
1
+ # Language-Specific Rules
2
+
3
+ ## Node.js / TypeScript
4
+
5
+ **IMPORTANT:** Only auto-approve the DETECTED package manager, not all of them. If the project uses pnpm, only include the pnpm rule. Do not include npm/yarn/bun rules for a pnpm project.
6
+
7
+ ```yaml
8
+ permissions:
9
+ # Include ONLY the detected package manager — pick ONE of these:
10
+ # If pnpm detected (pnpm-lock.yaml):
11
+ auto-approve-pnpm:
12
+ trigger: PermissionRequest
13
+ matcher: Bash
14
+ command_pattern: "pnpm"
15
+ decision: allow
16
+ # If npm detected (package-lock.json):
17
+ # auto-approve-npm:
18
+ # command_pattern: "npm"
19
+ # If yarn detected (yarn.lock):
20
+ # auto-approve-yarn:
21
+ # command_pattern: "yarn"
22
+ # If bun detected (bun.lockb):
23
+ # auto-approve-bun:
24
+ # command_pattern: "bun"
25
+
26
+ auto-approve-node:
27
+ trigger: PermissionRequest
28
+ matcher: Bash
29
+ command_pattern: "node"
30
+ decision: allow
31
+
32
+ auto-approve-npx:
33
+ trigger: PermissionRequest
34
+ matcher: Bash
35
+ command_pattern: "npx"
36
+ decision: allow
37
+
38
+ # Lock file protection (use whichever lock file is detected)
39
+ block-lock-file:
40
+ trigger: PreToolUse
41
+ matcher: "Write|Edit"
42
+ file_pattern: "pnpm-lock.yaml" # or yarn.lock, package-lock.json, bun.lockb
43
+ decision: deny
44
+ message: "Do not edit lock files manually. Use `{package_manager} install` to manage dependencies."
45
+ locked: true
46
+
47
+ # Build artifact protection
48
+ block-dist:
49
+ trigger: PreToolUse
50
+ matcher: "Write|Edit"
51
+ file_pattern: "dist/**"
52
+ decision: deny
53
+ message: "Do not edit build output. Run the build command to regenerate."
54
+ locked: true
55
+
56
+ block-build-output:
57
+ trigger: PreToolUse
58
+ matcher: "Write|Edit"
59
+ file_pattern: "build/**"
60
+ decision: deny
61
+ message: "Do not edit build output. Run the build command to regenerate."
62
+ locked: true
63
+
64
+ block-node-modules:
65
+ trigger: PreToolUse
66
+ matcher: "Write|Edit"
67
+ file_pattern: "node_modules/**"
68
+ decision: deny
69
+ message: "Do not edit node_modules directly. Use the package manager."
70
+ locked: true
71
+
72
+ block-turbo-cache:
73
+ trigger: PreToolUse
74
+ matcher: "Write|Edit"
75
+ file_pattern: ".turbo/**"
76
+ decision: deny
77
+ message: "Do not edit .turbo cache. Run turbo to regenerate."
78
+ locked: true
79
+
80
+ postconditions:
81
+ # Dependency sync after manifest change
82
+ install-after-package-json:
83
+ trigger: PostToolUse
84
+ matcher: "Write|Edit"
85
+ file_pattern: "package.json"
86
+ run: "{package_manager} install"
87
+ timeout: 60000
88
+ block_on_failure: false
89
+ ```
90
+
91
+ ## Python
92
+
93
+ ```yaml
94
+ permissions:
95
+ auto-approve-pip:
96
+ trigger: PermissionRequest
97
+ matcher: Bash
98
+ command_pattern: "pip"
99
+ decision: allow
100
+
101
+ auto-approve-python:
102
+ trigger: PermissionRequest
103
+ matcher: Bash
104
+ command_pattern: "python"
105
+ decision: allow
106
+
107
+ auto-approve-poetry:
108
+ trigger: PermissionRequest
109
+ matcher: Bash
110
+ command_pattern: "poetry"
111
+ decision: allow
112
+
113
+ auto-approve-uv:
114
+ trigger: PermissionRequest
115
+ matcher: Bash
116
+ command_pattern: "uv"
117
+ decision: allow
118
+
119
+ auto-approve-pytest:
120
+ trigger: PermissionRequest
121
+ matcher: Bash
122
+ command_pattern: "pytest"
123
+ decision: allow
124
+
125
+ auto-approve-ruff:
126
+ trigger: PermissionRequest
127
+ matcher: Bash
128
+ command_pattern: "ruff"
129
+ decision: allow
130
+
131
+ # Lock file protection (use whichever is detected)
132
+ block-poetry-lock:
133
+ trigger: PreToolUse
134
+ matcher: "Write|Edit"
135
+ file_pattern: "poetry.lock" # or uv.lock
136
+ decision: deny
137
+ message: "Do not edit lock files manually. Use `poetry install` or `uv sync` to manage dependencies."
138
+ locked: true
139
+
140
+ # Build artifact protection
141
+ block-pycache:
142
+ trigger: PreToolUse
143
+ matcher: "Write|Edit"
144
+ file_pattern: "**/__pycache__/**"
145
+ decision: deny
146
+ message: "Do not edit __pycache__. These are auto-generated bytecode files."
147
+ locked: true
148
+
149
+ block-egg-info:
150
+ trigger: PreToolUse
151
+ matcher: "Write|Edit"
152
+ file_pattern: "**/*.egg-info/**"
153
+ decision: deny
154
+ message: "Do not edit .egg-info directories. Run setup.py to regenerate."
155
+ locked: true
156
+
157
+ block-mypy-cache:
158
+ trigger: PreToolUse
159
+ matcher: "Write|Edit"
160
+ file_pattern: ".mypy_cache/**"
161
+ decision: deny
162
+ message: "Do not edit .mypy_cache. Run mypy to regenerate."
163
+ locked: true
164
+
165
+ postconditions:
166
+ # Dependency sync (use detected package manager)
167
+ install-after-pyproject:
168
+ trigger: PostToolUse
169
+ matcher: "Write|Edit"
170
+ file_pattern: "pyproject.toml"
171
+ run: "poetry install" # or "uv sync" if uv detected
172
+ timeout: 60000
173
+ block_on_failure: false
174
+
175
+ install-after-requirements:
176
+ trigger: PostToolUse
177
+ matcher: "Write|Edit"
178
+ file_pattern: "requirements*.txt"
179
+ run: "pip install -r {file_path}"
180
+ timeout: 60000
181
+ block_on_failure: false
182
+
183
+ # Lint on save (use detected linter: ruff, flake8, pylint)
184
+ lint-on-save:
185
+ trigger: PostToolUse
186
+ matcher: "Write|Edit"
187
+ file_pattern: "**/*.py"
188
+ run: "ruff check {file_path}" # or flake8/pylint
189
+ timeout: 15000
190
+ block_on_failure: false
191
+
192
+ # Format check on save (use detected formatter: ruff format, black)
193
+ format-check-on-save:
194
+ trigger: PostToolUse
195
+ matcher: "Write|Edit"
196
+ file_pattern: "**/*.py"
197
+ run: "ruff format --check {file_path}" # or "black --check {file_path}"
198
+ timeout: 10000
199
+ block_on_failure: false
200
+ ```
201
+
202
+ ## Go
203
+
204
+ ```yaml
205
+ permissions:
206
+ auto-approve-go:
207
+ trigger: PermissionRequest
208
+ matcher: Bash
209
+ command_pattern: "go"
210
+ decision: allow
211
+
212
+ # Build artifact protection
213
+ block-go-bin:
214
+ trigger: PreToolUse
215
+ matcher: "Write|Edit"
216
+ file_pattern: "bin/**"
217
+ decision: deny
218
+ message: "Do not edit compiled binaries. Run `go build` to regenerate."
219
+ locked: true
220
+
221
+ postconditions:
222
+ # Dependency sync
223
+ go-mod-tidy:
224
+ trigger: PostToolUse
225
+ matcher: "Write|Edit"
226
+ file_pattern: "go.mod"
227
+ run: "go mod tidy"
228
+ timeout: 30000
229
+ block_on_failure: false
230
+
231
+ # Build check on save
232
+ go-build-check:
233
+ trigger: PostToolUse
234
+ matcher: "Write|Edit"
235
+ file_pattern: "**/*.go"
236
+ run: "go build ./..."
237
+ timeout: 30000
238
+ block_on_failure: true
239
+
240
+ go-vet:
241
+ trigger: PostToolUse
242
+ matcher: "Write|Edit"
243
+ file_pattern: "**/*.go"
244
+ run: "go vet ./..."
245
+ timeout: 20000
246
+ block_on_failure: false
247
+ ```
248
+
249
+ ## Rust
250
+
251
+ ```yaml
252
+ permissions:
253
+ auto-approve-cargo:
254
+ trigger: PermissionRequest
255
+ matcher: Bash
256
+ command_pattern: "cargo"
257
+ decision: allow
258
+
259
+ # Lock file protection
260
+ block-cargo-lock:
261
+ trigger: PreToolUse
262
+ matcher: "Write|Edit"
263
+ file_pattern: "Cargo.lock"
264
+ decision: deny
265
+ message: "Do not edit Cargo.lock manually. Use `cargo update` to manage dependencies."
266
+ locked: true
267
+
268
+ # Build artifact protection
269
+ block-target:
270
+ trigger: PreToolUse
271
+ matcher: "Write|Edit"
272
+ file_pattern: "target/**"
273
+ decision: deny
274
+ message: "Do not edit target/. Run `cargo build` to regenerate."
275
+ locked: true
276
+
277
+ postconditions:
278
+ # Dependency check after manifest change
279
+ cargo-check-after-toml:
280
+ trigger: PostToolUse
281
+ matcher: "Write|Edit"
282
+ file_pattern: "Cargo.toml"
283
+ run: "cargo check"
284
+ timeout: 60000
285
+ block_on_failure: false
286
+
287
+ # Build check on save
288
+ cargo-check:
289
+ trigger: PostToolUse
290
+ matcher: "Write|Edit"
291
+ file_pattern: "**/*.rs"
292
+ run: "cargo check"
293
+ timeout: 60000
294
+ block_on_failure: true
295
+
296
+ # Lint on save
297
+ cargo-clippy:
298
+ trigger: PostToolUse
299
+ matcher: "Write|Edit"
300
+ file_pattern: "**/*.rs"
301
+ run: "cargo clippy -- -D warnings"
302
+ timeout: 60000
303
+ block_on_failure: false
304
+ ```
305
+
306
+ ## PHP
307
+
308
+ ```yaml
309
+ permissions:
310
+ auto-approve-composer:
311
+ trigger: PermissionRequest
312
+ matcher: Bash
313
+ command_pattern: "composer"
314
+ decision: allow
315
+
316
+ auto-approve-php:
317
+ trigger: PermissionRequest
318
+ matcher: Bash
319
+ command_pattern: "php"
320
+ decision: allow
321
+
322
+ # Lock file protection
323
+ block-composer-lock:
324
+ trigger: PreToolUse
325
+ matcher: "Write|Edit"
326
+ file_pattern: "composer.lock"
327
+ decision: deny
328
+ message: "Do not edit composer.lock manually. Use `composer install` or `composer update` to manage dependencies."
329
+ locked: true
330
+
331
+ # Build artifact protection
332
+ block-vendor:
333
+ trigger: PreToolUse
334
+ matcher: "Write|Edit"
335
+ file_pattern: "vendor/**"
336
+ decision: deny
337
+ message: "Do not edit vendor/ directly. Use composer to manage dependencies."
338
+ locked: true
339
+
340
+ postconditions:
341
+ # Dependency sync after manifest change
342
+ composer-install:
343
+ trigger: PostToolUse
344
+ matcher: "Write|Edit"
345
+ file_pattern: "composer.json"
346
+ run: "composer install"
347
+ timeout: 60000
348
+ block_on_failure: false
349
+ ```
350
+
351
+ ## Ruby
352
+
353
+ ```yaml
354
+ permissions:
355
+ auto-approve-bundle:
356
+ trigger: PermissionRequest
357
+ matcher: Bash
358
+ command_pattern: "bundle"
359
+ decision: allow
360
+
361
+ auto-approve-ruby:
362
+ trigger: PermissionRequest
363
+ matcher: Bash
364
+ command_pattern: "ruby"
365
+ decision: allow
366
+
367
+ auto-approve-rake:
368
+ trigger: PermissionRequest
369
+ matcher: Bash
370
+ command_pattern: "rake"
371
+ decision: allow
372
+
373
+ # Lock file protection
374
+ block-gemfile-lock:
375
+ trigger: PreToolUse
376
+ matcher: "Write|Edit"
377
+ file_pattern: "Gemfile.lock"
378
+ decision: deny
379
+ message: "Do not edit Gemfile.lock manually. Use `bundle install` to manage dependencies."
380
+ locked: true
381
+
382
+ postconditions:
383
+ # Dependency sync after manifest change
384
+ bundle-install:
385
+ trigger: PostToolUse
386
+ matcher: "Write|Edit"
387
+ file_pattern: "Gemfile"
388
+ run: "bundle install"
389
+ timeout: 60000
390
+ block_on_failure: false
391
+ ```
392
+
393
+ ## Java
394
+
395
+ ```yaml
396
+ permissions:
397
+ auto-approve-mvn:
398
+ trigger: PermissionRequest
399
+ matcher: Bash
400
+ command_pattern: "mvn"
401
+ decision: allow
402
+
403
+ auto-approve-gradle:
404
+ trigger: PermissionRequest
405
+ matcher: Bash
406
+ command_pattern: "gradle"
407
+ decision: allow
408
+
409
+ auto-approve-gradlew:
410
+ trigger: PermissionRequest
411
+ matcher: Bash
412
+ command_pattern: "./gradlew"
413
+ decision: allow
414
+
415
+ # Build artifact protection (Maven)
416
+ block-maven-target:
417
+ trigger: PreToolUse
418
+ matcher: "Write|Edit"
419
+ file_pattern: "target/**"
420
+ decision: deny
421
+ message: "Do not edit target/. Run `mvn compile` to regenerate."
422
+ locked: true
423
+
424
+ # Build artifact protection (Gradle)
425
+ block-gradle-build:
426
+ trigger: PreToolUse
427
+ matcher: "Write|Edit"
428
+ file_pattern: "build/**"
429
+ decision: deny
430
+ message: "Do not edit build/. Run `gradle build` to regenerate."
431
+ locked: true
432
+
433
+ postconditions:
434
+ # Dependency resolution after pom change (Maven)
435
+ mvn-resolve-deps:
436
+ trigger: PostToolUse
437
+ matcher: "Write|Edit"
438
+ file_pattern: "pom.xml"
439
+ run: "mvn dependency:resolve -q"
440
+ timeout: 120000
441
+ block_on_failure: false
442
+
443
+ # Dependency resolution after build.gradle change (Gradle)
444
+ gradle-resolve-deps:
445
+ trigger: PostToolUse
446
+ matcher: "Write|Edit"
447
+ file_pattern: "build.gradle*"
448
+ run: "./gradlew dependencies --quiet"
449
+ timeout: 120000
450
+ block_on_failure: false
451
+ ```
452
+
453
+ ## C# / .NET
454
+
455
+ ```yaml
456
+ permissions:
457
+ auto-approve-dotnet:
458
+ trigger: PermissionRequest
459
+ matcher: Bash
460
+ command_pattern: "dotnet"
461
+ decision: allow
462
+
463
+ # Build artifact protection
464
+ block-bin:
465
+ trigger: PreToolUse
466
+ matcher: "Write|Edit"
467
+ file_pattern: "bin/**"
468
+ decision: deny
469
+ message: "Do not edit bin/. Run `dotnet build` to regenerate."
470
+ locked: true
471
+
472
+ block-obj:
473
+ trigger: PreToolUse
474
+ matcher: "Write|Edit"
475
+ file_pattern: "obj/**"
476
+ decision: deny
477
+ message: "Do not edit obj/. Run `dotnet build` to regenerate."
478
+ locked: true
479
+
480
+ postconditions:
481
+ # Build check on save
482
+ dotnet-build:
483
+ trigger: PostToolUse
484
+ matcher: "Write|Edit"
485
+ file_pattern: "**/*.cs"
486
+ run: "dotnet build"
487
+ timeout: 60000
488
+ block_on_failure: true
489
+
490
+ # Dependency sync after csproj change
491
+ dotnet-restore:
492
+ trigger: PostToolUse
493
+ matcher: "Write|Edit"
494
+ file_pattern: "**/*.csproj"
495
+ run: "dotnet restore"
496
+ timeout: 60000
497
+ block_on_failure: false
498
+ ```
499
+
500
+ ## Elixir
501
+
502
+ ```yaml
503
+ permissions:
504
+ auto-approve-mix:
505
+ trigger: PermissionRequest
506
+ matcher: Bash
507
+ command_pattern: "mix"
508
+ decision: allow
509
+
510
+ auto-approve-iex:
511
+ trigger: PermissionRequest
512
+ matcher: Bash
513
+ command_pattern: "iex"
514
+ decision: allow
515
+
516
+ # Lock file protection
517
+ block-mix-lock:
518
+ trigger: PreToolUse
519
+ matcher: "Write|Edit"
520
+ file_pattern: "mix.lock"
521
+ decision: deny
522
+ message: "Do not edit mix.lock manually. Use `mix deps.get` to manage dependencies."
523
+ locked: true
524
+
525
+ # Build artifact protection
526
+ block-elixir-build:
527
+ trigger: PreToolUse
528
+ matcher: "Write|Edit"
529
+ file_pattern: "_build/**"
530
+ decision: deny
531
+ message: "Do not edit _build/. Run `mix compile` to regenerate."
532
+ locked: true
533
+
534
+ postconditions:
535
+ # Dependency sync after manifest change
536
+ mix-deps-get:
537
+ trigger: PostToolUse
538
+ matcher: "Write|Edit"
539
+ file_pattern: "mix.exs"
540
+ run: "mix deps.get"
541
+ timeout: 60000
542
+ block_on_failure: false
543
+
544
+ # Build check on save
545
+ mix-compile:
546
+ trigger: PostToolUse
547
+ matcher: "Write|Edit"
548
+ file_pattern: "**/*.ex"
549
+ run: "mix compile --warnings-as-errors"
550
+ timeout: 30000
551
+ block_on_failure: true
552
+ ```
553
+
554
+ ## Docker (Add if Dockerfile present)
555
+
556
+ ```yaml
557
+ permissions:
558
+ auto-approve-docker:
559
+ trigger: PermissionRequest
560
+ matcher: Bash
561
+ command_pattern: "docker"
562
+ decision: allow
563
+
564
+ auto-approve-docker-compose:
565
+ trigger: PermissionRequest
566
+ matcher: Bash
567
+ command_pattern: "docker compose"
568
+ decision: allow
569
+
570
+ block-system-prune:
571
+ trigger: PreToolUse
572
+ matcher: Bash
573
+ command_pattern: "docker system prune"
574
+ decision: deny
575
+ message: "docker system prune removes all unused data."
576
+
577
+ preconditions:
578
+ warn-dockerfile:
579
+ trigger: PreToolUse
580
+ matcher: "Write|Edit"
581
+ file_pattern: "Dockerfile"
582
+ message: "Dockerfile changes affect container builds and deployment. Rebuild and test locally."
583
+ priority: 60
584
+
585
+ warn-compose:
586
+ trigger: PreToolUse
587
+ matcher: "Write|Edit"
588
+ file_pattern: "docker-compose.yml" # or compose.yml
589
+ message: "Docker Compose changes affect service orchestration. Test with `docker compose up` after editing."
590
+ priority: 60
591
+ ```
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createApiServer
3
- } from "./chunk-VXH5Y4FO.js";
3
+ } from "./chunk-WVOZE25N.js";
4
4
  import "./chunk-4XTHZVDS.js";
5
5
  import {
6
6
  attachWebSocket
@@ -60,7 +60,7 @@ async function main() {
60
60
  const projectDir = process.argv[2] || process.cwd();
61
61
  const secret = generateApiSecret2();
62
62
  setApiSecret2(secret);
63
- const { createApiServer: createApiServer2 } = await import("./server-KKSETHDV-XSSLEENT.js");
63
+ const { createApiServer: createApiServer2 } = await import("./server-U7PQ6FTS-MG4MJPTS.js");
64
64
  const { attachWebSocket: attachWebSocket2 } = await import("./server-COL4AXKU-P7S7NNF6.js");
65
65
  const server = createApiServer2(projectDir);
66
66
  const wss = attachWebSocket2(server, projectDir);
@@ -216,7 +216,7 @@ async function runStart(args, projectDir) {
216
216
  historyReady = true;
217
217
  } else {
218
218
  const projectName = path2.basename(projectDir);
219
- await initHistoryBranch(projectDir, projectName, "0.1.6");
219
+ await initHistoryBranch(projectDir, projectName, "0.1.8");
220
220
  historyReady = true;
221
221
  }
222
222
  } catch {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  uninstallHooks
3
- } from "./chunk-VVEDXI7E.js";
3
+ } from "./chunk-XKF4DPUM.js";
4
4
  import "./chunk-C7CLUQI6.js";
5
5
  import "./chunk-4VNS5WPM.js";
6
6
 
@@ -11,7 +11,7 @@ async function runUninstall(_args, projectDir) {
11
11
  uninstallHooks(projectDir);
12
12
  console.log(chalk.green("\u2713 Hooks removed from .claude/settings.json"));
13
13
  try {
14
- const { isSupported, isLaunchAgentInstalled, uninstallLaunchAgent } = await import("./launchd-6AWT54HR.js");
14
+ const { isSupported, isLaunchAgentInstalled, uninstallLaunchAgent } = await import("./launchd-U3MSWBRH.js");
15
15
  if (isSupported() && isLaunchAgentInstalled()) {
16
16
  uninstallLaunchAgent();
17
17
  console.log(chalk.green("\u2713 Removed LaunchAgent for UI server"));
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  checkForUpdates
3
- } from "./chunk-KYYI23AQ.js";
3
+ } from "./chunk-BV5UYMYQ.js";
4
4
  import {
5
5
  CLI_BIN_NAME,
6
6
  CLI_NPM_PACKAGE
@@ -36,7 +36,7 @@ Run '${CLI_BIN_NAME} update' to install the update.`));
36
36
  console.log(chalk.green(`
37
37
  \u2713 Updated to v${info.latest}`));
38
38
  try {
39
- const { isSupported, isLaunchAgentInstalled, needsLegacyMigration, installLaunchAgent, restartLaunchAgent } = await import("./launchd-6AWT54HR.js");
39
+ const { isSupported, isLaunchAgentInstalled, needsLegacyMigration, installLaunchAgent, restartLaunchAgent } = await import("./launchd-U3MSWBRH.js");
40
40
  if (isSupported()) {
41
41
  if (needsLegacyMigration()) {
42
42
  installLaunchAgent();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  checkForUpdates,
3
3
  getCurrentVersion
4
- } from "./chunk-KYYI23AQ.js";
4
+ } from "./chunk-BV5UYMYQ.js";
5
5
  import "./chunk-C7CLUQI6.js";
6
6
  import "./chunk-4VNS5WPM.js";
7
7
  export {