@agenticmail/enterprise 0.5.476 → 0.5.478
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-tools-6TK72QLA.js +14677 -0
- package/dist/agent-tools-RJB2SV42.js +14677 -0
- package/dist/agent-tools-T5TU2TL2.js +14677 -0
- package/dist/browser-tool-R7WDY3TI.js +1434 -0
- package/dist/chunk-3W5NAKFC.js +2641 -0
- package/dist/chunk-67TC5JOS.js +7669 -0
- package/dist/chunk-6MLEOPNF.js +5670 -0
- package/dist/chunk-722P53KA.js +398 -0
- package/dist/chunk-CTF2NLZK.js +1657 -0
- package/dist/chunk-DGZEZB7B.js +2282 -0
- package/dist/chunk-FHKJDQKA.js +7669 -0
- package/dist/chunk-JSBE7BUR.js +1728 -0
- package/dist/chunk-LMEGAXDR.js +409 -0
- package/dist/chunk-NP4PBHMG.js +615 -0
- package/dist/chunk-NREH22VS.js +5672 -0
- package/dist/chunk-OHJMYCYP.js +5691 -0
- package/dist/chunk-PENTSXYU.js +242 -0
- package/dist/chunk-PLIE3LOT.js +208 -0
- package/dist/chunk-PP37VRLO.js +1728 -0
- package/dist/chunk-QBEYCUNN.js +359 -0
- package/dist/chunk-S63YKL7B.js +7669 -0
- package/dist/chunk-TMCTJWUB.js +2282 -0
- package/dist/chunk-TQWFWPVQ.js +5562 -0
- package/dist/chunk-TULB2JND.js +1657 -0
- package/dist/chunk-UK7ACQHN.js +2282 -0
- package/dist/chunk-UM3UOOPY.js +2583 -0
- package/dist/chunk-VQBIYBHF.js +5562 -0
- package/dist/chunk-WWXDTKY2.js +1657 -0
- package/dist/chunk-XBFT7H32.js +1950 -0
- package/dist/chunk-XCY6EZPH.js +1728 -0
- package/dist/chunk-XZIERFHK.js +5562 -0
- package/dist/chunk-YWK66HN4.js +2641 -0
- package/dist/chunk-ZDJ254GY.js +2245 -0
- package/dist/cli-agent-7SXTISQH.js +2804 -0
- package/dist/cli-agent-P2U4ZUD3.js +2804 -0
- package/dist/cli-agent-ZQ3VYFW2.js +2804 -0
- package/dist/cli-serve-CKPTIMEZ.js +322 -0
- package/dist/cli-serve-HDZAJG2F.js +322 -0
- package/dist/cli-serve-VQDZBQOV.js +322 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +9 -9
- package/dist/integrations-Z4OZ273A.js +43830 -0
- package/dist/mcp-server-tools-ZKDEIXHX.js +61 -0
- package/dist/meetings-4GFVH2GP.js +12 -0
- package/dist/microsoft-RDBD62YR.js +4159 -0
- package/dist/pipeline-PQOXEXY3.js +15 -0
- package/dist/pipeline-SM62YB6A.js +15 -0
- package/dist/polymarket-5QRBUONH.js +17 -0
- package/dist/polymarket-IABF2P2W.js +17 -0
- package/dist/polymarket-TJJO4SUQ.js +17 -0
- package/dist/polymarket-runtime-257R5AW7.js +108 -0
- package/dist/polymarket-runtime-LTSW26FX.js +108 -0
- package/dist/polymarket-runtime-WFMGG2QH.js +108 -0
- package/dist/polymarket-watcher-32IVC2ZO.js +23 -0
- package/dist/polymarket-watcher-QXWNPRBL.js +23 -0
- package/dist/polymarket-watcher-Z37AND7B.js +23 -0
- package/dist/pw-ai-N5BXPQCC.js +2325 -0
- package/dist/routes-LYYVXQAF.js +10 -0
- package/dist/runtime-4O6MHMZQ.js +50 -0
- package/dist/runtime-D2AQF4AQ.js +50 -0
- package/dist/runtime-HQYHUPJR.js +50 -0
- package/dist/screener-AR2UI3ZD.js +26 -0
- package/dist/screener-TATCEETD.js +26 -0
- package/dist/server-OSW2JAFC.js +36 -0
- package/dist/server-YGABCLLZ.js +36 -0
- package/dist/server-ZYEGUITS.js +36 -0
- package/dist/server-context-Y7TAVBIC.js +12 -0
- package/dist/server-middleware-H5UE6XVF.js +153 -0
- package/dist/setup-2VCHQGNM.js +20 -0
- package/dist/setup-BPC2427B.js +20 -0
- package/dist/setup-KYFORPV4.js +20 -0
- package/logs/cloudflared-error.log +48 -0
- package/package.json +1 -1
|
@@ -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-VQBIYBHF.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,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-TQWFWPVQ.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,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-LMEGAXDR.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,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-FHKJDQKA.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-OHJMYCYP.js";
|
|
18
|
+
import "./chunk-PLIE3LOT.js";
|
|
19
|
+
import "./chunk-I5IGHBXW.js";
|
|
20
|
+
import "./chunk-TULB2JND.js";
|
|
21
|
+
import "./chunk-WUAWWKTN.js";
|
|
22
|
+
import "./chunk-3W5NAKFC.js";
|
|
23
|
+
import "./chunk-LMEGAXDR.js";
|
|
24
|
+
import "./chunk-CVFIM72Q.js";
|
|
25
|
+
import "./chunk-UK7ACQHN.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,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-S63YKL7B.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-NREH22VS.js";
|
|
18
|
+
import "./chunk-PLIE3LOT.js";
|
|
19
|
+
import "./chunk-I5IGHBXW.js";
|
|
20
|
+
import "./chunk-WWXDTKY2.js";
|
|
21
|
+
import "./chunk-WUAWWKTN.js";
|
|
22
|
+
import "./chunk-YWK66HN4.js";
|
|
23
|
+
import "./chunk-722P53KA.js";
|
|
24
|
+
import "./chunk-CVFIM72Q.js";
|
|
25
|
+
import "./chunk-DGZEZB7B.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,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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-JSBE7BUR.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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-XCY6EZPH.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,51 @@
|
|
|
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
|
|
87
|
+
2026-03-14 02:22:50: 2026-03-14T01:22:50Z ERR error="stream 39533 canceled by remote with error code 0" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
88
|
+
2026-03-14 02:22:50: 2026-03-14T01:22:50Z ERR Request failed error="stream 39533 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
|
|
89
|
+
2026-03-14 02:22:50: 2026-03-14T01:22:50Z ERR error="stream 50417 canceled by remote with error code 0" connIndex=1 event=1 ingressRule=0 originService=http://localhost:3100
|
|
90
|
+
2026-03-14 02:22:50: 2026-03-14T01:22:50Z ERR Request failed error="stream 50417 canceled by remote with error code 0" connIndex=1 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/price-stream event=0 ip=198.41.200.33 type=http
|
|
91
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: read tcp [::1]:60975->[::1]:3100: read: connection reset by peer" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
92
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z 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: read tcp [::1]:60975->[::1]:3100: read: connection reset by peer" 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
|
|
93
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: read tcp [::1]:60961->[::1]:3100: read: connection reset by peer" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
94
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z 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: read tcp [::1]:60961->[::1]:3100: read: connection reset by peer" 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
|
|
95
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: read tcp [::1]:60973->[::1]:3100: read: connection reset by peer" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
96
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: read tcp [::1]:60974->[::1]:3100: read: connection reset by peer" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
97
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z 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: read tcp [::1]:60973->[::1]:3100: read: connection reset by peer" 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
|
|
98
|
+
2026-03-14 02:26:20: 2026-03-14T01:26:20Z 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: read tcp [::1]:60974->[::1]:3100: read: connection reset by peer" 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
|
|
99
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
100
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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
|
|
101
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
102
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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
|
|
103
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
104
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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
|
|
105
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR error="unexpected EOF" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
|
|
106
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR Request failed error="unexpected EOF" connIndex=3 dest=https://enterprise.agenticmail.io/api/polymarket/stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.200.23 type=http
|
|
107
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
108
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z ERR error="unexpected EOF" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
|
|
109
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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
|
|
110
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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
|
|
111
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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=1 event=1 ingressRule=0 originService=http://localhost:3100
|
|
112
|
+
2026-03-14 02:26:22: 2026-03-14T01:26:22Z 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=1 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/wallet/balance event=0 ip=198.41.200.33 type=http
|