agentmomo 0.2.0 → 0.2.1

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.js CHANGED
@@ -7,18 +7,34 @@ import path from "path";
7
7
  import { spawn, exec } from "child_process";
8
8
  import os from "os";
9
9
  var __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+ var cliArgs = process.argv.slice(2);
11
+ function readArg(name) {
12
+ const index = cliArgs.indexOf(name);
13
+ if (index !== -1 && cliArgs[index + 1]) {
14
+ return cliArgs[index + 1];
15
+ }
16
+ return void 0;
17
+ }
18
+ var LOCAL_BRIDGE_URL = "http://localhost:9001";
19
+ var DEFAULT_HOSTED_APP_URL = "https://agentmomo.net/app";
20
+ var openLocalUi = cliArgs.includes("--open-local") || process.env.AGENTMOMO_LOCAL_UI === "1";
21
+ var noOpen = cliArgs.includes("--no-open");
22
+ var hostedAppUrl = readArg("--app-url") ?? process.env.AGENTMOMO_APP_URL?.trim() ?? DEFAULT_HOSTED_APP_URL;
23
+ var browserUrl = noOpen ? "" : hostedAppUrl || (openLocalUi ? LOCAL_BRIDGE_URL : "");
10
24
  console.log("");
11
25
  console.log(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557");
12
- console.log(" \u2551 AgentsMomo Proxy \u2551");
26
+ console.log(" \u2551 AgentsMomo Companion \u2551");
13
27
  console.log(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D");
14
28
  console.log("");
15
- console.log(" Starting local proxy at http://localhost:9001 \u2026");
29
+ console.log(` Starting local bridge at ${LOCAL_BRIDGE_URL} \u2026`);
16
30
  console.log("");
17
31
  var serverPath = path.join(__dirname, "server.js");
18
32
  var server = spawn(process.execPath, [serverPath], {
19
33
  env: {
20
34
  ...process.env,
21
- AGENTSMOMO_DIST_DIR: __dirname
35
+ AGENTSMOMO_DIST_DIR: __dirname,
36
+ AGENTMOMO_LOCAL_UI: openLocalUi ? "1" : "0",
37
+ ...hostedAppUrl ? { AGENTMOMO_APP_URL: hostedAppUrl } : {}
22
38
  },
23
39
  stdio: "inherit"
24
40
  });
@@ -30,15 +46,30 @@ process.on("SIGTERM", () => {
30
46
  server.kill("SIGTERM");
31
47
  });
32
48
  setTimeout(() => {
33
- const url = "http://localhost:9001";
34
- const openCmd = os.platform() === "win32" ? `start "" "${url}"` : os.platform() === "darwin" ? `open "${url}"` : `xdg-open "${url}"`;
35
- exec(openCmd, () => {
36
- });
37
- console.log(` \u2713 Dashboard: ${url}`);
38
- console.log(` \u2713 Proxy API: ${url}/api`);
39
- console.log(` \u2713 WebSocket: ws://localhost:9001/ws`);
49
+ if (browserUrl) {
50
+ const openCmd = os.platform() === "win32" ? `start "" "${browserUrl}"` : os.platform() === "darwin" ? `open "${browserUrl}"` : `xdg-open "${browserUrl}"`;
51
+ exec(openCmd, () => {
52
+ });
53
+ }
54
+ console.log(` \u2713 Local bridge: ${LOCAL_BRIDGE_URL}`);
55
+ console.log(` \u2713 Bridge API: ${LOCAL_BRIDGE_URL}/api`);
56
+ console.log(` \u2713 WebSocket: ws://localhost:9001/ws`);
57
+ if (hostedAppUrl) {
58
+ console.log(` \u2713 AgentMomo app: ${hostedAppUrl}`);
59
+ } else if (openLocalUi) {
60
+ console.log(` \u2713 Local UI fallback: ${LOCAL_BRIDGE_URL}`);
61
+ } else {
62
+ console.log(
63
+ " \u2713 Open your deployed AgentMomo app and keep this process running."
64
+ );
65
+ }
40
66
  console.log("");
41
- console.log(" Supported: Claude Desktop \xB7 Claude Code \xB7 Gemini CLI \xB7 Codex CLI");
67
+ console.log(
68
+ " Supported: Claude Desktop \xB7 Claude Code \xB7 Gemini CLI \xB7 Codex CLI"
69
+ );
70
+ console.log(
71
+ openLocalUi ? " Mode: local UI + local bridge" : " Mode: bridge only for the hosted AgentMomo app"
72
+ );
42
73
  console.log(" Press Ctrl+C to stop.");
43
74
  console.log("");
44
75
  }, 1500);
package/dist/index.html CHANGED
@@ -11,7 +11,7 @@
11
11
  href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap"
12
12
  rel="stylesheet"
13
13
  />
14
- <script type="module" crossorigin src="/assets/index-5pVyUNvu.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-BQyAbSge.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-BjOLTppo.css">
16
16
  </head>
17
17
  <body>
package/dist/server.js CHANGED
@@ -55342,6 +55342,8 @@ var config = {
55342
55342
  var PORT = Number(process.env.PORT ?? config.httpProxy.port);
55343
55343
  var DIST_DIR = AGENTSMOMO_DIST_DIR ?? path3.join(process.cwd(), "dist");
55344
55344
  var INDEX_HTML = path3.join(DIST_DIR, "index.html");
55345
+ var LOCAL_UI_ENABLED = process.env.AGENTMOMO_LOCAL_UI === "1";
55346
+ var HOSTED_APP_URL = process.env.AGENTMOMO_APP_URL?.trim() ?? "https://agentmomo.net/app";
55345
55347
  var FEEDBACK_WINDOW_MS = 6e4;
55346
55348
  var FEEDBACK_MAX_PER_WINDOW = 5;
55347
55349
  var feedbackIpHits = /* @__PURE__ */ new Map();
@@ -56439,7 +56441,7 @@ if (config.httpProxy.targets.length > 0) {
56439
56441
  const proxyRouter = createHttpProxyRouter(config.httpProxy.targets);
56440
56442
  app.use(proxyRouter);
56441
56443
  }
56442
- if (fs2.existsSync(INDEX_HTML)) {
56444
+ if (LOCAL_UI_ENABLED && fs2.existsSync(INDEX_HTML)) {
56443
56445
  app.use(import_express2.default.static(DIST_DIR));
56444
56446
  app.get("*", (req, res, next) => {
56445
56447
  if (req.path.startsWith("/api") || req.path.startsWith("/proxy") || req.path.startsWith("/ws") || req.path.startsWith("/.well-known") || req.path.startsWith("/a2a")) {
@@ -56449,6 +56451,16 @@ if (fs2.existsSync(INDEX_HTML)) {
56449
56451
  res.sendFile(INDEX_HTML);
56450
56452
  });
56451
56453
  }
56454
+ if (!LOCAL_UI_ENABLED) {
56455
+ app.get("/", (_req, res) => {
56456
+ const lines = [
56457
+ "AgentMomo local bridge is running.",
56458
+ HOSTED_APP_URL ? `Open the hosted AgentMomo app at ${HOSTED_APP_URL} and keep this process running.` : "Open your hosted AgentMomo app and keep this process running.",
56459
+ `Health check: http://localhost:${PORT}/api/health`
56460
+ ];
56461
+ res.type("text/plain").send(lines.join("\n"));
56462
+ });
56463
+ }
56452
56464
  var server = createServer(app);
56453
56465
  var wss2 = startEventEmitter(PORT);
56454
56466
  server.on("upgrade", async (request, socket, head2) => {
@@ -56478,7 +56490,7 @@ server.listen(PORT, () => {
56478
56490
  const wsHost = `ws://localhost:${PORT}/ws`;
56479
56491
  console.log(`
56480
56492
  \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
56481
- \u2502 \u{1F3E2} AgentMomo Proxy Server \u2502
56493
+ \u2502 \u{1F3E2} AgentMomo Local Bridge \u2502
56482
56494
  \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
56483
56495
  \u2502 REST API: ${host}/api \u2502
56484
56496
  \u2502 WebSocket: ${wsHost} \u2502
@@ -56486,6 +56498,9 @@ server.listen(PORT, () => {
56486
56498
  \u2502 Targets: ${config.httpProxy.targets.length} configured \u2502
56487
56499
  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
56488
56500
  `);
56501
+ console.log(
56502
+ LOCAL_UI_ENABLED ? `[agentmomo] Local fallback UI enabled at ${host}` : `[agentmomo] Bridge-only mode enabled. Use the hosted app${HOSTED_APP_URL ? ` at ${HOSTED_APP_URL}` : ""}.`
56503
+ );
56489
56504
  });
56490
56505
  export {
56491
56506
  app,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmomo",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "3D visualization of MCP agent activity — watch your AI tools work in a virtual office",
5
5
  "license": "MIT",
6
6
  "repository": {