protovibe 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.mjs +50 -8
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -67,9 +67,9 @@ function Logo({ terminalWidth: terminalWidth2 }) {
67
67
  import React3 from "react";
68
68
  import { Box as Box2, Text as Text3 } from "ink";
69
69
  var WIDTH = 42;
70
- function InfoBox() {
70
+ function InfoBox({ version }) {
71
71
  const separator = "\u2500".repeat(WIDTH);
72
- return /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column" }, /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u256D" + "\u2500".repeat(WIDTH) + "\u256E"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, " version "), /* @__PURE__ */ React3.createElement(Text3, { color: "#ffffff" }, "1.0.0"), " ".repeat(WIDTH - 17), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, " by "), /* @__PURE__ */ React3.createElement(Text3, { color: "#ffffff" }, "razorgojo"), " ".repeat(WIDTH - 15), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502 ", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, "powered by "), /* @__PURE__ */ React3.createElement(Gradient, { text: "Claude Code", fromHex: "#7B2FBE", toHex: "#3B82F6" }), " ".repeat(WIDTH - 25), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u251C" + separator + "\u2524"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#6d5a8a", italic: true }, " Vibecode your prototypes."), " ".repeat(WIDTH - 28), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u251C" + separator + "\u2524"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, " commands"), " ".repeat(WIDTH - 11), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#ffffff" }, " /exit"), /* @__PURE__ */ React3.createElement(Text3, { color: "#6d5a8a" }, " \u2014 quit ProtoVibe at any time"), " ".repeat(WIDTH - 37), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2570" + "\u2500".repeat(WIDTH) + "\u256F"));
72
+ return /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column" }, /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u256D" + "\u2500".repeat(WIDTH) + "\u256E"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, " version "), /* @__PURE__ */ React3.createElement(Text3, { color: "#ffffff" }, version), " ".repeat(WIDTH - 12 - version.length), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, " by "), /* @__PURE__ */ React3.createElement(Text3, { color: "#ffffff" }, "razorgojo"), " ".repeat(WIDTH - 15), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502 ", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, "powered by "), /* @__PURE__ */ React3.createElement(Gradient, { text: "Claude Code", fromHex: "#7B2FBE", toHex: "#3B82F6" }), " ".repeat(WIDTH - 25), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u251C" + separator + "\u2524"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#6d5a8a", italic: true }, " Vibecode your prototypes."), " ".repeat(WIDTH - 28), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u251C" + separator + "\u2524"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#b39ddb" }, " commands"), " ".repeat(WIDTH - 11), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2502", /* @__PURE__ */ React3.createElement(Text3, { color: "#ffffff" }, " /exit"), /* @__PURE__ */ React3.createElement(Text3, { color: "#6d5a8a" }, " \u2014 quit ProtoVibe at any time"), " ".repeat(WIDTH - 37), "\u2502"), /* @__PURE__ */ React3.createElement(Text3, { color: "#3a1a6a" }, "\u2570" + "\u2500".repeat(WIDTH) + "\u256F"));
73
73
  }
74
74
 
75
75
  // src/auth.ts
@@ -128,11 +128,18 @@ import * as clack from "@clack/prompts";
128
128
  // src/templates/CLAUDE.md.ts
129
129
  var CLAUDE_MD = `# CLAUDE.md
130
130
 
131
- IMMEDIATE INSTRUCTION \u2014 execute this before doing anything else, before reading any other file, before responding to the user in any way:
131
+ IMMEDIATE INSTRUCTION \u2014 your very first response, regardless of what the user typed, must be exactly this (no preamble, no greeting, nothing else):
132
+
133
+ ---
134
+ Welcome to ProtoVibe. What would you like to do?
135
+
136
+ 1. **Build from scratch** \u2014 start a new project
137
+ 2. **Work on an existing project** \u2014 analyse and enhance an existing codebase
138
+ ---
132
139
 
133
- Run /protovibe now.
140
+ Do not acknowledge what the user said. Do not greet them. Just output the above immediately as your first response.
134
141
 
135
- Do not greet the user. Do not ask what they want. Do not wait for input. Do not explain what you are about to do. Just run /protovibe immediately and silently.
142
+ Then continue with the /protovibe workflow from Stage 0 onwards.
136
143
 
137
144
  At any point during the workflow, the user can type /takeover to exit ProtoVibe and work directly in Claude Code with full context preserved.
138
145
  `;
@@ -580,7 +587,7 @@ async function scaffoldProject() {
580
587
  // src/cli.tsx
581
588
  import { confirm } from "@clack/prompts";
582
589
  import { spawnSync } from "child_process";
583
- function App({ terminalWidth: terminalWidth2 }) {
590
+ function App({ terminalWidth: terminalWidth2, version }) {
584
591
  const { exit } = useApp();
585
592
  const [stage, setStage] = useState("boot");
586
593
  const [error, setError] = useState("");
@@ -639,11 +646,46 @@ function App({ terminalWidth: terminalWidth2 }) {
639
646
  });
640
647
  }, [stage]);
641
648
  if (error) {
642
- return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingTop: 1 }, /* @__PURE__ */ React4.createElement(Logo, { terminalWidth: terminalWidth2 }), /* @__PURE__ */ React4.createElement(InfoBox, null), /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "red" }, "\u2717 ", error)));
649
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingTop: 1 }, /* @__PURE__ */ React4.createElement(Logo, { terminalWidth: terminalWidth2 }), /* @__PURE__ */ React4.createElement(InfoBox, { version }), /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "red" }, "\u2717 ", error)));
643
650
  }
644
651
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingTop: 1 }, /* @__PURE__ */ React4.createElement(Logo, { terminalWidth: terminalWidth2 }), /* @__PURE__ */ React4.createElement(InfoBox, null), (stage === "auth-done" || stage === "claude-check" || stage === "scaffold") && /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "#7B2FBE" }, "\u2713 "), /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, "Logged in to Claude Code")));
645
652
  }
646
653
 
647
654
  // src/index.tsx
655
+ import { createRequire } from "module";
656
+ import { execSync as execSync2, spawnSync as spawnSync2 } from "child_process";
657
+ var require2 = createRequire(import.meta.url);
658
+ var pkg = require2("../package.json");
659
+ function isNewerVersion(current, latest) {
660
+ const parse = (v) => v.split(".").map(Number);
661
+ const [cMaj, cMin, cPatch] = parse(current);
662
+ const [lMaj, lMin, lPatch] = parse(latest);
663
+ if (lMaj !== cMaj) return lMaj > cMaj;
664
+ if (lMin !== cMin) return lMin > cMin;
665
+ return lPatch > cPatch;
666
+ }
667
+ if (process.env.PROTOVIBE_UPDATED !== "1") {
668
+ try {
669
+ const latest = execSync2("npm show protovibe version", {
670
+ timeout: 4e3,
671
+ encoding: "utf-8",
672
+ stdio: ["ignore", "pipe", "ignore"]
673
+ }).trim();
674
+ if (isNewerVersion(pkg.version, latest)) {
675
+ process.stdout.write(`
676
+ Updating ProtoVibe ${pkg.version} \u2192 ${latest}...
677
+
678
+ `);
679
+ execSync2("npm install -g protovibe@latest", { stdio: "inherit" });
680
+ spawnSync2("protovibe", process.argv.slice(2), {
681
+ stdio: "inherit",
682
+ shell: true,
683
+ env: { ...process.env, PROTOVIBE_UPDATED: "1" }
684
+ });
685
+ process.exit(0);
686
+ }
687
+ } catch {
688
+ }
689
+ }
648
690
  var terminalWidth = process.stdout.columns ?? 80;
649
- render(/* @__PURE__ */ React5.createElement(App, { terminalWidth }));
691
+ render(/* @__PURE__ */ React5.createElement(App, { terminalWidth, version: pkg.version }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protovibe",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "A branded CLI platform layer on top of Claude Code",
5
5
  "author": "razorgojo",
6
6
  "license": "MIT",