@rubytech/create-maxy 1.0.793 → 1.0.795

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 (49) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/graph-search/src/__tests__/fulltext-coverage.test.ts +8 -0
  3. package/payload/platform/neo4j/edge-annotations.json +20 -0
  4. package/payload/platform/neo4j/migrations/002-project-public-agents.ts +191 -0
  5. package/payload/platform/neo4j/schema.cypher +69 -2
  6. package/payload/platform/plugins/admin/hooks/__tests__/archive-ingest-gate.test.sh +166 -0
  7. package/payload/platform/plugins/admin/hooks/archive-ingest-gate.sh +147 -0
  8. package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +5 -2
  9. package/payload/platform/plugins/docs/references/platform.md +1 -1
  10. package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +2 -0
  11. package/payload/platform/plugins/memory/mcp/dist/index.js +2 -2
  12. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  13. package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-parse.d.ts +2 -1
  14. package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-parse.d.ts.map +1 -1
  15. package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-parse.js.map +1 -1
  16. package/payload/platform/plugins/whatsapp-import/PLUGIN.md +4 -0
  17. package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.d.ts +8 -2
  18. package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.d.ts.map +1 -1
  19. package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.js +66 -15
  20. package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.js.map +1 -1
  21. package/payload/platform/plugins/whatsapp-import/lib/src/__tests__/parse-export.test.ts +175 -0
  22. package/payload/platform/plugins/whatsapp-import/lib/src/parse-export.ts +78 -17
  23. package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/SKILL.md +2 -0
  24. package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/references/export-parse.md +8 -6
  25. package/payload/platform/scripts/seed-neo4j.sh +43 -20
  26. package/payload/platform/templates/specialists/agents/database-operator.md +2 -0
  27. package/payload/server/chunk-2N7XJW6Q.js +3428 -0
  28. package/payload/server/chunk-3SQJW5Y5.js +9892 -0
  29. package/payload/server/client-pool-CTMWNDMO.js +28 -0
  30. package/payload/server/maxy-edge.js +2 -2
  31. package/payload/server/public/assets/{Checkbox-DHsoNPeM.js → Checkbox-BruL6MSR.js} +1 -1
  32. package/payload/server/public/assets/{admin-CBDpia8P.js → admin-D8wbpnrW.js} +7 -7
  33. package/payload/server/public/assets/data-BhrQjgR5.js +1 -0
  34. package/payload/server/public/assets/graph-Jj7seS-w.js +1 -0
  35. package/payload/server/public/assets/{jsx-runtime-lOmSwjvd.css → jsx-runtime-foO6ZMix.css} +1 -1
  36. package/payload/server/public/assets/{page-DU8F3OGU.js → page-DIG7s5Jp.js} +1 -1
  37. package/payload/server/public/assets/page-sZb3wcOM.js +50 -0
  38. package/payload/server/public/assets/{public-Bn-gEWOv.js → public-CfjzDdUe.js} +1 -1
  39. package/payload/server/public/assets/{share-2-0IDKUUq9.js → share-2-BndjMKeG.js} +1 -1
  40. package/payload/server/public/assets/{useVoiceRecorder-B1S_t3Hq.js → useVoiceRecorder-D_8P7xJU.js} +1 -1
  41. package/payload/server/public/data.html +5 -5
  42. package/payload/server/public/graph.html +6 -6
  43. package/payload/server/public/index.html +8 -8
  44. package/payload/server/public/public.html +5 -5
  45. package/payload/server/server.js +123 -125
  46. package/payload/server/public/assets/data-bIkywng-.js +0 -1
  47. package/payload/server/public/assets/graph-CT4W30GR.js +0 -1
  48. package/payload/server/public/assets/page-Cs2i--Z2.js +0 -50
  49. /package/payload/server/public/assets/{jsx-runtime-Br2bU3EJ.js → jsx-runtime-DJER3a7U.js} +0 -0
@@ -49,7 +49,7 @@ import {
49
49
  vncLog,
50
50
  waitForExit,
51
51
  writeChromiumWrapper
52
- } from "./chunk-ZVUVUP6R.js";
52
+ } from "./chunk-3SQJW5Y5.js";
53
53
  import {
54
54
  ACCOUNTS_DIR,
55
55
  GREETING_DIRECTIVE,
@@ -63,6 +63,7 @@ import {
63
63
  checkGroupMembership,
64
64
  clearSessionHistory,
65
65
  completeGrantSetup,
66
+ deleteAgentProjection,
66
67
  deleteConversation,
67
68
  embed,
68
69
  fetchBranding,
@@ -93,6 +94,7 @@ import {
93
94
  loadOnboardingStep,
94
95
  preConversationLogStream,
95
96
  preflushStreamLogKey,
97
+ projectAgent,
96
98
  registerGrantSession,
97
99
  registerResumedSession,
98
100
  registerSession,
@@ -111,7 +113,7 @@ import {
111
113
  verifyAndGetConversationUpdatedAt,
112
114
  verifyConversationOwnership,
113
115
  writeAdminUserAndPerson
114
- } from "./chunk-MIP54X7Q.js";
116
+ } from "./chunk-2N7XJW6Q.js";
115
117
 
116
118
  // ../lib/graph-trash/dist/index.js
117
119
  var require_dist = __commonJS({
@@ -8208,7 +8210,7 @@ var app11 = new Hono();
8208
8210
  app11.post("/cancel", requireAdminSession, async (c) => {
8209
8211
  const session_key = c.var.sessionKey;
8210
8212
  try {
8211
- const { interruptClient: interruptClient2 } = await import("./client-pool-4MZN42GG.js");
8213
+ const { interruptClient: interruptClient2 } = await import("./client-pool-CTMWNDMO.js");
8212
8214
  await interruptClient2(session_key);
8213
8215
  return c.json({ ok: true });
8214
8216
  } catch (err) {
@@ -8894,7 +8896,7 @@ app16.get("/", (c) => {
8894
8896
  }
8895
8897
  return c.json({ agents });
8896
8898
  });
8897
- app16.delete("/:slug", (c) => {
8899
+ app16.delete("/:slug", async (c) => {
8898
8900
  const slug = c.req.param("slug");
8899
8901
  const account = resolveAccount();
8900
8902
  if (!account) return c.json({ error: "No account resolved" }, 400);
@@ -8908,6 +8910,13 @@ app16.delete("/:slug", (c) => {
8908
8910
  if (!existsSync17(agentDir)) {
8909
8911
  return c.json({ error: "Agent not found" }, 404);
8910
8912
  }
8913
+ try {
8914
+ await deleteAgentProjection(account.accountId, slug);
8915
+ } catch (err) {
8916
+ const msg = err instanceof Error ? err.message : String(err);
8917
+ console.error(`[admin/agents] graph cleanup failed for agent "${slug}", aborting file removal: ${msg}`);
8918
+ return c.json({ error: `Graph cleanup failed: ${msg}` }, 500);
8919
+ }
8911
8920
  try {
8912
8921
  rmSync(agentDir, { recursive: true, force: true });
8913
8922
  console.log(`[admin/agents] deleted agent "${slug}"`);
@@ -8917,6 +8926,28 @@ app16.delete("/:slug", (c) => {
8917
8926
  return c.json({ error: "Failed to delete agent" }, 500);
8918
8927
  }
8919
8928
  });
8929
+ app16.post("/:slug/project", async (c) => {
8930
+ const slug = c.req.param("slug");
8931
+ const account = resolveAccount();
8932
+ if (!account) return c.json({ error: "No account resolved" }, 400);
8933
+ if (slug === "admin") {
8934
+ return c.json({ error: "Cannot project the admin agent" }, 403);
8935
+ }
8936
+ if (slug.includes("/") || slug.includes("..") || slug.includes("\\")) {
8937
+ return c.json({ error: "Invalid agent slug" }, 400);
8938
+ }
8939
+ const agentDir = resolve15(account.accountDir, "agents", slug);
8940
+ if (!existsSync17(agentDir)) {
8941
+ return c.json({ error: "Agent not found on disk" }, 404);
8942
+ }
8943
+ try {
8944
+ await projectAgent(account.accountId, account.accountDir, slug);
8945
+ return c.json({ ok: true });
8946
+ } catch (err) {
8947
+ const msg = err instanceof Error ? err.message : String(err);
8948
+ return c.json({ error: `Projection failed: ${msg}` }, 500);
8949
+ }
8950
+ });
8920
8951
  var agents_default = app16;
8921
8952
 
8922
8953
  // server/routes/admin/sessions.ts
@@ -10844,7 +10875,15 @@ var GRAPH_LABEL_COLOURS = {
10844
10875
  // unregistered here, producing an `unknown label` 400 whenever the
10845
10876
  // filter popover advertised the label. Muted brick — still reads as
10846
10877
  // alert against the cream background but doesn't shout fire-engine red.)
10847
- ReviewAlert: "#A85C5C"
10878
+ ReviewAlert: "#A85C5C",
10879
+ // Public-agent projection (Task 837) — burnished bronze sits between
10880
+ // people-terracotta and email-moss but shares neither hue, signalling
10881
+ // "operator-defined persona that traverses to KnowledgeDocuments,
10882
+ // Conversations, and other entities" without colliding with any existing
10883
+ // family. Pairs with the four owned KnowledgeDocument projections rendered
10884
+ // in the moss family — visual contrast cues the operator that the agent
10885
+ // node is a different kind of thing from its IDENTITY/SOUL/KNOWLEDGE docs.
10886
+ Agent: "#B8893D"
10848
10887
  };
10849
10888
  var ALL_GRAPH_LABELS = Object.freeze(
10850
10889
  Object.keys(GRAPH_LABEL_COLOURS)
@@ -10880,7 +10919,8 @@ var FILTER_TOP_LEVEL_LABELS = Object.freeze(
10880
10919
  "Workflow",
10881
10920
  "OnboardingState",
10882
10921
  "Email",
10883
- "EmailAccount"
10922
+ "EmailAccount",
10923
+ "Agent"
10884
10924
  ])
10885
10925
  );
10886
10926
  var AGENT_ACTION_LABELS = Object.freeze(
@@ -11742,57 +11782,16 @@ app30.get("/", requireAdminSession, async (c) => {
11742
11782
  });
11743
11783
  var adherence_default = app30;
11744
11784
 
11745
- // server/routes/admin/sidebar-projects.ts
11746
- import neo4j3 from "neo4j-driver";
11747
- var LIMIT = 50;
11748
- var app31 = new Hono();
11749
- app31.get("/", requireAdminSession, async (c) => {
11750
- const sessionKey = c.var.sessionKey;
11751
- const accountId = getAccountIdForSession(sessionKey);
11752
- if (!accountId) {
11753
- return c.json({ error: "Account not found for session" }, 401);
11754
- }
11755
- const start = Date.now();
11756
- const session = getSession();
11757
- try {
11758
- const result = await session.run(
11759
- `MATCH (p:Project { accountId: $accountId })
11760
- WHERE NOT p:Trashed
11761
- RETURN p.taskId AS id, elementId(p) AS elementId, p.name AS name, p.updatedAt AS updatedAt
11762
- ORDER BY p.updatedAt DESC
11763
- LIMIT $limit`,
11764
- { accountId, limit: neo4j3.int(LIMIT) }
11765
- );
11766
- const projects = result.records.map((r) => ({
11767
- id: r.get("id"),
11768
- elementId: r.get("elementId"),
11769
- name: r.get("name") ?? "",
11770
- updatedAt: r.get("updatedAt") ?? ""
11771
- }));
11772
- const ms = Date.now() - start;
11773
- console.log(`[admin/sidebar-projects] account=${accountId} count=${projects.length} ms=${ms}`);
11774
- return c.json({ projects });
11775
- } catch (err) {
11776
- const ms = Date.now() - start;
11777
- const message = err instanceof Error ? err.message : String(err);
11778
- console.error(`[admin/sidebar-projects] account=${accountId} error="${message}" ms=${ms}`);
11779
- return c.json({ error: "Failed to load projects" }, 500);
11780
- } finally {
11781
- await session.close();
11782
- }
11783
- });
11784
- var sidebar_projects_default = app31;
11785
-
11786
11785
  // server/routes/admin/sidebar-artefacts.ts
11787
- import neo4j4 from "neo4j-driver";
11786
+ import neo4j3 from "neo4j-driver";
11788
11787
  import { readFile as readFile5, readdir as readdir3, stat as stat5 } from "fs/promises";
11789
11788
  import { resolve as resolve20, relative as relative2, isAbsolute } from "path";
11790
11789
  import { existsSync as existsSync19 } from "fs";
11791
- var LIMIT2 = 50;
11790
+ var LIMIT = 50;
11792
11791
  var TEXT_MIME_PREFIXES = ["text/", "application/json", "application/markdown"];
11793
11792
  var ADMIN_AGENT_FILES = ["IDENTITY.md", "SOUL.md", "KNOWLEDGE.md"];
11794
- var app32 = new Hono();
11795
- app32.get("/", requireAdminSession, async (c) => {
11793
+ var app31 = new Hono();
11794
+ app31.get("/", requireAdminSession, async (c) => {
11796
11795
  const sessionKey = c.var.sessionKey;
11797
11796
  const accountId = getAccountIdForSession(sessionKey);
11798
11797
  if (!accountId) {
@@ -11807,7 +11806,7 @@ app32.get("/", requireAdminSession, async (c) => {
11807
11806
  const agents = await fetchAgentTemplateRows(accountDir);
11808
11807
  const artefacts = [...docs, ...agents].sort(
11809
11808
  (a, b) => (b.updatedAt ?? "").localeCompare(a.updatedAt ?? "")
11810
- ).slice(0, LIMIT2);
11809
+ ).slice(0, LIMIT);
11811
11810
  const ms = Date.now() - start;
11812
11811
  console.log(
11813
11812
  `[admin/sidebar-artefacts] account=${accountId} count=${artefacts.length} docs=${docs.length} agents=${agents.length} ms=${ms}`
@@ -11825,7 +11824,7 @@ async function fetchKnowledgeDocs(accountId) {
11825
11824
  d.attachmentId AS attachmentId, d.encodingFormat AS mimeType
11826
11825
  ORDER BY d.updatedAt DESC
11827
11826
  LIMIT $limit`,
11828
- { accountId, limit: neo4j4.int(LIMIT2) }
11827
+ { accountId, limit: neo4j3.int(LIMIT) }
11829
11828
  );
11830
11829
  metas = result.records.map((r) => ({
11831
11830
  id: r.get("id"),
@@ -11998,7 +11997,7 @@ function isWithin(target, root) {
11998
11997
  const rel = relative2(root, target);
11999
11998
  return !rel.startsWith("..") && !isAbsolute(rel);
12000
11999
  }
12001
- var sidebar_artefacts_default = app32;
12000
+ var sidebar_artefacts_default = app31;
12002
12001
 
12003
12002
  // server/routes/admin/sidebar-artefact-save.ts
12004
12003
  import { mkdir as mkdir4, readdir as readdir4, stat as stat6, writeFile as writeFile5 } from "fs/promises";
@@ -12006,8 +12005,8 @@ import { resolve as resolve21 } from "path";
12006
12005
  import { existsSync as existsSync20 } from "fs";
12007
12006
  var ADMIN_AGENT_FILES2 = /* @__PURE__ */ new Set(["IDENTITY.md", "SOUL.md", "KNOWLEDGE.md"]);
12008
12007
  var UUID_RE4 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
12009
- var app33 = new Hono();
12010
- app33.post("/", requireAdminSession, async (c) => {
12008
+ var app32 = new Hono();
12009
+ app32.post("/", requireAdminSession, async (c) => {
12011
12010
  const sessionKey = c.var.sessionKey;
12012
12011
  const accountId = getAccountIdForSession(sessionKey);
12013
12012
  if (!accountId) return c.json({ error: "Account not found for session" }, 401);
@@ -12087,15 +12086,15 @@ async function resolveSavePath(id, accountId, accountDir) {
12087
12086
  function relPath(absPath, root) {
12088
12087
  return absPath.startsWith(root) ? absPath.slice(root.length + 1) : absPath;
12089
12088
  }
12090
- var sidebar_artefact_save_default = app33;
12089
+ var sidebar_artefact_save_default = app32;
12091
12090
 
12092
12091
  // server/routes/admin/sidebar-artefact-content.ts
12093
12092
  import { readFile as readFile6, readdir as readdir5 } from "fs/promises";
12094
12093
  import { existsSync as existsSync21 } from "fs";
12095
12094
  import { resolve as resolve22 } from "path";
12096
12095
  var UUID_RE5 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
12097
- var app34 = new Hono();
12098
- app34.get("/", requireAdminSession, async (c) => {
12096
+ var app33 = new Hono();
12097
+ app33.get("/", requireAdminSession, async (c) => {
12099
12098
  const sessionKey = c.var.sessionKey;
12100
12099
  const accountId = getAccountIdForSession(sessionKey);
12101
12100
  if (!accountId) return new Response("Unauthorized", { status: 401 });
@@ -12136,36 +12135,35 @@ app34.get("/", requireAdminSession, async (c) => {
12136
12135
  }
12137
12136
  });
12138
12137
  });
12139
- var sidebar_artefact_content_default = app34;
12138
+ var sidebar_artefact_content_default = app33;
12140
12139
 
12141
12140
  // server/routes/admin/index.ts
12142
- var app35 = new Hono();
12143
- app35.route("/session", session_default2);
12144
- app35.route("/chat", chat_default2);
12145
- app35.route("/compact", compact_default);
12146
- app35.route("/logs", logs_default);
12147
- app35.route("/claude-info", claude_info_default);
12148
- app35.route("/attachment", attachment_default);
12149
- app35.route("/agents", agents_default);
12150
- app35.route("/sessions", sessions_default);
12151
- app35.route("/browser", browser_default);
12152
- app35.route("/device-browser", device_browser_default);
12153
- app35.route("/events", events_default);
12154
- app35.route("/cloudflare", cloudflare_default);
12155
- app35.route("/files", files_default);
12156
- app35.route("/graph-search", graph_search_default);
12157
- app35.route("/graph-subgraph", graph_subgraph_default);
12158
- app35.route("/graph-delete", graph_delete_default);
12159
- app35.route("/graph-restore", graph_restore_default);
12160
- app35.route("/graph-labels-in-graph", graph_labels_in_graph_default);
12161
- app35.route("/graph-default-view", graph_default_view_default);
12162
- app35.route("/file-attach", file_attach_default);
12163
- app35.route("/adherence", adherence_default);
12164
- app35.route("/sidebar-projects", sidebar_projects_default);
12165
- app35.route("/sidebar-artefacts", sidebar_artefacts_default);
12166
- app35.route("/sidebar-artefact-save", sidebar_artefact_save_default);
12167
- app35.route("/sidebar-artefact-content", sidebar_artefact_content_default);
12168
- var admin_default = app35;
12141
+ var app34 = new Hono();
12142
+ app34.route("/session", session_default2);
12143
+ app34.route("/chat", chat_default2);
12144
+ app34.route("/compact", compact_default);
12145
+ app34.route("/logs", logs_default);
12146
+ app34.route("/claude-info", claude_info_default);
12147
+ app34.route("/attachment", attachment_default);
12148
+ app34.route("/agents", agents_default);
12149
+ app34.route("/sessions", sessions_default);
12150
+ app34.route("/browser", browser_default);
12151
+ app34.route("/device-browser", device_browser_default);
12152
+ app34.route("/events", events_default);
12153
+ app34.route("/cloudflare", cloudflare_default);
12154
+ app34.route("/files", files_default);
12155
+ app34.route("/graph-search", graph_search_default);
12156
+ app34.route("/graph-subgraph", graph_subgraph_default);
12157
+ app34.route("/graph-delete", graph_delete_default);
12158
+ app34.route("/graph-restore", graph_restore_default);
12159
+ app34.route("/graph-labels-in-graph", graph_labels_in_graph_default);
12160
+ app34.route("/graph-default-view", graph_default_view_default);
12161
+ app34.route("/file-attach", file_attach_default);
12162
+ app34.route("/adherence", adherence_default);
12163
+ app34.route("/sidebar-artefacts", sidebar_artefacts_default);
12164
+ app34.route("/sidebar-artefact-save", sidebar_artefact_save_default);
12165
+ app34.route("/sidebar-artefact-content", sidebar_artefact_content_default);
12166
+ var admin_default = app34;
12169
12167
 
12170
12168
  // app/lib/graph-health.ts
12171
12169
  var HOUR_MS = 60 * 60 * 1e3;
@@ -12319,9 +12317,9 @@ watchFile(ALIAS_DOMAINS_PATH2, { interval: 2e3 }, () => {
12319
12317
  function isPublicHost(host) {
12320
12318
  return host.startsWith("public.") || aliasDomains.has(host);
12321
12319
  }
12322
- var app36 = new Hono();
12323
- app36.use("*", clientIpMiddleware);
12324
- app36.use("*", async (c, next) => {
12320
+ var app35 = new Hono();
12321
+ app35.use("*", clientIpMiddleware);
12322
+ app35.use("*", async (c, next) => {
12325
12323
  await next();
12326
12324
  c.header("X-Content-Type-Options", "nosniff");
12327
12325
  c.header("Referrer-Policy", "strict-origin-when-cross-origin");
@@ -12344,7 +12342,7 @@ var PUBLIC_ALLOWED_PREFIXES = [
12344
12342
  "/g/"
12345
12343
  ];
12346
12344
  var PUBLIC_ALLOWED_EXACT = ["/favicon.ico"];
12347
- app36.use("*", async (c, next) => {
12345
+ app35.use("*", async (c, next) => {
12348
12346
  const host = (c.req.header("host") ?? "").split(":")[0];
12349
12347
  if (!isPublicHost(host)) {
12350
12348
  await next();
@@ -12384,7 +12382,7 @@ function resolveRemoteAuthOpts() {
12384
12382
  return brandLoginOpts;
12385
12383
  }
12386
12384
  var MAX_LOGIN_BODY = 8 * 1024;
12387
- app36.post("/__remote-auth/login", async (c) => {
12385
+ app35.post("/__remote-auth/login", async (c) => {
12388
12386
  const client = clientFrom(c);
12389
12387
  const clientIp = client.ip || "unknown";
12390
12388
  if (!requestIsTlsTerminated(c)) {
@@ -12428,7 +12426,7 @@ app36.post("/__remote-auth/login", async (c) => {
12428
12426
  }
12429
12427
  });
12430
12428
  });
12431
- app36.get("/__remote-auth/logout", (c) => {
12429
+ app35.get("/__remote-auth/logout", (c) => {
12432
12430
  return new Response(null, {
12433
12431
  status: 302,
12434
12432
  headers: {
@@ -12438,7 +12436,7 @@ app36.get("/__remote-auth/logout", (c) => {
12438
12436
  }
12439
12437
  });
12440
12438
  });
12441
- app36.post("/__remote-auth/change-password", async (c) => {
12439
+ app35.post("/__remote-auth/change-password", async (c) => {
12442
12440
  const client = clientFrom(c);
12443
12441
  const clientIp = client.ip || "unknown";
12444
12442
  const rateLimited = checkRateLimit(client);
@@ -12488,13 +12486,13 @@ app36.post("/__remote-auth/change-password", async (c) => {
12488
12486
  return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "change", changeError: "Failed to save password", redirect }), 200);
12489
12487
  }
12490
12488
  });
12491
- app36.get("/__remote-auth/setup", (c) => {
12489
+ app35.get("/__remote-auth/setup", (c) => {
12492
12490
  if (isRemoteAuthConfigured()) {
12493
12491
  return c.redirect("/");
12494
12492
  }
12495
12493
  return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "setup" }), 200);
12496
12494
  });
12497
- app36.post("/__remote-auth/set-initial-password", async (c) => {
12495
+ app35.post("/__remote-auth/set-initial-password", async (c) => {
12498
12496
  if (isRemoteAuthConfigured()) {
12499
12497
  return c.redirect("/");
12500
12498
  }
@@ -12530,10 +12528,10 @@ app36.post("/__remote-auth/set-initial-password", async (c) => {
12530
12528
  return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "setup", setupError: "Failed to save password. Please try again." }), 200);
12531
12529
  }
12532
12530
  });
12533
- app36.get("/api/remote-auth/status", (c) => {
12531
+ app35.get("/api/remote-auth/status", (c) => {
12534
12532
  return c.json({ configured: isRemoteAuthConfigured() });
12535
12533
  });
12536
- app36.post("/api/remote-auth/set-password", async (c) => {
12534
+ app35.post("/api/remote-auth/set-password", async (c) => {
12537
12535
  let body;
12538
12536
  try {
12539
12537
  body = await c.req.json();
@@ -12563,9 +12561,9 @@ app36.post("/api/remote-auth/set-password", async (c) => {
12563
12561
  return c.json({ error: "Failed to save password" }, 500);
12564
12562
  }
12565
12563
  });
12566
- app36.route("/api/_client-error", client_error_default);
12564
+ app35.route("/api/_client-error", client_error_default);
12567
12565
  console.log("[client-error-route] mounted");
12568
- app36.use("*", async (c, next) => {
12566
+ app35.use("*", async (c, next) => {
12569
12567
  const host = (c.req.header("host") ?? "").split(":")[0];
12570
12568
  const path2 = c.req.path;
12571
12569
  if (path2 === "/favicon.ico" || path2.startsWith("/assets/") || path2.startsWith("/brand/")) {
@@ -12598,15 +12596,15 @@ app36.use("*", async (c, next) => {
12598
12596
  console.error(`[remote-auth] login required ip=${clientIp} path=${path2} ${disambig}`);
12599
12597
  return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), redirect: path2 }), 200);
12600
12598
  });
12601
- app36.route("/api/health", health_default);
12602
- app36.route("/api/session", session_default);
12603
- app36.route("/api/chat", chat_default);
12604
- app36.route("/api/group", group_default);
12605
- app36.route("/api/access", access_default);
12606
- app36.route("/api/telegram", telegram_default);
12607
- app36.route("/api/whatsapp", whatsapp_default);
12608
- app36.route("/api/onboarding", onboarding_default);
12609
- app36.route("/api/admin", admin_default);
12599
+ app35.route("/api/health", health_default);
12600
+ app35.route("/api/session", session_default);
12601
+ app35.route("/api/chat", chat_default);
12602
+ app35.route("/api/group", group_default);
12603
+ app35.route("/api/access", access_default);
12604
+ app35.route("/api/telegram", telegram_default);
12605
+ app35.route("/api/whatsapp", whatsapp_default);
12606
+ app35.route("/api/onboarding", onboarding_default);
12607
+ app35.route("/api/admin", admin_default);
12610
12608
  var SAFE_SLUG_RE = /^[a-z][a-z0-9-]{2,49}$/;
12611
12609
  var SAFE_FILENAME_RE = /^[a-z0-9_][a-z0-9_.-]{0,99}$/i;
12612
12610
  var IMAGE_MIME = {
@@ -12618,7 +12616,7 @@ var IMAGE_MIME = {
12618
12616
  ".svg": "image/svg+xml",
12619
12617
  ".ico": "image/x-icon"
12620
12618
  };
12621
- app36.get("/agent-assets/:slug/:filename", (c) => {
12619
+ app35.get("/agent-assets/:slug/:filename", (c) => {
12622
12620
  const slug = c.req.param("slug");
12623
12621
  const filename = c.req.param("filename");
12624
12622
  if (!SAFE_SLUG_RE.test(slug)) {
@@ -12653,7 +12651,7 @@ app36.get("/agent-assets/:slug/:filename", (c) => {
12653
12651
  "Cache-Control": "public, max-age=3600"
12654
12652
  });
12655
12653
  });
12656
- app36.get("/generated/:filename", (c) => {
12654
+ app35.get("/generated/:filename", (c) => {
12657
12655
  const filename = c.req.param("filename");
12658
12656
  if (!SAFE_FILENAME_RE.test(filename) || filename.includes("..")) {
12659
12657
  console.error(`[generated] serve file=${filename} status=403`);
@@ -12819,7 +12817,7 @@ function brandedPublicHtml(agentSlug) {
12819
12817
  function escapeHtml(s) {
12820
12818
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
12821
12819
  }
12822
- app36.get("/", (c) => {
12820
+ app35.get("/", (c) => {
12823
12821
  const host = (c.req.header("host") ?? "").split(":")[0];
12824
12822
  if (isPublicHost(host)) {
12825
12823
  const defaultSlug = resolveDefaultSlug();
@@ -12827,12 +12825,12 @@ app36.get("/", (c) => {
12827
12825
  }
12828
12826
  return c.html(cachedHtml("index.html"));
12829
12827
  });
12830
- app36.get("/public", (c) => {
12828
+ app35.get("/public", (c) => {
12831
12829
  const host = (c.req.header("host") ?? "").split(":")[0];
12832
12830
  if (isPublicHost(host)) return c.text("Not found", 404);
12833
12831
  return c.html(cachedHtml("public.html"));
12834
12832
  });
12835
- app36.get("/chat", (c) => {
12833
+ app35.get("/chat", (c) => {
12836
12834
  const host = (c.req.header("host") ?? "").split(":")[0];
12837
12835
  if (isPublicHost(host)) return c.text("Not found", 404);
12838
12836
  return c.html(cachedHtml("public.html"));
@@ -12851,9 +12849,9 @@ async function logViewerFetch(c, next) {
12851
12849
  duration_ms: Date.now() - start
12852
12850
  });
12853
12851
  }
12854
- app36.use("/vnc-viewer.html", logViewerFetch);
12855
- app36.use("/vnc-popout.html", logViewerFetch);
12856
- app36.get("/vnc-popout.html", (c) => {
12852
+ app35.use("/vnc-viewer.html", logViewerFetch);
12853
+ app35.use("/vnc-popout.html", logViewerFetch);
12854
+ app35.get("/vnc-popout.html", (c) => {
12857
12855
  let html = htmlCache.get("vnc-popout.html");
12858
12856
  if (!html) {
12859
12857
  html = readFileSync16(resolve23(process.cwd(), "public", "vnc-popout.html"), "utf-8");
@@ -12866,7 +12864,7 @@ app36.get("/vnc-popout.html", (c) => {
12866
12864
  }
12867
12865
  return c.html(html);
12868
12866
  });
12869
- app36.post("/api/vnc/client-event", async (c) => {
12867
+ app35.post("/api/vnc/client-event", async (c) => {
12870
12868
  let body;
12871
12869
  try {
12872
12870
  body = await c.req.json();
@@ -12887,20 +12885,20 @@ app36.post("/api/vnc/client-event", async (c) => {
12887
12885
  });
12888
12886
  return c.json({ ok: true });
12889
12887
  });
12890
- app36.get("/g/:slug", (c) => {
12888
+ app35.get("/g/:slug", (c) => {
12891
12889
  return c.html(brandedPublicHtml());
12892
12890
  });
12893
- app36.get("/graph", (c) => {
12891
+ app35.get("/graph", (c) => {
12894
12892
  const host = (c.req.header("host") ?? "").split(":")[0];
12895
12893
  if (isPublicHost(host)) return c.text("Not found", 404);
12896
12894
  return c.html(cachedHtml("graph.html"));
12897
12895
  });
12898
- app36.get("/data", (c) => {
12896
+ app35.get("/data", (c) => {
12899
12897
  const host = (c.req.header("host") ?? "").split(":")[0];
12900
12898
  if (isPublicHost(host)) return c.text("Not found", 404);
12901
12899
  return c.html(cachedHtml("data.html"));
12902
12900
  });
12903
- app36.get("/:slug", async (c, next) => {
12901
+ app35.get("/:slug", async (c, next) => {
12904
12902
  const slug = c.req.param("slug");
12905
12903
  if (AGENT_SLUG_PATTERN.test(`/${slug}`)) {
12906
12904
  const branding = loadBrandingCache(slug);
@@ -12909,10 +12907,10 @@ app36.get("/:slug", async (c, next) => {
12909
12907
  }
12910
12908
  await next();
12911
12909
  });
12912
- app36.use("/*", serveStatic({ root: "./public" }));
12910
+ app35.use("/*", serveStatic({ root: "./public" }));
12913
12911
  var port = parseInt(process.env.MAXY_UI_INTERNAL_PORT ?? process.env.PORT ?? "19199", 10);
12914
12912
  var hostname = process.env.HOSTNAME ?? "127.0.0.1";
12915
- var httpServer = serve({ fetch: app36.fetch, port, hostname });
12913
+ var httpServer = serve({ fetch: app35.fetch, port, hostname });
12916
12914
  console.log(`${BRAND.productName} listening on http://${hostname}:${port}`);
12917
12915
  var SUBAPP_MANIFEST = [
12918
12916
  { prefix: "/api/health", file: "server/routes/health.ts", subapp: health_default },
@@ -12932,7 +12930,7 @@ for (const m of SUBAPP_MANIFEST) {
12932
12930
  }
12933
12931
  try {
12934
12932
  const registered = [];
12935
- for (const r of app36.routes ?? []) {
12933
+ for (const r of app35.routes ?? []) {
12936
12934
  if (typeof r.path !== "string" || r.path.includes(":") || r.path.includes("*")) continue;
12937
12935
  if (AGENT_SLUG_PATTERN.test(r.path)) {
12938
12936
  registered.push({ method: (r.method ?? "ALL").toUpperCase(), path: r.path });
@@ -1 +0,0 @@
1
- import{i as e,t}from"./jsx-runtime-Br2bU3EJ.js";import{t as n}from"./page-DU8F3OGU.js";var r=e(),i=t();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
@@ -1 +0,0 @@
1
- import{i as e,t}from"./jsx-runtime-Br2bU3EJ.js";import{n}from"./page-Cs2i--Z2.js";import"./Checkbox-DHsoNPeM.js";var r=e(),i=t();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));