@agenticmail/enterprise 0.5.390 → 0.5.392

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.
@@ -2430,18 +2430,198 @@ var init_enterprise_documents = __esm({
2430
2430
  }
2431
2431
  });
2432
2432
 
2433
- // src/engine/skills/enterprise-http.ts
2434
- var enterprise_http_exports = {};
2435
- __export(enterprise_http_exports, {
2433
+ // src/engine/skills/remotion-video.ts
2434
+ var remotion_video_exports = {};
2435
+ __export(remotion_video_exports, {
2436
2436
  SKILL_DEF: () => SKILL_DEF46,
2437
2437
  TOOLS: () => TOOLS46
2438
2438
  });
2439
2439
  var SKILL_DEF46, TOOLS46;
2440
+ var init_remotion_video = __esm({
2441
+ "src/engine/skills/remotion-video.ts"() {
2442
+ "use strict";
2443
+ init_emoji();
2444
+ SKILL_DEF46 = {
2445
+ id: "remotion-video",
2446
+ name: "Video Creation (Remotion)",
2447
+ description: "Create professional marketing videos, social media reels, animations, and motion graphics programmatically using Remotion. Build React-based video compositions, render to MP4/WebM/GIF, and manage video projects. Supports text animations, image slideshows, data visualizations, branded intros/outros, and more.",
2448
+ category: "media",
2449
+ risk: "medium",
2450
+ icon: Emoji.movie,
2451
+ source: "builtin",
2452
+ version: "1.0.0",
2453
+ author: "AgenticMail"
2454
+ };
2455
+ TOOLS46 = [
2456
+ {
2457
+ id: "remotion_create_project",
2458
+ name: "Create Video Project",
2459
+ description: "Initialize a new Remotion video project in a workspace directory. Sets up the project structure with package.json, tsconfig, and a starter composition. Use this before creating compositions.",
2460
+ category: "write",
2461
+ risk: "medium",
2462
+ skillId: "remotion-video",
2463
+ sideEffects: ["modifies-files", "installs-packages"],
2464
+ parameters: {
2465
+ type: "object",
2466
+ properties: {
2467
+ projectDir: { type: "string", description: 'Directory path for the video project (e.g., "/workspace/videos/my-project")' },
2468
+ name: { type: "string", description: "Project name (used in package.json)" },
2469
+ template: { type: "string", enum: ["blank", "hello-world", "text-animation", "slideshow", "social-reel"], default: "blank", description: "Starter template to use" }
2470
+ },
2471
+ required: ["projectDir"]
2472
+ }
2473
+ },
2474
+ {
2475
+ id: "remotion_create_composition",
2476
+ name: "Create Video Composition",
2477
+ description: "Create or update a Remotion composition (React component) that defines a video. Write the JSX/TSX component code that will be rendered as a video. The composition defines what appears in each frame \u2014 text, images, animations, transitions, etc. Use React patterns: useCurrentFrame(), interpolate(), spring(), Sequence, AbsoluteFill.",
2478
+ category: "write",
2479
+ risk: "low",
2480
+ skillId: "remotion-video",
2481
+ sideEffects: ["modifies-files"],
2482
+ parameters: {
2483
+ type: "object",
2484
+ properties: {
2485
+ projectDir: { type: "string", description: "Path to the Remotion project directory" },
2486
+ compositionId: { type: "string", description: 'Unique ID for this composition (e.g., "marketing-reel", "product-demo")' },
2487
+ code: { type: "string", description: "Full React component code (TSX) for the composition. Use Remotion APIs: useCurrentFrame(), interpolate(), spring(), Sequence, AbsoluteFill, Img, Audio, Video, etc." },
2488
+ width: { type: "number", default: 1080, description: "Video width in pixels" },
2489
+ height: { type: "number", default: 1920, description: "Video height in pixels (1920 for 9:16 vertical reels, 1080 for 16:9 landscape)" },
2490
+ fps: { type: "number", default: 30, description: "Frames per second" },
2491
+ durationInSeconds: { type: "number", default: 15, description: "Video duration in seconds" }
2492
+ },
2493
+ required: ["projectDir", "compositionId", "code"]
2494
+ }
2495
+ },
2496
+ {
2497
+ id: "remotion_render",
2498
+ name: "Render Video",
2499
+ description: "Render a Remotion composition to a video file (MP4, WebM, or GIF). This bundles the React project and renders each frame using a headless browser, then encodes the final video. Requires ffmpeg to be installed.",
2500
+ category: "write",
2501
+ risk: "medium",
2502
+ skillId: "remotion-video",
2503
+ sideEffects: ["modifies-files", "cpu-intensive"],
2504
+ parameters: {
2505
+ type: "object",
2506
+ properties: {
2507
+ projectDir: { type: "string", description: "Path to the Remotion project directory" },
2508
+ compositionId: { type: "string", description: "ID of the composition to render" },
2509
+ outputPath: { type: "string", description: 'Output file path (e.g., "/workspace/videos/output.mp4")' },
2510
+ codec: { type: "string", enum: ["h264", "h265", "vp8", "vp9", "gif", "prores"], default: "h264", description: "Video codec" },
2511
+ quality: { type: "number", description: "Quality (0-100, default varies by codec). For h264: crf value (lower = better, 18 is visually lossless)" },
2512
+ inputProps: { type: "object", description: "Props to pass to the composition (e.g., text content, image URLs, colors)" },
2513
+ concurrency: { type: "number", description: "Number of frames to render in parallel (default: half of CPU cores)" },
2514
+ scale: { type: "number", default: 1, description: "Scale factor for rendering (2 = 2x resolution)" }
2515
+ },
2516
+ required: ["projectDir", "compositionId", "outputPath"]
2517
+ }
2518
+ },
2519
+ {
2520
+ id: "remotion_render_still",
2521
+ name: "Render Still Image",
2522
+ description: "Render a single frame from a Remotion composition as a PNG or JPEG image. Useful for thumbnails, social media images, or previewing a specific frame of a video.",
2523
+ category: "write",
2524
+ risk: "low",
2525
+ skillId: "remotion-video",
2526
+ sideEffects: ["modifies-files"],
2527
+ parameters: {
2528
+ type: "object",
2529
+ properties: {
2530
+ projectDir: { type: "string", description: "Path to the Remotion project directory" },
2531
+ compositionId: { type: "string", description: "ID of the composition" },
2532
+ outputPath: { type: "string", description: "Output image path (.png or .jpg)" },
2533
+ frame: { type: "number", default: 0, description: "Frame number to render" },
2534
+ inputProps: { type: "object", description: "Props to pass to the composition" },
2535
+ format: { type: "string", enum: ["png", "jpeg", "webp"], default: "png" },
2536
+ scale: { type: "number", default: 1 }
2537
+ },
2538
+ required: ["projectDir", "compositionId", "outputPath"]
2539
+ }
2540
+ },
2541
+ {
2542
+ id: "remotion_list_compositions",
2543
+ name: "List Compositions",
2544
+ description: "List all available compositions in a Remotion project with their IDs, dimensions, duration, and FPS.",
2545
+ category: "read",
2546
+ risk: "low",
2547
+ skillId: "remotion-video",
2548
+ sideEffects: [],
2549
+ parameters: {
2550
+ type: "object",
2551
+ properties: {
2552
+ projectDir: { type: "string", description: "Path to the Remotion project directory" }
2553
+ },
2554
+ required: ["projectDir"]
2555
+ }
2556
+ },
2557
+ {
2558
+ id: "remotion_preview_url",
2559
+ name: "Start Preview Server",
2560
+ description: "Start the Remotion Studio preview server so you can preview compositions in the browser. Returns the URL to access the studio.",
2561
+ category: "read",
2562
+ risk: "low",
2563
+ skillId: "remotion-video",
2564
+ sideEffects: ["starts-process"],
2565
+ parameters: {
2566
+ type: "object",
2567
+ properties: {
2568
+ projectDir: { type: "string", description: "Path to the Remotion project directory" },
2569
+ port: { type: "number", default: 3333, description: "Port for the preview server" }
2570
+ },
2571
+ required: ["projectDir"]
2572
+ }
2573
+ },
2574
+ {
2575
+ id: "remotion_add_asset",
2576
+ name: "Add Asset to Project",
2577
+ description: "Add an image, audio, font, or video asset to a Remotion project. Downloads from URL or copies from local path into the project's public/ directory so it can be referenced in compositions via staticFile().",
2578
+ category: "write",
2579
+ risk: "low",
2580
+ skillId: "remotion-video",
2581
+ sideEffects: ["modifies-files"],
2582
+ parameters: {
2583
+ type: "object",
2584
+ properties: {
2585
+ projectDir: { type: "string", description: "Path to the Remotion project directory" },
2586
+ source: { type: "string", description: "URL or local file path of the asset to add" },
2587
+ filename: { type: "string", description: 'Filename to save as in public/ directory (e.g., "background.mp3", "logo.png")' }
2588
+ },
2589
+ required: ["projectDir", "source", "filename"]
2590
+ }
2591
+ },
2592
+ {
2593
+ id: "remotion_install_package",
2594
+ name: "Install Remotion Package",
2595
+ description: "Install additional Remotion packages or dependencies into a project. Common packages: @remotion/transitions (scene transitions), @remotion/motion-blur, @remotion/noise, @remotion/paths, @remotion/shapes, @remotion/lottie (After Effects animations), @remotion/three (3D graphics).",
2596
+ category: "write",
2597
+ risk: "medium",
2598
+ skillId: "remotion-video",
2599
+ sideEffects: ["installs-packages"],
2600
+ parameters: {
2601
+ type: "object",
2602
+ properties: {
2603
+ projectDir: { type: "string", description: "Path to the Remotion project directory" },
2604
+ packages: { type: "array", items: { type: "string" }, description: 'Package names to install (e.g., ["@remotion/transitions", "@remotion/shapes"])' }
2605
+ },
2606
+ required: ["projectDir", "packages"]
2607
+ }
2608
+ }
2609
+ ];
2610
+ }
2611
+ });
2612
+
2613
+ // src/engine/skills/enterprise-http.ts
2614
+ var enterprise_http_exports = {};
2615
+ __export(enterprise_http_exports, {
2616
+ SKILL_DEF: () => SKILL_DEF47,
2617
+ TOOLS: () => TOOLS47
2618
+ });
2619
+ var SKILL_DEF47, TOOLS47;
2440
2620
  var init_enterprise_http = __esm({
2441
2621
  "src/engine/skills/enterprise-http.ts"() {
2442
2622
  "use strict";
2443
2623
  init_emoji();
2444
- SKILL_DEF46 = {
2624
+ SKILL_DEF47 = {
2445
2625
  id: "enterprise-http",
2446
2626
  name: "HTTP API Client",
2447
2627
  description: "Make authenticated HTTP requests to any internal or external API. Supports Bearer tokens, API keys, OAuth, mutual TLS, and custom authentication. Includes request/response logging, retry logic, and rate limiting.",
@@ -2452,7 +2632,7 @@ var init_enterprise_http = __esm({
2452
2632
  version: "1.0.0",
2453
2633
  author: "AgenticMail"
2454
2634
  };
2455
- TOOLS46 = [
2635
+ TOOLS47 = [
2456
2636
  {
2457
2637
  id: "ent_http_request",
2458
2638
  name: "HTTP Request",
@@ -2542,15 +2722,15 @@ var init_enterprise_http = __esm({
2542
2722
  // src/engine/skills/enterprise-security-scan.ts
2543
2723
  var enterprise_security_scan_exports = {};
2544
2724
  __export(enterprise_security_scan_exports, {
2545
- SKILL_DEF: () => SKILL_DEF47,
2546
- TOOLS: () => TOOLS47
2725
+ SKILL_DEF: () => SKILL_DEF48,
2726
+ TOOLS: () => TOOLS48
2547
2727
  });
2548
- var SKILL_DEF47, TOOLS47;
2728
+ var SKILL_DEF48, TOOLS48;
2549
2729
  var init_enterprise_security_scan = __esm({
2550
2730
  "src/engine/skills/enterprise-security-scan.ts"() {
2551
2731
  "use strict";
2552
2732
  init_emoji();
2553
- SKILL_DEF47 = {
2733
+ SKILL_DEF48 = {
2554
2734
  id: "enterprise-security-scan",
2555
2735
  name: "Security Scanning",
2556
2736
  description: "Scan text, code, and documents for security issues: exposed credentials, PII (personally identifiable information), malicious patterns, and dependency vulnerabilities. Supports GDPR, CCPA, HIPAA, and PCI-DSS compliance checks.",
@@ -2561,7 +2741,7 @@ var init_enterprise_security_scan = __esm({
2561
2741
  version: "1.0.0",
2562
2742
  author: "AgenticMail"
2563
2743
  };
2564
- TOOLS47 = [
2744
+ TOOLS48 = [
2565
2745
  {
2566
2746
  id: "ent_sec_scan_secrets",
2567
2747
  name: "Scan for Exposed Secrets",
@@ -2677,15 +2857,15 @@ var init_enterprise_security_scan = __esm({
2677
2857
  // src/engine/skills/enterprise-code-sandbox.ts
2678
2858
  var enterprise_code_sandbox_exports = {};
2679
2859
  __export(enterprise_code_sandbox_exports, {
2680
- SKILL_DEF: () => SKILL_DEF48,
2681
- TOOLS: () => TOOLS48
2860
+ SKILL_DEF: () => SKILL_DEF49,
2861
+ TOOLS: () => TOOLS49
2682
2862
  });
2683
- var SKILL_DEF48, TOOLS48;
2863
+ var SKILL_DEF49, TOOLS49;
2684
2864
  var init_enterprise_code_sandbox = __esm({
2685
2865
  "src/engine/skills/enterprise-code-sandbox.ts"() {
2686
2866
  "use strict";
2687
2867
  init_emoji();
2688
- SKILL_DEF48 = {
2868
+ SKILL_DEF49 = {
2689
2869
  id: "enterprise-code-sandbox",
2690
2870
  name: "Code Sandbox",
2691
2871
  description: "Execute code snippets in isolated sandboxes for data transformation, calculations, and automation scripts. Supports JavaScript/TypeScript, Python, and shell commands with memory and time limits.",
@@ -2696,7 +2876,7 @@ var init_enterprise_code_sandbox = __esm({
2696
2876
  version: "1.0.0",
2697
2877
  author: "AgenticMail"
2698
2878
  };
2699
- TOOLS48 = [
2879
+ TOOLS49 = [
2700
2880
  {
2701
2881
  id: "ent_code_run_js",
2702
2882
  name: "Run JavaScript",
@@ -2800,15 +2980,15 @@ var init_enterprise_code_sandbox = __esm({
2800
2980
  // src/engine/skills/enterprise-diff.ts
2801
2981
  var enterprise_diff_exports = {};
2802
2982
  __export(enterprise_diff_exports, {
2803
- SKILL_DEF: () => SKILL_DEF49,
2804
- TOOLS: () => TOOLS49
2983
+ SKILL_DEF: () => SKILL_DEF50,
2984
+ TOOLS: () => TOOLS50
2805
2985
  });
2806
- var SKILL_DEF49, TOOLS49;
2986
+ var SKILL_DEF50, TOOLS50;
2807
2987
  var init_enterprise_diff = __esm({
2808
2988
  "src/engine/skills/enterprise-diff.ts"() {
2809
2989
  "use strict";
2810
2990
  init_emoji();
2811
- SKILL_DEF49 = {
2991
+ SKILL_DEF50 = {
2812
2992
  id: "enterprise-diff",
2813
2993
  name: "Comparison & Diff",
2814
2994
  description: "Compare documents, datasets, configurations, and code to find differences. Supports text diff, JSON/YAML structural diff, spreadsheet comparison, and config audit. Generates human-readable change reports.",
@@ -2819,7 +2999,7 @@ var init_enterprise_diff = __esm({
2819
2999
  version: "1.0.0",
2820
3000
  author: "AgenticMail"
2821
3001
  };
2822
- TOOLS49 = [
3002
+ TOOLS50 = [
2823
3003
  {
2824
3004
  id: "ent_diff_text",
2825
3005
  name: "Diff Text",
@@ -2956,6 +3136,7 @@ var init_skills = __esm({
2956
3136
  init_database_access();
2957
3137
  init_enterprise_spreadsheet();
2958
3138
  init_enterprise_documents();
3139
+ init_remotion_video();
2959
3140
  init_enterprise_http();
2960
3141
  init_enterprise_security_scan();
2961
3142
  init_enterprise_code_sandbox();
@@ -3013,7 +3194,8 @@ var init_skills = __esm({
3013
3194
  enterprise_http_exports,
3014
3195
  enterprise_security_scan_exports,
3015
3196
  enterprise_code_sandbox_exports,
3016
- enterprise_diff_exports
3197
+ enterprise_diff_exports,
3198
+ remotion_video_exports
3017
3199
  ];
3018
3200
  ENTERPRISE_SKILL_DEFS = ENTERPRISE_MODULES.map((m) => m.SKILL_DEF);
3019
3201
  ENTERPRISE_UTILITY_TOOLS = ENTERPRISE_MODULES.flatMap((m) => m.TOOLS);
@@ -11,7 +11,7 @@ import {
11
11
  init_config_bus,
12
12
  init_routes,
13
13
  routes_exports
14
- } from "./chunk-ACP7QSXU.js";
14
+ } from "./chunk-VYP6FF3B.js";
15
15
  import {
16
16
  SecureVault,
17
17
  init_vault
@@ -3269,7 +3269,7 @@ function createAdminRoutes(db) {
3269
3269
  });
3270
3270
  api.get("/system/update-check", async (c) => {
3271
3271
  try {
3272
- const { checkForUpdate, getCachedUpdateCheck } = await import("./cli-update-UM7XCICB.js");
3272
+ const { checkForUpdate, getCachedUpdateCheck } = await import("./cli-update-P3TAXEW7.js");
3273
3273
  const cached = getCachedUpdateCheck();
3274
3274
  if (cached && Date.now() - new Date(cached.checkedAt).getTime() < 5 * 6e4) {
3275
3275
  return c.json(cached);
@@ -3282,7 +3282,7 @@ function createAdminRoutes(db) {
3282
3282
  });
3283
3283
  api.post("/system/update", async (c) => {
3284
3284
  try {
3285
- const { performUpdate } = await import("./cli-update-UM7XCICB.js");
3285
+ const { performUpdate } = await import("./cli-update-P3TAXEW7.js");
3286
3286
  const result = await performUpdate({ restart: true });
3287
3287
  return c.json(result);
3288
3288
  } catch (e) {
@@ -4683,7 +4683,7 @@ function createServer(config) {
4683
4683
  let engineInitialized = false;
4684
4684
  api.all("/engine/*", async (c, _next) => {
4685
4685
  try {
4686
- const { engineRoutes, setEngineDb } = await import("./routes-K2GAVUXI.js");
4686
+ const { engineRoutes, setEngineDb } = await import("./routes-DONZ5NBL.js");
4687
4687
  const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
4688
4688
  if (!engineInitialized) {
4689
4689
  engineInitialized = true;
@@ -4713,13 +4713,13 @@ function createServer(config) {
4713
4713
  engineInitialized = true;
4714
4714
  if (config.runtime?.enabled) {
4715
4715
  try {
4716
- const { createAgentRuntime } = await import("./runtime-5OKJ5DT6.js");
4717
- const { mountRuntimeApp, setRuntime } = await import("./routes-K2GAVUXI.js");
4716
+ const { createAgentRuntime } = await import("./runtime-U3YSWLFD.js");
4717
+ const { mountRuntimeApp, setRuntime } = await import("./routes-DONZ5NBL.js");
4718
4718
  let getEmailConfig;
4719
4719
  let onTokenRefresh;
4720
4720
  let agentMemoryMgr;
4721
4721
  try {
4722
- const { lifecycle: lc, memoryManager: mm } = await import("./routes-K2GAVUXI.js");
4722
+ const { lifecycle: lc, memoryManager: mm } = await import("./routes-DONZ5NBL.js");
4723
4723
  agentMemoryMgr = mm;
4724
4724
  if (lc) {
4725
4725
  getEmailConfig = (agentId) => {
@@ -4758,7 +4758,7 @@ function createServer(config) {
4758
4758
  }
4759
4759
  } catch {
4760
4760
  }
4761
- const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-K2GAVUXI.js");
4761
+ const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-DONZ5NBL.js");
4762
4762
  const runtime = createAgentRuntime({
4763
4763
  engineDb,
4764
4764
  adminDb: config.db,
@@ -4965,7 +4965,7 @@ function createServer(config) {
4965
4965
  });
4966
4966
  (async () => {
4967
4967
  try {
4968
- const { engineRoutes, setEngineDb } = await import("./routes-K2GAVUXI.js");
4968
+ const { engineRoutes, setEngineDb } = await import("./routes-DONZ5NBL.js");
4969
4969
  const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
4970
4970
  if (!engineInitialized) {
4971
4971
  engineInitialized = true;
@@ -4989,13 +4989,13 @@ function createServer(config) {
4989
4989
  await setEngineDb(engineDb, config.db);
4990
4990
  if (config.runtime?.enabled) {
4991
4991
  try {
4992
- const { createAgentRuntime } = await import("./runtime-5OKJ5DT6.js");
4993
- const { mountRuntimeApp, setRuntime } = await import("./routes-K2GAVUXI.js");
4992
+ const { createAgentRuntime } = await import("./runtime-U3YSWLFD.js");
4993
+ const { mountRuntimeApp, setRuntime } = await import("./routes-DONZ5NBL.js");
4994
4994
  let getEmailConfig;
4995
4995
  let onTokenRefresh;
4996
4996
  let agentMemoryMgr;
4997
4997
  try {
4998
- const { lifecycle: lc, memoryManager: mm } = await import("./routes-K2GAVUXI.js");
4998
+ const { lifecycle: lc, memoryManager: mm } = await import("./routes-DONZ5NBL.js");
4999
4999
  agentMemoryMgr = mm;
5000
5000
  if (lc) {
5001
5001
  getEmailConfig = (agentId) => {
@@ -5034,7 +5034,7 @@ function createServer(config) {
5034
5034
  }
5035
5035
  } catch {
5036
5036
  }
5037
- const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-K2GAVUXI.js");
5037
+ const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-DONZ5NBL.js");
5038
5038
  const runtime = createAgentRuntime({
5039
5039
  engineDb,
5040
5040
  adminDb: config.db,
@@ -5046,7 +5046,7 @@ function createServer(config) {
5046
5046
  agentMemoryManager: agentMemoryMgr,
5047
5047
  vault: vaultRef2,
5048
5048
  permissionEngine: permRef2,
5049
- hierarchyManager: (await import("./routes-K2GAVUXI.js")).hierarchyManager ?? void 0,
5049
+ hierarchyManager: (await import("./routes-DONZ5NBL.js")).hierarchyManager ?? void 0,
5050
5050
  databaseManager: dbMgr2
5051
5051
  });
5052
5052
  await runtime.start();
@@ -5060,7 +5060,7 @@ function createServer(config) {
5060
5060
  }
5061
5061
  console.log("[engine] Eagerly initialized");
5062
5062
  try {
5063
- const { lifecycle: lcRef } = await import("./routes-K2GAVUXI.js");
5063
+ const { lifecycle: lcRef } = await import("./routes-DONZ5NBL.js");
5064
5064
  if (lcRef) {
5065
5065
  const agents = Array.from(lcRef.agents?.values?.() || []);
5066
5066
  const hasLocalPm2 = agents.some((a) => {
@@ -5069,7 +5069,7 @@ function createServer(config) {
5069
5069
  return target === "local" && (!pm || pm === "pm2");
5070
5070
  });
5071
5071
  if (hasLocalPm2) {
5072
- const { ensurePm2 } = await import("./deployer-HN7HPTZU.js");
5072
+ const { ensurePm2 } = await import("./deployer-MCISTNBP.js");
5073
5073
  const pm2 = await ensurePm2();
5074
5074
  if (pm2.installed) {
5075
5075
  console.log(`[startup] PM2 v${pm2.version} available for local deployments`);
@@ -449,7 +449,7 @@ async function runCloudSetup(inquirer, chalk, existingSubdomain) {
449
449
  try {
450
450
  const archStr = arch() === "arm64" ? "arm64" : "amd64";
451
451
  const dlUrl = `https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-${archStr}.exe`;
452
- execSync(`powershell -Command "New-Item -ItemType Directory -Force -Path '${cfDir}' | Out-Null; Invoke-WebRequest -Uri '${dlUrl}' -OutFile '${cfExe}'"`, { stdio: "inherit", timeout: 12e4 });
452
+ execSync(`powershell -Command "New-Item -ItemType Directory -Force -Path '${cfDir.replace(/'/g, "''")}' | Out-Null; Invoke-WebRequest -Uri '${dlUrl}' -OutFile '${cfExe.replace(/'/g, "''")}'"`, { stdio: "inherit", timeout: 12e4 });
453
453
  found = true;
454
454
  } catch (dlErr) {
455
455
  console.log(chalk.dim(` Download failed: ${dlErr.message?.substring(0, 100)}`));
@@ -1234,7 +1234,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1234
1234
  const { deployTarget, company, database, domain, tunnel, cloud } = config;
1235
1235
  if (deployTarget === "cloudflare-tunnel" && tunnel) {
1236
1236
  spinner.start(`Starting local server on port ${tunnel.port}...`);
1237
- const { createServer: createServer2 } = await import("./server-WX52FFA4.js");
1237
+ const { createServer: createServer2 } = await import("./server-K5QLSS55.js");
1238
1238
  const server2 = createServer2({ port: tunnel.port, db, jwtSecret });
1239
1239
  const handle2 = await server2.start();
1240
1240
  spinner.succeed("Server running");
@@ -1264,11 +1264,11 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1264
1264
  execSync2("winget install --id Cloudflare.cloudflared --accept-source-agreements --accept-package-agreements", { stdio: "pipe", timeout: 12e4 });
1265
1265
  } catch {
1266
1266
  const archStr = process.arch === "arm64" ? "arm64" : "amd64";
1267
- const localAppData = process.env.LOCALAPPDATA || `${process.env.USERPROFILE}\\AppData\\Local`;
1268
- const cfDir = `${localAppData}\\cloudflared`;
1269
- const cfExe = `${cfDir}\\cloudflared.exe`;
1267
+ const localAppData = process.env.LOCALAPPDATA || join2(process.env.USERPROFILE || homedir2(), "AppData", "Local");
1268
+ const cfDir = join2(localAppData, "cloudflared");
1269
+ const cfExe = join2(cfDir, "cloudflared.exe");
1270
1270
  const dlUrl = `https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-${archStr}.exe`;
1271
- execSync2(`powershell -Command "New-Item -ItemType Directory -Force -Path '${cfDir}' | Out-Null; Invoke-WebRequest -Uri '${dlUrl}' -OutFile '${cfExe}'"`, { stdio: "pipe", timeout: 12e4 });
1271
+ execSync2(`powershell -Command "New-Item -ItemType Directory -Force -Path '${cfDir.replace(/'/g, "''")}' | Out-Null; Invoke-WebRequest -Uri '${dlUrl}' -OutFile '${cfExe.replace(/'/g, "''")}'"`, { stdio: "pipe", timeout: 12e4 });
1272
1272
  process.env.PATH = `${cfDir};${process.env.PATH}`;
1273
1273
  }
1274
1274
  } else if (process.platform === "darwin") {
@@ -1350,7 +1350,8 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1350
1350
  `});`,
1351
1351
  `process.exit(r.status || 0);`
1352
1352
  ].join("\n"));
1353
- execSync2(`pm2 start "${cfScript}" --name cloudflared -- tunnel --no-autoupdate run --token ${cloud.tunnelToken}`, { stdio: "pipe", timeout: 15e3 });
1353
+ const safeToken = String(cloud.tunnelToken || "").replace(/[^a-zA-Z0-9_.-]/g, "");
1354
+ execSync2(`pm2 start "${cfScript}" --name cloudflared -- tunnel --no-autoupdate run --token ${safeToken}`, { stdio: "pipe", timeout: 15e3 });
1354
1355
  const envLines = [
1355
1356
  `PORT=${cloud.port || 8080}`,
1356
1357
  `DATABASE_URL=${database.connectionString || ""}`,
@@ -1535,7 +1536,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1535
1536
  return {};
1536
1537
  }
1537
1538
  spinner.start("Starting local server...");
1538
- const { createServer } = await import("./server-WX52FFA4.js");
1539
+ const { createServer } = await import("./server-K5QLSS55.js");
1539
1540
  const server = createServer({ port: 3e3, db, jwtSecret });
1540
1541
  const handle = await server.start();
1541
1542
  spinner.succeed("Server running");
@@ -9,7 +9,7 @@ import {
9
9
  init_skills,
10
10
  init_tool_catalog,
11
11
  tool_catalog_exports
12
- } from "./chunk-A2XPEZ7L.js";
12
+ } from "./chunk-7E7MVJI7.js";
13
13
  import {
14
14
  __esm,
15
15
  __toCommonJS
@@ -12,7 +12,7 @@ import {
12
12
  DeploymentEngine,
13
13
  init_agent_config,
14
14
  init_deployer
15
- } from "./chunk-FT5MAYTU.js";
15
+ } from "./chunk-E6B4W3WG.js";
16
16
  import {
17
17
  init_messaging_history,
18
18
  storeMessage
@@ -44,7 +44,7 @@ import {
44
44
  PermissionEngine,
45
45
  SKILL_SUITES,
46
46
  init_skills as init_skills2
47
- } from "./chunk-TCDRCMJJ.js";
47
+ } from "./chunk-GRWV7MDT.js";
48
48
  import {
49
49
  init_resilience,
50
50
  withRetry
@@ -62,7 +62,7 @@ import {
62
62
  FULL_SKILL_DEFINITIONS,
63
63
  init_emoji,
64
64
  init_skills
65
- } from "./chunk-A2XPEZ7L.js";
65
+ } from "./chunk-7E7MVJI7.js";
66
66
  import {
67
67
  VALID_CATEGORIES,
68
68
  init_skill_validator,
@@ -6847,7 +6847,7 @@ function createAgentRoutes(opts) {
6847
6847
  });
6848
6848
  router.post("/system/install-pm2", async (c) => {
6849
6849
  try {
6850
- const { ensurePm2 } = await import("./deployer-HN7HPTZU.js");
6850
+ const { ensurePm2 } = await import("./deployer-MCISTNBP.js");
6851
6851
  const result = await ensurePm2();
6852
6852
  if (result.installed) {
6853
6853
  return c.json({ success: true, message: `PM2 ${result.version} installed successfully` });
@@ -7075,7 +7075,7 @@ function createAgentRoutes(opts) {
7075
7075
  if (presetName || permissionsData) {
7076
7076
  let profile = { id: agentId, name: presetName || "Custom", createdAt: (/* @__PURE__ */ new Date()).toISOString(), updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
7077
7077
  if (presetName) {
7078
- const { PRESET_PROFILES: PRESET_PROFILES2 } = await import("./skills-SYCLOBYM.js");
7078
+ const { PRESET_PROFILES: PRESET_PROFILES2 } = await import("./skills-OKZFMTQT.js");
7079
7079
  const preset = PRESET_PROFILES2.find((p) => p.name === presetName);
7080
7080
  if (preset) Object.assign(profile, preset);
7081
7081
  }
@@ -7103,7 +7103,7 @@ function createAgentRoutes(opts) {
7103
7103
  }
7104
7104
  const managedAgent = await lifecycle2.createAgent(orgId, config, actor);
7105
7105
  try {
7106
- const { knowledgeBase: kbEngine } = await import("./routes-K2GAVUXI.js");
7106
+ const { knowledgeBase: kbEngine } = await import("./routes-DONZ5NBL.js");
7107
7107
  const allKbs = kbEngine.getAllKnowledgeBases();
7108
7108
  const clientOrgId = managedAgent?.clientOrgId || config?.clientOrgId || null;
7109
7109
  let kbAssigned = 0;