junis 0.2.5 → 0.2.6
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/cli/index.js +171 -27
- package/package.json +2 -1
package/dist/cli/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var require_package = __commonJS({
|
|
|
31
31
|
"package.json"(exports2, module2) {
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "junis",
|
|
34
|
-
version: "0.2.
|
|
34
|
+
version: "0.2.6",
|
|
35
35
|
description: "One-line device control for AI agents",
|
|
36
36
|
bin: {
|
|
37
37
|
junis: "dist/cli/index.js"
|
|
@@ -43,6 +43,7 @@ var require_package = __commonJS({
|
|
|
43
43
|
prepublishOnly: "npm run build"
|
|
44
44
|
},
|
|
45
45
|
dependencies: {
|
|
46
|
+
"@inquirer/prompts": "^8.2.1",
|
|
46
47
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
47
48
|
commander: "^12.0.0",
|
|
48
49
|
glob: "^11.0.0",
|
|
@@ -72,6 +73,7 @@ var require_package = __commonJS({
|
|
|
72
73
|
|
|
73
74
|
// src/cli/index.ts
|
|
74
75
|
var import_commander = require("commander");
|
|
76
|
+
var import_prompts = require("@inquirer/prompts");
|
|
75
77
|
|
|
76
78
|
// src/cli/config.ts
|
|
77
79
|
var import_fs = __toESM(require("fs"));
|
|
@@ -1528,8 +1530,154 @@ function printStep1(port) {
|
|
|
1528
1530
|
console.log(` \u25C9 Local MCP endpoint ........... http://localhost:${port}/mcp`);
|
|
1529
1531
|
console.log("");
|
|
1530
1532
|
}
|
|
1531
|
-
|
|
1533
|
+
async function runForeground(config, port) {
|
|
1534
|
+
const deviceName = config.device_name;
|
|
1535
|
+
const platformName = process.platform === "darwin" ? "macos" : process.platform === "win32" ? "windows" : "linux";
|
|
1536
|
+
const actualPort = await startMCPServer(port);
|
|
1537
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1538
|
+
console.log(" STEP 5 \xB7 Starting Foreground Service");
|
|
1539
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1540
|
+
console.log(` \u25C9 MCP server started on port ${actualPort}`);
|
|
1541
|
+
const relay = new RelayClient(config, handleMCPRequest, async () => {
|
|
1542
|
+
console.log("[junis] \uC138\uC158 \uB9CC\uB8CC - \uC7AC\uC778\uC99D \uD544\uC694");
|
|
1543
|
+
try {
|
|
1544
|
+
let waitingPrinted = false;
|
|
1545
|
+
const authResult = await authenticate(
|
|
1546
|
+
deviceName,
|
|
1547
|
+
platformName,
|
|
1548
|
+
(uri) => {
|
|
1549
|
+
console.log(`[junis] \uBE0C\uB77C\uC6B0\uC800 \uC7AC\uC778\uC99D: ${uri}`);
|
|
1550
|
+
},
|
|
1551
|
+
() => {
|
|
1552
|
+
if (!waitingPrinted) waitingPrinted = true;
|
|
1553
|
+
}
|
|
1554
|
+
);
|
|
1555
|
+
config.token = authResult.token;
|
|
1556
|
+
saveConfig(config);
|
|
1557
|
+
relay.restart();
|
|
1558
|
+
} catch (e) {
|
|
1559
|
+
console.error("[junis] \uC7AC\uC778\uC99D \uC2E4\uD328:", e);
|
|
1560
|
+
process.exit(1);
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
await relay.connect();
|
|
1564
|
+
const webUrl = process.env.JUNIS_WEB_URL ?? "https://junis.ai";
|
|
1565
|
+
console.log(" \u25C9 Relay connected");
|
|
1566
|
+
console.log("");
|
|
1567
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1568
|
+
console.log(" \u2705 ALL SET \u2014 Junis\uAC00 \uD3EC\uADF8\uB77C\uC6B4\uB4DC\uC5D0\uC11C \uC2E4\uD589 \uC911\uC785\uB2C8\uB2E4.");
|
|
1569
|
+
console.log(" Ctrl+C\uB97C \uB20C\uB7EC \uC885\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");
|
|
1570
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1571
|
+
console.log("");
|
|
1572
|
+
console.log(` \u2192 ${webUrl}`);
|
|
1573
|
+
console.log("");
|
|
1574
|
+
const shutdown = () => {
|
|
1575
|
+
console.log("\n[junis] Shutting down...");
|
|
1576
|
+
relay.destroy();
|
|
1577
|
+
process.exit(0);
|
|
1578
|
+
};
|
|
1579
|
+
process.on("SIGINT", shutdown);
|
|
1580
|
+
process.on("SIGTERM", shutdown);
|
|
1581
|
+
}
|
|
1582
|
+
async function runBackground(config, port) {
|
|
1583
|
+
void config;
|
|
1584
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1585
|
+
console.log(" STEP 5 \xB7 Starting Background Service");
|
|
1586
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1587
|
+
const svc = new ServiceManager();
|
|
1588
|
+
try {
|
|
1589
|
+
await svc.install();
|
|
1590
|
+
console.log(" \u25C9 Service registered ........... \u2705");
|
|
1591
|
+
console.log(" \u25C9 Auto-start on boot ........... \u2705");
|
|
1592
|
+
} catch (e) {
|
|
1593
|
+
console.warn(` \u26A0\uFE0F \uC11C\uBE44\uC2A4 \uB4F1\uB85D \uC2E4\uD328: ${e.message}`);
|
|
1594
|
+
console.warn(" \uBC31\uADF8\uB77C\uC6B4\uB4DC \uD504\uB85C\uC138\uC2A4\uB85C\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.");
|
|
1595
|
+
startDaemon(port);
|
|
1596
|
+
}
|
|
1597
|
+
const webUrl = process.env.JUNIS_WEB_URL ?? "https://junis.ai";
|
|
1598
|
+
console.log("");
|
|
1599
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1600
|
+
console.log(" \u2705 ALL SET \u2014 Junis\uAC00 \uBC31\uADF8\uB77C\uC6B4\uB4DC\uC5D0\uC11C \uC2E4\uD589 \uC911\uC785\uB2C8\uB2E4.");
|
|
1601
|
+
console.log(" \uBD80\uD305 \uC2DC \uC790\uB3D9\uC73C\uB85C \uC2DC\uC791\uB429\uB2C8\uB2E4.");
|
|
1602
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1603
|
+
console.log("");
|
|
1604
|
+
console.log(` \u2192 ${webUrl}`);
|
|
1605
|
+
console.log("");
|
|
1606
|
+
console.log(" \uC885\uB8CC\uD558\uB824\uBA74: npx junis stop");
|
|
1607
|
+
console.log("");
|
|
1608
|
+
process.exit(0);
|
|
1609
|
+
}
|
|
1610
|
+
import_commander.program.command("start", { isDefault: true }).description("Junis \uC5D0\uC774\uC804\uD2B8\uC640 \uC5F0\uACB0 \uC2DC\uC791").option("--local", "\uB85C\uCEEC MCP \uC11C\uBC84\uB9CC \uC2E4\uD589 (\uD074\uB77C\uC6B0\uB4DC \uC5F0\uACB0 \uC5C6\uC74C)").option("--port <number>", "\uD3EC\uD2B8 \uBC88\uD638", "3000").option("--reset", "\uAE30\uC874 \uC778\uC99D \uCD08\uAE30\uD654 \uD6C4 \uC7AC\uB85C\uADF8\uC778").option("--daemon", "\uB370\uBAAC \uBAA8\uB4DC\uB85C \uC2E4\uD589 (\uB0B4\uBD80\uC6A9, launchd/systemd\uC5D0\uC11C \uC0AC\uC6A9)").option("--foreground", "\uD3EC\uADF8\uB77C\uC6B4\uB4DC \uBAA8\uB4DC\uB85C \uC2E4\uD589 (\uD504\uB86C\uD504\uD2B8 \uC5C6\uC774)").action(async (options) => {
|
|
1532
1611
|
const port = parseInt(options.port, 10);
|
|
1612
|
+
if (options.foreground) {
|
|
1613
|
+
printBanner();
|
|
1614
|
+
let config2 = options.reset ? null : loadConfig();
|
|
1615
|
+
const deviceName2 = config2?.device_name ?? `${process.env["USER"] ?? "user"}'s ${getDeviceName()}`;
|
|
1616
|
+
const platformName2 = process.platform === "darwin" ? "macos" : process.platform === "win32" ? "windows" : "linux";
|
|
1617
|
+
printStep1(port);
|
|
1618
|
+
if (!config2) {
|
|
1619
|
+
let waitingPrinted = false;
|
|
1620
|
+
const authResult = await authenticate(
|
|
1621
|
+
deviceName2,
|
|
1622
|
+
platformName2,
|
|
1623
|
+
(uri) => {
|
|
1624
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1625
|
+
console.log(" STEP 2 \xB7 Connect to Junis Cloud");
|
|
1626
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1627
|
+
console.log(" Opening browser...");
|
|
1628
|
+
console.log(` \u2192 ${uri}`);
|
|
1629
|
+
process.stdout.write(" Waiting for login \xB7");
|
|
1630
|
+
},
|
|
1631
|
+
() => {
|
|
1632
|
+
if (!waitingPrinted) {
|
|
1633
|
+
waitingPrinted = true;
|
|
1634
|
+
} else {
|
|
1635
|
+
process.stdout.write("\xB7");
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
);
|
|
1639
|
+
console.log("");
|
|
1640
|
+
console.log(` \u2705 Authenticated as ${authResult.email ?? "your account"}`);
|
|
1641
|
+
console.log("");
|
|
1642
|
+
config2 = {
|
|
1643
|
+
device_key: authResult.device_key,
|
|
1644
|
+
token: authResult.token,
|
|
1645
|
+
device_name: deviceName2,
|
|
1646
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
1647
|
+
};
|
|
1648
|
+
saveConfig(config2);
|
|
1649
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1650
|
+
console.log(" STEP 3 \xB7 Register Device");
|
|
1651
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1652
|
+
console.log(` \u25C9 Device name .................. ${deviceName2}`);
|
|
1653
|
+
console.log(` \u25C9 Device key ................... ${authResult.device_key}`);
|
|
1654
|
+
console.log(` \u25C9 Cloud relay connected ........ wss://junis.ai/ws/devices/${authResult.device_key}`);
|
|
1655
|
+
console.log(" \u25C9 Status ....................... \u{1F7E2} online");
|
|
1656
|
+
console.log("");
|
|
1657
|
+
if (authResult.agent_id) {
|
|
1658
|
+
const workspaceName = `${deviceName2} Workspace`;
|
|
1659
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1660
|
+
console.log(" STEP 4 \xB7 Create AI Team");
|
|
1661
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1662
|
+
console.log(` \u25C9 Workspace created ............ ${workspaceName}`);
|
|
1663
|
+
console.log(` \u25C9 Agent created ................ ${authResult.agent_name}`);
|
|
1664
|
+
console.log(` \u25C9 Device linked ................ ${deviceName2} \u2192 ${authResult.agent_name}`);
|
|
1665
|
+
console.log(" \u25C9 Tools assigned ............... call_device_mcp, list_device_mcp_tools");
|
|
1666
|
+
console.log("");
|
|
1667
|
+
}
|
|
1668
|
+
} else {
|
|
1669
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1670
|
+
console.log(" STEP 3 \xB7 Register Device");
|
|
1671
|
+
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1672
|
+
console.log(` \u25C9 Device name .................. ${config2.device_name}`);
|
|
1673
|
+
console.log(` \u25C9 Device key ................... ${config2.device_key}`);
|
|
1674
|
+
console.log(` \u25C9 Cloud relay connected ........ wss://junis.ai/ws/devices/${config2.device_key}`);
|
|
1675
|
+
console.log(" \u25C9 Status ....................... \u{1F7E2} online");
|
|
1676
|
+
console.log("");
|
|
1677
|
+
}
|
|
1678
|
+
await runForeground(config2, port);
|
|
1679
|
+
return;
|
|
1680
|
+
}
|
|
1533
1681
|
if (options.daemon) {
|
|
1534
1682
|
writePid(process.pid);
|
|
1535
1683
|
if (options.local) {
|
|
@@ -1571,8 +1719,8 @@ import_commander.program.command("start", { isDefault: true }).description("Juni
|
|
|
1571
1719
|
console.log("[junis daemon] relay connected");
|
|
1572
1720
|
return;
|
|
1573
1721
|
}
|
|
1574
|
-
printBanner();
|
|
1575
1722
|
if (options.local) {
|
|
1723
|
+
printBanner();
|
|
1576
1724
|
const actualPort = await startMCPServer(port);
|
|
1577
1725
|
printStep1(actualPort);
|
|
1578
1726
|
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
@@ -1580,6 +1728,7 @@ import_commander.program.command("start", { isDefault: true }).description("Juni
|
|
|
1580
1728
|
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1581
1729
|
return;
|
|
1582
1730
|
}
|
|
1731
|
+
printBanner();
|
|
1583
1732
|
const { running, pid } = isRunning();
|
|
1584
1733
|
if (running) {
|
|
1585
1734
|
console.log(`\u2705 Junis \uC2E4\uD589 \uC911\uC785\uB2C8\uB2E4. (PID: ${pid})`);
|
|
@@ -1650,31 +1799,26 @@ import_commander.program.command("start", { isDefault: true }).description("Juni
|
|
|
1650
1799
|
console.log(" \u25C9 Status ....................... \u{1F7E2} online");
|
|
1651
1800
|
console.log("");
|
|
1652
1801
|
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1802
|
+
const mode = await (0, import_prompts.select)({
|
|
1803
|
+
message: "Select run mode:",
|
|
1804
|
+
choices: [
|
|
1805
|
+
{
|
|
1806
|
+
name: "Foreground",
|
|
1807
|
+
value: "foreground",
|
|
1808
|
+
description: "Runs in the current terminal. Press Ctrl+C to stop.\n Full OS access: camera, notifications, and more."
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
name: "Background (daemon)",
|
|
1812
|
+
value: "background",
|
|
1813
|
+
description: "Runs as a background service. Stays alive after\n closing the terminal. Auto-starts on reboot."
|
|
1814
|
+
}
|
|
1815
|
+
]
|
|
1816
|
+
});
|
|
1817
|
+
if (mode === "foreground") {
|
|
1818
|
+
await runForeground(config, port);
|
|
1819
|
+
} else {
|
|
1820
|
+
await runBackground(config, port);
|
|
1665
1821
|
}
|
|
1666
|
-
const webUrl = process.env.JUNIS_WEB_URL ?? "https://junis.ai";
|
|
1667
|
-
console.log("");
|
|
1668
|
-
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1669
|
-
console.log(" \u2705 ALL SET \u2014 Junis\uAC00 \uBC31\uADF8\uB77C\uC6B4\uB4DC\uC5D0\uC11C \uC2E4\uD589 \uC911\uC785\uB2C8\uB2E4.");
|
|
1670
|
-
console.log(" \uBD80\uD305 \uC2DC \uC790\uB3D9\uC73C\uB85C \uC2DC\uC791\uB429\uB2C8\uB2E4.");
|
|
1671
|
-
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
1672
|
-
console.log("");
|
|
1673
|
-
console.log(` \u2192 ${webUrl}`);
|
|
1674
|
-
console.log("");
|
|
1675
|
-
console.log(" \uC885\uB8CC\uD558\uB824\uBA74: npx junis stop");
|
|
1676
|
-
console.log("");
|
|
1677
|
-
process.exit(0);
|
|
1678
1822
|
});
|
|
1679
1823
|
import_commander.program.command("stop").description("\uBC31\uADF8\uB77C\uC6B4\uB4DC \uC11C\uBE44\uC2A4 \uC911\uC9C0 \uBC0F \uC790\uB3D9\uC2DC\uC791 \uD574\uC81C").action(async () => {
|
|
1680
1824
|
const stopped = stopDaemon();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "junis",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "One-line device control for AI agents",
|
|
5
5
|
"bin": {
|
|
6
6
|
"junis": "dist/cli/index.js"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"prepublishOnly": "npm run build"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@inquirer/prompts": "^8.2.1",
|
|
15
16
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
16
17
|
"commander": "^12.0.0",
|
|
17
18
|
"glob": "^11.0.0",
|