@agenticmail/enterprise 0.5.319 → 0.5.321
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/CHANGELOG.md +68 -0
- package/CODE_OF_CONDUCT.md +31 -0
- package/README.md +118 -38
- package/SECURITY.md +42 -0
- package/dist/agent-heartbeat-3FWNHZFX.js +510 -0
- package/dist/agent-heartbeat-4RWHZR7H.js +510 -0
- package/dist/agent-heartbeat-6ZGB5ILY.js +510 -0
- package/dist/agent-heartbeat-BIVHLKFM.js +510 -0
- package/dist/agent-heartbeat-HRKVFK2T.js +510 -0
- package/dist/agent-heartbeat-JC5GWVXD.js +510 -0
- package/dist/agent-heartbeat-K6A4HMHB.js +510 -0
- package/dist/agent-heartbeat-LCDXWFVB.js +510 -0
- package/dist/agent-heartbeat-P7HZCZAQ.js +510 -0
- package/dist/agent-heartbeat-PUIRSNIO.js +510 -0
- package/dist/agent-heartbeat-SN5ILQ6Y.js +510 -0
- package/dist/agent-heartbeat-TW5YTDYC.js +510 -0
- package/dist/agent-heartbeat-Z2QQXROL.js +510 -0
- package/dist/agent-notify-OEQBCZLN.js +43 -0
- package/dist/{agent-tools-263HM5QU.js → agent-tools-3W7XLUYA.js} +1 -1
- package/dist/agent-tools-4QK7LLNP.js +9 -0
- package/dist/agent-tools-54VZGT6L.js +9 -0
- package/dist/{agent-tools-AT4D276V.js → agent-tools-AYYDPO27.js} +7 -7
- package/dist/{agent-tools-MSTAPX2I.js → agent-tools-F2X47FKF.js} +7 -7
- package/dist/{agent-tools-FA26SY5O.js → agent-tools-O6W3QAZL.js} +11 -6
- package/dist/agent-tools-OAWVZBMW.js +9 -0
- package/dist/agent-tools-QCCU74PN.js +13949 -0
- package/dist/chunk-2LHUARN6.js +4929 -0
- package/dist/chunk-2WVCNCYC.js +5087 -0
- package/dist/{chunk-6PWDS7KY.js → chunk-3FM6YQUK.js} +20 -20
- package/dist/chunk-3UAFHUEC.js +212 -0
- package/dist/{chunk-WJO57PMO.js → chunk-46GOWZT4.js} +20 -20
- package/dist/{chunk-BNRE7TSX.js → chunk-5KYJAUZV.js} +3 -3
- package/dist/chunk-6C5PKREN.js +467 -0
- package/dist/{chunk-447MTPZF.js → chunk-6ZMLNEHB.js} +3 -3
- package/dist/chunk-BPZQT5N5.js +25652 -0
- package/dist/chunk-BQM7MBPS.js +1380 -0
- package/dist/{chunk-ZRFKGPIU.js → chunk-C52OQNNY.js} +20 -20
- package/dist/chunk-C7HGQF4Y.js +25652 -0
- package/dist/chunk-CAHNZGGK.js +25656 -0
- package/dist/{chunk-FL3CH3ET.js → chunk-CK7R6UHE.js} +51 -27
- package/dist/chunk-D36RPWB7.js +25652 -0
- package/dist/{chunk-36NM2B4C.js → chunk-DJK2UPFH.js} +63 -93
- package/dist/chunk-DM7FTF7W.js +4929 -0
- package/dist/chunk-DMD24UFZ.js +5101 -0
- package/dist/{chunk-36XNMIHA.js → chunk-DXZGPUAF.js} +20 -20
- package/dist/chunk-F46WB5IL.js +5087 -0
- package/dist/chunk-F5QG5SQH.js +5087 -0
- package/dist/{chunk-JGEVQZDR.js → chunk-FLQ5FLHW.js} +13 -16
- package/dist/chunk-H7GP733U.js +5087 -0
- package/dist/{chunk-OZSQLOV6.js → chunk-HHBXWB5U.js} +415 -19
- package/dist/{chunk-D24JY75H.js → chunk-IMXS4N6W.js} +3 -3
- package/dist/{chunk-6PVBV6ZP.js → chunk-JNMDD7JY.js} +3 -3
- package/dist/chunk-JTV5LA47.js +1519 -0
- package/dist/chunk-KV6G7NZX.js +1519 -0
- package/dist/chunk-MU5MEBIK.js +1519 -0
- package/dist/chunk-NLT5MC7X.js +465 -0
- package/dist/{chunk-GTFZZUXX.js → chunk-NVLYIM4J.js} +51 -27
- package/dist/{chunk-6G5SXLXC.js → chunk-NZY2BIZH.js} +63 -93
- package/dist/chunk-O42L6G67.js +1519 -0
- package/dist/chunk-OCNERGGM.js +4891 -0
- package/dist/chunk-OJSNHONE.js +1519 -0
- package/dist/{chunk-2TAZJWJN.js → chunk-OWL3QVH7.js} +18 -0
- package/dist/{chunk-P3HVY2HS.js → chunk-OWTLNV4Q.js} +382 -7
- package/dist/chunk-PCNYEP6T.js +4891 -0
- package/dist/{chunk-YL3Z5KPR.js → chunk-PI4AQ4Z6.js} +438 -15
- package/dist/chunk-PN3EGTCA.js +194 -0
- package/dist/chunk-Q37UKNRC.js +1519 -0
- package/dist/chunk-QXTC6J7H.js +5087 -0
- package/dist/{chunk-SPBQVNDI.js → chunk-RKERL5LZ.js} +25 -21
- package/dist/chunk-RVBK2IOX.js +25652 -0
- package/dist/chunk-SAKODCZ5.js +4891 -0
- package/dist/{chunk-XV4TU65E.js → chunk-SALGFC5L.js} +51 -27
- package/dist/chunk-STGWZ2MS.js +1519 -0
- package/dist/chunk-UY3ZVQDP.js +25652 -0
- package/dist/chunk-V6OSD62M.js +5087 -0
- package/dist/chunk-VP6YAHX4.js +1519 -0
- package/dist/chunk-WDYJOEAI.js +5087 -0
- package/dist/chunk-WEAFQNOS.js +195 -0
- package/dist/chunk-XKUSAZGP.js +5087 -0
- package/dist/chunk-Z6K5FKAB.js +548 -0
- package/dist/chunk-ZGE3XAXY.js +1519 -0
- package/dist/chunk-ZGYVXYQQ.js +3296 -0
- package/dist/cli-agent-7TB2BWS6.js +2370 -0
- package/dist/cli-agent-AKXFFST2.js +2370 -0
- package/dist/cli-agent-DZTKLITB.js +2357 -0
- package/dist/cli-agent-FOF7PFEP.js +2357 -0
- package/dist/cli-agent-H74M2ZYN.js +2357 -0
- package/dist/cli-agent-HORWVPHB.js +2370 -0
- package/dist/cli-agent-HSZT6SKF.js +2423 -0
- package/dist/cli-agent-JLUQ4ZU6.js +2424 -0
- package/dist/cli-agent-MVCDH4HV.js +2370 -0
- package/dist/cli-agent-NZXOEPJ2.js +2357 -0
- package/dist/cli-agent-PADN3QRC.js +2357 -0
- package/dist/cli-agent-QAYEX3BE.js +2441 -0
- package/dist/cli-agent-QT64DT5J.js +2370 -0
- package/dist/cli-agent-TFL2M6UK.js +2424 -0
- package/dist/cli-agent-UIKXATTD.js +2357 -0
- package/dist/cli-agent-UJN6FYTO.js +2370 -0
- package/dist/cli-agent-VIQAYVY4.js +2357 -0
- package/dist/cli-agent-WNWFVOFM.js +2370 -0
- package/dist/cli-agent-XBQX67VJ.js +2423 -0
- package/dist/cli-agent-ZLSC6FF4.js +2357 -0
- package/dist/cli-serve-2IL5DTEY.js +153 -0
- package/dist/cli-serve-47N5UKKW.js +153 -0
- package/dist/cli-serve-4XGZFUV2.js +140 -0
- package/dist/cli-serve-6OT3UEAN.js +140 -0
- package/dist/cli-serve-7L6EY5UH.js +153 -0
- package/dist/cli-serve-BDGOOOKQ.js +260 -0
- package/dist/cli-serve-BFNIW2LF.js +153 -0
- package/dist/cli-serve-C7MN6U5Q.js +153 -0
- package/dist/cli-serve-CR3OY3IM.js +153 -0
- package/dist/cli-serve-DAJFRWQ7.js +153 -0
- package/dist/cli-serve-FW6FHFW4.js +153 -0
- package/dist/cli-serve-GEEOQS77.js +153 -0
- package/dist/cli-serve-H562I3ZK.js +153 -0
- package/dist/cli-serve-HDQZF4C4.js +153 -0
- package/dist/cli-serve-LICAOMEB.js +140 -0
- package/dist/cli-serve-LLGYLWFS.js +153 -0
- package/dist/cli-serve-N3OISDNB.js +153 -0
- package/dist/cli-serve-TIZ27EVR.js +153 -0
- package/dist/cli-serve-TUNI2RCN.js +153 -0
- package/dist/cli-serve-WNOZMAWD.js +153 -0
- package/dist/cli-validate-Z726VJCN.js +150 -0
- package/dist/cli.js +4 -4
- package/dist/connection-manager-KAWEUWUR.js +9 -0
- package/dist/dashboard/app.js +9 -3
- package/dist/dashboard/components/knowledge-link.js +15 -0
- package/dist/dashboard/components/settings-help.js +4 -2
- package/dist/dashboard/docs/agent-deployment.html +33 -1
- package/dist/dashboard/docs/settings-network.html +321 -0
- package/dist/dashboard/docs/settings-security.html +347 -0
- package/dist/dashboard/docs/settings-tool-security.html +176 -0
- package/dist/dashboard/docs/settings.html +36 -16
- package/dist/dashboard/pages/agent-detail/deployment.js +39 -6
- package/dist/dashboard/pages/agent-detail/tools.js +10 -0
- package/dist/dashboard/pages/database-access.js +4 -3
- package/dist/dashboard/pages/settings.js +174 -37
- package/dist/dashboard/pages/task-pipeline.js +400 -843
- package/dist/db-adapter-2T56ORSD.js +7 -0
- package/dist/db-adapter-IRHOUMVC.js +7 -0
- package/dist/index.js +41 -41
- package/dist/microsoft-VREAZ7M2.js +3955 -0
- package/dist/routes-3MMLQTB6.js +90 -0
- package/dist/routes-4ZUIJ4HE.js +90 -0
- package/dist/routes-5MXHKKH4.js +90 -0
- package/dist/routes-64NJFK3B.js +90 -0
- package/dist/routes-6AKQ2LBV.js +90 -0
- package/dist/routes-CRRBUDO4.js +90 -0
- package/dist/routes-DIAF3MC3.js +90 -0
- package/dist/routes-KMUNU6CY.js +90 -0
- package/dist/routes-LRRLXIZR.js +90 -0
- package/dist/routes-N647AJYG.js +90 -0
- package/dist/routes-SSSELAAR.js +90 -0
- package/dist/routes-STERVGKJ.js +90 -0
- package/dist/routes-ZEZZACZP.js +90 -0
- package/dist/runtime-5EQN4GFM.js +45 -0
- package/dist/runtime-5LP7PUD4.js +45 -0
- package/dist/runtime-6BULDBR3.js +45 -0
- package/dist/runtime-6YEENDN3.js +45 -0
- package/dist/runtime-7LQFRG3B.js +45 -0
- package/dist/runtime-AMXJU2MB.js +45 -0
- package/dist/runtime-D6WSE7FG.js +45 -0
- package/dist/runtime-EYVN7NFJ.js +45 -0
- package/dist/runtime-F6RPWQVW.js +45 -0
- package/dist/runtime-FYMJURFC.js +45 -0
- package/dist/runtime-JRNBL4O4.js +45 -0
- package/dist/runtime-OM2NIBMI.js +45 -0
- package/dist/runtime-QWPVD7CY.js +45 -0
- package/dist/runtime-YLIIPTE4.js +45 -0
- package/dist/runtime-YU6P22CG.js +45 -0
- package/dist/screen-unlock-4RPZBHOI.js +118 -0
- package/dist/server-AMCSXINC.js +28 -0
- package/dist/server-CU6LVQS4.js +28 -0
- package/dist/server-DFYGH2CV.js +28 -0
- package/dist/server-EELWOC3X.js +28 -0
- package/dist/server-EN5E2OWQ.js +28 -0
- package/dist/server-GW2HYJYI.js +28 -0
- package/dist/server-J25NCRWJ.js +28 -0
- package/dist/server-JDGNOTFV.js +28 -0
- package/dist/server-NE5HD5DJ.js +28 -0
- package/dist/server-NQOT7W77.js +28 -0
- package/dist/server-PWE5PQTR.js +28 -0
- package/dist/server-Q2Q32H2B.js +28 -0
- package/dist/server-Q77ME7TL.js +28 -0
- package/dist/server-WLLH4WST.js +28 -0
- package/dist/server-WTUJ2O3F.js +28 -0
- package/dist/server-X4CJTHHF.js +28 -0
- package/dist/server-XK3ILCJC.js +28 -0
- package/dist/server-ZRD3NDJE.js +28 -0
- package/dist/setup-44VBAO4J.js +20 -0
- package/dist/setup-4ONNQBWB.js +20 -0
- package/dist/setup-4OSBXSCL.js +20 -0
- package/dist/setup-4QFGRBLZ.js +20 -0
- package/dist/setup-6766SGAR.js +20 -0
- package/dist/setup-AYY24DKM.js +20 -0
- package/dist/setup-B34N4HPU.js +20 -0
- package/dist/setup-E2YLC2EY.js +20 -0
- package/dist/setup-ER6NXTY5.js +20 -0
- package/dist/setup-H2AGCBW5.js +20 -0
- package/dist/setup-ICOZRKCX.js +20 -0
- package/dist/setup-JFTJH7UF.js +20 -0
- package/dist/setup-PRFNI6YW.js +20 -0
- package/dist/setup-RAHBMYHE.js +20 -0
- package/dist/setup-TXPR5UQX.js +20 -0
- package/dist/setup-XCJMELVU.js +20 -0
- package/dist/setup-XIYEIFVK.js +20 -0
- package/dist/setup-Z4PZSHBI.js +20 -0
- package/dist/skills-FR7I5V7H.js +16 -0
- package/dist/skills-HCVBA6PK.js +16 -0
- package/dist/system-prompts-TM7OA32C.js +913 -0
- package/dist/task-queue-O7IVZYUO.js +9 -0
- package/dist/transport-encryption-2T7PIXKG.js +25 -0
- package/logs/cloudflared-error.log +61 -0
- package/logs/cloudflared-out.log +0 -0
- package/logs/enterprise-error.log +0 -0
- package/logs/enterprise-out.log +3 -0
- package/logs/fola-error.log +0 -0
- package/logs/fola-out.log +0 -0
- package/logs/john-error.log +8 -0
- package/logs/john-out.log +0 -0
- package/package.json +31 -3
- package/src/agent-tools/tool-resolver.ts +50 -61
- package/src/agent-tools/tools/enterprise-database.ts +5 -5
- package/src/agent-tools/tools/local/dependency-manager.ts +2 -2
- package/src/agent-tools/tools/microsoft/graph-api.ts +137 -26
- package/src/agent-tools/tools/microsoft/outlook-mail.ts +392 -100
- package/src/agent-tools/tools/microsoft/teams.ts +267 -48
- package/src/auth/routes.ts +4 -4
- package/src/cli-agent.ts +108 -8
- package/src/cli-serve.ts +140 -0
- package/src/dashboard/app.js +9 -3
- package/src/dashboard/components/knowledge-link.js +15 -0
- package/src/dashboard/components/settings-help.js +4 -2
- package/src/dashboard/docs/agent-deployment.html +33 -1
- package/src/dashboard/docs/settings-network.html +321 -0
- package/src/dashboard/docs/settings-security.html +347 -0
- package/src/dashboard/docs/settings-tool-security.html +176 -0
- package/src/dashboard/docs/settings.html +36 -16
- package/src/dashboard/pages/agent-detail/deployment.js +39 -6
- package/src/dashboard/pages/agent-detail/tools.js +10 -0
- package/src/dashboard/pages/database-access.js +4 -3
- package/src/dashboard/pages/settings.js +174 -37
- package/src/dashboard/pages/task-pipeline.js +400 -843
- package/src/database-access/agent-tools.ts +78 -63
- package/src/database-access/connection-manager.ts +13 -2
- package/src/database-access/routes.ts +13 -1
- package/src/db/adapter.ts +1 -0
- package/src/engine/agent-memory.ts +2 -1
- package/src/engine/agent-notify.ts +50 -0
- package/src/engine/agent-routes.ts +257 -4
- package/src/engine/db-adapter.ts +16 -0
- package/src/engine/lifecycle.ts +4 -0
- package/src/engine/routes.ts +4 -3
- package/src/engine/screen-unlock.ts +136 -0
- package/src/engine/skills/database-access.ts +78 -0
- package/src/engine/skills/index.ts +3 -2
- package/src/engine/skills.ts +2 -0
- package/src/engine/task-queue-routes.ts +18 -0
- package/src/engine/task-queue.ts +15 -2
- package/src/middleware/transport-encryption.ts +1 -4
- package/src/runtime/agent-loop.ts +4 -0
- package/src/runtime/index.ts +15 -6
- package/src/server.ts +14 -1
- package/src/system-prompts/google/index.ts +1 -2
- package/src/system-prompts/index.ts +1 -1
- package/src/system-prompts/microsoft/contacts.ts +34 -0
- package/src/system-prompts/microsoft/excel.ts +52 -0
- package/src/system-prompts/microsoft/index.ts +31 -0
- package/src/system-prompts/microsoft/onedrive.ts +41 -0
- package/src/system-prompts/microsoft/onenote.ts +36 -0
- package/src/system-prompts/microsoft/outlook-calendar.ts +37 -0
- package/src/system-prompts/microsoft/outlook-mail.ts +46 -0
- package/src/system-prompts/microsoft/planner.ts +37 -0
- package/src/system-prompts/microsoft/powerbi.ts +38 -0
- package/src/system-prompts/microsoft/powerpoint.ts +35 -0
- package/src/system-prompts/microsoft/sharepoint.ts +44 -0
- package/src/system-prompts/microsoft/teams.ts +49 -0
- package/src/system-prompts/microsoft/todo.ts +37 -0
- package/src/types/hono-env.ts +4 -0
- package/.github/CODEOWNERS +0 -23
- package/.github/workflows/publish-community-skills.yml +0 -121
- package/.github/workflows/validate-community-skills.yml +0 -172
- package/agriculture_southwest_nigeria_research.txt +0 -10
- package/boa_credit_cards_research.txt +0 -10
- package/customer_support_research_feb2026.txt +0 -10
- package/dist/agent-tools-LRA7PPXG.js +0 -13922
- package/dist/agent-tools-VAU5DOQB.js +0 -13910
- package/dist/agent-tools-VWV7OWXU.js +0 -13922
- package/dist/chunk-2Z7MWTCX.js +0 -4977
- package/dist/chunk-3T4XU3VV.js +0 -5010
- package/dist/chunk-445QM4NX.js +0 -5061
- package/dist/chunk-5TW3Y7DJ.js +0 -1519
- package/dist/chunk-6I7VY3LT.js +0 -5060
- package/dist/chunk-6W5EK3UP.js +0 -4977
- package/dist/chunk-AQMSHJQT.js +0 -5069
- package/dist/chunk-ASSQW7HX.js +0 -5051
- package/dist/chunk-CIN27FGC.js +0 -5037
- package/dist/chunk-CMXY3NUB.js +0 -4977
- package/dist/chunk-DRLMRUDP.js +0 -5052
- package/dist/chunk-EHI7Z446.js +0 -1519
- package/dist/chunk-FEAILFAQ.js +0 -1519
- package/dist/chunk-GA3PYBZL.js +0 -1519
- package/dist/chunk-GWX63G5J.js +0 -1519
- package/dist/chunk-HHMZ4UY6.js +0 -1519
- package/dist/chunk-HVQMNF7E.js +0 -4921
- package/dist/chunk-HXM7F3YN.js +0 -1519
- package/dist/chunk-K6NGOUXG.js +0 -5060
- package/dist/chunk-KPG5WINJ.js +0 -4977
- package/dist/chunk-LBCUBYDL.js +0 -1519
- package/dist/chunk-LIRQSWLR.js +0 -5014
- package/dist/chunk-LRCKO5KE.js +0 -1519
- package/dist/chunk-M7XL3DJD.js +0 -5069
- package/dist/chunk-MHJULEIQ.js +0 -1519
- package/dist/chunk-MJGGW6MC.js +0 -106
- package/dist/chunk-MMYBDHDB.js +0 -4921
- package/dist/chunk-MQT5FXKD.js +0 -1519
- package/dist/chunk-OIMPEQF5.js +0 -4977
- package/dist/chunk-OOU7JUYE.js +0 -542
- package/dist/chunk-OW4GLBHP.js +0 -1519
- package/dist/chunk-Q4K4MMLU.js +0 -4977
- package/dist/chunk-RUK4CRPF.js +0 -1519
- package/dist/chunk-T7H65XQY.js +0 -1519
- package/dist/chunk-TQVFWG57.js +0 -5064
- package/dist/chunk-UEPK3IMC.js +0 -1519
- package/dist/chunk-VUWTXJH6.js +0 -1519
- package/dist/chunk-WCPGGSAD.js +0 -1519
- package/dist/chunk-WO63NZOJ.js +0 -1519
- package/dist/chunk-YPJDRVUM.js +0 -5064
- package/dist/chunk-ZROMH5DL.js +0 -4921
- package/src/dashboard/docs/_template.txt +0 -92
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AGENTICMAIL_SKILL_DEFS,
|
|
3
|
+
ENTERPRISE_SKILL_DEFS,
|
|
4
|
+
Emoji,
|
|
5
|
+
GWS_SKILL_DEFS,
|
|
6
|
+
M365_SKILL_DEFS,
|
|
7
|
+
SYSTEM_SKILL_DEFS,
|
|
8
|
+
init_emoji,
|
|
9
|
+
init_skills,
|
|
10
|
+
init_tool_catalog,
|
|
11
|
+
tool_catalog_exports
|
|
12
|
+
} from "./chunk-ZGYVXYQQ.js";
|
|
13
|
+
import {
|
|
14
|
+
__esm,
|
|
15
|
+
__toCommonJS
|
|
16
|
+
} from "./chunk-KFQGP6VL.js";
|
|
17
|
+
|
|
18
|
+
// src/engine/skills.ts
|
|
19
|
+
var SKILL_SUITES, PRESET_PROFILES, BUILTIN_SKILLS, PermissionEngine;
|
|
20
|
+
var init_skills2 = __esm({
|
|
21
|
+
"src/engine/skills.ts"() {
|
|
22
|
+
init_emoji();
|
|
23
|
+
init_skills();
|
|
24
|
+
SKILL_SUITES = [
|
|
25
|
+
{
|
|
26
|
+
id: "microsoft-365",
|
|
27
|
+
name: "Microsoft 365",
|
|
28
|
+
description: "Complete Microsoft 365 suite \u2014 Outlook, Teams, SharePoint, OneDrive, Word, Excel, PowerPoint, OneNote, Planner, Power BI, Power Automate, Forms, To Do, Bookings, Whiteboard, Admin Center, Copilot.",
|
|
29
|
+
icon: Emoji.building,
|
|
30
|
+
skills: [
|
|
31
|
+
"m365-outlook",
|
|
32
|
+
"m365-teams",
|
|
33
|
+
"m365-sharepoint",
|
|
34
|
+
"m365-onedrive",
|
|
35
|
+
"m365-word",
|
|
36
|
+
"m365-excel",
|
|
37
|
+
"m365-powerpoint",
|
|
38
|
+
"m365-onenote",
|
|
39
|
+
"m365-planner",
|
|
40
|
+
"m365-power-bi",
|
|
41
|
+
"m365-power-automate",
|
|
42
|
+
"m365-forms",
|
|
43
|
+
"m365-todo",
|
|
44
|
+
"m365-bookings",
|
|
45
|
+
"m365-whiteboard",
|
|
46
|
+
"m365-admin",
|
|
47
|
+
"m365-copilot"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "google-workspace",
|
|
52
|
+
name: "Google Workspace",
|
|
53
|
+
description: "Complete Google Workspace suite \u2014 Gmail, Calendar, Drive, Docs, Sheets, Slides, Meet, Chat, Forms, Sites, Keep, Admin Console, Vault, Groups.",
|
|
54
|
+
icon: Emoji.blueCircle,
|
|
55
|
+
skills: [
|
|
56
|
+
"gws-gmail",
|
|
57
|
+
"gws-calendar",
|
|
58
|
+
"gws-drive",
|
|
59
|
+
"gws-docs",
|
|
60
|
+
"gws-sheets",
|
|
61
|
+
"gws-slides",
|
|
62
|
+
"gws-meet",
|
|
63
|
+
"gws-chat",
|
|
64
|
+
"gws-forms",
|
|
65
|
+
"gws-sites",
|
|
66
|
+
"gws-keep",
|
|
67
|
+
"gws-admin",
|
|
68
|
+
"gws-vault",
|
|
69
|
+
"gws-groups"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "atlassian",
|
|
74
|
+
name: "Atlassian Suite",
|
|
75
|
+
description: "Jira, Confluence, Bitbucket, Trello, Statuspage, and Opsgenie.",
|
|
76
|
+
icon: Emoji.blueDiamond,
|
|
77
|
+
skills: ["jira", "confluence", "bitbucket", "trello", "statuspage", "opsgenie"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "aws",
|
|
81
|
+
name: "Amazon Web Services",
|
|
82
|
+
description: "AWS cloud infrastructure \u2014 S3, EC2, Lambda, RDS, CloudWatch, IAM, SES, SNS, SQS, DynamoDB, CloudFormation.",
|
|
83
|
+
icon: Emoji.cloud,
|
|
84
|
+
skills: ["aws-s3", "aws-ec2", "aws-lambda", "aws-rds", "aws-cloudwatch", "aws-iam", "aws-ses", "aws-sns", "aws-sqs", "aws-dynamodb", "aws-cloudformation"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "azure",
|
|
88
|
+
name: "Microsoft Azure",
|
|
89
|
+
description: "Azure cloud infrastructure \u2014 VMs, App Service, Functions, Storage, SQL, CosmosDB, DevOps, Active Directory.",
|
|
90
|
+
icon: Emoji.partlyCloudy,
|
|
91
|
+
skills: ["azure-vms", "azure-app-service", "azure-functions", "azure-storage", "azure-sql", "azure-cosmosdb", "azure-devops", "azure-ad"]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "gcp",
|
|
95
|
+
name: "Google Cloud Platform",
|
|
96
|
+
description: "GCP cloud infrastructure \u2014 Compute Engine, Cloud Functions, Cloud Storage, BigQuery, Cloud Run, Pub/Sub, Firestore.",
|
|
97
|
+
icon: Emoji.sunCloud,
|
|
98
|
+
skills: ["gcp-compute", "gcp-functions", "gcp-storage", "gcp-bigquery", "gcp-run", "gcp-pubsub", "gcp-firestore"]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "salesforce-suite",
|
|
102
|
+
name: "Salesforce Suite",
|
|
103
|
+
description: "Salesforce CRM, Service Cloud, Marketing Cloud, and Commerce Cloud.",
|
|
104
|
+
icon: Emoji.cloud,
|
|
105
|
+
skills: ["salesforce", "salesforce-service", "salesforce-marketing", "salesforce-commerce"]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "hubspot-suite",
|
|
109
|
+
name: "HubSpot Suite",
|
|
110
|
+
description: "HubSpot CRM, Marketing Hub, Sales Hub, Service Hub, and CMS.",
|
|
111
|
+
icon: Emoji.orangeCircle,
|
|
112
|
+
skills: ["hubspot-crm", "hubspot-marketing", "hubspot-sales", "hubspot-service"]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "adobe-creative",
|
|
116
|
+
name: "Adobe Creative Cloud",
|
|
117
|
+
description: "Adobe Photoshop, Illustrator, Premiere Pro, After Effects, InDesign, and XD.",
|
|
118
|
+
icon: Emoji.art,
|
|
119
|
+
skills: ["adobe-photoshop", "adobe-illustrator", "adobe-premiere", "adobe-after-effects", "adobe-indesign", "adobe-xd"]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "enterprise-utility",
|
|
123
|
+
name: "Enterprise Utility Tools",
|
|
124
|
+
description: "Built-in enterprise productivity tools \u2014 database queries, spreadsheets, documents, calendar, knowledge search, web research, translation, logs, workflow, notifications, finance, HTTP, security scanning, code sandbox, diff, and vision.",
|
|
125
|
+
icon: Emoji.construction,
|
|
126
|
+
skills: [
|
|
127
|
+
"enterprise-database",
|
|
128
|
+
"enterprise-spreadsheet",
|
|
129
|
+
"enterprise-documents",
|
|
130
|
+
"enterprise-http",
|
|
131
|
+
"enterprise-security-scan",
|
|
132
|
+
"enterprise-code-sandbox",
|
|
133
|
+
"enterprise-diff"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
];
|
|
137
|
+
PRESET_PROFILES = [
|
|
138
|
+
{
|
|
139
|
+
name: "Research Assistant",
|
|
140
|
+
description: "Can search the web, read files, and summarize content. Cannot send messages, run code, or modify anything.",
|
|
141
|
+
skills: { mode: "allowlist", list: ["research", "summarize", "data-read"] },
|
|
142
|
+
tools: { blocked: ["exec", "write", "edit"], allowed: ["web_search", "web_fetch", "read", "memory_search", "memory_get"] },
|
|
143
|
+
maxRiskLevel: "low",
|
|
144
|
+
blockedSideEffects: ["sends-email", "sends-message", "sends-sms", "posts-social", "runs-code", "modifies-files", "deletes-data", "controls-device", "financial"],
|
|
145
|
+
requireApproval: { enabled: false, forRiskLevels: [], forSideEffects: [], approvers: [], timeoutMinutes: 30 },
|
|
146
|
+
rateLimits: { toolCallsPerMinute: 30, toolCallsPerHour: 500, toolCallsPerDay: 5e3, externalActionsPerHour: 0 },
|
|
147
|
+
constraints: { maxConcurrentTasks: 3, maxSessionDurationMinutes: 480, sandboxMode: false },
|
|
148
|
+
dependencyPolicy: { mode: "deny", allowGlobalInstalls: false, allowElevated: false, allowedManagers: [], blockedPackages: [], autoCleanup: true }
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "Customer Support Agent",
|
|
152
|
+
description: "Can read/send emails, search knowledge base, and manage tickets. Cannot run code or access files.",
|
|
153
|
+
skills: { mode: "allowlist", list: ["communication", "research", "agenticmail", "m365-outlook", "m365-teams", "gws-gmail", "gws-calendar", "zendesk", "intercom"] },
|
|
154
|
+
tools: { blocked: ["exec", "browser", "write", "edit"], allowed: ["agenticmail_send", "agenticmail_reply", "agenticmail_inbox", "agenticmail_read", "agenticmail_search", "web_search", "web_fetch"] },
|
|
155
|
+
maxRiskLevel: "medium",
|
|
156
|
+
blockedSideEffects: ["runs-code", "modifies-files", "deletes-data", "controls-device", "financial", "posts-social"],
|
|
157
|
+
requireApproval: { enabled: true, forRiskLevels: ["high", "critical"], forSideEffects: ["sends-email"], approvers: [], timeoutMinutes: 60 },
|
|
158
|
+
rateLimits: { toolCallsPerMinute: 20, toolCallsPerHour: 300, toolCallsPerDay: 3e3, externalActionsPerHour: 50 },
|
|
159
|
+
constraints: { maxConcurrentTasks: 5, maxSessionDurationMinutes: 480, sandboxMode: false },
|
|
160
|
+
dependencyPolicy: { mode: "deny", allowGlobalInstalls: false, allowElevated: false, allowedManagers: [], blockedPackages: [], autoCleanup: true }
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "Developer Assistant",
|
|
164
|
+
description: "Full development capabilities: code, git, GitHub, shell. Cannot send external messages or access smart home.",
|
|
165
|
+
skills: { mode: "allowlist", list: ["development", "github", "coding-agent", "research", "data", "docker", "github-actions", "jira", "linear", "slack"] },
|
|
166
|
+
tools: { blocked: ["agenticmail_send", "message", "tts", "nodes"], allowed: ["exec", "read", "write", "edit", "web_search", "web_fetch", "browser"] },
|
|
167
|
+
maxRiskLevel: "high",
|
|
168
|
+
blockedSideEffects: ["sends-email", "sends-message", "sends-sms", "posts-social", "controls-device", "financial"],
|
|
169
|
+
requireApproval: { enabled: true, forRiskLevels: ["critical"], forSideEffects: [], approvers: [], timeoutMinutes: 15 },
|
|
170
|
+
rateLimits: { toolCallsPerMinute: 60, toolCallsPerHour: 1e3, toolCallsPerDay: 1e4, externalActionsPerHour: 100 },
|
|
171
|
+
constraints: { maxConcurrentTasks: 3, maxSessionDurationMinutes: 720, sandboxMode: false },
|
|
172
|
+
dependencyPolicy: { mode: "auto", allowGlobalInstalls: true, allowElevated: false, allowedManagers: ["brew", "apt", "npm", "pip", "choco", "winget"], blockedPackages: [], autoCleanup: false }
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "Full Access (Owner)",
|
|
176
|
+
description: "Unrestricted access to all skills and tools. Full system access including sudo, global installs, and all package managers.",
|
|
177
|
+
skills: { mode: "blocklist", list: [] },
|
|
178
|
+
tools: { blocked: [], allowed: [] },
|
|
179
|
+
maxRiskLevel: "critical",
|
|
180
|
+
blockedSideEffects: [],
|
|
181
|
+
requireApproval: { enabled: false, forRiskLevels: [], forSideEffects: [], approvers: [], timeoutMinutes: 30 },
|
|
182
|
+
rateLimits: { toolCallsPerMinute: 120, toolCallsPerHour: 5e3, toolCallsPerDay: 5e4, externalActionsPerHour: 500 },
|
|
183
|
+
constraints: { maxConcurrentTasks: 10, maxSessionDurationMinutes: 1440, sandboxMode: false },
|
|
184
|
+
dependencyPolicy: { mode: "auto", allowGlobalInstalls: true, allowElevated: true, allowedManagers: ["brew", "apt", "npm", "pip", "choco", "winget", "pacman", "dnf", "snap", "scoop"], blockedPackages: [], autoCleanup: false }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "Sandbox (Testing)",
|
|
188
|
+
description: "All tools available but in simulation mode. No real external actions are taken.",
|
|
189
|
+
skills: { mode: "blocklist", list: [] },
|
|
190
|
+
tools: { blocked: [], allowed: [] },
|
|
191
|
+
maxRiskLevel: "critical",
|
|
192
|
+
blockedSideEffects: [],
|
|
193
|
+
requireApproval: { enabled: false, forRiskLevels: [], forSideEffects: [], approvers: [], timeoutMinutes: 30 },
|
|
194
|
+
rateLimits: { toolCallsPerMinute: 60, toolCallsPerHour: 1e3, toolCallsPerDay: 1e4, externalActionsPerHour: 500 },
|
|
195
|
+
constraints: { maxConcurrentTasks: 5, maxSessionDurationMinutes: 480, sandboxMode: true },
|
|
196
|
+
dependencyPolicy: { mode: "auto", allowGlobalInstalls: false, allowElevated: false, allowedManagers: ["npm", "pip"], blockedPackages: [], autoCleanup: true }
|
|
197
|
+
}
|
|
198
|
+
];
|
|
199
|
+
BUILTIN_SKILLS = [
|
|
200
|
+
// ═══ AgenticMail — Core Product (always available) ═══
|
|
201
|
+
...AGENTICMAIL_SKILL_DEFS,
|
|
202
|
+
// ═══ Microsoft 365 Suite ═══
|
|
203
|
+
...M365_SKILL_DEFS,
|
|
204
|
+
// ═══ Google Workspace Suite ═══
|
|
205
|
+
...GWS_SKILL_DEFS,
|
|
206
|
+
// ═══ Enterprise Utility Tools ═══
|
|
207
|
+
...ENTERPRISE_SKILL_DEFS,
|
|
208
|
+
// ═══ System / Core ═══
|
|
209
|
+
...SYSTEM_SKILL_DEFS
|
|
210
|
+
];
|
|
211
|
+
PermissionEngine = class {
|
|
212
|
+
skills = /* @__PURE__ */ new Map();
|
|
213
|
+
profiles = /* @__PURE__ */ new Map();
|
|
214
|
+
engineDb;
|
|
215
|
+
refreshTimer;
|
|
216
|
+
_onRefreshCallbacks = [];
|
|
217
|
+
constructor(skills) {
|
|
218
|
+
if (skills) {
|
|
219
|
+
for (const s of skills) this.skills.set(s.id, s);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Refresh all permission profiles from DB.
|
|
224
|
+
* Called periodically so dashboard changes take effect without agent restart.
|
|
225
|
+
*/
|
|
226
|
+
async refreshProfiles() {
|
|
227
|
+
if (!this.engineDb) return;
|
|
228
|
+
try {
|
|
229
|
+
const profiles = await this.engineDb.getAllPermissionProfiles();
|
|
230
|
+
for (const profile of profiles) {
|
|
231
|
+
if (profile && profile.id) {
|
|
232
|
+
this.profiles.set(profile.id, profile);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
for (const cb of this._onRefreshCallbacks) {
|
|
236
|
+
try {
|
|
237
|
+
cb(this.profiles);
|
|
238
|
+
} catch {
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
} catch {
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/** Register a callback to run after profiles refresh (e.g., sync dependency policy) */
|
|
245
|
+
onRefresh(callback) {
|
|
246
|
+
this._onRefreshCallbacks.push(callback);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Start periodic profile refresh (default: every 30s).
|
|
250
|
+
* Call after setDb() to keep profiles in sync with dashboard changes.
|
|
251
|
+
*/
|
|
252
|
+
startAutoRefresh(intervalMs = 3e4) {
|
|
253
|
+
if (this.refreshTimer) return;
|
|
254
|
+
this.refreshTimer = setInterval(() => {
|
|
255
|
+
this.refreshProfiles().catch(() => {
|
|
256
|
+
});
|
|
257
|
+
}, intervalMs);
|
|
258
|
+
if (this.refreshTimer?.unref) this.refreshTimer.unref();
|
|
259
|
+
}
|
|
260
|
+
stopAutoRefresh() {
|
|
261
|
+
if (this.refreshTimer) {
|
|
262
|
+
clearInterval(this.refreshTimer);
|
|
263
|
+
this.refreshTimer = void 0;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Set the database adapter and load existing profiles from DB
|
|
268
|
+
*/
|
|
269
|
+
async setDb(db) {
|
|
270
|
+
this.engineDb = db;
|
|
271
|
+
try {
|
|
272
|
+
const profiles = await db.getAllPermissionProfiles();
|
|
273
|
+
for (const profile of profiles) {
|
|
274
|
+
if (profile && profile.id) {
|
|
275
|
+
this.profiles.set(profile.id, profile);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (profiles.length > 0) console.log(`[permissions] Loaded ${profiles.length} permission profiles from DB`);
|
|
279
|
+
} catch {
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
registerSkill(skill) {
|
|
283
|
+
this.skills.set(skill.id, skill);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Register tools dynamically at runtime (e.g., MCP bridge tools loaded after init).
|
|
287
|
+
* Merges into an existing skill definition or creates a new one.
|
|
288
|
+
*/
|
|
289
|
+
registerDynamicTools(skillId, tools) {
|
|
290
|
+
const existing = this.skills.get(skillId);
|
|
291
|
+
if (existing) {
|
|
292
|
+
const existingIds = new Set(existing.tools.map((t) => t.id));
|
|
293
|
+
const newTools = tools.filter((t) => !existingIds.has(t.id));
|
|
294
|
+
existing.tools = [...existing.tools, ...newTools];
|
|
295
|
+
} else {
|
|
296
|
+
this.skills.set(skillId, {
|
|
297
|
+
id: skillId,
|
|
298
|
+
name: `Dynamic: ${skillId}`,
|
|
299
|
+
description: "Dynamically registered tools",
|
|
300
|
+
category: "integration",
|
|
301
|
+
risk: "medium",
|
|
302
|
+
tools,
|
|
303
|
+
source: "builtin"
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
setProfile(agentId, profile, orgId) {
|
|
308
|
+
this.profiles.set(agentId, profile);
|
|
309
|
+
if (this.engineDb && orgId) {
|
|
310
|
+
this.engineDb.upsertPermissionProfile(orgId, profile).catch((err) => {
|
|
311
|
+
console.error(`[permissions] Failed to persist profile for agent ${agentId}:`, err);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
import("./agent-notify-OEQBCZLN.js").then(({ notifyAgent }) => notifyAgent(agentId, "permissions")).catch(() => {
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
getProfile(agentId) {
|
|
318
|
+
return this.profiles.get(agentId);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Core permission check: Can this agent use this tool right now?
|
|
322
|
+
* Returns { allowed, reason, requiresApproval }
|
|
323
|
+
*/
|
|
324
|
+
checkPermission(agentId, toolId, context) {
|
|
325
|
+
const profile = this.profiles.get(agentId);
|
|
326
|
+
if (!profile) {
|
|
327
|
+
return { allowed: false, reason: "No permission profile assigned", requiresApproval: false };
|
|
328
|
+
}
|
|
329
|
+
if (profile.constraints.sandboxMode) {
|
|
330
|
+
return { allowed: true, reason: "Sandbox mode \u2014 action will be simulated", requiresApproval: false, sandbox: true };
|
|
331
|
+
}
|
|
332
|
+
if (profile.constraints.allowedWorkingHours) {
|
|
333
|
+
const now = context?.timestamp || /* @__PURE__ */ new Date();
|
|
334
|
+
const { start, end, timezone } = profile.constraints.allowedWorkingHours;
|
|
335
|
+
const hour = parseInt(new Intl.DateTimeFormat("en-US", { hour: "numeric", hour12: false, timeZone: timezone }).format(now));
|
|
336
|
+
const startHour = parseInt(start.split(":")[0]);
|
|
337
|
+
const endHour = parseInt(end.split(":")[0]);
|
|
338
|
+
if (hour < startHour || hour >= endHour) {
|
|
339
|
+
return { allowed: false, reason: `Outside working hours (${start}-${end} ${timezone})`, requiresApproval: false };
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
if (profile.constraints.allowedIPs?.length && context?.ip) {
|
|
343
|
+
if (!profile.constraints.allowedIPs.includes(context.ip)) {
|
|
344
|
+
return { allowed: false, reason: `IP ${context.ip} not in allowlist`, requiresApproval: false };
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
const blockedTools = profile.tools?.blocked || [];
|
|
348
|
+
const allowedTools = profile.tools?.allowed || [];
|
|
349
|
+
if (blockedTools.includes(toolId)) {
|
|
350
|
+
return { allowed: false, reason: `Tool "${toolId}" is explicitly blocked`, requiresApproval: false };
|
|
351
|
+
}
|
|
352
|
+
if (allowedTools.includes(toolId)) {
|
|
353
|
+
return this._checkApproval(profile, toolId);
|
|
354
|
+
}
|
|
355
|
+
const tool = this._findTool(toolId);
|
|
356
|
+
if (!tool) {
|
|
357
|
+
return { allowed: false, reason: `Unknown tool "${toolId}"`, requiresApproval: false };
|
|
358
|
+
}
|
|
359
|
+
const skillsMode = profile.skills?.mode || "blocklist";
|
|
360
|
+
const skillsList = profile.skills?.list || [];
|
|
361
|
+
const skillAllowed = skillsMode === "allowlist" ? skillsList.includes(tool.skillId || "") : !skillsList.includes(tool.skillId || "");
|
|
362
|
+
if (!skillAllowed) {
|
|
363
|
+
return { allowed: false, reason: `Skill "${tool.skillId}" is not permitted`, requiresApproval: false };
|
|
364
|
+
}
|
|
365
|
+
const riskOrder = ["low", "medium", "high", "critical"];
|
|
366
|
+
const toolRiskIdx = riskOrder.indexOf(tool.risk || "low");
|
|
367
|
+
const maxRiskIdx = riskOrder.indexOf(profile.maxRiskLevel);
|
|
368
|
+
if (toolRiskIdx > maxRiskIdx) {
|
|
369
|
+
return { allowed: false, reason: `Tool risk "${tool.risk}" exceeds max allowed "${profile.maxRiskLevel}"`, requiresApproval: false };
|
|
370
|
+
}
|
|
371
|
+
for (const effect of tool.sideEffects || []) {
|
|
372
|
+
if (profile.blockedSideEffects.includes(effect)) {
|
|
373
|
+
return { allowed: false, reason: `Side effect "${effect}" is blocked`, requiresApproval: false };
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return this._checkApproval(profile, toolId, tool);
|
|
377
|
+
}
|
|
378
|
+
_checkApproval(profile, toolId, tool) {
|
|
379
|
+
if (!profile.requireApproval.enabled) {
|
|
380
|
+
return { allowed: true, reason: "Permitted", requiresApproval: false };
|
|
381
|
+
}
|
|
382
|
+
if (tool) {
|
|
383
|
+
if (profile.requireApproval.forRiskLevels.includes(tool.risk || "low")) {
|
|
384
|
+
return { allowed: true, reason: "Requires human approval (risk level)", requiresApproval: true };
|
|
385
|
+
}
|
|
386
|
+
for (const effect of tool.sideEffects || []) {
|
|
387
|
+
if (profile.requireApproval.forSideEffects.includes(effect)) {
|
|
388
|
+
return { allowed: true, reason: `Requires human approval (${effect})`, requiresApproval: true };
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return { allowed: true, reason: "Permitted", requiresApproval: false };
|
|
393
|
+
}
|
|
394
|
+
_findTool(toolId) {
|
|
395
|
+
for (const skill of this.skills.values()) {
|
|
396
|
+
const tool = skill.tools.find((t) => t.id === toolId);
|
|
397
|
+
if (tool) return tool;
|
|
398
|
+
}
|
|
399
|
+
try {
|
|
400
|
+
const { TOOL_INDEX } = (init_tool_catalog(), __toCommonJS(tool_catalog_exports));
|
|
401
|
+
return TOOL_INDEX.get(toolId);
|
|
402
|
+
} catch {
|
|
403
|
+
return void 0;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Get the full resolved tool list for an agent — what they can actually use
|
|
408
|
+
*/
|
|
409
|
+
getAvailableTools(agentId) {
|
|
410
|
+
const result = [];
|
|
411
|
+
for (const skill of this.skills.values()) {
|
|
412
|
+
for (const tool of skill.tools) {
|
|
413
|
+
const perm = this.checkPermission(agentId, tool.id || tool.name);
|
|
414
|
+
if (perm.allowed) {
|
|
415
|
+
result.push({
|
|
416
|
+
tool,
|
|
417
|
+
status: perm.sandbox ? "sandbox" : perm.requiresApproval ? "approval-required" : "allowed"
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return result;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Generate the tool policy config for an agent based on their profile
|
|
426
|
+
*/
|
|
427
|
+
generateToolPolicy(agentId) {
|
|
428
|
+
const profile = this.profiles.get(agentId);
|
|
429
|
+
if (!profile) return { allowedTools: [], blockedTools: [], approvalRequired: [], rateLimits: { toolCallsPerMinute: 10, toolCallsPerHour: 100, toolCallsPerDay: 1e3, externalActionsPerHour: 10 } };
|
|
430
|
+
const allowed = [];
|
|
431
|
+
const blocked = [];
|
|
432
|
+
const approval = [];
|
|
433
|
+
for (const skill of this.skills.values()) {
|
|
434
|
+
for (const tool of skill.tools) {
|
|
435
|
+
const perm = this.checkPermission(agentId, tool.id || tool.name);
|
|
436
|
+
if (perm.allowed) {
|
|
437
|
+
allowed.push(tool.id || tool.name);
|
|
438
|
+
if (perm.requiresApproval) approval.push(tool.id || tool.name);
|
|
439
|
+
} else {
|
|
440
|
+
blocked.push(tool.id || tool.name);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
return { allowedTools: allowed, blockedTools: blocked, approvalRequired: approval, rateLimits: profile.rateLimits };
|
|
445
|
+
}
|
|
446
|
+
getAllSkills() {
|
|
447
|
+
return Array.from(this.skills.values());
|
|
448
|
+
}
|
|
449
|
+
getSkillsByCategory() {
|
|
450
|
+
const result = {};
|
|
451
|
+
for (const skill of this.skills.values()) {
|
|
452
|
+
if (!result[skill.category]) result[skill.category] = [];
|
|
453
|
+
result[skill.category].push(skill);
|
|
454
|
+
}
|
|
455
|
+
return result;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
export {
|
|
462
|
+
SKILL_SUITES,
|
|
463
|
+
PRESET_PROFILES,
|
|
464
|
+
BUILTIN_SKILLS,
|
|
465
|
+
PermissionEngine,
|
|
466
|
+
init_skills2 as init_skills
|
|
467
|
+
};
|
|
@@ -1046,7 +1046,7 @@ async function provision(config, ora, chalk) {
|
|
|
1046
1046
|
const engineDbInterface = db.getEngineDB();
|
|
1047
1047
|
if (engineDbInterface) {
|
|
1048
1048
|
spinner.start("Initializing engine...");
|
|
1049
|
-
const { EngineDatabase } = await import("./db-adapter-
|
|
1049
|
+
const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
|
|
1050
1050
|
const dialectMap = {
|
|
1051
1051
|
sqlite: "sqlite",
|
|
1052
1052
|
postgres: "postgres",
|
|
@@ -1188,7 +1188,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
|
|
|
1188
1188
|
const { deployTarget, company, database, domain, tunnel, cloud } = config;
|
|
1189
1189
|
if (deployTarget === "cloudflare-tunnel" && tunnel) {
|
|
1190
1190
|
spinner.start(`Starting local server on port ${tunnel.port}...`);
|
|
1191
|
-
const { createServer: createServer2 } = await import("./server-
|
|
1191
|
+
const { createServer: createServer2 } = await import("./server-WLLH4WST.js");
|
|
1192
1192
|
const server2 = createServer2({ port: tunnel.port, db, jwtSecret });
|
|
1193
1193
|
const handle2 = await server2.start();
|
|
1194
1194
|
spinner.succeed("Server running");
|
|
@@ -1341,7 +1341,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
|
|
|
1341
1341
|
return {};
|
|
1342
1342
|
}
|
|
1343
1343
|
spinner.start("Starting local server...");
|
|
1344
|
-
const { createServer } = await import("./server-
|
|
1344
|
+
const { createServer } = await import("./server-WLLH4WST.js");
|
|
1345
1345
|
const server = createServer({ port: 3e3, db, jwtSecret });
|
|
1346
1346
|
const handle = await server.start();
|
|
1347
1347
|
spinner.succeed("Server running");
|