pulse-framework-cli 0.4.4 → 0.4.5

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.
@@ -200,19 +200,28 @@ function registerInitCommand(program) {
200
200
  console.log(`ℹ️ Config exists: ${cfgPath}`);
201
201
  }
202
202
  // ════════════════════════════════════════════════════════════════════════
203
- // .cursorrules kopieren (Fallback ohne MCP)
203
+ // .cursorrules copy (Fallback without MCP)
204
204
  // ════════════════════════════════════════════════════════════════════════
205
205
  const cursorrulesDst = node_path_1.default.join(repoRoot, ".cursorrules");
206
206
  if (!(await fileExists(cursorrulesDst))) {
207
207
  const src = node_path_1.default.join(packageRoot(), "templates", ".cursorrules");
208
- if (await fileExists(src)) {
209
- await promises_1.default.copyFile(src, cursorrulesDst);
210
- // eslint-disable-next-line no-console
211
- console.log(`✅ .cursorrules created (Fallback rules)`);
208
+ try {
209
+ if (await fileExists(src)) {
210
+ await promises_1.default.copyFile(src, cursorrulesDst);
211
+ // eslint-disable-next-line no-console
212
+ console.log(`✅ .cursorrules created (Fallback rules)`);
213
+ }
214
+ else {
215
+ // eslint-disable-next-line no-console
216
+ console.log(`⚠️ .cursorrules template not found: ${src}`);
217
+ }
212
218
  }
213
- else {
219
+ catch (error) {
220
+ const errMsg = error instanceof Error ? error.message : String(error);
221
+ // eslint-disable-next-line no-console
222
+ console.log(`❌ Failed to create .cursorrules: ${errMsg}`);
214
223
  // eslint-disable-next-line no-console
215
- console.log(`⚠️ .cursorrules template not found: ${src}`);
224
+ console.log(` 💡 Check write permissions for: ${repoRoot}`);
216
225
  }
217
226
  }
218
227
  else {
@@ -535,12 +544,13 @@ async function installAgentsMd(repoRoot) {
535
544
  console.log(`ℹ️ AGENTS.md already exists`);
536
545
  return;
537
546
  }
538
- if (await fileExists(agentsSrc)) {
539
- await promises_1.default.copyFile(agentsSrc, agentsDst);
540
- }
541
- else {
542
- // Fallback: Minimal inline version
543
- const content = `# AI Agent Instructions
547
+ try {
548
+ if (await fileExists(agentsSrc)) {
549
+ await promises_1.default.copyFile(agentsSrc, agentsDst);
550
+ }
551
+ else {
552
+ // Fallback: Minimal inline version
553
+ const content = `# AI Agent Instructions
544
554
 
545
555
  > Universal agent configuration for PULSE Framework.
546
556
 
@@ -563,8 +573,31 @@ async function installAgentsMd(repoRoot) {
563
573
 
564
574
  *Generated by PULSE Framework*
565
575
  `;
566
- await promises_1.default.writeFile(agentsDst, content, "utf8");
576
+ await promises_1.default.writeFile(agentsDst, content, "utf8");
577
+ }
578
+ // eslint-disable-next-line no-console
579
+ console.log(`✅ AGENTS.md created (universal for all AI editors)`);
580
+ }
581
+ catch (error) {
582
+ const errMsg = error instanceof Error ? error.message : String(error);
583
+ // eslint-disable-next-line no-console
584
+ console.log(`❌ Failed to create AGENTS.md: ${errMsg}`);
585
+ // Provide helpful hints based on error type
586
+ if (errMsg.includes("EACCES") || errMsg.includes("permission")) {
587
+ // eslint-disable-next-line no-console
588
+ console.log(` 💡 Permission denied. Try: sudo pulse init --agents`);
589
+ }
590
+ else if (errMsg.includes("ENOENT")) {
591
+ // eslint-disable-next-line no-console
592
+ console.log(` 💡 Directory not found. Make sure you're in your project root.`);
593
+ }
594
+ else if (errMsg.includes("ENOSPC")) {
595
+ // eslint-disable-next-line no-console
596
+ console.log(` 💡 No space left on disk.`);
597
+ }
598
+ else {
599
+ // eslint-disable-next-line no-console
600
+ console.log(` 💡 Check write permissions for: ${repoRoot}`);
601
+ }
567
602
  }
568
- // eslint-disable-next-line no-console
569
- console.log(`✅ AGENTS.md created (universal for all AI editors)`);
570
603
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulse-framework-cli",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Pulse Framework CLI – Guardrails, checkpoints, and escalation for AI-assisted development.",
5
5
  "author": "Manuel Fuß <kontakt@manuel-fuss.de>",
6
6
  "license": "MIT",