vibebusiness 1.2.49 → 1.2.53
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/.next/standalone/.env +1 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +20 -20
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +4 -4
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/api/analyze/route.js +1 -1
- package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
- package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/provider-status/route.js +1 -0
- package/.next/standalone/.next/server/app/api/provider-status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/social/page.js +1 -1
- package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/social.html +1 -1
- package/.next/standalone/.next/server/app/social.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +12 -11
- package/.next/standalone/.next/server/chunks/3794.js +92 -17
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/data/business-context.json +60 -6
- package/.next/standalone/data/goals.json +50 -10
- package/.next/standalone/data/ideas.json +1278 -597
- package/.next/standalone/data/implementations.json +101 -0
- package/.next/standalone/data/posthog.json +68 -0
- package/.next/standalone/data/sessions.json +5 -4
- package/.next/standalone/data/social.json +86 -3
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/analyze.ts +10 -0
- package/.next/standalone/scripts/implement.ts +37 -30
- package/.next/standalone/scripts/skills/social-media.ts +172 -2
- package/.next/static/chunks/59-76eecfb6e8216043.js +1 -0
- package/.next/static/chunks/app/goals/[id]/page-051064c3146131cc.js +1 -0
- package/.next/static/chunks/app/ideas/[id]/page-adaeb619cd0425e9.js +1 -0
- package/.next/static/chunks/app/roadmap/[id]/page-3822586c0d64fff1.js +1 -0
- package/.next/static/chunks/app/settings/page-2204cc936ec9474b.js +1 -0
- package/.next/static/chunks/app/social/page-018893f87b308651.js +1 -0
- package/.next/static/chunks/{main-61d2f25883998186.js → main-c99f3473a63aa803.js} +1 -1
- package/.next/static/css/d8bd6d69d1ff97e3.css +3 -0
- package/dist/bin/vibebusiness.js +12 -0
- package/dist/scripts/analyze.js +170 -68
- package/dist/scripts/chat.js +137 -36
- package/dist/scripts/heartbeat.js +617 -348
- package/dist/scripts/implement.js +218 -70
- package/dist/scripts/init.js +164 -16
- package/dist/scripts/provider.js +428 -0
- package/dist/scripts/scan.js +44 -5
- package/package.json +1 -1
- package/.next/static/chunks/59-a053b1c0e85128de.js +0 -1
- package/.next/static/chunks/app/goals/[id]/page-8dbeab5cc8cf0988.js +0 -1
- package/.next/static/chunks/app/ideas/[id]/page-89e3625db9017166.js +0 -1
- package/.next/static/chunks/app/roadmap/[id]/page-f437e783039534c4.js +0 -1
- package/.next/static/chunks/app/settings/page-d2d630a799b6b495.js +0 -1
- package/.next/static/chunks/app/social/page-69e480936711ccf2.js +0 -1
- package/.next/static/css/179dd3e0738c2fe4.css +0 -3
- /package/.next/static/{zIIaTqrawBK1MmHg37JOr → p1Sl4kPMQcYC3c1LgbNSP}/_buildManifest.js +0 -0
- /package/.next/static/{zIIaTqrawBK1MmHg37JOr → p1Sl4kPMQcYC3c1LgbNSP}/_ssgManifest.js +0 -0
package/dist/scripts/chat.js
CHANGED
|
@@ -24,25 +24,120 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
));
|
|
25
25
|
|
|
26
26
|
// scripts/chat.ts
|
|
27
|
+
var import_child_process2 = require("child_process");
|
|
28
|
+
var fs3 = __toESM(require("fs"));
|
|
29
|
+
var path3 = __toESM(require("path"));
|
|
30
|
+
|
|
31
|
+
// scripts/lib/ai-provider.ts
|
|
27
32
|
var import_child_process = require("child_process");
|
|
28
|
-
var
|
|
29
|
-
var
|
|
33
|
+
var fs = __toESM(require("fs"));
|
|
34
|
+
var path = __toESM(require("path"));
|
|
35
|
+
var CREDENTIALS_DIR = path.join(process.env.HOME || "", ".vibebusiness");
|
|
36
|
+
var CREDENTIALS_FILE = path.join(CREDENTIALS_DIR, "credentials.json");
|
|
37
|
+
function loadCredentials() {
|
|
38
|
+
try {
|
|
39
|
+
if (fs.existsSync(CREDENTIALS_FILE)) {
|
|
40
|
+
return JSON.parse(fs.readFileSync(CREDENTIALS_FILE, "utf-8"));
|
|
41
|
+
}
|
|
42
|
+
} catch {
|
|
43
|
+
}
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
function detectClaudeCLI(customPath) {
|
|
47
|
+
const claudeBin = customPath || "claude";
|
|
48
|
+
try {
|
|
49
|
+
const version = (0, import_child_process.execSync)(`${claudeBin} --version 2>/dev/null`, {
|
|
50
|
+
timeout: 1e4,
|
|
51
|
+
encoding: "utf-8"
|
|
52
|
+
}).trim();
|
|
53
|
+
return { found: true, path: claudeBin, version };
|
|
54
|
+
} catch {
|
|
55
|
+
const commonPaths = [
|
|
56
|
+
"/usr/local/bin/claude",
|
|
57
|
+
path.join(process.env.HOME || "", ".claude", "bin", "claude"),
|
|
58
|
+
path.join(process.env.HOME || "", ".local", "bin", "claude")
|
|
59
|
+
];
|
|
60
|
+
for (const p of commonPaths) {
|
|
61
|
+
try {
|
|
62
|
+
if (fs.existsSync(p)) {
|
|
63
|
+
const version = (0, import_child_process.execSync)(`${p} --version 2>/dev/null`, {
|
|
64
|
+
timeout: 1e4,
|
|
65
|
+
encoding: "utf-8"
|
|
66
|
+
}).trim();
|
|
67
|
+
return { found: true, path: p, version };
|
|
68
|
+
}
|
|
69
|
+
} catch {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return { found: false, path: claudeBin };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function detectBYOKKeys() {
|
|
77
|
+
if (process.env.ANTHROPIC_API_KEY) {
|
|
78
|
+
return { provider: "anthropic-api", key: process.env.ANTHROPIC_API_KEY, source: "env" };
|
|
79
|
+
}
|
|
80
|
+
if (process.env.OPENAI_API_KEY) {
|
|
81
|
+
return { provider: "openai-api", key: process.env.OPENAI_API_KEY, source: "env" };
|
|
82
|
+
}
|
|
83
|
+
if (process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY) {
|
|
84
|
+
return { provider: "google-api", key: process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY, source: "env" };
|
|
85
|
+
}
|
|
86
|
+
const creds = loadCredentials();
|
|
87
|
+
if (creds.ANTHROPIC_API_KEY) {
|
|
88
|
+
process.env.ANTHROPIC_API_KEY = creds.ANTHROPIC_API_KEY;
|
|
89
|
+
return { provider: "anthropic-api", key: creds.ANTHROPIC_API_KEY, source: "credentials" };
|
|
90
|
+
}
|
|
91
|
+
if (creds.OPENAI_API_KEY) {
|
|
92
|
+
process.env.OPENAI_API_KEY = creds.OPENAI_API_KEY;
|
|
93
|
+
return { provider: "openai-api", key: creds.OPENAI_API_KEY, source: "credentials" };
|
|
94
|
+
}
|
|
95
|
+
if (creds.GOOGLE_API_KEY || creds.GEMINI_API_KEY) {
|
|
96
|
+
const key = creds.GOOGLE_API_KEY || creds.GEMINI_API_KEY;
|
|
97
|
+
process.env.GOOGLE_API_KEY = key;
|
|
98
|
+
return { provider: "google-api", key, source: "credentials" };
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
var CONFIG_DIR = path.join(process.env.HOME || "", ".ai-analyst");
|
|
103
|
+
var PROVIDER_CONFIG_FILE = path.join(CONFIG_DIR, "provider.json");
|
|
104
|
+
function requireClaudeCLI(feature) {
|
|
105
|
+
const cli = detectClaudeCLI();
|
|
106
|
+
if (cli.found) {
|
|
107
|
+
return cli.path;
|
|
108
|
+
}
|
|
109
|
+
const featureLabel = feature ? ` (${feature})` : "";
|
|
110
|
+
const byok = detectBYOKKeys();
|
|
111
|
+
if (byok) {
|
|
112
|
+
throw new Error(
|
|
113
|
+
`This feature${featureLabel} requires Claude Code CLI for file and tool access.
|
|
114
|
+
Your API key is detected and works for reasoning tasks (heartbeat, idea evaluation),
|
|
115
|
+
but codebase analysis and implementation need the full CLI.
|
|
116
|
+
Install it with: npm install -g @anthropic-ai/claude-code`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
throw new Error(
|
|
120
|
+
`No AI provider found${featureLabel}.
|
|
121
|
+
Install Claude Code CLI: npm install -g @anthropic-ai/claude-code
|
|
122
|
+
Or set an API key: export ANTHROPIC_API_KEY=sk-ant-...`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
30
125
|
|
|
31
126
|
// scripts/lib/paths.ts
|
|
32
|
-
var
|
|
33
|
-
var
|
|
127
|
+
var path2 = __toESM(require("path"));
|
|
128
|
+
var fs2 = __toESM(require("fs"));
|
|
34
129
|
function findProjectRoot() {
|
|
35
130
|
const cwd = process.cwd();
|
|
36
|
-
if (
|
|
131
|
+
if (fs2.existsSync(path2.join(cwd, "data", "config.json"))) {
|
|
37
132
|
return cwd;
|
|
38
133
|
}
|
|
39
134
|
try {
|
|
40
|
-
const entries =
|
|
135
|
+
const entries = fs2.readdirSync(cwd, { withFileTypes: true });
|
|
41
136
|
for (const entry of entries) {
|
|
42
137
|
if (entry.isDirectory()) {
|
|
43
|
-
const candidate =
|
|
44
|
-
if (
|
|
45
|
-
return
|
|
138
|
+
const candidate = path2.join(cwd, entry.name, "data", "config.json");
|
|
139
|
+
if (fs2.existsSync(candidate)) {
|
|
140
|
+
return path2.join(cwd, entry.name);
|
|
46
141
|
}
|
|
47
142
|
}
|
|
48
143
|
}
|
|
@@ -50,9 +145,9 @@ function findProjectRoot() {
|
|
|
50
145
|
}
|
|
51
146
|
let dir = cwd;
|
|
52
147
|
for (let i = 0; i < 5; i++) {
|
|
53
|
-
const parent =
|
|
148
|
+
const parent = path2.dirname(dir);
|
|
54
149
|
if (parent === dir) break;
|
|
55
|
-
if (
|
|
150
|
+
if (fs2.existsSync(path2.join(parent, "data", "config.json"))) {
|
|
56
151
|
return parent;
|
|
57
152
|
}
|
|
58
153
|
dir = parent;
|
|
@@ -60,26 +155,26 @@ function findProjectRoot() {
|
|
|
60
155
|
return cwd;
|
|
61
156
|
}
|
|
62
157
|
var PROJECT_DIR = findProjectRoot();
|
|
63
|
-
var DATA_DIR =
|
|
64
|
-
var STATUS_FILE =
|
|
65
|
-
var TODO_FILE =
|
|
66
|
-
var MEMORY_FILE =
|
|
67
|
-
var IDEAS_FILE =
|
|
68
|
-
var GOALS_FILE =
|
|
69
|
-
var SESSIONS_FILE =
|
|
70
|
-
var CONFIG_FILE =
|
|
71
|
-
var BUSINESS_CONTEXT_FILE =
|
|
72
|
-
var HYPOTHESES_FILE =
|
|
73
|
-
var IMPLEMENTATIONS_FILE =
|
|
74
|
-
var ROADMAP_FILE =
|
|
75
|
-
var COMPETITORS_FILE =
|
|
76
|
-
var POSITIONING_FILE =
|
|
77
|
-
var PAGES_FILE =
|
|
78
|
-
var PAYMENTS_FILE =
|
|
79
|
-
var POSTHOG_FILE =
|
|
80
|
-
var SOCIAL_FILE =
|
|
81
|
-
var TEMPLATES_DIR =
|
|
82
|
-
var COMMAND_TEMPLATES_DIR =
|
|
158
|
+
var DATA_DIR = path2.join(PROJECT_DIR, "data");
|
|
159
|
+
var STATUS_FILE = path2.join(PROJECT_DIR, "STATUS.md");
|
|
160
|
+
var TODO_FILE = path2.join(PROJECT_DIR, "TODO.md");
|
|
161
|
+
var MEMORY_FILE = path2.join(PROJECT_DIR, "MEMORY.md");
|
|
162
|
+
var IDEAS_FILE = path2.join(DATA_DIR, "ideas.json");
|
|
163
|
+
var GOALS_FILE = path2.join(DATA_DIR, "goals.json");
|
|
164
|
+
var SESSIONS_FILE = path2.join(DATA_DIR, "sessions.json");
|
|
165
|
+
var CONFIG_FILE = path2.join(DATA_DIR, "config.json");
|
|
166
|
+
var BUSINESS_CONTEXT_FILE = path2.join(DATA_DIR, "business-context.json");
|
|
167
|
+
var HYPOTHESES_FILE = path2.join(DATA_DIR, "hypotheses.json");
|
|
168
|
+
var IMPLEMENTATIONS_FILE = path2.join(DATA_DIR, "implementations.json");
|
|
169
|
+
var ROADMAP_FILE = path2.join(DATA_DIR, "roadmap.json");
|
|
170
|
+
var COMPETITORS_FILE = path2.join(DATA_DIR, "competitors.json");
|
|
171
|
+
var POSITIONING_FILE = path2.join(DATA_DIR, "positioning.json");
|
|
172
|
+
var PAGES_FILE = path2.join(DATA_DIR, "pages.json");
|
|
173
|
+
var PAYMENTS_FILE = path2.join(DATA_DIR, "payments.json");
|
|
174
|
+
var POSTHOG_FILE = path2.join(DATA_DIR, "posthog.json");
|
|
175
|
+
var SOCIAL_FILE = path2.join(DATA_DIR, "social.json");
|
|
176
|
+
var TEMPLATES_DIR = path2.join(__dirname, "..", "..", "templates");
|
|
177
|
+
var COMMAND_TEMPLATES_DIR = path2.join(TEMPLATES_DIR, "commands");
|
|
83
178
|
|
|
84
179
|
// scripts/lib/skill-registry.ts
|
|
85
180
|
var SKILL_REGISTRY = [
|
|
@@ -241,7 +336,7 @@ function buildSkillGuide() {
|
|
|
241
336
|
// scripts/chat.ts
|
|
242
337
|
function readFileSafe(filePath) {
|
|
243
338
|
try {
|
|
244
|
-
return
|
|
339
|
+
return fs3.readFileSync(filePath, "utf-8");
|
|
245
340
|
} catch {
|
|
246
341
|
return null;
|
|
247
342
|
}
|
|
@@ -307,7 +402,7 @@ You have full Claude Code capabilities. The user may ask you to:
|
|
|
307
402
|
| \`data/competitors.json\` | \`{ competitors[], last_updated }\` | Competitor intelligence |
|
|
308
403
|
| \`data/positioning.json\` | \`PositioningData\` | Brand positioning & copy bank |
|
|
309
404
|
| \`data/sessions.json\` | \`{ sessions: AnalysisSession[] }\` | Analysis session history |`);
|
|
310
|
-
const docsDir =
|
|
405
|
+
const docsDir = path3.join(PROJECT_DIR, "docs");
|
|
311
406
|
const docDescriptions = {
|
|
312
407
|
"ARCHITECTURE.md": "System architecture",
|
|
313
408
|
"business_idea.md": "Market analysis, competitive landscape",
|
|
@@ -316,8 +411,8 @@ You have full Claude Code capabilities. The user may ask you to:
|
|
|
316
411
|
};
|
|
317
412
|
const docRows = [];
|
|
318
413
|
for (const [file, desc] of Object.entries(docDescriptions)) {
|
|
319
|
-
const fullPath =
|
|
320
|
-
if (
|
|
414
|
+
const fullPath = path3.join(docsDir, file);
|
|
415
|
+
if (fs3.existsSync(fullPath)) {
|
|
321
416
|
const lines = readFileSafe(fullPath)?.split("\n").length || 0;
|
|
322
417
|
docRows.push(`| \`docs/${file}\` | ${desc} (~${lines} lines) |`);
|
|
323
418
|
}
|
|
@@ -380,10 +475,16 @@ function main() {
|
|
|
380
475
|
if (initialPrompt) {
|
|
381
476
|
claudeArgs.push("-p", initialPrompt);
|
|
382
477
|
}
|
|
478
|
+
try {
|
|
479
|
+
requireClaudeCLI("interactive chat");
|
|
480
|
+
} catch (err) {
|
|
481
|
+
console.error(err.message);
|
|
482
|
+
process.exit(1);
|
|
483
|
+
}
|
|
383
484
|
const env = { ...process.env };
|
|
384
485
|
delete env.CLAUDE_CODE;
|
|
385
486
|
delete env.CLAUDECODE;
|
|
386
|
-
const child = (0,
|
|
487
|
+
const child = (0, import_child_process2.spawn)("claude", claudeArgs, {
|
|
387
488
|
cwd: PROJECT_DIR,
|
|
388
489
|
stdio: "inherit",
|
|
389
490
|
env
|