@agenticmail/enterprise 0.5.324 → 0.5.326
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-77N4OOQL.js → agent-heartbeat-ZFKA6GMI.js} +2 -2
- package/dist/{agent-tools-BNSTIK4P.js → agent-tools-R6RSBDJQ.js} +25 -25
- package/dist/{agenticmail-EDO5XOTP.js → agenticmail-QMWQNUY2.js} +1 -1
- package/dist/{browser-tool-JF3LNRGX.js → browser-tool-4KWE37RL.js} +4 -4
- package/dist/{chunk-JEGYVXYC.js → chunk-CQV7GGHT.js} +1 -1
- package/dist/{chunk-CQYLRIQ3.js → chunk-DWHJYAV6.js} +143 -26
- package/dist/{chunk-HKCKMCPY.js → chunk-G4YSECQ4.js} +2 -2
- package/dist/{chunk-DM7FTF7W.js → chunk-GNABVGDZ.js} +31 -32
- package/dist/{chunk-DMD24UFZ.js → chunk-HTT6LUPP.js} +19 -19
- package/dist/{chunk-3FMK32KQ.js → chunk-LHQP7QRX.js} +9 -9
- package/dist/{chunk-6C5PKREN.js → chunk-NOAQG5CY.js} +1 -1
- package/dist/{chunk-4EKXYIJF.js → chunk-PAHT4ABL.js} +4 -4
- package/dist/{chunk-JNMDD7JY.js → chunk-RHO7WRVJ.js} +5 -5
- package/dist/{chunk-BQM7MBPS.js → chunk-WYDVMFGJ.js} +5 -5
- package/dist/{chunk-TPLVQFXM.js → chunk-X2YL6KSY.js} +13 -13
- package/dist/{cli-agent-USMKX7WN.js → cli-agent-2NBPF3GN.js} +11 -11
- package/dist/{cli-recover-XEZ2SKPU.js → cli-recover-TTOR7CJR.js} +2 -2
- package/dist/{cli-serve-BDGOOOKQ.js → cli-serve-5VFU4GR4.js} +3 -3
- package/dist/{cli-verify-CZIITRED.js → cli-verify-WICBVLAM.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/{connection-manager-KAWEUWUR.js → connection-manager-Y7CCQK4X.js} +1 -1
- package/dist/dashboard/docs/cluster.html +285 -0
- package/dist/dashboard/pages/cluster.js +400 -69
- package/dist/{deployer-3YK4RPUL.js → deployer-7NG7LCJW.js} +1 -1
- package/dist/{factory-JFWXTAWK.js → factory-4V2W4BSV.js} +1 -1
- package/dist/index.js +9 -9
- package/dist/{integrations-TF4EBCJ7.js → integrations-V2WXFDIV.js} +13 -13
- package/dist/{local-6MLIZDKO.js → local-OXFH4V7E.js} +2 -2
- package/dist/{meeting-voice-intelligence-CJLR52YV.js → meeting-voice-intelligence-RZZCAD6G.js} +2 -2
- package/dist/{meetings-FJ453ENF.js → meetings-SQNTB6GD.js} +1 -1
- package/dist/{microsoft-2IIHDLJB.js → microsoft-2PDVV6HX.js} +3 -3
- package/dist/{postgres-WGUVC2S7.js → postgres-USXBPTHX.js} +2 -2
- package/dist/{pw-ai-IBEF6HBF.js → pw-ai-NK5GKBDG.js} +1 -1
- package/dist/{routes-XYR2RNEC.js → routes-T3CDAQTD.js} +4 -4
- package/dist/{runtime-6BULDBR3.js → runtime-X4BTVICL.js} +1 -1
- package/dist/{server-7NT4LMSQ.js → server-WQ6LLYGB.js} +5 -5
- package/dist/{setup-2JBXMUDS.js → setup-6DRKSOMH.js} +2 -2
- package/dist/{skills-FR7I5V7H.js → skills-EL4RTJKK.js} +1 -1
- package/logs/cloudflared-error.log +14 -0
- package/logs/enterprise-out.log +2 -0
- package/package.json +1 -1
- package/src/admin/routes.ts +1 -1
- package/src/agent-tools/tool-resolver.ts +1 -1
- package/src/agent-tools/tools/agenticmail.ts +2 -2
- package/src/agent-tools/tools/browser.ts +1 -1
- package/src/agent-tools/tools/enterprise-code-sandbox.ts +1 -1
- package/src/agent-tools/tools/enterprise-diff.ts +1 -1
- package/src/agent-tools/tools/enterprise-http.ts +1 -3
- package/src/agent-tools/tools/enterprise-security-scan.ts +1 -1
- package/src/agent-tools/tools/google/forms.ts +2 -2
- package/src/agent-tools/tools/google/gmail.ts +1 -1
- package/src/agent-tools/tools/google/maps.ts +2 -2
- package/src/agent-tools/tools/google/meeting-voice.ts +1 -1
- package/src/agent-tools/tools/google/meetings.ts +1 -1
- package/src/agent-tools/tools/google/slides.ts +2 -2
- package/src/agent-tools/tools/grep.ts +1 -1
- package/src/agent-tools/tools/knowledge-search.ts +1 -1
- package/src/agent-tools/tools/local/coding.ts +5 -5
- package/src/agent-tools/tools/microsoft/excel-vba.ts +1 -1
- package/src/agent-tools/tools/microsoft/excel.ts +1 -1
- package/src/agent-tools/tools/microsoft/powerpoint.ts +1 -1
- package/src/agent-tools/tools/visual-memory/index.ts +11 -11
- package/src/agent-tools/tools/visual-memory/similarity.ts +2 -2
- package/src/agent-tools/tools/visual-memory/storage.ts +1 -1
- package/src/agenticmail/providers/imap.ts +2 -2
- package/src/browser/enterprise-compat.ts +1 -1
- package/src/cli-agent.ts +3 -3
- package/src/cli-serve.ts +1 -1
- package/src/dashboard/docs/cluster.html +285 -0
- package/src/dashboard/pages/cluster.js +400 -69
- package/src/database-access/connection-manager.ts +6 -6
- package/src/database-access/routes.ts +0 -1
- package/src/db/dynamodb.ts +1 -1
- package/src/db/postgres.ts +2 -2
- package/src/deploy/fly.ts +4 -4
- package/src/deploy/managed.ts +0 -1
- package/src/engine/agent-config.ts +1 -1
- package/src/engine/agent-heartbeat.ts +1 -1
- package/src/engine/agent-hierarchy.ts +1 -1
- package/src/engine/agent-memory.ts +1 -1
- package/src/engine/agent-routes.ts +2 -2
- package/src/engine/chat-poller.ts +1 -1
- package/src/engine/cluster.ts +14 -1
- package/src/engine/community-registry.ts +2 -2
- package/src/engine/db-adapter.ts +0 -1
- package/src/engine/deployer.ts +8 -8
- package/src/engine/email-poller.ts +1 -1
- package/src/engine/knowledge-contribution.ts +1 -1
- package/src/engine/knowledge-import/import-manager.ts +2 -3
- package/src/engine/knowledge-import/processors/extract-github.ts +1 -1
- package/src/engine/knowledge-import/processors/extract-sharepoint.ts +1 -1
- package/src/engine/knowledge-import/processors/validate.ts +1 -1
- package/src/engine/lifecycle.ts +1 -1
- package/src/engine/meeting-monitor.ts +2 -2
- package/src/engine/meeting-voice-intelligence.ts +3 -3
- package/src/engine/messaging-poller.ts +2 -2
- package/src/engine/org-integration-routes.ts +2 -2
- package/src/engine/org-integrations.ts +1 -1
- package/src/engine/routes.ts +119 -1
- package/src/engine/skills.ts +1 -1
- package/src/engine/tool-catalog.ts +1 -1
- package/src/engine/vault-routes.ts +1 -1
- package/src/engine/vault.ts +1 -1
- package/src/mcp/adapters/adp.adapter.ts +1 -1
- package/src/mcp/adapters/auth0.adapter.ts +1 -1
- package/src/mcp/adapters/clickup.adapter.ts +1 -1
- package/src/mcp/adapters/close.adapter.ts +1 -1
- package/src/mcp/adapters/firebase.adapter.ts +1 -1
- package/src/mcp/adapters/google-ads.adapter.ts +1 -1
- package/src/mcp/adapters/kubernetes.adapter.ts +1 -1
- package/src/mcp/adapters/mixpanel.adapter.ts +1 -1
- package/src/mcp/adapters/recurly.adapter.ts +1 -1
- package/src/mcp/adapters/sap.adapter.ts +2 -2
- package/src/mcp/adapters/shortcut.adapter.ts +1 -1
- package/src/mcp/adapters/snowflake.adapter.ts +1 -1
- package/src/mcp/adapters/stripe.adapter.ts +1 -1
- package/src/mcp/adapters/supabase.adapter.ts +1 -1
- package/src/mcp/adapters/zuora.adapter.ts +1 -1
- package/src/middleware/request-limits.ts +1 -1
- package/src/runtime/agent-loop.ts +3 -3
- package/src/runtime/compaction.ts +2 -2
- package/src/runtime/followup.ts +1 -1
- package/src/runtime/hooks.ts +3 -3
- package/src/runtime/index.ts +5 -6
- package/src/runtime/llm-client.ts +1 -1
- package/src/runtime/subagent.ts +0 -1
- package/src/runtime/types.ts +2 -0
- package/src/security/brute-force.ts +1 -1
- package/src/security/csp.ts +1 -1
- package/src/security/index.ts +3 -3
- package/src/security/input-sanitizer.ts +1 -1
- package/src/security/threat-logger.ts +2 -2
- package/src/server.ts +2 -2
- package/src/setup/database.ts +1 -1
- package/src/setup/index.ts +1 -2
- package/src/setup/provision.ts +1 -1
- package/dist/_seed-data-FQR5PY2W.js +0 -4554
- package/dist/agent-heartbeat-3FWNHZFX.js +0 -510
- package/dist/agent-heartbeat-4RWHZR7H.js +0 -510
- package/dist/agent-heartbeat-6ZGB5ILY.js +0 -510
- package/dist/agent-heartbeat-BBINFNL4.js +0 -510
- package/dist/agent-heartbeat-BIVHLKFM.js +0 -510
- package/dist/agent-heartbeat-HGVIAHS5.js +0 -510
- package/dist/agent-heartbeat-HRKVFK2T.js +0 -510
- package/dist/agent-heartbeat-JC5GWVXD.js +0 -510
- package/dist/agent-heartbeat-K6A4HMHB.js +0 -510
- package/dist/agent-heartbeat-LCDXWFVB.js +0 -510
- package/dist/agent-heartbeat-P7HZCZAQ.js +0 -510
- package/dist/agent-heartbeat-PUIRSNIO.js +0 -510
- package/dist/agent-heartbeat-SN5ILQ6Y.js +0 -510
- package/dist/agent-heartbeat-TW5YTDYC.js +0 -510
- package/dist/agent-heartbeat-YCSWP54H.js +0 -510
- package/dist/agent-heartbeat-Z2QQXROL.js +0 -510
- package/dist/agent-tools-3W7XLUYA.js +0 -13949
- package/dist/agent-tools-54VZGT6L.js +0 -9
- package/dist/agent-tools-AYYDPO27.js +0 -13949
- package/dist/agent-tools-F2X47FKF.js +0 -13949
- package/dist/agent-tools-O6W3QAZL.js +0 -13949
- package/dist/agent-tools-OAWVZBMW.js +0 -9
- package/dist/agent-tools-QCCU74PN.js +0 -13949
- package/dist/agent-tools-QGE26U6R.js +0 -9
- package/dist/chunk-2LHUARN6.js +0 -4929
- package/dist/chunk-2WVCNCYC.js +0 -5087
- package/dist/chunk-3FM6YQUK.js +0 -5087
- package/dist/chunk-46GOWZT4.js +0 -5087
- package/dist/chunk-5KYJAUZV.js +0 -1519
- package/dist/chunk-6ZMLNEHB.js +0 -1519
- package/dist/chunk-7HBGXW7Z.js +0 -4929
- package/dist/chunk-7UCKD25B.js +0 -551
- package/dist/chunk-BDCFOP7O.js +0 -537
- package/dist/chunk-BPZQT5N5.js +0 -25652
- package/dist/chunk-C52OQNNY.js +0 -5087
- package/dist/chunk-C7HGQF4Y.js +0 -25652
- package/dist/chunk-CAHNZGGK.js +0 -25656
- package/dist/chunk-CK7R6UHE.js +0 -4945
- package/dist/chunk-D36RPWB7.js +0 -25652
- package/dist/chunk-DJK2UPFH.js +0 -4891
- package/dist/chunk-DXZGPUAF.js +0 -5087
- package/dist/chunk-F46WB5IL.js +0 -5087
- package/dist/chunk-F5QG5SQH.js +0 -5087
- package/dist/chunk-GYB2WHMN.js +0 -5101
- package/dist/chunk-H7GP733U.js +0 -5087
- package/dist/chunk-HHBXWB5U.js +0 -25640
- package/dist/chunk-HS5YWSGM.js +0 -3206
- package/dist/chunk-IMXS4N6W.js +0 -1519
- package/dist/chunk-JTV5LA47.js +0 -1519
- package/dist/chunk-KN3T3CTD.js +0 -4929
- package/dist/chunk-KV6G7NZX.js +0 -1519
- package/dist/chunk-M6ZIC5H3.js +0 -1370
- package/dist/chunk-MU5MEBIK.js +0 -1519
- package/dist/chunk-NLT5MC7X.js +0 -465
- package/dist/chunk-NVLYIM4J.js +0 -4945
- package/dist/chunk-NZY2BIZH.js +0 -4891
- package/dist/chunk-O42L6G67.js +0 -1519
- package/dist/chunk-OCNERGGM.js +0 -4891
- package/dist/chunk-OJSNHONE.js +0 -1519
- package/dist/chunk-OWTLNV4Q.js +0 -25623
- package/dist/chunk-PCNYEP6T.js +0 -4891
- package/dist/chunk-PI4AQ4Z6.js +0 -25652
- package/dist/chunk-PN3EGTCA.js +0 -194
- package/dist/chunk-PWWV2U5P.js +0 -195
- package/dist/chunk-Q37UKNRC.js +0 -1519
- package/dist/chunk-QXTC6J7H.js +0 -5087
- package/dist/chunk-RF2LGX3E.js +0 -1519
- package/dist/chunk-RH7KPWRQ.js +0 -465
- package/dist/chunk-RKERL5LZ.js +0 -4925
- package/dist/chunk-RVBK2IOX.js +0 -25652
- package/dist/chunk-SAKODCZ5.js +0 -4891
- package/dist/chunk-SALGFC5L.js +0 -4945
- package/dist/chunk-STGWZ2MS.js +0 -1519
- package/dist/chunk-SVSLIQYN.js +0 -1519
- package/dist/chunk-UY3ZVQDP.js +0 -25652
- package/dist/chunk-V6OSD62M.js +0 -5087
- package/dist/chunk-VP6YAHX4.js +0 -1519
- package/dist/chunk-WDYJOEAI.js +0 -5087
- package/dist/chunk-WEAFQNOS.js +0 -195
- package/dist/chunk-XKUSAZGP.js +0 -5087
- package/dist/chunk-YCWOCIPH.js +0 -5101
- package/dist/chunk-ZGE3XAXY.js +0 -1519
- package/dist/cli-agent-33GWIF2D.js +0 -2300
- package/dist/cli-agent-4XK6LVQQ.js +0 -2357
- package/dist/cli-agent-64EOV3ST.js +0 -2300
- package/dist/cli-agent-67WP6KKO.js +0 -2300
- package/dist/cli-agent-7RW5Y7C4.js +0 -2294
- package/dist/cli-agent-7TB2BWS6.js +0 -2370
- package/dist/cli-agent-AKXFFST2.js +0 -2370
- package/dist/cli-agent-C3YSECO4.js +0 -2344
- package/dist/cli-agent-DZTKLITB.js +0 -2357
- package/dist/cli-agent-FNMDJN7T.js +0 -2357
- package/dist/cli-agent-FOF7PFEP.js +0 -2357
- package/dist/cli-agent-FXZ6DJKP.js +0 -2357
- package/dist/cli-agent-H74M2ZYN.js +0 -2357
- package/dist/cli-agent-HG4Y657I.js +0 -2300
- package/dist/cli-agent-HORWVPHB.js +0 -2370
- package/dist/cli-agent-HSZT6SKF.js +0 -2423
- package/dist/cli-agent-ION2W5JF.js +0 -2441
- package/dist/cli-agent-JLUQ4ZU6.js +0 -2424
- package/dist/cli-agent-KBPWY3CB.js +0 -2302
- package/dist/cli-agent-MVCDH4HV.js +0 -2370
- package/dist/cli-agent-NZXOEPJ2.js +0 -2357
- package/dist/cli-agent-OO6H57UQ.js +0 -2300
- package/dist/cli-agent-PADN3QRC.js +0 -2357
- package/dist/cli-agent-QAYEX3BE.js +0 -2441
- package/dist/cli-agent-QT64DT5J.js +0 -2370
- package/dist/cli-agent-TCTRKCHN.js +0 -2300
- package/dist/cli-agent-TFL2M6UK.js +0 -2424
- package/dist/cli-agent-TSOJG7EX.js +0 -2357
- package/dist/cli-agent-UIKXATTD.js +0 -2357
- package/dist/cli-agent-UJN6FYTO.js +0 -2370
- package/dist/cli-agent-VIQAYVY4.js +0 -2357
- package/dist/cli-agent-WNWFVOFM.js +0 -2370
- package/dist/cli-agent-XBQX67VJ.js +0 -2423
- package/dist/cli-agent-ZLSC6FF4.js +0 -2357
- package/dist/cli-agent-ZSHUPBBN.js +0 -2357
- package/dist/cli-recover-T32NABFA.js +0 -487
- package/dist/cli-serve-2IL5DTEY.js +0 -153
- package/dist/cli-serve-3NGBX5ER.js +0 -140
- package/dist/cli-serve-47N5UKKW.js +0 -153
- package/dist/cli-serve-4RS4UDHC.js +0 -140
- package/dist/cli-serve-4XGZFUV2.js +0 -140
- package/dist/cli-serve-53FVANQK.js +0 -260
- package/dist/cli-serve-57225XWV.js +0 -140
- package/dist/cli-serve-63BDPSOP.js +0 -140
- package/dist/cli-serve-657NRUOX.js +0 -140
- package/dist/cli-serve-6ER7QMLR.js +0 -140
- package/dist/cli-serve-6OT3UEAN.js +0 -140
- package/dist/cli-serve-7JQ4FVUQ.js +0 -260
- package/dist/cli-serve-7L6EY5UH.js +0 -153
- package/dist/cli-serve-BFNIW2LF.js +0 -153
- package/dist/cli-serve-C7MN6U5Q.js +0 -153
- package/dist/cli-serve-CQFI3LMK.js +0 -140
- package/dist/cli-serve-CR3OY3IM.js +0 -153
- package/dist/cli-serve-DAJFRWQ7.js +0 -153
- package/dist/cli-serve-DTQLN5UI.js +0 -140
- package/dist/cli-serve-EQS2SGT3.js +0 -140
- package/dist/cli-serve-FW6FHFW4.js +0 -153
- package/dist/cli-serve-GEEOQS77.js +0 -153
- package/dist/cli-serve-H562I3ZK.js +0 -153
- package/dist/cli-serve-HDQZF4C4.js +0 -153
- package/dist/cli-serve-KBJNXWYJ.js +0 -140
- package/dist/cli-serve-LICAOMEB.js +0 -140
- package/dist/cli-serve-LLGYLWFS.js +0 -153
- package/dist/cli-serve-LMZKQ5GX.js +0 -140
- package/dist/cli-serve-LNTT73P2.js +0 -140
- package/dist/cli-serve-MQKBUZ7X.js +0 -140
- package/dist/cli-serve-N3OISDNB.js +0 -153
- package/dist/cli-serve-NBFT7B42.js +0 -140
- package/dist/cli-serve-RTWO3AWY.js +0 -140
- package/dist/cli-serve-SIHTSW5P.js +0 -140
- package/dist/cli-serve-SP6TEURE.js +0 -140
- package/dist/cli-serve-TDKZA6I5.js +0 -140
- package/dist/cli-serve-TF5ZVVXF.js +0 -140
- package/dist/cli-serve-TIZ27EVR.js +0 -153
- package/dist/cli-serve-TUNI2RCN.js +0 -153
- package/dist/cli-serve-WCU66CHX.js +0 -140
- package/dist/cli-serve-WNOZMAWD.js +0 -153
- package/dist/cli-serve-YCCKRRUY.js +0 -140
- package/dist/cli-serve-ZD5V7I6G.js +0 -140
- package/dist/cli-validate-6XDDLVVQ.js +0 -150
- package/dist/cli-verify-I4WGRQNT.js +0 -149
- package/dist/connection-manager-4ZA4XAFA.js +0 -9
- package/dist/db-adapter-IK2EDK2N.js +0 -7
- package/dist/db-adapter-IRHOUMVC.js +0 -7
- package/dist/dependency-manager-G6D2XXNY.js +0 -11
- package/dist/dependency-manager-OCUKF72T.js +0 -543
- package/dist/dependency-manager-YULUXN34.js +0 -511
- package/dist/factory-MQASIPEB.js +0 -11
- package/dist/google-W5AYGNUJ.js +0 -33
- package/dist/integrations-VWANOHQ4.js +0 -43830
- package/dist/local-O2FN57UN.js +0 -1128
- package/dist/local-S7SDOQHN.js +0 -1128
- package/dist/microsoft-HPLA5ZL5.js +0 -2414
- package/dist/microsoft-UFLZBEAC.js +0 -1619
- package/dist/microsoft-VREAZ7M2.js +0 -3955
- package/dist/microsoft-YUT6EIGP.js +0 -3400
- package/dist/postgres-BOTHOPDW.js +0 -875
- package/dist/routes-3MMLQTB6.js +0 -90
- package/dist/routes-4ZUIJ4HE.js +0 -90
- package/dist/routes-5MXHKKH4.js +0 -90
- package/dist/routes-64NJFK3B.js +0 -90
- package/dist/routes-6AKQ2LBV.js +0 -90
- package/dist/routes-CRRBUDO4.js +0 -90
- package/dist/routes-D7SMYOLT.js +0 -90
- package/dist/routes-DIAF3MC3.js +0 -90
- package/dist/routes-KMUNU6CY.js +0 -90
- package/dist/routes-LRRLXIZR.js +0 -90
- package/dist/routes-N647AJYG.js +0 -90
- package/dist/routes-SSSELAAR.js +0 -90
- package/dist/routes-STERVGKJ.js +0 -90
- package/dist/routes-TZMPYLHJ.js +0 -90
- package/dist/routes-XNK2MAVO.js +0 -90
- package/dist/routes-ZEZZACZP.js +0 -90
- package/dist/runtime-4UVCTFNQ.js +0 -45
- package/dist/runtime-5EQN4GFM.js +0 -45
- package/dist/runtime-5LP7PUD4.js +0 -45
- package/dist/runtime-6YEENDN3.js +0 -45
- package/dist/runtime-7LQFRG3B.js +0 -45
- package/dist/runtime-AMXJU2MB.js +0 -45
- package/dist/runtime-D6WSE7FG.js +0 -45
- package/dist/runtime-EYVN7NFJ.js +0 -45
- package/dist/runtime-F6RPWQVW.js +0 -45
- package/dist/runtime-FYMJURFC.js +0 -45
- package/dist/runtime-GGF4P55M.js +0 -45
- package/dist/runtime-H3SAMWWF.js +0 -45
- package/dist/runtime-H7T4I7I7.js +0 -45
- package/dist/runtime-HTIM7GZR.js +0 -45
- package/dist/runtime-JRNBL4O4.js +0 -45
- package/dist/runtime-K4C7NQLW.js +0 -45
- package/dist/runtime-MWWZCPC2.js +0 -45
- package/dist/runtime-N7CM2DYA.js +0 -45
- package/dist/runtime-OM2NIBMI.js +0 -45
- package/dist/runtime-OVGSOTAH.js +0 -45
- package/dist/runtime-QQ6LAY4U.js +0 -45
- package/dist/runtime-QWPVD7CY.js +0 -45
- package/dist/runtime-SX3B5MG3.js +0 -45
- package/dist/runtime-YLIIPTE4.js +0 -45
- package/dist/runtime-YU6P22CG.js +0 -45
- package/dist/runtime-ZOC337DD.js +0 -45
- package/dist/server-3AVWBRIF.js +0 -28
- package/dist/server-5BKJI5OW.js +0 -28
- package/dist/server-6NDO2S52.js +0 -28
- package/dist/server-7TD3M2BW.js +0 -28
- package/dist/server-AMCSXINC.js +0 -28
- package/dist/server-BEJ6RAGL.js +0 -28
- package/dist/server-BFPYDHBG.js +0 -28
- package/dist/server-BKEWXGVX.js +0 -28
- package/dist/server-BMEJZGFG.js +0 -28
- package/dist/server-CU6LVQS4.js +0 -28
- package/dist/server-DFR7FI3Q.js +0 -28
- package/dist/server-DFYGH2CV.js +0 -28
- package/dist/server-DURRN3GJ.js +0 -28
- package/dist/server-EELWOC3X.js +0 -28
- package/dist/server-EN5E2OWQ.js +0 -28
- package/dist/server-EXZC3OJO.js +0 -28
- package/dist/server-GW2HYJYI.js +0 -28
- package/dist/server-J25NCRWJ.js +0 -28
- package/dist/server-JDGNOTFV.js +0 -28
- package/dist/server-KA6U3YNP.js +0 -28
- package/dist/server-L52A2ME4.js +0 -28
- package/dist/server-NE5HD5DJ.js +0 -28
- package/dist/server-NLQAXPOG.js +0 -28
- package/dist/server-NQOT7W77.js +0 -28
- package/dist/server-OHHAA34U.js +0 -28
- package/dist/server-PWE5PQTR.js +0 -28
- package/dist/server-Q2Q32H2B.js +0 -28
- package/dist/server-Q77ME7TL.js +0 -28
- package/dist/server-QDKO6OVO.js +0 -28
- package/dist/server-RR6QJIXM.js +0 -28
- package/dist/server-T3R6BO6A.js +0 -28
- package/dist/server-TRIBAHDV.js +0 -28
- package/dist/server-TXV3ZVVR.js +0 -28
- package/dist/server-VHSFJP3I.js +0 -28
- package/dist/server-VOJF2XGU.js +0 -28
- package/dist/server-W76YHPEC.js +0 -28
- package/dist/server-WLLH4WST.js +0 -28
- package/dist/server-WTUJ2O3F.js +0 -28
- package/dist/server-X4CJTHHF.js +0 -28
- package/dist/server-XK3ILCJC.js +0 -28
- package/dist/server-ZRD3NDJE.js +0 -28
- package/dist/setup-2JYXGTW6.js +0 -20
- package/dist/setup-3XOSZEW5.js +0 -20
- package/dist/setup-44VBAO4J.js +0 -20
- package/dist/setup-4OA7QNJW.js +0 -20
- package/dist/setup-4ONNQBWB.js +0 -20
- package/dist/setup-4OSBXSCL.js +0 -20
- package/dist/setup-4QFGRBLZ.js +0 -20
- package/dist/setup-52US54Z4.js +0 -20
- package/dist/setup-5CY3CKKT.js +0 -20
- package/dist/setup-6766SGAR.js +0 -20
- package/dist/setup-6NUSB4XO.js +0 -20
- package/dist/setup-7FZJEOD4.js +0 -20
- package/dist/setup-7LYYXBUL.js +0 -20
- package/dist/setup-ADSKKBGV.js +0 -20
- package/dist/setup-AMV2WKVH.js +0 -20
- package/dist/setup-AYY24DKM.js +0 -20
- package/dist/setup-B34N4HPU.js +0 -20
- package/dist/setup-CEF4QY4L.js +0 -20
- package/dist/setup-E2YLC2EY.js +0 -20
- package/dist/setup-ER6NXTY5.js +0 -20
- package/dist/setup-FIOAQJ6C.js +0 -20
- package/dist/setup-G76S7X44.js +0 -20
- package/dist/setup-H2AGCBW5.js +0 -20
- package/dist/setup-H4JZUHH5.js +0 -20
- package/dist/setup-ICOZRKCX.js +0 -20
- package/dist/setup-JFTJH7UF.js +0 -20
- package/dist/setup-JJHOT2ZU.js +0 -20
- package/dist/setup-KEAM2BCL.js +0 -20
- package/dist/setup-LW4MLU2N.js +0 -20
- package/dist/setup-NHAZABW4.js +0 -20
- package/dist/setup-PRFNI6YW.js +0 -20
- package/dist/setup-RAHBMYHE.js +0 -20
- package/dist/setup-T6KYFR7O.js +0 -20
- package/dist/setup-TGM6L362.js +0 -20
- package/dist/setup-TNANAH7C.js +0 -20
- package/dist/setup-TXPR5UQX.js +0 -20
- package/dist/setup-UJSNSCLM.js +0 -20
- package/dist/setup-XCJMELVU.js +0 -20
- package/dist/setup-XIYEIFVK.js +0 -20
- package/dist/setup-XP2VGBEU.js +0 -20
- package/dist/setup-Z4PZSHBI.js +0 -20
- package/dist/skills-HCVBA6PK.js +0 -16
- package/dist/skills-HFSW74KZ.js +0 -16
- package/dist/system-prompts-6OUTAMH6.js +0 -41
- package/dist/task-queue-YP2I54IA.js +0 -9
- package/dist/transport-encryption-F2NQYACT.js +0 -25
- package/seed-data.mjs +0 -455
- package/src/agent-tools/tools/integrations/_seed-data.json +0 -4548
- package/src/agent-tools/tools/integrations/_seed-data.ts +0 -4563
- package/src/engine/NOTE.MD +0 -52
package/dist/chunk-NLT5MC7X.js
DELETED
|
@@ -1,465 +0,0 @@
|
|
|
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
|
-
}
|
|
315
|
-
getProfile(agentId) {
|
|
316
|
-
return this.profiles.get(agentId);
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Core permission check: Can this agent use this tool right now?
|
|
320
|
-
* Returns { allowed, reason, requiresApproval }
|
|
321
|
-
*/
|
|
322
|
-
checkPermission(agentId, toolId, context) {
|
|
323
|
-
const profile = this.profiles.get(agentId);
|
|
324
|
-
if (!profile) {
|
|
325
|
-
return { allowed: false, reason: "No permission profile assigned", requiresApproval: false };
|
|
326
|
-
}
|
|
327
|
-
if (profile.constraints.sandboxMode) {
|
|
328
|
-
return { allowed: true, reason: "Sandbox mode \u2014 action will be simulated", requiresApproval: false, sandbox: true };
|
|
329
|
-
}
|
|
330
|
-
if (profile.constraints.allowedWorkingHours) {
|
|
331
|
-
const now = context?.timestamp || /* @__PURE__ */ new Date();
|
|
332
|
-
const { start, end, timezone } = profile.constraints.allowedWorkingHours;
|
|
333
|
-
const hour = parseInt(new Intl.DateTimeFormat("en-US", { hour: "numeric", hour12: false, timeZone: timezone }).format(now));
|
|
334
|
-
const startHour = parseInt(start.split(":")[0]);
|
|
335
|
-
const endHour = parseInt(end.split(":")[0]);
|
|
336
|
-
if (hour < startHour || hour >= endHour) {
|
|
337
|
-
return { allowed: false, reason: `Outside working hours (${start}-${end} ${timezone})`, requiresApproval: false };
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
if (profile.constraints.allowedIPs?.length && context?.ip) {
|
|
341
|
-
if (!profile.constraints.allowedIPs.includes(context.ip)) {
|
|
342
|
-
return { allowed: false, reason: `IP ${context.ip} not in allowlist`, requiresApproval: false };
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
const blockedTools = profile.tools?.blocked || [];
|
|
346
|
-
const allowedTools = profile.tools?.allowed || [];
|
|
347
|
-
if (blockedTools.includes(toolId)) {
|
|
348
|
-
return { allowed: false, reason: `Tool "${toolId}" is explicitly blocked`, requiresApproval: false };
|
|
349
|
-
}
|
|
350
|
-
if (allowedTools.includes(toolId)) {
|
|
351
|
-
return this._checkApproval(profile, toolId);
|
|
352
|
-
}
|
|
353
|
-
const tool = this._findTool(toolId);
|
|
354
|
-
if (!tool) {
|
|
355
|
-
return { allowed: false, reason: `Unknown tool "${toolId}"`, requiresApproval: false };
|
|
356
|
-
}
|
|
357
|
-
const skillsMode = profile.skills?.mode || "blocklist";
|
|
358
|
-
const skillsList = profile.skills?.list || [];
|
|
359
|
-
const skillAllowed = skillsMode === "allowlist" ? skillsList.includes(tool.skillId || "") : !skillsList.includes(tool.skillId || "");
|
|
360
|
-
if (!skillAllowed) {
|
|
361
|
-
return { allowed: false, reason: `Skill "${tool.skillId}" is not permitted`, requiresApproval: false };
|
|
362
|
-
}
|
|
363
|
-
const riskOrder = ["low", "medium", "high", "critical"];
|
|
364
|
-
const toolRiskIdx = riskOrder.indexOf(tool.risk || "low");
|
|
365
|
-
const maxRiskIdx = riskOrder.indexOf(profile.maxRiskLevel);
|
|
366
|
-
if (toolRiskIdx > maxRiskIdx) {
|
|
367
|
-
return { allowed: false, reason: `Tool risk "${tool.risk}" exceeds max allowed "${profile.maxRiskLevel}"`, requiresApproval: false };
|
|
368
|
-
}
|
|
369
|
-
for (const effect of tool.sideEffects || []) {
|
|
370
|
-
if (profile.blockedSideEffects.includes(effect)) {
|
|
371
|
-
return { allowed: false, reason: `Side effect "${effect}" is blocked`, requiresApproval: false };
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
return this._checkApproval(profile, toolId, tool);
|
|
375
|
-
}
|
|
376
|
-
_checkApproval(profile, toolId, tool) {
|
|
377
|
-
if (!profile.requireApproval.enabled) {
|
|
378
|
-
return { allowed: true, reason: "Permitted", requiresApproval: false };
|
|
379
|
-
}
|
|
380
|
-
if (tool) {
|
|
381
|
-
if (profile.requireApproval.forRiskLevels.includes(tool.risk || "low")) {
|
|
382
|
-
return { allowed: true, reason: "Requires human approval (risk level)", requiresApproval: true };
|
|
383
|
-
}
|
|
384
|
-
for (const effect of tool.sideEffects || []) {
|
|
385
|
-
if (profile.requireApproval.forSideEffects.includes(effect)) {
|
|
386
|
-
return { allowed: true, reason: `Requires human approval (${effect})`, requiresApproval: true };
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
return { allowed: true, reason: "Permitted", requiresApproval: false };
|
|
391
|
-
}
|
|
392
|
-
_findTool(toolId) {
|
|
393
|
-
for (const skill of this.skills.values()) {
|
|
394
|
-
const tool = skill.tools.find((t) => t.id === toolId);
|
|
395
|
-
if (tool) return tool;
|
|
396
|
-
}
|
|
397
|
-
try {
|
|
398
|
-
const { TOOL_INDEX } = (init_tool_catalog(), __toCommonJS(tool_catalog_exports));
|
|
399
|
-
return TOOL_INDEX.get(toolId);
|
|
400
|
-
} catch {
|
|
401
|
-
return void 0;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Get the full resolved tool list for an agent — what they can actually use
|
|
406
|
-
*/
|
|
407
|
-
getAvailableTools(agentId) {
|
|
408
|
-
const result = [];
|
|
409
|
-
for (const skill of this.skills.values()) {
|
|
410
|
-
for (const tool of skill.tools) {
|
|
411
|
-
const perm = this.checkPermission(agentId, tool.id || tool.name);
|
|
412
|
-
if (perm.allowed) {
|
|
413
|
-
result.push({
|
|
414
|
-
tool,
|
|
415
|
-
status: perm.sandbox ? "sandbox" : perm.requiresApproval ? "approval-required" : "allowed"
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
return result;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Generate the tool policy config for an agent based on their profile
|
|
424
|
-
*/
|
|
425
|
-
generateToolPolicy(agentId) {
|
|
426
|
-
const profile = this.profiles.get(agentId);
|
|
427
|
-
if (!profile) return { allowedTools: [], blockedTools: [], approvalRequired: [], rateLimits: { toolCallsPerMinute: 10, toolCallsPerHour: 100, toolCallsPerDay: 1e3, externalActionsPerHour: 10 } };
|
|
428
|
-
const allowed = [];
|
|
429
|
-
const blocked = [];
|
|
430
|
-
const approval = [];
|
|
431
|
-
for (const skill of this.skills.values()) {
|
|
432
|
-
for (const tool of skill.tools) {
|
|
433
|
-
const perm = this.checkPermission(agentId, tool.id || tool.name);
|
|
434
|
-
if (perm.allowed) {
|
|
435
|
-
allowed.push(tool.id || tool.name);
|
|
436
|
-
if (perm.requiresApproval) approval.push(tool.id || tool.name);
|
|
437
|
-
} else {
|
|
438
|
-
blocked.push(tool.id || tool.name);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return { allowedTools: allowed, blockedTools: blocked, approvalRequired: approval, rateLimits: profile.rateLimits };
|
|
443
|
-
}
|
|
444
|
-
getAllSkills() {
|
|
445
|
-
return Array.from(this.skills.values());
|
|
446
|
-
}
|
|
447
|
-
getSkillsByCategory() {
|
|
448
|
-
const result = {};
|
|
449
|
-
for (const skill of this.skills.values()) {
|
|
450
|
-
if (!result[skill.category]) result[skill.category] = [];
|
|
451
|
-
result[skill.category].push(skill);
|
|
452
|
-
}
|
|
453
|
-
return result;
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
export {
|
|
460
|
-
SKILL_SUITES,
|
|
461
|
-
PRESET_PROFILES,
|
|
462
|
-
BUILTIN_SKILLS,
|
|
463
|
-
PermissionEngine,
|
|
464
|
-
init_skills2 as init_skills
|
|
465
|
-
};
|