@rubytech/create-maxy-code 0.1.404 → 0.1.406

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 (87) hide show
  1. package/dist/__tests__/launchd-plist.test.js +13 -1
  2. package/dist/__tests__/neo4j-darwin-dedicated.test.js +52 -0
  3. package/dist/__tests__/neo4j-datadir.test.js +8 -7
  4. package/dist/__tests__/neo4j-teardown.test.js +17 -1
  5. package/dist/index.js +183 -9
  6. package/dist/launchd-plist.js +21 -0
  7. package/dist/neo4j-darwin-dedicated.js +39 -0
  8. package/dist/neo4j-datadir.js +9 -5
  9. package/dist/neo4j-teardown.js +15 -0
  10. package/dist/uninstall.js +34 -8
  11. package/package.json +1 -1
  12. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +2 -2
  13. package/payload/platform/plugins/scheduling/PLUGIN.md +2 -0
  14. package/payload/platform/plugins/scheduling/mcp/dist/__tests__/agent-dispatch-manager-grounding.test.d.ts +2 -0
  15. package/payload/platform/plugins/scheduling/mcp/dist/__tests__/agent-dispatch-manager-grounding.test.d.ts.map +1 -0
  16. package/payload/platform/plugins/scheduling/mcp/dist/__tests__/agent-dispatch-manager-grounding.test.js +19 -0
  17. package/payload/platform/plugins/scheduling/mcp/dist/__tests__/agent-dispatch-manager-grounding.test.js.map +1 -0
  18. package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/deliverability-grounding.test.d.ts +2 -0
  19. package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/deliverability-grounding.test.d.ts.map +1 -0
  20. package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/deliverability-grounding.test.js +33 -0
  21. package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/deliverability-grounding.test.js.map +1 -0
  22. package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +2 -0
  23. package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +5 -1
  24. package/payload/platform/services/claude-session-manager/dist/claude-host-creds.d.ts +8 -7
  25. package/payload/platform/services/claude-session-manager/dist/claude-host-creds.d.ts.map +1 -1
  26. package/payload/platform/services/claude-session-manager/dist/claude-host-creds.js +63 -40
  27. package/payload/platform/services/claude-session-manager/dist/claude-host-creds.js.map +1 -1
  28. package/payload/platform/services/claude-session-manager/dist/claude-keychain-write.d.ts +40 -0
  29. package/payload/platform/services/claude-session-manager/dist/claude-keychain-write.d.ts.map +1 -0
  30. package/payload/platform/services/claude-session-manager/dist/claude-keychain-write.js +159 -0
  31. package/payload/platform/services/claude-session-manager/dist/claude-keychain-write.js.map +1 -0
  32. package/payload/platform/services/claude-session-manager/dist/connector-availability.d.ts +36 -0
  33. package/payload/platform/services/claude-session-manager/dist/connector-availability.d.ts.map +1 -0
  34. package/payload/platform/services/claude-session-manager/dist/connector-availability.js +76 -0
  35. package/payload/platform/services/claude-session-manager/dist/connector-availability.js.map +1 -0
  36. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +2 -1
  37. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
  38. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +2 -2
  39. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
  40. package/payload/premium-plugins/venture-studio/PLUGIN.md +1 -1
  41. package/payload/premium-plugins/venture-studio/bin/scan-private-data.sh +61 -0
  42. package/payload/premium-plugins/venture-studio/skills/investor-data-room/SKILL.md +31 -32
  43. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +5 -5
  44. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitor-analysis.md +1 -1
  45. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +2 -2
  46. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +1 -1
  47. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +38 -26
  48. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +2 -2
  49. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +6 -6
  50. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/strategy-frameworks.md +1 -1
  51. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +17 -18
  52. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +156 -234
  53. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +13 -13
  54. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/strategy-red-team.md +1 -1
  55. package/payload/server/public/assets/{AdminLoginScreens-BzErD9Zo.js → AdminLoginScreens-D36zz_SY.js} +1 -1
  56. package/payload/server/public/assets/{AdminShell-BihejKg_.js → AdminShell-DH6Lcj-d.js} +1 -1
  57. package/payload/server/public/assets/{Checkbox-Ds004CBE.js → Checkbox-54KtArF3.js} +1 -1
  58. package/payload/server/public/assets/{Transcript-CgaMQKgY.js → Transcript-BCpiXt4J.js} +1 -1
  59. package/payload/server/public/assets/{admin-BSuRtMws.js → admin-C0FCHcJj.js} +1 -1
  60. package/payload/server/public/assets/{browser-BO2eR_YY.js → browser-bKeZ5iLx.js} +1 -1
  61. package/payload/server/public/assets/{calendar-12QuR_oh.js → calendar-BDPBArFA.js} +1 -1
  62. package/payload/server/public/assets/chat-Cp_1ebzU.js +1 -0
  63. package/payload/server/public/assets/chevron-left-S7Nk-se6.js +1 -0
  64. package/payload/server/public/assets/data-BshlTgIW.js +1 -0
  65. package/payload/server/public/assets/{graph-CDOJZepc.js → graph-Dvru9CW9.js} +1 -1
  66. package/payload/server/public/assets/{graph-labels-6HKBjyXX.js → graph-labels-DLhR6Rit.js} +1 -1
  67. package/payload/server/public/assets/{maximize-2-DWmyXX8h.js → maximize-2-CyPKq7HZ.js} +1 -1
  68. package/payload/server/public/assets/{operator-D-s7jVnf.js → operator-Ql5iQXB-.js} +1 -1
  69. package/payload/server/public/assets/page-ClJOW2fk.js +32 -0
  70. package/payload/server/public/assets/{page-rDhp8G9q.js → page-YsTtZsn6.js} +1 -1
  71. package/payload/server/public/assets/{public-zK67N3z2.js → public-BlDxwcmS.js} +1 -1
  72. package/payload/server/public/assets/{rotate-ccw-BzBJxqBN.js → rotate-ccw-DSynJPZX.js} +1 -1
  73. package/payload/server/public/assets/{useSubAccountSwitcher-B-GuP1jj.css → useSubAccountSwitcher-CJelLQK-.css} +1 -1
  74. package/payload/server/public/browser.html +4 -4
  75. package/payload/server/public/calendar.html +5 -5
  76. package/payload/server/public/chat.html +9 -9
  77. package/payload/server/public/data.html +8 -8
  78. package/payload/server/public/graph.html +9 -9
  79. package/payload/server/public/index.html +11 -11
  80. package/payload/server/public/operator.html +11 -11
  81. package/payload/server/public/public.html +9 -9
  82. package/payload/server/server.js +82 -63
  83. package/payload/server/public/assets/chat-Qpyg5t65.js +0 -1
  84. package/payload/server/public/assets/chevron-left-DBUeR2CX.js +0 -1
  85. package/payload/server/public/assets/data-Ch5bne41.js +0 -1
  86. package/payload/server/public/assets/page-BcxrdxYL.js +0 -32
  87. /package/payload/server/public/assets/{useSubAccountSwitcher-Bg0RH3Gk.js → useSubAccountSwitcher-DGKQxXDD.js} +0 -0
@@ -1307,7 +1307,7 @@ var serveStatic = (options = { root: "" }) => {
1307
1307
  // server/index.ts
1308
1308
  import { readFileSync as readFileSync35, existsSync as existsSync33, watchFile } from "fs";
1309
1309
  import { spawn as spawn3 } from "child_process";
1310
- import { resolve as resolve33, join as join34, basename as basename13 } from "path";
1310
+ import { resolve as resolve33, join as join35, basename as basename13 } from "path";
1311
1311
  import { homedir as homedir3 } from "os";
1312
1312
  import { monitorEventLoopDelay } from "perf_hooks";
1313
1313
 
@@ -8325,6 +8325,8 @@ function parseTranscript(lines, queuedPendingSuppress = /* @__PURE__ */ new Map(
8325
8325
  if (!isScheduleSource(text)) {
8326
8326
  renderOrSuppressChannelInbound(unwrapChannel(text), ts, out, queuedPendingSuppress);
8327
8327
  }
8328
+ } else if (row.isMeta === true) {
8329
+ out.push({ kind: "harness-internal", text, ts });
8328
8330
  } else {
8329
8331
  out.push({ kind: "operator-typed", text, ts });
8330
8332
  }
@@ -10499,6 +10501,9 @@ function claudeBin() {
10499
10501
  return process.env.CLAUDE_BIN ?? "claude";
10500
10502
  }
10501
10503
 
10504
+ // server/routes/onboarding.ts
10505
+ import { dirname as dirname8, join as join23 } from "path";
10506
+
10502
10507
  // app/lib/claude-keychain.ts
10503
10508
  import { execFileSync as execFileSync2 } from "child_process";
10504
10509
  var CREDS_SERVICE_PREFIX = "Claude Code-credentials";
@@ -10565,6 +10570,15 @@ function bridgeKeychainToFile(deps) {
10565
10570
  deps.log(`[onboarding] op=login-writeback src=keychain dst=host-creds-file bytes=${blob.length}`);
10566
10571
  return { wrote: true, reason: "ok", bytes: blob.length, service };
10567
10572
  }
10573
+ function persistKeychainService(result, persist, log) {
10574
+ if (!result.wrote || !result.service) return;
10575
+ try {
10576
+ persist(result.service);
10577
+ log(`[onboarding] op=keychain-service-persist service=${JSON.stringify(result.service)}`);
10578
+ } catch (err) {
10579
+ log(`[onboarding] op=keychain-service-persist result=failed err=${err instanceof Error ? err.message : String(err)}`);
10580
+ }
10581
+ }
10568
10582
  function listHostCredsMdats() {
10569
10583
  try {
10570
10584
  const out = execFileSync2("security", ["dump-keychain"], { encoding: "utf-8", timeout: 1e4 });
@@ -10877,7 +10891,7 @@ app9.post("/claude-auth", async (c) => {
10877
10891
  claudeProc2.stderr?.on("data", onClaudeOutput);
10878
10892
  claudeProc2.once("close", () => {
10879
10893
  closeSync3(claudeAuthLogFd);
10880
- bridgeKeychainToFile({
10894
+ const writebackResult = bridgeKeychainToFile({
10881
10895
  platform: process.platform,
10882
10896
  before: darwinCredsBefore,
10883
10897
  listMdats: listHostCredsMdats,
@@ -10889,6 +10903,11 @@ app9.post("/claude-auth", async (c) => {
10889
10903
  },
10890
10904
  log: (line) => console.log(line)
10891
10905
  });
10906
+ persistKeychainService(
10907
+ writebackResult,
10908
+ (service) => writeFileSync10(join23(dirname8(CLAUDE_CREDENTIALS_FILE), ".keychain-service"), service, { mode: 384 }),
10909
+ (line) => console.log(line)
10910
+ );
10892
10911
  if (darwinAuthChild === claudeProc2) darwinAuthChild = null;
10893
10912
  });
10894
10913
  return c.json({ started: true, transport: "native" });
@@ -11152,8 +11171,8 @@ var onboarding_default = app9;
11152
11171
 
11153
11172
  // server/routes/client-error.ts
11154
11173
  import { appendFileSync as appendFileSync3, existsSync as existsSync16, renameSync as renameSync8, statSync as statSync9 } from "fs";
11155
- import { join as join23 } from "path";
11156
- var CLIENT_ERRORS_LOG = join23(LOG_DIR, "client-errors.log");
11174
+ import { join as join24 } from "path";
11175
+ var CLIENT_ERRORS_LOG = join24(LOG_DIR, "client-errors.log");
11157
11176
  var MAX_LOG_SIZE = 10 * 1024 * 1024;
11158
11177
  var MAX_BODY_SIZE = 8 * 1024;
11159
11178
  var MAX_STACK_LEN = 2e3;
@@ -11520,12 +11539,12 @@ import { resolve as resolve16, basename as basename8 } from "path";
11520
11539
 
11521
11540
  // app/lib/logs-read-resolve.ts
11522
11541
  import { existsSync as existsSync17 } from "fs";
11523
- import { join as join24 } from "path";
11542
+ import { join as join25 } from "path";
11524
11543
  function resolveSessionLogPaths(filename, logDirs) {
11525
11544
  const tried = [filename];
11526
11545
  const hits = [];
11527
11546
  for (const dir of logDirs) {
11528
- const fullPath = join24(dir, filename);
11547
+ const fullPath = join25(dir, filename);
11529
11548
  if (existsSync17(fullPath)) {
11530
11549
  hits.push({ path: fullPath, dir });
11531
11550
  }
@@ -12553,7 +12572,7 @@ var sessions_default = app17;
12553
12572
 
12554
12573
  // app/lib/claude-agent/spawn-context.ts
12555
12574
  import { existsSync as existsSync22, readFileSync as readFileSync27, readdirSync as readdirSync16, statSync as statSync11 } from "fs";
12556
- import { dirname as dirname8, resolve as resolve19, join as join25 } from "path";
12575
+ import { dirname as dirname9, resolve as resolve19, join as join26 } from "path";
12557
12576
  async function resolveOwnerProfileBlock(accountId, userId) {
12558
12577
  if (!userId) return { ok: false, reason: "missing-user-id" };
12559
12578
  try {
@@ -12594,8 +12613,8 @@ function frontmatterField(manifest, field2) {
12594
12613
  function extractPluginToolDescriptions(pluginDir) {
12595
12614
  const out = /* @__PURE__ */ new Map();
12596
12615
  const candidates = [
12597
- join25(pluginDir, "mcp/dist/index.js"),
12598
- join25(pluginDir, "mcp/src/index.ts")
12616
+ join26(pluginDir, "mcp/dist/index.js"),
12617
+ join26(pluginDir, "mcp/src/index.ts")
12599
12618
  ];
12600
12619
  let raw = null;
12601
12620
  for (const path2 of candidates) {
@@ -12653,21 +12672,21 @@ function listPluginDirs() {
12653
12672
  const platformPlugins = resolve19(PLATFORM_ROOT, "plugins");
12654
12673
  if (existsSync22(platformPlugins)) {
12655
12674
  for (const name of readdirSync16(platformPlugins)) {
12656
- const dir = join25(platformPlugins, name);
12675
+ const dir = join26(platformPlugins, name);
12657
12676
  try {
12658
12677
  if (statSync11(dir).isDirectory()) out.set(name, dir);
12659
12678
  } catch {
12660
12679
  }
12661
12680
  }
12662
12681
  }
12663
- const premiumRoot = resolve19(dirname8(PLATFORM_ROOT), "premium-plugins");
12682
+ const premiumRoot = resolve19(dirname9(PLATFORM_ROOT), "premium-plugins");
12664
12683
  if (existsSync22(premiumRoot)) {
12665
12684
  for (const bundle of readdirSync16(premiumRoot)) {
12666
- const bundlePlugins = join25(premiumRoot, bundle, "plugins");
12685
+ const bundlePlugins = join26(premiumRoot, bundle, "plugins");
12667
12686
  if (!existsSync22(bundlePlugins)) continue;
12668
12687
  try {
12669
12688
  for (const name of readdirSync16(bundlePlugins)) {
12670
- const dir = join25(bundlePlugins, name);
12689
+ const dir = join26(bundlePlugins, name);
12671
12690
  try {
12672
12691
  if (statSync11(dir).isDirectory()) out.set(name, dir);
12673
12692
  } catch {
@@ -12710,7 +12729,7 @@ function computeActivePlugins(accountId) {
12710
12729
  for (const name of Array.from(enabled).sort()) {
12711
12730
  const dir = pluginDirs.get(name);
12712
12731
  if (!dir) continue;
12713
- const fm = readFrontmatter(join25(dir, "PLUGIN.md"));
12732
+ const fm = readFrontmatter(join26(dir, "PLUGIN.md"));
12714
12733
  if (!fm) continue;
12715
12734
  const description = frontmatterField(`---
12716
12735
  ${fm}
@@ -12727,7 +12746,7 @@ ${fm}
12727
12746
  `plugin-manifest-tool-coverage plugin=${name} tools=${tools.length} with-desc=${withDesc}`
12728
12747
  );
12729
12748
  if (toolNames.length > 0 && descMap.size === 0) {
12730
- const hasSource = existsSync22(join25(dir, "mcp/dist/index.js")) || existsSync22(join25(dir, "mcp/src/index.ts"));
12749
+ const hasSource = existsSync22(join26(dir, "mcp/dist/index.js")) || existsSync22(join26(dir, "mcp/src/index.ts"));
12731
12750
  if (hasSource) {
12732
12751
  console.warn(
12733
12752
  `[spawn-context] WARN plugin=${name} mcp source present but tool-description regex matched zero entries \u2014 SDK upgrade may have changed the registration shape`
@@ -12737,7 +12756,7 @@ ${fm}
12737
12756
  const skillPaths = parseSkillPathsFromFrontmatter(fm);
12738
12757
  const skills = [];
12739
12758
  for (const relPath of skillPaths) {
12740
- const skillPath = join25(dir, relPath);
12759
+ const skillPath = join26(dir, relPath);
12741
12760
  const skillFm = readFrontmatter(skillPath);
12742
12761
  if (!skillFm) continue;
12743
12762
  const skillName = frontmatterField(`---
@@ -12781,7 +12800,7 @@ function computeSpecialistDomains(accountId) {
12781
12800
  const out = [];
12782
12801
  for (const file of entries.sort()) {
12783
12802
  if (!file.endsWith(".md")) continue;
12784
- const fm = readFrontmatter(join25(specialistsDir, file));
12803
+ const fm = readFrontmatter(join26(specialistsDir, file));
12785
12804
  if (!fm) continue;
12786
12805
  const wrapped = `---
12787
12806
  ${fm}
@@ -13109,7 +13128,7 @@ import { createReadStream as createReadStream2, createWriteStream as createWrite
13109
13128
  import { readdir as readdir3, readFile as readFile4, stat as stat4, mkdir as mkdir3, unlink as unlink2, rename } from "fs/promises";
13110
13129
  import { realpathSync as realpathSync5 } from "fs";
13111
13130
  import { randomUUID as randomUUID9 } from "crypto";
13112
- import { basename as basename10, dirname as dirname9, join as join27, relative as relative4, resolve as resolve22, sep as sep6 } from "path";
13131
+ import { basename as basename10, dirname as dirname10, join as join28, relative as relative4, resolve as resolve22, sep as sep6 } from "path";
13113
13132
  import { Readable as Readable2 } from "stream";
13114
13133
 
13115
13134
  // ../lib/graph-trash/src/index.ts
@@ -13427,7 +13446,7 @@ async function cascadeDeleteDocument(params) {
13427
13446
 
13428
13447
  // app/lib/file-index.ts
13429
13448
  import * as fsp from "fs/promises";
13430
- import { resolve as resolve21, relative as relative3, join as join26, basename as basename9, extname as extname2, sep as sep5 } from "path";
13449
+ import { resolve as resolve21, relative as relative3, join as join27, basename as basename9, extname as extname2, sep as sep5 } from "path";
13431
13450
  import { tmpdir as tmpdir2 } from "os";
13432
13451
  import { execFile as execFile2 } from "child_process";
13433
13452
  import { promisify as promisify2 } from "util";
@@ -13509,7 +13528,7 @@ async function extractPdf(absolute) {
13509
13528
  return stdout.trim();
13510
13529
  }
13511
13530
  async function ocrPdf(absolute) {
13512
- const outPdf = join26(tmpdir2(), `file-index-ocr-${process.pid}-${Date.now()}.pdf`);
13531
+ const outPdf = join27(tmpdir2(), `file-index-ocr-${process.pid}-${Date.now()}.pdf`);
13513
13532
  try {
13514
13533
  await execFileAsync2(
13515
13534
  "ocrmypdf",
@@ -13571,7 +13590,7 @@ async function readDisplayName(absolute) {
13571
13590
  const stem = dot === -1 ? base : base.slice(0, dot);
13572
13591
  if (base === `${stem}.meta.json`) return null;
13573
13592
  try {
13574
- const raw = await fsp.readFile(join26(dir, `${stem}.meta.json`), "utf-8");
13593
+ const raw = await fsp.readFile(join27(dir, `${stem}.meta.json`), "utf-8");
13575
13594
  const meta = JSON.parse(raw);
13576
13595
  const dn = meta.displayName ?? meta.filename;
13577
13596
  return typeof dn === "string" && dn.length > 0 ? dn : null;
@@ -13592,7 +13611,7 @@ async function walkSubtree(root, dataRoot, out) {
13592
13611
  for (const entry of entries) {
13593
13612
  if (entry.isSymbolicLink()) continue;
13594
13613
  if (entry.isDirectory() && entry.name === ".uploads-tmp") continue;
13595
- const abs = join26(root, entry.name);
13614
+ const abs = join27(root, entry.name);
13596
13615
  if (entry.isDirectory()) {
13597
13616
  const sub = await walkSubtree(abs, dataRoot, out);
13598
13617
  if (!sub.clean) clean = false;
@@ -13948,7 +13967,7 @@ var UPLOAD_TMP_DIR = ".uploads-tmp";
13948
13967
  var UUID_RE3 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
13949
13968
  async function readMeta(absDir, baseName) {
13950
13969
  try {
13951
- const raw = await readFile4(join27(absDir, `${baseName}.meta.json`), "utf8");
13970
+ const raw = await readFile4(join28(absDir, `${baseName}.meta.json`), "utf8");
13952
13971
  const parsed = JSON.parse(raw);
13953
13972
  if (typeof parsed?.filename === "string") {
13954
13973
  return { filename: parsed.filename, mimeType: typeof parsed.mimeType === "string" ? parsed.mimeType : void 0 };
@@ -13986,7 +14005,7 @@ async function readAccountNames() {
13986
14005
  }
13987
14006
  async function enrich(absolute, entry, accountNames) {
13988
14007
  if (entry.kind === "directory" && UUID_RE3.test(entry.name)) {
13989
- const meta = await readMeta(join27(absolute, entry.name), entry.name);
14008
+ const meta = await readMeta(join28(absolute, entry.name), entry.name);
13990
14009
  if (meta?.filename) {
13991
14010
  entry.displayName = meta.filename;
13992
14011
  entry.mimeType = meta.mimeType;
@@ -14150,7 +14169,7 @@ app21.get("/", requireAdminSession, async (c) => {
14150
14169
  const childRel = relPath === "" || relPath === "." ? name : `${relPath}/${name}`;
14151
14170
  const protectedEntry = isProtectedFromDeletion(childRel).protected;
14152
14171
  try {
14153
- const entryPath = join27(absolute, name);
14172
+ const entryPath = join28(absolute, name);
14154
14173
  const s = await stat4(entryPath);
14155
14174
  entries.push({
14156
14175
  name,
@@ -14203,7 +14222,7 @@ app21.get("/download", requireAdminSession, async (c) => {
14203
14222
  console.error(`[data] op=scratchpad-no-session sessionId="${sessionId.slice(0, 8)}\u2026"`);
14204
14223
  return c.json({ error: "Not found" }, 404);
14205
14224
  }
14206
- const meta = readSidecarMeta(join27(projectDir, `${sessionId}.meta.json`));
14225
+ const meta = readSidecarMeta(join28(projectDir, `${sessionId}.meta.json`));
14207
14226
  if (!meta.accountId || meta.accountId !== accountId) {
14208
14227
  console.error(`[data] account-scope-blocked root="scratchpad" sessionId="${sessionId.slice(0, 8)}\u2026" account=${accountId.slice(0, 8)}\u2026`);
14209
14228
  return c.json({ error: "Not found" }, 404);
@@ -14290,7 +14309,7 @@ async function* walkRegularFiles(dirAbsolute) {
14290
14309
  const dirents = await readdir3(dirAbsolute, { withFileTypes: true });
14291
14310
  for (const d of dirents) {
14292
14311
  if (d.isSymbolicLink()) continue;
14293
- const child = join27(dirAbsolute, d.name);
14312
+ const child = join28(dirAbsolute, d.name);
14294
14313
  if (d.isDirectory()) {
14295
14314
  yield* walkRegularFiles(child);
14296
14315
  continue;
@@ -14339,7 +14358,7 @@ app21.get("/download-zip", requireAdminSession, async (c) => {
14339
14358
  const info = await stat4(absolute);
14340
14359
  if (info.isDirectory()) {
14341
14360
  dirsWalked++;
14342
- const parentAbs = dirname9(absolute);
14361
+ const parentAbs = dirname10(absolute);
14343
14362
  for await (const fileAbs of walkRegularFiles(absolute)) {
14344
14363
  const within = relative4(absolute, fileAbs).split(sep6).join("/");
14345
14364
  const fileRel = relPath === "" || relPath === "." ? within : `${relPath}/${within}`;
@@ -14393,8 +14412,8 @@ async function resolveUploadTarget(c, accountId, uid) {
14393
14412
  const rawDir = c.req.query("path") ?? "";
14394
14413
  const base = resolveOwnAccountWrite(rawDir, accountId, "POST /api/admin/files/upload");
14395
14414
  if (!base.ok) return { ok: false, status: base.status, error: base.error };
14396
- const relDir = relpath ? dirname9(relpath) : ".";
14397
- const destRel = relDir === "." ? base.relative : join27(base.relative, relDir);
14415
+ const relDir = relpath ? dirname10(relpath) : ".";
14416
+ const destRel = relDir === "." ? base.relative : join28(base.relative, relDir);
14398
14417
  if (crossesForeignAccountPartition(destRel, accountId)) {
14399
14418
  console.error(`[data] account-scope-blocked endpoint="POST /api/admin/files/upload" path="${destRel}" account=${accountId.slice(0, 8)}\u2026`);
14400
14419
  return { ok: false, status: 404, error: "Not found" };
@@ -14770,7 +14789,7 @@ app21.delete("/", requireAdminSession, async (c) => {
14770
14789
  }
14771
14790
  const dot = base.lastIndexOf(".");
14772
14791
  const stem = dot === -1 ? base : base.slice(0, dot);
14773
- const sidecarPath = UUID_RE3.test(stem) && base !== `${stem}.meta.json` ? join27(dirname9(absolute), `${stem}.meta.json`) : null;
14792
+ const sidecarPath = UUID_RE3.test(stem) && base !== `${stem}.meta.json` ? join28(dirname10(absolute), `${stem}.meta.json`) : null;
14774
14793
  await unlink2(absolute);
14775
14794
  if (sidecarPath) {
14776
14795
  try {
@@ -14866,8 +14885,8 @@ app21.post("/rename", requireAdminSession, async (c) => {
14866
14885
  console.error(`[data] file-rename blocked path="${src.relative}" reason="protected"`);
14867
14886
  return c.json({ error: "Protected entry \u2014 refusing to rename" }, 403);
14868
14887
  }
14869
- const destAbs = resolve22(dirname9(src.absolute), newName);
14870
- const newRel = `${dirname9(src.relative)}/${newName}`.replace(/^\.\//, "");
14888
+ const destAbs = resolve22(dirname10(src.absolute), newName);
14889
+ const newRel = `${dirname10(src.relative)}/${newName}`.replace(/^\.\//, "");
14871
14890
  if (isProtectedFromRename(newRel)) {
14872
14891
  console.error(`[data] file-rename blocked path="${newRel}" reason="protected-target"`);
14873
14892
  return c.json({ error: "That name is reserved" }, 403);
@@ -17736,10 +17755,10 @@ var system_stats_default = app36;
17736
17755
 
17737
17756
  // server/routes/admin/health.ts
17738
17757
  import { existsSync as existsSync26, readFileSync as readFileSync29 } from "fs";
17739
- import { resolve as resolve24, join as join28 } from "path";
17758
+ import { resolve as resolve24, join as join29 } from "path";
17740
17759
  var PLATFORM_ROOT6 = process.env.MAXY_PLATFORM_ROOT ?? resolve24(process.cwd(), "..");
17741
17760
  var brandHostname = "maxy";
17742
- var brandJsonPath = join28(PLATFORM_ROOT6, "config", "brand.json");
17761
+ var brandJsonPath = join29(PLATFORM_ROOT6, "config", "brand.json");
17743
17762
  if (existsSync26(brandJsonPath)) {
17744
17763
  try {
17745
17764
  const brand = JSON.parse(readFileSync29(brandJsonPath, "utf-8"));
@@ -18526,7 +18545,7 @@ var browser_default = app44;
18526
18545
 
18527
18546
  // server/routes/admin/calendar.ts
18528
18547
  import { existsSync as existsSync27 } from "fs";
18529
- import { join as join30 } from "path";
18548
+ import { join as join31 } from "path";
18530
18549
 
18531
18550
  // server/lib/calendar-ics.ts
18532
18551
  var CRLF = "\r\n";
@@ -18626,7 +18645,7 @@ function countVEvents(ics) {
18626
18645
 
18627
18646
  // server/lib/calendar-availability.ts
18628
18647
  import { readFileSync as readFileSync30 } from "fs";
18629
- import { join as join29 } from "path";
18648
+ import { join as join30 } from "path";
18630
18649
  var AVAILABILITY_FILENAME = "calendar-availability.json";
18631
18650
  var REQUIRED_KEYS = [
18632
18651
  "timezone",
@@ -18635,7 +18654,7 @@ var REQUIRED_KEYS = [
18635
18654
  "weekly"
18636
18655
  ];
18637
18656
  function readAvailabilityConfig(accountDir) {
18638
- const path2 = join29(accountDir, AVAILABILITY_FILENAME);
18657
+ const path2 = join30(accountDir, AVAILABILITY_FILENAME);
18639
18658
  let raw;
18640
18659
  try {
18641
18660
  raw = readFileSync30(path2, "utf-8");
@@ -18997,7 +19016,7 @@ app45.get("/booking-link", requireAdminSession, (c) => {
18997
19016
  console.error('[calendar] op=booking-link-fail err="no account configured"');
18998
19017
  return c.json({ bookingDomain: null });
18999
19018
  }
19000
- if (!existsSync27(join30(account.accountDir, AVAILABILITY_FILENAME))) {
19019
+ if (!existsSync27(join31(account.accountDir, AVAILABILITY_FILENAME))) {
19001
19020
  console.log("[calendar] op=booking-link bookingDomain=none source=availability-config");
19002
19021
  return c.json({ bookingDomain: null });
19003
19022
  }
@@ -19431,7 +19450,7 @@ var sites_default = app50;
19431
19450
  // app/lib/visitor-token.ts
19432
19451
  import { createHmac, randomBytes, timingSafeEqual } from "crypto";
19433
19452
  import { mkdirSync as mkdirSync7, readFileSync as readFileSync32, writeFileSync as writeFileSync11 } from "fs";
19434
- import { dirname as dirname10 } from "path";
19453
+ import { dirname as dirname11 } from "path";
19435
19454
  var TOKEN_PREFIX = "v1.";
19436
19455
  var SECRET_BYTES = 32;
19437
19456
  var DEFAULT_TTL_MS = 30 * 24 * 60 * 60 * 1e3;
@@ -19448,7 +19467,7 @@ function getSecret() {
19448
19467
  }
19449
19468
  const fresh = randomBytes(SECRET_BYTES).toString("hex");
19450
19469
  try {
19451
- mkdirSync7(dirname10(VISITOR_TOKEN_SECRET_FILE), { recursive: true, mode: 448 });
19470
+ mkdirSync7(dirname11(VISITOR_TOKEN_SECRET_FILE), { recursive: true, mode: 448 });
19452
19471
  writeFileSync11(VISITOR_TOKEN_SECRET_FILE, fresh, { mode: 384, flag: "wx" });
19453
19472
  console.log(`[visitor-token] secret minted path=${VISITOR_TOKEN_SECRET_FILE}`);
19454
19473
  } catch {
@@ -19507,7 +19526,7 @@ var VISITOR_COOKIE_MAX_AGE_SECONDS = Math.floor(DEFAULT_TTL_MS / 1e3);
19507
19526
 
19508
19527
  // app/lib/brand-config.ts
19509
19528
  import { existsSync as existsSync29, readFileSync as readFileSync33 } from "fs";
19510
- import { join as join31 } from "path";
19529
+ import { join as join32 } from "path";
19511
19530
  var cached = null;
19512
19531
  var cachedAttempted = false;
19513
19532
  function readBrandConfig() {
@@ -19515,7 +19534,7 @@ function readBrandConfig() {
19515
19534
  cachedAttempted = true;
19516
19535
  const platformRoot3 = process.env.MAXY_PLATFORM_ROOT;
19517
19536
  if (!platformRoot3) return null;
19518
- const brandPath = join31(platformRoot3, "config", "brand.json");
19537
+ const brandPath = join32(platformRoot3, "config", "brand.json");
19519
19538
  if (!existsSync29(brandPath)) return null;
19520
19539
  try {
19521
19540
  cached = JSON.parse(readFileSync33(brandPath, "utf-8"));
@@ -20556,7 +20575,7 @@ async function startFileWatcher(opts = {}) {
20556
20575
 
20557
20576
  // app/lib/migrate-uploads.ts
20558
20577
  import { mkdir as mkdir5, readdir as readdir5, rename as rename2, rm as rm3 } from "fs/promises";
20559
- import { dirname as dirname11, relative as relative6, resolve as resolve29 } from "path";
20578
+ import { dirname as dirname12, relative as relative6, resolve as resolve29 } from "path";
20560
20579
  var ACCOUNT_UUID_RE4 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
20561
20580
  async function walkFiles(dir) {
20562
20581
  const out = [];
@@ -20588,7 +20607,7 @@ async function relocateTree(srcDir, destDir, dataRoot, accountId, session) {
20588
20607
  for (const oldAbs of files) {
20589
20608
  const suffix = relative6(srcDir, oldAbs);
20590
20609
  const newAbs = resolve29(destDir, suffix);
20591
- await mkdir5(dirname11(newAbs), { recursive: true });
20610
+ await mkdir5(dirname12(newAbs), { recursive: true });
20592
20611
  await rename2(oldAbs, newAbs);
20593
20612
  moved++;
20594
20613
  const oldRel = relative6(dataRoot, oldAbs);
@@ -20680,7 +20699,7 @@ async function migrateUploads(opts = {}) {
20680
20699
  // app/lib/migrate-admin-webchat-sidecars.ts
20681
20700
  import { readdir as readdir6, readFile as readFile6, rename as rename3, writeFile as writeFile4, unlink as unlink3 } from "fs/promises";
20682
20701
  import { existsSync as existsSync31 } from "fs";
20683
- import { join as join32 } from "path";
20702
+ import { join as join33 } from "path";
20684
20703
  var ADMIN_ROLE2 = "admin";
20685
20704
  var WEBCHAT_CHANNEL2 = "webchat";
20686
20705
  var SESSION_META_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.meta\.json$/i;
@@ -20725,7 +20744,7 @@ async function collectLiveSidecars(projectsRoot) {
20725
20744
  }
20726
20745
  for (const slug of slugs) {
20727
20746
  if (!slug.isDirectory()) continue;
20728
- const slugDir = join32(projectsRoot, slug.name);
20747
+ const slugDir = join33(projectsRoot, slug.name);
20729
20748
  let entries;
20730
20749
  try {
20731
20750
  entries = await readdir6(slugDir, { withFileTypes: true });
@@ -20734,9 +20753,9 @@ async function collectLiveSidecars(projectsRoot) {
20734
20753
  }
20735
20754
  for (const entry of entries) {
20736
20755
  if (entry.isFile() && SESSION_META_RE.test(entry.name)) {
20737
- out.push(join32(slugDir, entry.name));
20756
+ out.push(join33(slugDir, entry.name));
20738
20757
  } else if (entry.isDirectory() && entry.name === "subagents") {
20739
- const subDir = join32(slugDir, entry.name);
20758
+ const subDir = join33(slugDir, entry.name);
20740
20759
  let subs;
20741
20760
  try {
20742
20761
  subs = await readdir6(subDir, { withFileTypes: true });
@@ -20744,7 +20763,7 @@ async function collectLiveSidecars(projectsRoot) {
20744
20763
  continue;
20745
20764
  }
20746
20765
  for (const s of subs) {
20747
- if (s.isFile() && SESSION_META_RE.test(s.name)) out.push(join32(subDir, s.name));
20766
+ if (s.isFile() && SESSION_META_RE.test(s.name)) out.push(join33(subDir, s.name));
20748
20767
  }
20749
20768
  }
20750
20769
  }
@@ -20756,7 +20775,7 @@ function shortId(path2) {
20756
20775
  return base.slice(0, 8);
20757
20776
  }
20758
20777
  async function migrateAdminWebchatSidecars(opts = {}) {
20759
- const projectsRoot = opts.projectsRoot ?? (process.env.CLAUDE_CONFIG_DIR ? join32(process.env.CLAUDE_CONFIG_DIR, "projects") : null) ?? "";
20778
+ const projectsRoot = opts.projectsRoot ?? (process.env.CLAUDE_CONFIG_DIR ? join33(process.env.CLAUDE_CONFIG_DIR, "projects") : null) ?? "";
20760
20779
  const usersFile = opts.usersFile ?? USERS_FILE;
20761
20780
  const accountId = opts.accountId ?? resolveAccount()?.accountId ?? null;
20762
20781
  const resolveName = opts.resolveName ?? defaultResolveName;
@@ -22813,12 +22832,12 @@ function startTelegramNativeFileFollower(input) {
22813
22832
  }
22814
22833
 
22815
22834
  // server/telegram-descriptor.ts
22816
- import { resolve as resolve31, join as join33 } from "path";
22835
+ import { resolve as resolve31, join as join34 } from "path";
22817
22836
  function telegramGatewayUrl() {
22818
22837
  return `http://127.0.0.1:${process.env.MAXY_UI_INTERNAL_PORT ?? ""}`;
22819
22838
  }
22820
22839
  function telegramServerPath() {
22821
- return process.env.MAXY_TELEGRAM_CHANNEL_SERVER_PATH ?? resolve31(process.env.MAXY_PLATFORM_ROOT ?? join33(__dirname, ".."), "services/telegram-channel/dist/server.js");
22840
+ return process.env.MAXY_TELEGRAM_CHANNEL_SERVER_PATH ?? resolve31(process.env.MAXY_PLATFORM_ROOT ?? join34(__dirname, ".."), "services/telegram-channel/dist/server.js");
22822
22841
  }
22823
22842
 
22824
22843
  // app/lib/channel-pty-bridge/public-session-end-review.ts
@@ -23318,7 +23337,7 @@ function clientFrom(c) {
23318
23337
  );
23319
23338
  }
23320
23339
  var PLATFORM_ROOT8 = process.env.MAXY_PLATFORM_ROOT || "";
23321
- var BRAND_JSON_PATH = PLATFORM_ROOT8 ? join34(PLATFORM_ROOT8, "config", "brand.json") : "";
23340
+ var BRAND_JSON_PATH = PLATFORM_ROOT8 ? join35(PLATFORM_ROOT8, "config", "brand.json") : "";
23322
23341
  var BRAND = { productName: "Maxy", hostname: "maxy", configDir: ".maxy", marketingUrl: "https://getmaxy.com" };
23323
23342
  if (BRAND_JSON_PATH && !existsSync33(BRAND_JSON_PATH)) {
23324
23343
  console.error(`[brand] WARNING: brand.json not found at ${BRAND_JSON_PATH} \u2014 using Maxy defaults`);
@@ -23357,7 +23376,7 @@ var brandLoginOpts = {
23357
23376
  appleTouchIconPath: brandAppIcon512Path,
23358
23377
  themeColor: BRAND.defaultColors?.primary
23359
23378
  };
23360
- var ALIAS_DOMAINS_PATH = join34(homedir3(), BRAND.configDir, "alias-domains.json");
23379
+ var ALIAS_DOMAINS_PATH = join35(homedir3(), BRAND.configDir, "alias-domains.json");
23361
23380
  function loadAliasDomains() {
23362
23381
  try {
23363
23382
  if (!existsSync33(ALIAS_DOMAINS_PATH)) return null;
@@ -23389,7 +23408,7 @@ var app56 = new Hono();
23389
23408
  var nativeFileFollowers = /* @__PURE__ */ new Map();
23390
23409
  var waGateway = new WaGateway({
23391
23410
  gatewayUrl: `http://127.0.0.1:${process.env.MAXY_UI_INTERNAL_PORT ?? ""}`,
23392
- serverPath: process.env.MAXY_WA_CHANNEL_SERVER_PATH ?? resolve33(process.env.MAXY_PLATFORM_ROOT ?? join34(__dirname, ".."), "services/whatsapp-channel/dist/server.js"),
23411
+ serverPath: process.env.MAXY_WA_CHANNEL_SERVER_PATH ?? resolve33(process.env.MAXY_PLATFORM_ROOT ?? join35(__dirname, ".."), "services/whatsapp-channel/dist/server.js"),
23393
23412
  // Task 751 / 1390 — file delivery on the native channel. `maxyAccountId` (the
23394
23413
  // path-validation scope) is the sender's effective SESSION account, resolved
23395
23414
  // once at the inbound gate and threaded here via the gateway's per-sender doc
@@ -23404,7 +23423,7 @@ var waGateway = new WaGateway({
23404
23423
  caption,
23405
23424
  accountId,
23406
23425
  maxyAccountId,
23407
- platformRoot: resolve33(process.env.MAXY_PLATFORM_ROOT ?? join34(__dirname, ".."))
23426
+ platformRoot: resolve33(process.env.MAXY_PLATFORM_ROOT ?? join35(__dirname, ".."))
23408
23427
  });
23409
23428
  return result.ok ? { ok: true, messageId: result.messageId } : { ok: false, error: result.error };
23410
23429
  },
@@ -24046,7 +24065,7 @@ var SW_SOURCE = (() => {
24046
24065
  function readInstalledVersion() {
24047
24066
  try {
24048
24067
  if (!PLATFORM_ROOT8) return "unknown";
24049
- const versionFile = join34(PLATFORM_ROOT8, "config", `.${BRAND.hostname}-version`);
24068
+ const versionFile = join35(PLATFORM_ROOT8, "config", `.${BRAND.hostname}-version`);
24050
24069
  if (!existsSync33(versionFile)) return "unknown";
24051
24070
  const content = readFileSync35(versionFile, "utf-8").trim();
24052
24071
  return content || "unknown";
@@ -24106,11 +24125,11 @@ ${clientErrorReporterScript}
24106
24125
  return html;
24107
24126
  }
24108
24127
  function loadBrandingCache(agentSlug) {
24109
- const configDir2 = join34(homedir3(), BRAND.configDir);
24128
+ const configDir2 = join35(homedir3(), BRAND.configDir);
24110
24129
  try {
24111
24130
  const accountId = getDefaultAccountId();
24112
24131
  if (!accountId) return null;
24113
- const cachePath = join34(configDir2, "branding-cache", accountId, `${agentSlug}.json`);
24132
+ const cachePath = join35(configDir2, "branding-cache", accountId, `${agentSlug}.json`);
24114
24133
  if (!existsSync33(cachePath)) return null;
24115
24134
  return JSON.parse(readFileSync35(cachePath, "utf-8"));
24116
24135
  } catch {
@@ -24334,7 +24353,7 @@ var hostname = process.env.HOSTNAME ?? "127.0.0.1";
24334
24353
  var httpServer = serve({ fetch: app56.fetch, port, hostname });
24335
24354
  console.log(`${BRAND.productName} listening on http://${hostname}:${port}`);
24336
24355
  {
24337
- const reconcilePlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join34(__dirname, "..");
24356
+ const reconcilePlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join35(__dirname, "..");
24338
24357
  const reconcileScript = resolve33(reconcilePlatformRoot, "plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js");
24339
24358
  const RECONCILE_INTERVAL_MS = 12e4;
24340
24359
  const runReconcile = () => {
@@ -24356,7 +24375,7 @@ console.log(`${BRAND.productName} listening on http://${hostname}:${port}`);
24356
24375
  loop.unref();
24357
24376
  }
24358
24377
  {
24359
- const auditPlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join34(__dirname, "..");
24378
+ const auditPlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join35(__dirname, "..");
24360
24379
  const auditScript = resolve33(auditPlatformRoot, "plugins/connector/mcp/dist/scripts/audit-connectors.js");
24361
24380
  const auditLogDir = process.env.LOG_DIR ?? LOG_DIR;
24362
24381
  const CONNECTOR_AUDIT_INTERVAL_MS = 3e5;
@@ -24624,7 +24643,7 @@ if (bootAccountConfig?.whatsapp) {
24624
24643
  }
24625
24644
  init({
24626
24645
  configDir: configDirForWhatsApp,
24627
- platformRoot: resolve33(process.env.MAXY_PLATFORM_ROOT ?? join34(__dirname, "..")),
24646
+ platformRoot: resolve33(process.env.MAXY_PLATFORM_ROOT ?? join35(__dirname, "..")),
24628
24647
  accountConfig: bootAccountConfig,
24629
24648
  onMessage: async (msg) => {
24630
24649
  if (msg.isOwnerMirror) {
@@ -1 +0,0 @@
1
- import{F as e,M as t}from"./useSubAccountSwitcher-Bg0RH3Gk.js";import"./admin-types-hioowVct.js";import"./AdminShell-BihejKg_.js";import{n}from"./page-BcxrdxYL.js";import"./Transcript-CgaMQKgY.js";var r=e(),i=t();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
@@ -1 +0,0 @@
1
- import{D as e}from"./useSubAccountSwitcher-Bg0RH3Gk.js";var t=e(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]);export{t};
@@ -1 +0,0 @@
1
- import{F as e,M as t}from"./useSubAccountSwitcher-Bg0RH3Gk.js";import{t as n}from"./page-rDhp8G9q.js";import"./Transcript-CgaMQKgY.js";import"./graph-labels-6HKBjyXX.js";var r=e(),i=t();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));