@agenticmail/enterprise 0.5.476 → 0.5.477

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/agent-tools-RJB2SV42.js +14677 -0
  2. package/dist/browser-tool-R7WDY3TI.js +1434 -0
  3. package/dist/chunk-67TC5JOS.js +7669 -0
  4. package/dist/chunk-6MLEOPNF.js +5670 -0
  5. package/dist/chunk-722P53KA.js +398 -0
  6. package/dist/chunk-CTF2NLZK.js +1657 -0
  7. package/dist/chunk-NP4PBHMG.js +615 -0
  8. package/dist/chunk-PENTSXYU.js +242 -0
  9. package/dist/chunk-PLIE3LOT.js +208 -0
  10. package/dist/chunk-PP37VRLO.js +1728 -0
  11. package/dist/chunk-QBEYCUNN.js +359 -0
  12. package/dist/chunk-TMCTJWUB.js +2282 -0
  13. package/dist/chunk-UM3UOOPY.js +2583 -0
  14. package/dist/chunk-XBFT7H32.js +1950 -0
  15. package/dist/chunk-XZIERFHK.js +5562 -0
  16. package/dist/chunk-YWK66HN4.js +2641 -0
  17. package/dist/chunk-ZDJ254GY.js +2245 -0
  18. package/dist/cli-agent-P2U4ZUD3.js +2804 -0
  19. package/dist/cli-serve-HDZAJG2F.js +322 -0
  20. package/dist/cli.js +3 -3
  21. package/dist/index.js +9 -9
  22. package/dist/integrations-Z4OZ273A.js +43830 -0
  23. package/dist/mcp-server-tools-ZKDEIXHX.js +61 -0
  24. package/dist/meetings-4GFVH2GP.js +12 -0
  25. package/dist/microsoft-RDBD62YR.js +4159 -0
  26. package/dist/pipeline-SM62YB6A.js +15 -0
  27. package/dist/polymarket-IABF2P2W.js +17 -0
  28. package/dist/polymarket-runtime-LTSW26FX.js +108 -0
  29. package/dist/polymarket-watcher-Z37AND7B.js +23 -0
  30. package/dist/pw-ai-N5BXPQCC.js +2325 -0
  31. package/dist/routes-LYYVXQAF.js +10 -0
  32. package/dist/runtime-HQYHUPJR.js +50 -0
  33. package/dist/screener-TATCEETD.js +26 -0
  34. package/dist/server-ZYEGUITS.js +36 -0
  35. package/dist/server-context-Y7TAVBIC.js +12 -0
  36. package/dist/server-middleware-H5UE6XVF.js +153 -0
  37. package/dist/setup-2VCHQGNM.js +20 -0
  38. package/logs/cloudflared-error.log +22 -0
  39. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import {
2
+ registerBrowserRoutes
3
+ } from "./chunk-ZDJ254GY.js";
4
+ import "./chunk-QBEYCUNN.js";
5
+ import "./chunk-XBFT7H32.js";
6
+ import "./chunk-PENTSXYU.js";
7
+ import "./chunk-KFQGP6VL.js";
8
+ export {
9
+ registerBrowserRoutes
10
+ };
@@ -0,0 +1,50 @@
1
+ import {
2
+ AgentRuntime,
3
+ EmailChannel,
4
+ FollowUpScheduler,
5
+ SessionManager,
6
+ SubAgentManager,
7
+ ToolRegistry,
8
+ ageStaleMessages,
9
+ callLLM,
10
+ createAgentRuntime,
11
+ createNoopHooks,
12
+ createRuntimeHooks,
13
+ estimateMessageTokens,
14
+ estimateTokens,
15
+ executeTool,
16
+ runAgentLoop,
17
+ toolsToDefinitions,
18
+ truncateToolResults
19
+ } from "./chunk-XZIERFHK.js";
20
+ import "./chunk-CFR5OSMI.js";
21
+ import {
22
+ PROVIDER_REGISTRY,
23
+ listAllProviders,
24
+ resolveApiKeyForProvider,
25
+ resolveProvider
26
+ } from "./chunk-UF3ZJMJO.js";
27
+ import "./chunk-KFQGP6VL.js";
28
+ export {
29
+ AgentRuntime,
30
+ EmailChannel,
31
+ FollowUpScheduler,
32
+ PROVIDER_REGISTRY,
33
+ SessionManager,
34
+ SubAgentManager,
35
+ ToolRegistry,
36
+ ageStaleMessages,
37
+ callLLM,
38
+ createAgentRuntime,
39
+ createNoopHooks,
40
+ createRuntimeHooks,
41
+ estimateMessageTokens,
42
+ estimateTokens,
43
+ executeTool,
44
+ listAllProviders,
45
+ resolveApiKeyForProvider,
46
+ resolveProvider,
47
+ runAgentLoop,
48
+ toolsToDefinitions,
49
+ truncateToolResults
50
+ };
@@ -0,0 +1,26 @@
1
+ import {
2
+ analyzeOrderbook,
3
+ generateRecommendation,
4
+ getPriceLevel,
5
+ scoreEdge,
6
+ scoreLiquidity,
7
+ scoreMomentum,
8
+ scoreSpread,
9
+ scoreTiming,
10
+ scoreVolume,
11
+ screenMarkets
12
+ } from "./chunk-722P53KA.js";
13
+ import "./chunk-CVFIM72Q.js";
14
+ import "./chunk-KFQGP6VL.js";
15
+ export {
16
+ analyzeOrderbook,
17
+ generateRecommendation,
18
+ getPriceLevel,
19
+ scoreEdge,
20
+ scoreLiquidity,
21
+ scoreMomentum,
22
+ scoreSpread,
23
+ scoreTiming,
24
+ scoreVolume,
25
+ screenMarkets
26
+ };
@@ -0,0 +1,36 @@
1
+ import {
2
+ createServer
3
+ } from "./chunk-67TC5JOS.js";
4
+ import "./chunk-DJBCRQTD.js";
5
+ import "./chunk-UF3ZJMJO.js";
6
+ import "./chunk-DHPOGY7C.js";
7
+ import "./chunk-3UAFHUEC.js";
8
+ import "./chunk-Z7NVD3OQ.js";
9
+ import "./chunk-VSBC4SWO.js";
10
+ import "./chunk-AF3WSNVX.js";
11
+ import "./chunk-74ZCQKYU.js";
12
+ import "./chunk-ZNLABJCS.js";
13
+ import "./chunk-FQWJMPKW.js";
14
+ import "./chunk-WYDVMFGJ.js";
15
+ import "./chunk-IHPLR7EK.js";
16
+ import "./chunk-PSZU6FMQ.js";
17
+ import "./chunk-6MLEOPNF.js";
18
+ import "./chunk-PLIE3LOT.js";
19
+ import "./chunk-I5IGHBXW.js";
20
+ import "./chunk-CTF2NLZK.js";
21
+ import "./chunk-WUAWWKTN.js";
22
+ import "./chunk-YWK66HN4.js";
23
+ import "./chunk-722P53KA.js";
24
+ import "./chunk-CVFIM72Q.js";
25
+ import "./chunk-TMCTJWUB.js";
26
+ import "./chunk-YDD5TC5Q.js";
27
+ import "./chunk-37ABTUFU.js";
28
+ import "./chunk-NU657BBQ.js";
29
+ import "./chunk-PGAU3W3M.js";
30
+ import "./chunk-FLQ5FLHW.js";
31
+ import "./chunk-YJ6RNSFH.js";
32
+ import "./chunk-22U7TZPN.js";
33
+ import "./chunk-KFQGP6VL.js";
34
+ export {
35
+ createServer
36
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ createBrowserRouteContext,
3
+ listKnownProfileNames
4
+ } from "./chunk-NP4PBHMG.js";
5
+ import "./chunk-QBEYCUNN.js";
6
+ import "./chunk-XBFT7H32.js";
7
+ import "./chunk-PENTSXYU.js";
8
+ import "./chunk-KFQGP6VL.js";
9
+ export {
10
+ createBrowserRouteContext,
11
+ listKnownProfileNames
12
+ };
@@ -0,0 +1,153 @@
1
+ import {
2
+ isLoopbackHost,
3
+ safeEqualSecret
4
+ } from "./chunk-PENTSXYU.js";
5
+ import "./chunk-KFQGP6VL.js";
6
+
7
+ // src/browser/server-middleware.ts
8
+ import express from "express";
9
+
10
+ // src/browser/csrf.ts
11
+ function firstHeader(value) {
12
+ return Array.isArray(value) ? value[0] ?? "" : value ?? "";
13
+ }
14
+ function isMutatingMethod(method) {
15
+ const m = (method || "").trim().toUpperCase();
16
+ return m === "POST" || m === "PUT" || m === "PATCH" || m === "DELETE";
17
+ }
18
+ function isLoopbackUrl(value) {
19
+ const v = value.trim();
20
+ if (!v || v === "null") {
21
+ return false;
22
+ }
23
+ try {
24
+ const parsed = new URL(v);
25
+ return isLoopbackHost(parsed.hostname);
26
+ } catch {
27
+ return false;
28
+ }
29
+ }
30
+ function shouldRejectBrowserMutation(params) {
31
+ if (!isMutatingMethod(params.method)) {
32
+ return false;
33
+ }
34
+ const secFetchSite = (params.secFetchSite ?? "").trim().toLowerCase();
35
+ if (secFetchSite === "cross-site") {
36
+ return true;
37
+ }
38
+ const origin = (params.origin ?? "").trim();
39
+ if (origin) {
40
+ return !isLoopbackUrl(origin);
41
+ }
42
+ const referer = (params.referer ?? "").trim();
43
+ if (referer) {
44
+ return !isLoopbackUrl(referer);
45
+ }
46
+ return false;
47
+ }
48
+ function browserMutationGuardMiddleware() {
49
+ return (req, res, next) => {
50
+ const method = (req.method || "").trim().toUpperCase();
51
+ if (method === "OPTIONS") {
52
+ return next();
53
+ }
54
+ const origin = firstHeader(req.headers.origin);
55
+ const referer = firstHeader(req.headers.referer);
56
+ const secFetchSite = firstHeader(req.headers["sec-fetch-site"]);
57
+ if (shouldRejectBrowserMutation({
58
+ method,
59
+ origin,
60
+ referer,
61
+ secFetchSite
62
+ })) {
63
+ res.status(403).send("Forbidden");
64
+ return;
65
+ }
66
+ next();
67
+ };
68
+ }
69
+
70
+ // src/browser/http-auth.ts
71
+ function firstHeaderValue(value) {
72
+ return Array.isArray(value) ? value[0] ?? "" : value ?? "";
73
+ }
74
+ function parseBearerToken(authorization) {
75
+ if (!authorization || !authorization.toLowerCase().startsWith("bearer ")) {
76
+ return void 0;
77
+ }
78
+ const token = authorization.slice(7).trim();
79
+ return token || void 0;
80
+ }
81
+ function parseBasicPassword(authorization) {
82
+ if (!authorization || !authorization.toLowerCase().startsWith("basic ")) {
83
+ return void 0;
84
+ }
85
+ const encoded = authorization.slice(6).trim();
86
+ if (!encoded) {
87
+ return void 0;
88
+ }
89
+ try {
90
+ const decoded = Buffer.from(encoded, "base64").toString("utf8");
91
+ const sep = decoded.indexOf(":");
92
+ if (sep < 0) {
93
+ return void 0;
94
+ }
95
+ const password = decoded.slice(sep + 1).trim();
96
+ return password || void 0;
97
+ } catch {
98
+ return void 0;
99
+ }
100
+ }
101
+ function isAuthorizedBrowserRequest(req, auth) {
102
+ const authorization = firstHeaderValue(req.headers.authorization).trim();
103
+ if (auth.token) {
104
+ const bearer = parseBearerToken(authorization);
105
+ if (bearer && safeEqualSecret(bearer, auth.token)) {
106
+ return true;
107
+ }
108
+ }
109
+ if (auth.password) {
110
+ const passwordHeader = firstHeaderValue(req.headers["x-agenticmail-password"]).trim();
111
+ if (passwordHeader && safeEqualSecret(passwordHeader, auth.password)) {
112
+ return true;
113
+ }
114
+ const basicPassword = parseBasicPassword(authorization);
115
+ if (basicPassword && safeEqualSecret(basicPassword, auth.password)) {
116
+ return true;
117
+ }
118
+ }
119
+ return false;
120
+ }
121
+
122
+ // src/browser/server-middleware.ts
123
+ function installBrowserCommonMiddleware(app) {
124
+ app.use((req, res, next) => {
125
+ const ctrl = new AbortController();
126
+ const abort = () => ctrl.abort(new Error("request aborted"));
127
+ req.once("aborted", abort);
128
+ res.once("close", () => {
129
+ if (!res.writableEnded) {
130
+ abort();
131
+ }
132
+ });
133
+ req.signal = ctrl.signal;
134
+ next();
135
+ });
136
+ app.use(express.json({ limit: "1mb" }));
137
+ app.use(browserMutationGuardMiddleware());
138
+ }
139
+ function installBrowserAuthMiddleware(app, auth) {
140
+ if (!auth.token && !auth.password) {
141
+ return;
142
+ }
143
+ app.use((req, res, next) => {
144
+ if (isAuthorizedBrowserRequest(req, auth)) {
145
+ return next();
146
+ }
147
+ res.status(401).send("Unauthorized");
148
+ });
149
+ }
150
+ export {
151
+ installBrowserAuthMiddleware,
152
+ installBrowserCommonMiddleware
153
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-PP37VRLO.js";
10
+ import "./chunk-HPIK224M.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -62,3 +62,25 @@
62
62
  2026-03-14 00:42:05: 2026-03-13T23:42:05Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/wallet/balance event=0 ip=198.41.192.167 type=http
63
63
  2026-03-14 00:42:06: 2026-03-13T23:42:06Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
64
64
  2026-03-14 00:42:06: 2026-03-13T23:42:06Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=3 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/wallet/balance event=0 ip=198.41.200.23 type=http
65
+ 2026-03-14 02:08:06: 2026-03-14T01:08:06Z ERR error="stream 61053 canceled by remote with error code 0" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
66
+ 2026-03-14 02:08:06: 2026-03-14T01:08:06Z ERR Request failed error="stream 61053 canceled by remote with error code 0" connIndex=3 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/price-stream event=0 ip=198.41.200.23 type=http
67
+ 2026-03-14 02:08:15: 2026-03-14T01:08:15Z ERR error="stream 31381 canceled by remote with error code 0" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
68
+ 2026-03-14 02:08:15: 2026-03-14T01:08:15Z ERR Request failed error="stream 31381 canceled by remote with error code 0" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.167 type=http
69
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
70
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
71
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="unexpected EOF" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/price-stream event=0 ip=198.41.192.167 type=http
72
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="unexpected EOF" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.167 type=http
73
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="unexpected EOF" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
74
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="unexpected EOF" connIndex=3 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/price-stream event=0 ip=198.41.200.23 type=http
75
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="unexpected EOF" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
76
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
77
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="unexpected EOF" connIndex=0 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/price-stream event=0 ip=198.41.192.67 type=http
78
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="unexpected EOF" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.167 type=http
79
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="unexpected EOF" connIndex=1 event=1 ingressRule=0 originService=http://localhost:3100
80
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="unexpected EOF" connIndex=1 dest=https://enterprise.agenticmail.io/api/polymarket/stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.200.33 type=http
81
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
82
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/wallet/balance event=0 ip=198.41.192.167 type=http
83
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
84
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/wallet/balance event=0 ip=198.41.192.167 type=http
85
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
86
+ 2026-03-14 02:09:03: 2026-03-14T01:09:03Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/wallet/balance event=0 ip=198.41.192.167 type=http
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.476",
3
+ "version": "0.5.477",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {