@agenticmail/enterprise 0.5.392 → 0.5.393
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-heartbeat-4ANIPGGS.js → agent-heartbeat-RJOWUU7H.js} +1 -1
- package/dist/{agent-tools-HLCHRVEV.js → agent-tools-W47VHMR5.js} +44 -3
- package/dist/{chunk-CJ6NJPJ6.js → chunk-2VYK7XFD.js} +57 -13
- package/dist/{chunk-X54GHR4W.js → chunk-BLUC55P3.js} +20 -19
- package/dist/{chunk-7E7MVJI7.js → chunk-MMMDC5GF.js} +17 -0
- package/dist/{chunk-VYP6FF3B.js → chunk-MZT7LJPB.js} +4 -4
- package/dist/{chunk-GF6IRQOC.js → chunk-QVFQ54MS.js} +2 -2
- package/dist/{chunk-GRWV7MDT.js → chunk-TYVHFKMT.js} +1 -1
- package/dist/{cli-agent-WWDX3RIJ.js → cli-agent-7PC2LAMO.js} +6 -6
- package/dist/{cli-serve-KNEKNOJT.js → cli-serve-SL5AAVKI.js} +1 -1
- package/dist/{cli-validate-5OWQCA4S.js → cli-validate-3U2O6OD4.js} +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.js +6 -6
- package/dist/{routes-DONZ5NBL.js → routes-OXGRASTV.js} +3 -3
- package/dist/{runtime-U3YSWLFD.js → runtime-HD6CMDLQ.js} +1 -1
- package/dist/{server-K5QLSS55.js → server-UXS6VUX7.js} +4 -4
- package/dist/{setup-5XWBZMTT.js → setup-2263PHUO.js} +1 -1
- package/dist/{skills-OKZFMTQT.js → skills-JKIV5NPK.js} +2 -2
- package/package.json +1 -1
|
@@ -466,7 +466,7 @@ var AgentHeartbeatManager = class {
|
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
468
|
try {
|
|
469
|
-
const { guardrails } = await import("./routes-
|
|
469
|
+
const { guardrails } = await import("./routes-OXGRASTV.js");
|
|
470
470
|
const status = await guardrails.getStatus(ctx.agentId);
|
|
471
471
|
if (status.paused || status.offDuty) {
|
|
472
472
|
console.log(`[heartbeat] Skipping action dispatch \u2014 agent is ${status.offDuty ? "off duty" : "paused"}`);
|
|
@@ -12676,14 +12676,29 @@ var renderVideo = async (_id, params) => {
|
|
|
12676
12676
|
}
|
|
12677
12677
|
try {
|
|
12678
12678
|
const output = runInProject(projectDir, cmd, 6e5);
|
|
12679
|
+
let shareUrl;
|
|
12680
|
+
try {
|
|
12681
|
+
const baseUrl = process.env.ENTERPRISE_URL || `http://localhost:${process.env.PORT || 8080}`;
|
|
12682
|
+
const res = await fetch(`${baseUrl}/api/share-file`, {
|
|
12683
|
+
method: "POST",
|
|
12684
|
+
headers: { "Content-Type": "application/json" },
|
|
12685
|
+
body: JSON.stringify({ path: outputPath, ttl: 72 })
|
|
12686
|
+
// 72 hour expiry
|
|
12687
|
+
});
|
|
12688
|
+
if (res.ok) {
|
|
12689
|
+
const data = await res.json();
|
|
12690
|
+
shareUrl = data.url;
|
|
12691
|
+
}
|
|
12692
|
+
} catch {
|
|
12693
|
+
}
|
|
12679
12694
|
return {
|
|
12680
12695
|
success: true,
|
|
12681
12696
|
outputPath,
|
|
12682
12697
|
compositionId,
|
|
12683
12698
|
codec,
|
|
12684
|
-
|
|
12699
|
+
shareUrl,
|
|
12700
|
+
message: shareUrl ? `Video rendered and available at: ${shareUrl}` : "Video rendered successfully",
|
|
12685
12701
|
output: output.substring(output.length - 500)
|
|
12686
|
-
// last 500 chars of output
|
|
12687
12702
|
};
|
|
12688
12703
|
} catch (e) {
|
|
12689
12704
|
return {
|
|
@@ -12779,6 +12794,24 @@ var installPackage = async (_id, params) => {
|
|
|
12779
12794
|
return { error: `Install failed: ${e.message?.substring(0, 300)}` };
|
|
12780
12795
|
}
|
|
12781
12796
|
};
|
|
12797
|
+
var shareFile = async (_id, params) => {
|
|
12798
|
+
const { filePath, ttl = 72 } = params;
|
|
12799
|
+
if (!filePath) return { error: "filePath is required" };
|
|
12800
|
+
if (!existsSync(filePath)) return { error: `File not found: ${filePath}` };
|
|
12801
|
+
try {
|
|
12802
|
+
const baseUrl = process.env.ENTERPRISE_URL || `http://localhost:${process.env.PORT || 8080}`;
|
|
12803
|
+
const res = await fetch(`${baseUrl}/api/share-file`, {
|
|
12804
|
+
method: "POST",
|
|
12805
|
+
headers: { "Content-Type": "application/json" },
|
|
12806
|
+
body: JSON.stringify({ path: filePath, ttl })
|
|
12807
|
+
});
|
|
12808
|
+
if (!res.ok) return { error: `Share failed: ${res.status}` };
|
|
12809
|
+
const data = await res.json();
|
|
12810
|
+
return { success: true, url: data.url, expiresIn: data.expiresIn, message: `File available at: ${data.url}` };
|
|
12811
|
+
} catch (e) {
|
|
12812
|
+
return { error: `Share failed: ${e.message?.substring(0, 300)}` };
|
|
12813
|
+
}
|
|
12814
|
+
};
|
|
12782
12815
|
function tool(name, label, description, params, executor) {
|
|
12783
12816
|
return {
|
|
12784
12817
|
name,
|
|
@@ -12867,7 +12900,15 @@ function createRemotonTools() {
|
|
|
12867
12900
|
packages: { type: "array", items: { type: "string" } }
|
|
12868
12901
|
},
|
|
12869
12902
|
required: ["projectDir", "packages"]
|
|
12870
|
-
}, installPackage)
|
|
12903
|
+
}, installPackage),
|
|
12904
|
+
tool("remotion_share_file", "Share File via URL", "Generate a shareable URL for any file (video, image, PDF, etc.). The URL is publicly accessible for a limited time (default 72 hours). Use this to share rendered videos with users via messaging channels.", {
|
|
12905
|
+
type: "object",
|
|
12906
|
+
properties: {
|
|
12907
|
+
filePath: { type: "string", description: "Absolute path to the file to share" },
|
|
12908
|
+
ttl: { type: "number", default: 72, description: "Hours until the link expires (default 72)" }
|
|
12909
|
+
},
|
|
12910
|
+
required: ["filePath"]
|
|
12911
|
+
}, shareFile)
|
|
12871
12912
|
];
|
|
12872
12913
|
}
|
|
12873
12914
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
init_config_bus,
|
|
12
12
|
init_routes,
|
|
13
13
|
routes_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MZT7LJPB.js";
|
|
15
15
|
import {
|
|
16
16
|
SecureVault,
|
|
17
17
|
init_vault
|
|
@@ -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-
|
|
4686
|
+
const { engineRoutes, setEngineDb } = await import("./routes-OXGRASTV.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-
|
|
4717
|
-
const { mountRuntimeApp, setRuntime } = await import("./routes-
|
|
4716
|
+
const { createAgentRuntime } = await import("./runtime-HD6CMDLQ.js");
|
|
4717
|
+
const { mountRuntimeApp, setRuntime } = await import("./routes-OXGRASTV.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-
|
|
4722
|
+
const { lifecycle: lc, memoryManager: mm } = await import("./routes-OXGRASTV.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-
|
|
4761
|
+
const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-OXGRASTV.js");
|
|
4762
4762
|
const runtime = createAgentRuntime({
|
|
4763
4763
|
engineDb,
|
|
4764
4764
|
adminDb: config.db,
|
|
@@ -4898,6 +4898,50 @@ function createServer(config) {
|
|
|
4898
4898
|
}
|
|
4899
4899
|
return c.json({ error: "Documentation page not found" }, 404);
|
|
4900
4900
|
});
|
|
4901
|
+
const SHARED_FILES = /* @__PURE__ */ new Map();
|
|
4902
|
+
const MEDIA_MIME = { ".mp4": "video/mp4", ".webm": "video/webm", ".gif": "image/gif", ".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".mp3": "audio/mpeg", ".wav": "audio/wav", ".pdf": "application/pdf", ".svg": "image/svg+xml" };
|
|
4903
|
+
app.post("/api/share-file", async (c) => {
|
|
4904
|
+
try {
|
|
4905
|
+
const body = await c.req.json();
|
|
4906
|
+
const filePath = body.path;
|
|
4907
|
+
if (!filePath || !existsSync(filePath)) return c.json({ error: "File not found" }, 400);
|
|
4908
|
+
const ext = filePath.substring(filePath.lastIndexOf("."));
|
|
4909
|
+
const mime = MEDIA_MIME[ext] || "application/octet-stream";
|
|
4910
|
+
const token = crypto.randomUUID().replace(/-/g, "").substring(0, 16);
|
|
4911
|
+
const ttlHours = body.ttl || 24;
|
|
4912
|
+
SHARED_FILES.set(token, { path: filePath, mime, expires: Date.now() + ttlHours * 36e5 });
|
|
4913
|
+
const baseUrl = process.env.ENTERPRISE_URL || `http://localhost:${process.env.PORT || 8080}`;
|
|
4914
|
+
const filename = filePath.split("/").pop() || "file";
|
|
4915
|
+
return c.json({ url: `${baseUrl}/shared/${token}/${filename}`, token, expiresIn: `${ttlHours}h` });
|
|
4916
|
+
} catch (e) {
|
|
4917
|
+
return c.json({ error: e.message }, 500);
|
|
4918
|
+
}
|
|
4919
|
+
});
|
|
4920
|
+
app.get("/shared/:token/:filename", (c) => {
|
|
4921
|
+
const token = c.req.param("token");
|
|
4922
|
+
const entry = SHARED_FILES.get(token);
|
|
4923
|
+
if (!entry) return c.text("Not found or expired", 404);
|
|
4924
|
+
if (Date.now() > entry.expires) {
|
|
4925
|
+
SHARED_FILES.delete(token);
|
|
4926
|
+
return c.text("Link expired", 410);
|
|
4927
|
+
}
|
|
4928
|
+
if (!existsSync(entry.path)) {
|
|
4929
|
+
SHARED_FILES.delete(token);
|
|
4930
|
+
return c.text("File no longer available", 404);
|
|
4931
|
+
}
|
|
4932
|
+
try {
|
|
4933
|
+
const content = readFileSync(entry.path);
|
|
4934
|
+
return new Response(content, { headers: { "Content-Type": entry.mime, "Content-Disposition": `inline; filename="${c.req.param("filename")}"`, "Cache-Control": "public, max-age=3600" } });
|
|
4935
|
+
} catch {
|
|
4936
|
+
return c.text("Error reading file", 500);
|
|
4937
|
+
}
|
|
4938
|
+
});
|
|
4939
|
+
setInterval(() => {
|
|
4940
|
+
const now = Date.now();
|
|
4941
|
+
for (const [k, v] of SHARED_FILES) {
|
|
4942
|
+
if (now > v.expires) SHARED_FILES.delete(k);
|
|
4943
|
+
}
|
|
4944
|
+
}, 6e5);
|
|
4901
4945
|
const STATIC_MIME = { ".js": "application/javascript; charset=utf-8", ".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".svg": "image/svg+xml", ".ico": "image/x-icon", ".gif": "image/gif", ".webp": "image/webp", ".css": "text/css; charset=utf-8" };
|
|
4902
4946
|
app.get("/dashboard/*", (c) => {
|
|
4903
4947
|
const reqPath = c.req.path.replace("/dashboard/", "");
|
|
@@ -4965,7 +5009,7 @@ function createServer(config) {
|
|
|
4965
5009
|
});
|
|
4966
5010
|
(async () => {
|
|
4967
5011
|
try {
|
|
4968
|
-
const { engineRoutes, setEngineDb } = await import("./routes-
|
|
5012
|
+
const { engineRoutes, setEngineDb } = await import("./routes-OXGRASTV.js");
|
|
4969
5013
|
const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
|
|
4970
5014
|
if (!engineInitialized) {
|
|
4971
5015
|
engineInitialized = true;
|
|
@@ -4989,13 +5033,13 @@ function createServer(config) {
|
|
|
4989
5033
|
await setEngineDb(engineDb, config.db);
|
|
4990
5034
|
if (config.runtime?.enabled) {
|
|
4991
5035
|
try {
|
|
4992
|
-
const { createAgentRuntime } = await import("./runtime-
|
|
4993
|
-
const { mountRuntimeApp, setRuntime } = await import("./routes-
|
|
5036
|
+
const { createAgentRuntime } = await import("./runtime-HD6CMDLQ.js");
|
|
5037
|
+
const { mountRuntimeApp, setRuntime } = await import("./routes-OXGRASTV.js");
|
|
4994
5038
|
let getEmailConfig;
|
|
4995
5039
|
let onTokenRefresh;
|
|
4996
5040
|
let agentMemoryMgr;
|
|
4997
5041
|
try {
|
|
4998
|
-
const { lifecycle: lc, memoryManager: mm } = await import("./routes-
|
|
5042
|
+
const { lifecycle: lc, memoryManager: mm } = await import("./routes-OXGRASTV.js");
|
|
4999
5043
|
agentMemoryMgr = mm;
|
|
5000
5044
|
if (lc) {
|
|
5001
5045
|
getEmailConfig = (agentId) => {
|
|
@@ -5034,7 +5078,7 @@ function createServer(config) {
|
|
|
5034
5078
|
}
|
|
5035
5079
|
} catch {
|
|
5036
5080
|
}
|
|
5037
|
-
const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-
|
|
5081
|
+
const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-OXGRASTV.js");
|
|
5038
5082
|
const runtime = createAgentRuntime({
|
|
5039
5083
|
engineDb,
|
|
5040
5084
|
adminDb: config.db,
|
|
@@ -5046,7 +5090,7 @@ function createServer(config) {
|
|
|
5046
5090
|
agentMemoryManager: agentMemoryMgr,
|
|
5047
5091
|
vault: vaultRef2,
|
|
5048
5092
|
permissionEngine: permRef2,
|
|
5049
|
-
hierarchyManager: (await import("./routes-
|
|
5093
|
+
hierarchyManager: (await import("./routes-OXGRASTV.js")).hierarchyManager ?? void 0,
|
|
5050
5094
|
databaseManager: dbMgr2
|
|
5051
5095
|
});
|
|
5052
5096
|
await runtime.start();
|
|
@@ -5060,7 +5104,7 @@ function createServer(config) {
|
|
|
5060
5104
|
}
|
|
5061
5105
|
console.log("[engine] Eagerly initialized");
|
|
5062
5106
|
try {
|
|
5063
|
-
const { lifecycle: lcRef } = await import("./routes-
|
|
5107
|
+
const { lifecycle: lcRef } = await import("./routes-OXGRASTV.js");
|
|
5064
5108
|
if (lcRef) {
|
|
5065
5109
|
const agents = Array.from(lcRef.agents?.values?.() || []);
|
|
5066
5110
|
const hasLocalPm2 = agents.some((a) => {
|
|
@@ -356,7 +356,7 @@ function createRuntimeHooks(deps) {
|
|
|
356
356
|
var injectedMessages = [...messages];
|
|
357
357
|
if (deps.knowledgeBaseEnabled !== false) {
|
|
358
358
|
try {
|
|
359
|
-
var { knowledgeBase } = await import("./routes-
|
|
359
|
+
var { knowledgeBase } = await import("./routes-OXGRASTV.js");
|
|
360
360
|
var kbs = await knowledgeBase.listForAgent(agentId);
|
|
361
361
|
if (kbs.length > 0) {
|
|
362
362
|
var contextParts = [];
|
|
@@ -389,7 +389,7 @@ ${contextParts.join("\n\n")}`;
|
|
|
389
389
|
}
|
|
390
390
|
if (deps.memoryEnabled !== false) {
|
|
391
391
|
try {
|
|
392
|
-
var { memoryManager } = await import("./routes-
|
|
392
|
+
var { memoryManager } = await import("./routes-OXGRASTV.js");
|
|
393
393
|
var memories = await memoryManager.queryMemories({
|
|
394
394
|
agentId,
|
|
395
395
|
limit: 10,
|
|
@@ -410,7 +410,7 @@ ${memories.map(function(m) {
|
|
|
410
410
|
}
|
|
411
411
|
if (deps.policyEnabled !== false) {
|
|
412
412
|
try {
|
|
413
|
-
var { policyEngine } = await import("./routes-
|
|
413
|
+
var { policyEngine } = await import("./routes-OXGRASTV.js");
|
|
414
414
|
var policies = await policyEngine.getAgentPolicies(agentId, deps.orgId);
|
|
415
415
|
if (policies.length > 0) {
|
|
416
416
|
var policyText = policies.map(function(p) {
|
|
@@ -435,7 +435,7 @@ ${policyText}`;
|
|
|
435
435
|
// ─── Budget Check ──────────────────────────────
|
|
436
436
|
async checkBudget(agentId, _orgId, _estimatedTokens) {
|
|
437
437
|
try {
|
|
438
|
-
var { lifecycle } = await import("./routes-
|
|
438
|
+
var { lifecycle } = await import("./routes-OXGRASTV.js");
|
|
439
439
|
var now = Date.now();
|
|
440
440
|
var cacheKey = `budget_sync_${agentId}`;
|
|
441
441
|
var lastSync = globalThis[cacheKey] || 0;
|
|
@@ -528,7 +528,7 @@ ${policyText}`;
|
|
|
528
528
|
// ─── Record LLM Usage ──────────────────────────
|
|
529
529
|
async recordLLMUsage(agentId, orgId, usage) {
|
|
530
530
|
try {
|
|
531
|
-
var { lifecycle } = await import("./routes-
|
|
531
|
+
var { lifecycle } = await import("./routes-OXGRASTV.js");
|
|
532
532
|
console.log(`[hooks] recordLLMUsage: agent=${agentId}, input=${usage.inputTokens}, output=${usage.outputTokens}`);
|
|
533
533
|
await lifecycle.recordLLMUsage(agentId, {
|
|
534
534
|
inputTokens: usage.inputTokens,
|
|
@@ -539,7 +539,7 @@ ${policyText}`;
|
|
|
539
539
|
console.log(`[hooks] recordLLMUsage error: ${recordErr.message}`);
|
|
540
540
|
}
|
|
541
541
|
try {
|
|
542
|
-
var { activity } = await import("./routes-
|
|
542
|
+
var { activity } = await import("./routes-OXGRASTV.js");
|
|
543
543
|
await activity.record({
|
|
544
544
|
agentId,
|
|
545
545
|
orgId,
|
|
@@ -587,7 +587,7 @@ ${policyText}`;
|
|
|
587
587
|
var cacheKey = `${ctx.agentId}:${ctx.toolName}`;
|
|
588
588
|
var cached = getCachedPermission(cacheKey);
|
|
589
589
|
if (cached) return cached;
|
|
590
|
-
var { permissionEngine } = await import("./routes-
|
|
590
|
+
var { permissionEngine } = await import("./routes-OXGRASTV.js");
|
|
591
591
|
var permResult = await permissionEngine.checkPermission(ctx.agentId, ctx.toolName);
|
|
592
592
|
var result = {
|
|
593
593
|
allowed: permResult.allowed,
|
|
@@ -596,7 +596,7 @@ ${policyText}`;
|
|
|
596
596
|
};
|
|
597
597
|
if (result.allowed && deps.guardrailsEnabled !== false) {
|
|
598
598
|
try {
|
|
599
|
-
var { guardrails } = await import("./routes-
|
|
599
|
+
var { guardrails } = await import("./routes-OXGRASTV.js");
|
|
600
600
|
var status = await guardrails.getStatus(ctx.agentId);
|
|
601
601
|
if (status.paused || status.offDuty) {
|
|
602
602
|
result.allowed = false;
|
|
@@ -608,7 +608,7 @@ ${policyText}`;
|
|
|
608
608
|
}
|
|
609
609
|
if (result.allowed && deps.dlpEnabled !== false && ctx.parameters) {
|
|
610
610
|
try {
|
|
611
|
-
var { dlp } = await import("./routes-
|
|
611
|
+
var { dlp } = await import("./routes-OXGRASTV.js");
|
|
612
612
|
var dlpResult = await dlp.scanParameters({
|
|
613
613
|
orgId: ctx.orgId,
|
|
614
614
|
agentId: ctx.agentId,
|
|
@@ -628,7 +628,7 @@ ${policyText}`;
|
|
|
628
628
|
}
|
|
629
629
|
if (result.requiresApproval && result.allowed) {
|
|
630
630
|
try {
|
|
631
|
-
var { approvals } = await import("./routes-
|
|
631
|
+
var { approvals } = await import("./routes-OXGRASTV.js");
|
|
632
632
|
var approval = await approvals.createAndWait({
|
|
633
633
|
agentId: ctx.agentId,
|
|
634
634
|
orgId: ctx.orgId,
|
|
@@ -658,7 +658,7 @@ ${policyText}`;
|
|
|
658
658
|
// ─── After Tool Call ────────────────────────────
|
|
659
659
|
async afterToolCall(ctx, result) {
|
|
660
660
|
try {
|
|
661
|
-
var { activity } = await import("./routes-
|
|
661
|
+
var { activity } = await import("./routes-OXGRASTV.js");
|
|
662
662
|
await activity.record({
|
|
663
663
|
agentId: ctx.agentId,
|
|
664
664
|
orgId: ctx.orgId,
|
|
@@ -675,7 +675,7 @@ ${policyText}`;
|
|
|
675
675
|
} catch {
|
|
676
676
|
}
|
|
677
677
|
try {
|
|
678
|
-
var { lifecycle } = await import("./routes-
|
|
678
|
+
var { lifecycle } = await import("./routes-OXGRASTV.js");
|
|
679
679
|
await lifecycle.recordToolCall(ctx.agentId, {
|
|
680
680
|
toolId: ctx.toolName,
|
|
681
681
|
tokensUsed: 0,
|
|
@@ -687,7 +687,7 @@ ${policyText}`;
|
|
|
687
687
|
}
|
|
688
688
|
if (result.success && EXTERNAL_TOOLS.has(ctx.toolName)) {
|
|
689
689
|
try {
|
|
690
|
-
var { journal } = await import("./routes-
|
|
690
|
+
var { journal } = await import("./routes-OXGRASTV.js");
|
|
691
691
|
await journal.record({
|
|
692
692
|
orgId: ctx.orgId,
|
|
693
693
|
agentId: ctx.agentId,
|
|
@@ -702,7 +702,7 @@ ${policyText}`;
|
|
|
702
702
|
}
|
|
703
703
|
if (result.success && COMMUNICATION_TOOLS.has(ctx.toolName)) {
|
|
704
704
|
try {
|
|
705
|
-
var { commBus } = await import("./routes-
|
|
705
|
+
var { commBus } = await import("./routes-OXGRASTV.js");
|
|
706
706
|
await commBus.observeMessage({
|
|
707
707
|
orgId: ctx.orgId,
|
|
708
708
|
agentId: ctx.agentId,
|
|
@@ -716,7 +716,7 @@ ${policyText}`;
|
|
|
716
716
|
// ─── Session Lifecycle ──────────────────────────
|
|
717
717
|
async onSessionStart(sessionId, agentId, orgId) {
|
|
718
718
|
try {
|
|
719
|
-
var { activity } = await import("./routes-
|
|
719
|
+
var { activity } = await import("./routes-OXGRASTV.js");
|
|
720
720
|
await activity.record({
|
|
721
721
|
agentId,
|
|
722
722
|
orgId,
|
|
@@ -729,7 +729,7 @@ ${policyText}`;
|
|
|
729
729
|
},
|
|
730
730
|
async onSessionEnd(sessionId, agentId, orgId) {
|
|
731
731
|
try {
|
|
732
|
-
var { activity } = await import("./routes-
|
|
732
|
+
var { activity } = await import("./routes-OXGRASTV.js");
|
|
733
733
|
await activity.record({
|
|
734
734
|
agentId,
|
|
735
735
|
orgId,
|
|
@@ -743,7 +743,7 @@ ${policyText}`;
|
|
|
743
743
|
// ─── Context Compaction ─────────────────────────
|
|
744
744
|
async onContextCompaction(sessionId, agentId, summary) {
|
|
745
745
|
try {
|
|
746
|
-
var { memoryManager } = await import("./routes-
|
|
746
|
+
var { memoryManager } = await import("./routes-OXGRASTV.js");
|
|
747
747
|
await memoryManager.createMemory({
|
|
748
748
|
agentId,
|
|
749
749
|
orgId: deps.orgId,
|
|
@@ -2518,7 +2518,7 @@ async function runAgentLoop(config, initialMessages, hooks, options) {
|
|
|
2518
2518
|
console.log(`[agent-loop] \u2705 Tool ${toolCall.name} succeeded (${content.length} chars): ${content.slice(0, 300)}`);
|
|
2519
2519
|
}
|
|
2520
2520
|
try {
|
|
2521
|
-
const { activity } = await import("./routes-
|
|
2521
|
+
const { activity } = await import("./routes-OXGRASTV.js");
|
|
2522
2522
|
activity.recordToolCallCompact({
|
|
2523
2523
|
agentId: config.agentId,
|
|
2524
2524
|
orgId: config.orgId,
|
|
@@ -2984,6 +2984,7 @@ var TOOL_REGISTRY = {
|
|
|
2984
2984
|
remotion_preview_url: "remotion_video",
|
|
2985
2985
|
remotion_add_asset: "remotion_video",
|
|
2986
2986
|
remotion_install_package: "remotion_video",
|
|
2987
|
+
remotion_share_file: "remotion_video",
|
|
2987
2988
|
// ── Knowledge Search (3) ──
|
|
2988
2989
|
knowledge_base_search: "ent_knowledge",
|
|
2989
2990
|
knowledge_hub_search: "ent_knowledge",
|
|
@@ -3418,7 +3419,7 @@ function createRequestToolsTool(allTools, activeSets, _context) {
|
|
|
3418
3419
|
};
|
|
3419
3420
|
}
|
|
3420
3421
|
async function createToolsForContext(options, context, opts) {
|
|
3421
|
-
const { createAllTools } = await import("./agent-tools-
|
|
3422
|
+
const { createAllTools } = await import("./agent-tools-W47VHMR5.js");
|
|
3422
3423
|
if (context === "full") {
|
|
3423
3424
|
return createAllTools(options);
|
|
3424
3425
|
}
|
|
@@ -2607,6 +2607,23 @@ var init_remotion_video = __esm({
|
|
|
2607
2607
|
}
|
|
2608
2608
|
}
|
|
2609
2609
|
];
|
|
2610
|
+
TOOLS46.push({
|
|
2611
|
+
id: "remotion_share_file",
|
|
2612
|
+
name: "Share File via URL",
|
|
2613
|
+
description: "Generate a temporary shareable URL for any rendered file (video, image, etc.). Link expires after configurable TTL.",
|
|
2614
|
+
category: "write",
|
|
2615
|
+
risk: "low",
|
|
2616
|
+
skillId: "remotion-video",
|
|
2617
|
+
sideEffects: [],
|
|
2618
|
+
parameters: {
|
|
2619
|
+
type: "object",
|
|
2620
|
+
properties: {
|
|
2621
|
+
filePath: { type: "string", description: "Absolute path to the file" },
|
|
2622
|
+
ttl: { type: "number", description: "Hours until expiry (default 72)" }
|
|
2623
|
+
},
|
|
2624
|
+
required: ["filePath"]
|
|
2625
|
+
}
|
|
2626
|
+
});
|
|
2610
2627
|
}
|
|
2611
2628
|
});
|
|
2612
2629
|
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
PermissionEngine,
|
|
45
45
|
SKILL_SUITES,
|
|
46
46
|
init_skills as init_skills2
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-TYVHFKMT.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-
|
|
65
|
+
} from "./chunk-MMMDC5GF.js";
|
|
66
66
|
import {
|
|
67
67
|
VALID_CATEGORIES,
|
|
68
68
|
init_skill_validator,
|
|
@@ -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-
|
|
7078
|
+
const { PRESET_PROFILES: PRESET_PROFILES2 } = await import("./skills-JKIV5NPK.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-
|
|
7106
|
+
const { knowledgeBase: kbEngine } = await import("./routes-OXGRASTV.js");
|
|
7107
7107
|
const allKbs = kbEngine.getAllKnowledgeBases();
|
|
7108
7108
|
const clientOrgId = managedAgent?.clientOrgId || config?.clientOrgId || null;
|
|
7109
7109
|
let kbAssigned = 0;
|
|
@@ -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-
|
|
1237
|
+
const { createServer: createServer2 } = await import("./server-UXS6VUX7.js");
|
|
1238
1238
|
const server2 = createServer2({ port: tunnel.port, db, jwtSecret });
|
|
1239
1239
|
const handle2 = await server2.start();
|
|
1240
1240
|
spinner.succeed("Server running");
|
|
@@ -1536,7 +1536,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
|
|
|
1536
1536
|
return {};
|
|
1537
1537
|
}
|
|
1538
1538
|
spinner.start("Starting local server...");
|
|
1539
|
-
const { createServer } = await import("./server-
|
|
1539
|
+
const { createServer } = await import("./server-UXS6VUX7.js");
|
|
1540
1540
|
const server = createServer({ port: 3e3, db, jwtSecret });
|
|
1541
1541
|
const handle = await server.start();
|
|
1542
1542
|
spinner.succeed("Server running");
|
|
@@ -776,7 +776,7 @@ async function runAgent(_args) {
|
|
|
776
776
|
const agent = agentRow[0];
|
|
777
777
|
console.log(` Agent: ${agent.display_name || agent.name}`);
|
|
778
778
|
console.log(` State: ${agent.state}`);
|
|
779
|
-
const routes = await import("./routes-
|
|
779
|
+
const routes = await import("./routes-OXGRASTV.js");
|
|
780
780
|
await routes.lifecycle.setDb(engineDb);
|
|
781
781
|
await routes.lifecycle.loadFromDb();
|
|
782
782
|
routes.lifecycle.standaloneMode = true;
|
|
@@ -834,10 +834,10 @@ async function runAgent(_args) {
|
|
|
834
834
|
}
|
|
835
835
|
} catch {
|
|
836
836
|
}
|
|
837
|
-
const { createAgentRuntime } = await import("./runtime-
|
|
837
|
+
const { createAgentRuntime } = await import("./runtime-HD6CMDLQ.js");
|
|
838
838
|
let orgIntMgr = null;
|
|
839
839
|
try {
|
|
840
|
-
const { orgIntegrations: oi } = await import("./routes-
|
|
840
|
+
const { orgIntegrations: oi } = await import("./routes-OXGRASTV.js");
|
|
841
841
|
orgIntMgr = oi;
|
|
842
842
|
} catch {
|
|
843
843
|
}
|
|
@@ -1236,7 +1236,7 @@ Please complete this task now.`,
|
|
|
1236
1236
|
}
|
|
1237
1237
|
if (scope === "all" || scope === "permissions") {
|
|
1238
1238
|
try {
|
|
1239
|
-
const { permissionEngine } = await import("./routes-
|
|
1239
|
+
const { permissionEngine } = await import("./routes-OXGRASTV.js");
|
|
1240
1240
|
await permissionEngine.setDb(engineDb);
|
|
1241
1241
|
reloaded.push("permissions");
|
|
1242
1242
|
} catch {
|
|
@@ -1276,7 +1276,7 @@ Please complete this task now.`,
|
|
|
1276
1276
|
}
|
|
1277
1277
|
if (scope === "all" || scope === "guardrails") {
|
|
1278
1278
|
try {
|
|
1279
|
-
const { guardrails } = await import("./routes-
|
|
1279
|
+
const { guardrails } = await import("./routes-OXGRASTV.js");
|
|
1280
1280
|
await guardrails.loadFromDb?.();
|
|
1281
1281
|
reloaded.push("guardrails");
|
|
1282
1282
|
} catch {
|
|
@@ -2216,7 +2216,7 @@ Available tools: ${providerType === "imap" ? "email_send (to, subject, body)" :
|
|
|
2216
2216
|
console.log("[guardrails] Disabled via autonomy settings");
|
|
2217
2217
|
}
|
|
2218
2218
|
try {
|
|
2219
|
-
const { AgentHeartbeatManager } = await import("./agent-heartbeat-
|
|
2219
|
+
const { AgentHeartbeatManager } = await import("./agent-heartbeat-RJOWUU7H.js");
|
|
2220
2220
|
const hbOrgRows = await engineDb.query(`SELECT org_id FROM managed_agents WHERE id = $1`, [AGENT_ID]);
|
|
2221
2221
|
const hbOrgId = hbOrgRows?.[0]?.org_id || "";
|
|
2222
2222
|
const hbManagerEmail = config.managerEmail || (config.manager?.type === "external" ? config.manager.email : null);
|
|
@@ -94,7 +94,7 @@ async function runServe(_args) {
|
|
|
94
94
|
process.exit(1);
|
|
95
95
|
}
|
|
96
96
|
const { createAdapter, smartDbConfig } = await import("./factory-XRYYBBCW.js");
|
|
97
|
-
const { createServer } = await import("./server-
|
|
97
|
+
const { createServer } = await import("./server-UXS6VUX7.js");
|
|
98
98
|
const db = await createAdapter(smartDbConfig(DATABASE_URL));
|
|
99
99
|
await db.migrate();
|
|
100
100
|
const server = createServer({
|
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ var args = process.argv.slice(2);
|
|
|
5
5
|
var command = args[0];
|
|
6
6
|
switch (command) {
|
|
7
7
|
case "validate":
|
|
8
|
-
import("./cli-validate-
|
|
8
|
+
import("./cli-validate-3U2O6OD4.js").then((m) => m.runValidate(args.slice(1))).catch(fatal);
|
|
9
9
|
break;
|
|
10
10
|
case "build-skill":
|
|
11
11
|
import("./cli-build-skill-2IOE7MYP.js").then((m) => m.runBuildSkill(args.slice(1))).catch(fatal);
|
|
@@ -65,14 +65,14 @@ Skill Development:
|
|
|
65
65
|
break;
|
|
66
66
|
case "serve":
|
|
67
67
|
case "start":
|
|
68
|
-
import("./cli-serve-
|
|
68
|
+
import("./cli-serve-SL5AAVKI.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
|
|
69
69
|
break;
|
|
70
70
|
case "agent":
|
|
71
|
-
import("./cli-agent-
|
|
71
|
+
import("./cli-agent-7PC2LAMO.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
|
|
72
72
|
break;
|
|
73
73
|
case "setup":
|
|
74
74
|
default:
|
|
75
|
-
import("./setup-
|
|
75
|
+
import("./setup-2263PHUO.js").then((m) => m.runSetupWizard()).catch(fatal);
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
function fatal(err) {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
provision,
|
|
3
3
|
runSetupWizard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QVFQ54MS.js";
|
|
5
5
|
import {
|
|
6
6
|
AgenticMailManager,
|
|
7
7
|
GoogleEmailProvider,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
executeTool,
|
|
29
29
|
runAgentLoop,
|
|
30
30
|
toolsToDefinitions
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BLUC55P3.js";
|
|
32
32
|
import {
|
|
33
33
|
ValidationError,
|
|
34
34
|
auditLogger,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
requireRole,
|
|
43
43
|
securityHeaders,
|
|
44
44
|
validate
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-2VYK7XFD.js";
|
|
46
46
|
import "./chunk-DJBCRQTD.js";
|
|
47
47
|
import {
|
|
48
48
|
PROVIDER_REGISTRY,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
init_storage_manager,
|
|
83
83
|
init_tenant,
|
|
84
84
|
init_workforce
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-MZT7LJPB.js";
|
|
86
86
|
import "./chunk-WYDVMFGJ.js";
|
|
87
87
|
import "./chunk-3UAFHUEC.js";
|
|
88
88
|
import {
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
PRESET_PROFILES,
|
|
120
120
|
PermissionEngine,
|
|
121
121
|
init_skills
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-TYVHFKMT.js";
|
|
123
123
|
import {
|
|
124
124
|
CircuitBreaker,
|
|
125
125
|
CircuitOpenError,
|
|
@@ -148,7 +148,7 @@ import {
|
|
|
148
148
|
generateToolPolicy,
|
|
149
149
|
getToolsBySkill,
|
|
150
150
|
init_tool_catalog
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-MMMDC5GF.js";
|
|
152
152
|
import {
|
|
153
153
|
VALID_CATEGORIES,
|
|
154
154
|
VALID_RISK_LEVELS,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
tenants,
|
|
36
36
|
vault,
|
|
37
37
|
workforce
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-MZT7LJPB.js";
|
|
39
39
|
import "./chunk-WYDVMFGJ.js";
|
|
40
40
|
import "./chunk-3UAFHUEC.js";
|
|
41
41
|
import "./chunk-E6B4W3WG.js";
|
|
@@ -46,10 +46,10 @@ import "./chunk-74ZCQKYU.js";
|
|
|
46
46
|
import "./chunk-Z6K5FKAB.js";
|
|
47
47
|
import "./chunk-C6JP5NR6.js";
|
|
48
48
|
import "./chunk-WUAWWKTN.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-TYVHFKMT.js";
|
|
50
50
|
import "./chunk-YDD5TC5Q.js";
|
|
51
51
|
import "./chunk-FLQ5FLHW.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-MMMDC5GF.js";
|
|
53
53
|
import "./chunk-22U7TZPN.js";
|
|
54
54
|
import "./chunk-KFQGP6VL.js";
|
|
55
55
|
init_routes();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2VYK7XFD.js";
|
|
4
4
|
import "./chunk-DJBCRQTD.js";
|
|
5
5
|
import "./chunk-UF3ZJMJO.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-MZT7LJPB.js";
|
|
7
7
|
import "./chunk-WYDVMFGJ.js";
|
|
8
8
|
import "./chunk-3UAFHUEC.js";
|
|
9
9
|
import "./chunk-E6B4W3WG.js";
|
|
@@ -14,13 +14,13 @@ import "./chunk-74ZCQKYU.js";
|
|
|
14
14
|
import "./chunk-Z6K5FKAB.js";
|
|
15
15
|
import "./chunk-C6JP5NR6.js";
|
|
16
16
|
import "./chunk-WUAWWKTN.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-TYVHFKMT.js";
|
|
18
18
|
import "./chunk-YDD5TC5Q.js";
|
|
19
19
|
import "./chunk-37ABTUFU.js";
|
|
20
20
|
import "./chunk-NU657BBQ.js";
|
|
21
21
|
import "./chunk-PGAU3W3M.js";
|
|
22
22
|
import "./chunk-FLQ5FLHW.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-MMMDC5GF.js";
|
|
24
24
|
import "./chunk-22U7TZPN.js";
|
|
25
25
|
import "./chunk-KFQGP6VL.js";
|
|
26
26
|
export {
|