@inkeep/agents-cli 0.0.0-dev-20250920001717 → 0.0.0-dev-20250924191551
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/dist/index.js +149 -22
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -21505,6 +21505,7 @@ import { existsSync as existsSync2 } from "fs";
|
|
|
21505
21505
|
import { createRequire } from "module";
|
|
21506
21506
|
import { dirname, join as join2 } from "path";
|
|
21507
21507
|
import chalk3 from "chalk";
|
|
21508
|
+
import fs4 from "fs-extra";
|
|
21508
21509
|
import ora2 from "ora";
|
|
21509
21510
|
var require2 = createRequire(import.meta.url);
|
|
21510
21511
|
function resolveWebRuntime() {
|
|
@@ -21517,22 +21518,18 @@ function resolveWebRuntime() {
|
|
|
21517
21518
|
}
|
|
21518
21519
|
}
|
|
21519
21520
|
function startWebApp({ port = 3e3, host = "localhost" }) {
|
|
21521
|
+
console.log("");
|
|
21520
21522
|
const spinner = ora2("Starting dashboard server...").start();
|
|
21521
21523
|
try {
|
|
21522
21524
|
const rt = resolveWebRuntime();
|
|
21523
21525
|
const entry = join2(rt, "server.js");
|
|
21524
|
-
console.log(entry);
|
|
21525
21526
|
if (!existsSync2(entry)) {
|
|
21526
21527
|
spinner.fail("Dashboard server not found");
|
|
21527
|
-
console.error(
|
|
21528
|
-
chalk3.red("The dashboard server has not been built yet. Please run the following commands:")
|
|
21529
|
-
);
|
|
21530
|
-
console.error(chalk3.yellow(" cd agents-manage-ui"));
|
|
21531
|
-
console.error(chalk3.yellow(" pnpm build"));
|
|
21532
|
-
console.error(chalk3.yellow(" pnpm start"));
|
|
21528
|
+
console.error(chalk3.red("The dashboard server has not been built yet."));
|
|
21533
21529
|
process.exit(1);
|
|
21534
21530
|
}
|
|
21535
21531
|
spinner.succeed("Starting dashboard server...");
|
|
21532
|
+
console.log("");
|
|
21536
21533
|
const child = fork(entry, [], {
|
|
21537
21534
|
cwd: rt,
|
|
21538
21535
|
env: {
|
|
@@ -21544,8 +21541,11 @@ function startWebApp({ port = 3e3, host = "localhost" }) {
|
|
|
21544
21541
|
stdio: "inherit"
|
|
21545
21542
|
});
|
|
21546
21543
|
console.log(chalk3.green(`\u{1F680} Dashboard server started at http://${host}:${port}`));
|
|
21544
|
+
console.log("");
|
|
21547
21545
|
console.log(chalk3.gray("Press Ctrl+C to stop the server"));
|
|
21546
|
+
console.log("");
|
|
21548
21547
|
process.on("SIGINT", () => {
|
|
21548
|
+
console.log("");
|
|
21549
21549
|
console.log(chalk3.yellow("\n\u{1F6D1} Stopping dashboard server..."));
|
|
21550
21550
|
child.kill("SIGINT");
|
|
21551
21551
|
process.exit(0);
|
|
@@ -21561,11 +21561,135 @@ function startWebApp({ port = 3e3, host = "localhost" }) {
|
|
|
21561
21561
|
process.exit(1);
|
|
21562
21562
|
}
|
|
21563
21563
|
}
|
|
21564
|
+
async function copyVercelOutput() {
|
|
21565
|
+
const spinner = ora2("Copying Vercel output...").start();
|
|
21566
|
+
try {
|
|
21567
|
+
const pkg = require2.resolve("@inkeep/agents-manage-ui/package.json");
|
|
21568
|
+
const root = dirname(pkg);
|
|
21569
|
+
const sourceOutputPath = join2(root, ".vercel", "output");
|
|
21570
|
+
if (!existsSync2(sourceOutputPath)) {
|
|
21571
|
+
spinner.fail("Vercel output not found");
|
|
21572
|
+
console.error(chalk3.red("The Vercel output has not been built yet in the package."));
|
|
21573
|
+
process.exit(1);
|
|
21574
|
+
}
|
|
21575
|
+
const destVercelDir = join2(process.cwd(), ".vercel");
|
|
21576
|
+
const destOutputPath = join2(destVercelDir, "output");
|
|
21577
|
+
await fs4.ensureDir(destVercelDir);
|
|
21578
|
+
if (existsSync2(destOutputPath)) {
|
|
21579
|
+
await fs4.remove(destOutputPath);
|
|
21580
|
+
}
|
|
21581
|
+
await fs4.copy(sourceOutputPath, destOutputPath);
|
|
21582
|
+
spinner.succeed(`Vercel output copied to .vercel/output/`);
|
|
21583
|
+
console.log("");
|
|
21584
|
+
console.log(chalk3.blue("\u{1F680} Ready for Vercel deployment"));
|
|
21585
|
+
console.log(chalk3.gray("Run: vercel deploy --prebuilt --prod"));
|
|
21586
|
+
console.log("");
|
|
21587
|
+
} catch (error) {
|
|
21588
|
+
spinner.fail("Failed to copy Vercel output");
|
|
21589
|
+
console.error(chalk3.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
21590
|
+
throw error;
|
|
21591
|
+
}
|
|
21592
|
+
}
|
|
21593
|
+
async function buildForVercel({ outputDir = "./vercel-build" }) {
|
|
21594
|
+
const spinner = ora2("Creating Vercel-ready build...").start();
|
|
21595
|
+
try {
|
|
21596
|
+
const pkg = require2.resolve("@inkeep/agents-manage-ui/package.json");
|
|
21597
|
+
const root = dirname(pkg);
|
|
21598
|
+
const standalonePath = join2(root, ".next/standalone/agents-manage-ui");
|
|
21599
|
+
if (!existsSync2(standalonePath)) {
|
|
21600
|
+
spinner.fail("Standalone build not found");
|
|
21601
|
+
console.error(chalk3.red("The standalone build has not been created yet."));
|
|
21602
|
+
process.exit(1);
|
|
21603
|
+
}
|
|
21604
|
+
if (existsSync2(outputDir)) {
|
|
21605
|
+
await fs4.remove(outputDir);
|
|
21606
|
+
}
|
|
21607
|
+
await fs4.ensureDir(outputDir);
|
|
21608
|
+
await fs4.copy(standalonePath, outputDir);
|
|
21609
|
+
const packageJson2 = {
|
|
21610
|
+
name: "inkeep-dashboard",
|
|
21611
|
+
version: "1.0.0",
|
|
21612
|
+
scripts: {
|
|
21613
|
+
start: "node server.js"
|
|
21614
|
+
},
|
|
21615
|
+
dependencies: {
|
|
21616
|
+
"@inkeep/agents-manage-ui": "latest"
|
|
21617
|
+
}
|
|
21618
|
+
};
|
|
21619
|
+
await fs4.writeJson(join2(outputDir, "package.json"), packageJson2, { spaces: 2 });
|
|
21620
|
+
const vercelConfig = {
|
|
21621
|
+
version: 2,
|
|
21622
|
+
builds: [
|
|
21623
|
+
{
|
|
21624
|
+
src: "server.js",
|
|
21625
|
+
use: "@vercel/node"
|
|
21626
|
+
}
|
|
21627
|
+
],
|
|
21628
|
+
routes: [
|
|
21629
|
+
{
|
|
21630
|
+
src: "/(.*)",
|
|
21631
|
+
dest: "server.js"
|
|
21632
|
+
}
|
|
21633
|
+
]
|
|
21634
|
+
};
|
|
21635
|
+
await fs4.writeJson(join2(outputDir, "vercel.json"), vercelConfig, { spaces: 2 });
|
|
21636
|
+
const instructions = `# Inkeep Dashboard - Vercel Deployment
|
|
21637
|
+
|
|
21638
|
+
## Quick Deploy
|
|
21639
|
+
|
|
21640
|
+
1. Go to https://vercel.com/dashboard
|
|
21641
|
+
2. Click "New Project"
|
|
21642
|
+
3. Upload this folder or connect to GitHub
|
|
21643
|
+
4. Set environment variables:
|
|
21644
|
+
- INKEEP_API_URL=your-api-url
|
|
21645
|
+
- INKEEP_TENANT_ID=your-tenant-id
|
|
21646
|
+
- NODE_ENV=production
|
|
21647
|
+
5. Deploy!
|
|
21648
|
+
|
|
21649
|
+
## Using Vercel CLI
|
|
21650
|
+
|
|
21651
|
+
\`\`\`bash
|
|
21652
|
+
cd ${outputDir}
|
|
21653
|
+
vercel --prod
|
|
21654
|
+
\`\`\`
|
|
21655
|
+
|
|
21656
|
+
## Environment Variables
|
|
21657
|
+
|
|
21658
|
+
Make sure to set these in your Vercel project settings:
|
|
21659
|
+
- INKEEP_API_URL
|
|
21660
|
+
- INKEEP_TENANT_ID
|
|
21661
|
+
- Any other variables from your .env file
|
|
21662
|
+
`;
|
|
21663
|
+
await fs4.writeFile(join2(outputDir, "README-VERCEL.md"), instructions);
|
|
21664
|
+
spinner.succeed(`Vercel-ready build created at ${outputDir}/`);
|
|
21665
|
+
console.log("");
|
|
21666
|
+
console.log(chalk3.blue("\u{1F680} Start script:"), "node server.js");
|
|
21667
|
+
console.log("");
|
|
21668
|
+
console.log(chalk3.yellow("\u{1F4D6} See README-VERCEL.md for deployment instructions"));
|
|
21669
|
+
} catch (error) {
|
|
21670
|
+
spinner.fail("Failed to create Vercel build");
|
|
21671
|
+
console.error(chalk3.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
21672
|
+
throw error;
|
|
21673
|
+
}
|
|
21674
|
+
}
|
|
21564
21675
|
async function devCommand(options) {
|
|
21565
|
-
const {
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21676
|
+
const {
|
|
21677
|
+
port = 3e3,
|
|
21678
|
+
host = "localhost",
|
|
21679
|
+
build = false,
|
|
21680
|
+
outputDir = "./vercel-build",
|
|
21681
|
+
vercel = false
|
|
21682
|
+
} = options;
|
|
21683
|
+
if (vercel) {
|
|
21684
|
+
await copyVercelOutput();
|
|
21685
|
+
return;
|
|
21686
|
+
}
|
|
21687
|
+
if (build) {
|
|
21688
|
+
await buildForVercel({ outputDir });
|
|
21689
|
+
console.log("");
|
|
21690
|
+
console.log(chalk3.blue("Next steps: Deploy the build folder to Vercel"));
|
|
21691
|
+
return;
|
|
21692
|
+
}
|
|
21569
21693
|
startWebApp({ port, host });
|
|
21570
21694
|
}
|
|
21571
21695
|
|
|
@@ -21604,12 +21728,12 @@ async function promptForModelConfiguration() {
|
|
|
21604
21728
|
{ name: "Claude Haiku 3.5", value: "anthropic/claude-3-5-haiku-20241022" }
|
|
21605
21729
|
];
|
|
21606
21730
|
const openaiModels = [
|
|
21607
|
-
{ name: "GPT-5", value: "openai/gpt-5-2025-08-07" },
|
|
21608
|
-
{ name: "GPT-5 Mini", value: "openai/gpt-5-mini-2025-08-07" },
|
|
21609
|
-
{ name: "GPT-5 Nano", value: "openai/gpt-5-nano-2025-08-07" },
|
|
21610
21731
|
{ name: "GPT-4.1", value: "openai/gpt-4.1-2025-04-14" },
|
|
21611
21732
|
{ name: "GPT-4.1 Mini", value: "openai/gpt-4.1-mini-2025-04-14" },
|
|
21612
|
-
{ name: "GPT-4.1 Nano", value: "openai/gpt-4.1-nano-2025-04-14" }
|
|
21733
|
+
{ name: "GPT-4.1 Nano", value: "openai/gpt-4.1-nano-2025-04-14" },
|
|
21734
|
+
{ name: "GPT-5", value: "openai/gpt-5-2025-08-07" },
|
|
21735
|
+
{ name: "GPT-5 Mini", value: "openai/gpt-5-mini-2025-08-07" },
|
|
21736
|
+
{ name: "GPT-5 Nano", value: "openai/gpt-5-nano-2025-08-07" }
|
|
21613
21737
|
];
|
|
21614
21738
|
const googleModels = [
|
|
21615
21739
|
{ name: "Gemini 2.5 Pro", value: "google/gemini-2.5-pro" },
|
|
@@ -22040,11 +22164,11 @@ function parseModelString(modelString) {
|
|
|
22040
22164
|
};
|
|
22041
22165
|
}
|
|
22042
22166
|
async function generateTypeScriptFileWithLLM(graphData, graphId, outputFilePath, modelSettings, retryContext) {
|
|
22043
|
-
const
|
|
22167
|
+
const fs5 = await import("fs");
|
|
22044
22168
|
let existingContent = "";
|
|
22045
22169
|
let fileExists = false;
|
|
22046
22170
|
try {
|
|
22047
|
-
existingContent =
|
|
22171
|
+
existingContent = fs5.readFileSync(outputFilePath, "utf-8");
|
|
22048
22172
|
fileExists = true;
|
|
22049
22173
|
} catch {
|
|
22050
22174
|
fileExists = false;
|
|
@@ -22060,7 +22184,7 @@ async function generateTypeScriptFileWithLLM(graphData, graphId, outputFilePath,
|
|
|
22060
22184
|
maxOutputTokens: 16e3
|
|
22061
22185
|
// Increased to handle large TypeScript files
|
|
22062
22186
|
});
|
|
22063
|
-
|
|
22187
|
+
fs5.writeFileSync(outputFilePath, text2, "utf-8");
|
|
22064
22188
|
console.log(`\u2705 Successfully generated TypeScript file: ${outputFilePath}`);
|
|
22065
22189
|
} catch (error) {
|
|
22066
22190
|
console.error("\u274C Error generating TypeScript file with LLM:", error);
|
|
@@ -22472,8 +22596,8 @@ async function pushCommand(options) {
|
|
|
22472
22596
|
try {
|
|
22473
22597
|
const projectDefinition = await project.toFullProjectDefinition();
|
|
22474
22598
|
const jsonFilePath = join9(projectDir, `${finalConfig.projectId}.json`);
|
|
22475
|
-
const
|
|
22476
|
-
await
|
|
22599
|
+
const fs5 = await import("fs/promises");
|
|
22600
|
+
await fs5.writeFile(jsonFilePath, JSON.stringify(projectDefinition, null, 2));
|
|
22477
22601
|
spinner.succeed(`Project data saved to ${jsonFilePath}`);
|
|
22478
22602
|
console.log(chalk7.gray(` \u2022 File: ${jsonFilePath}`));
|
|
22479
22603
|
console.log(chalk7.gray(` \u2022 Size: ${JSON.stringify(projectDefinition).length} bytes`));
|
|
@@ -22581,10 +22705,13 @@ program.command("list-graphs").description("List all available graphs for the cu
|
|
|
22581
22705
|
).action(async (options) => {
|
|
22582
22706
|
await listGraphsCommand(options);
|
|
22583
22707
|
});
|
|
22584
|
-
program.command("dev").description("Start the Inkeep dashboard server").option("--port <port>", "Port to run the server on", "3000").option("--host <host>", "Host to bind the server to", "localhost").action(async (options) => {
|
|
22708
|
+
program.command("dev").description("Start the Inkeep dashboard server").option("--port <port>", "Port to run the server on", "3000").option("--host <host>", "Host to bind the server to", "localhost").option("--build", "Create a Vercel-ready build and exit").option("--output-dir <dir>", "Output directory for build files", "./vercel-build").option("--vercel", "Copy Vercel output to .vercel/output for deployment").action(async (options) => {
|
|
22585
22709
|
await devCommand({
|
|
22586
22710
|
port: parseInt(options.port, 10),
|
|
22587
|
-
host: options.host
|
|
22711
|
+
host: options.host,
|
|
22712
|
+
build: options.build,
|
|
22713
|
+
outputDir: options.outputDir,
|
|
22714
|
+
vercel: options.vercel
|
|
22588
22715
|
});
|
|
22589
22716
|
});
|
|
22590
22717
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250924191551",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"recast": "^0.23.0",
|
|
44
44
|
"ts-morph": "^26.0.0",
|
|
45
45
|
"tsx": "^4.20.5",
|
|
46
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
47
|
-
"@inkeep/agents-manage-ui": "^0.0.0-dev-
|
|
46
|
+
"@inkeep/agents-core": "^0.0.0-dev-20250924191551",
|
|
47
|
+
"@inkeep/agents-manage-ui": "^0.0.0-dev-20250924191551"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/degit": "^2.8.6",
|