@@ -793,6 +793,7 @@ async def test_create(self, mock_async_client: AsyncMock, agent_view: MockAgentV
793793 client = AsyncAgentOps (mock_async_client )
794794 agent = await client .create (
795795 name = "test-agent" ,
796+ version = "1.2.3" ,
796797 )
797798
798799 assert isinstance (agent , AsyncAgent )
@@ -901,6 +902,7 @@ async def test_create_from_npm(self, mock_async_client: AsyncMock, agent_view: M
901902 agent = await client .create_from_npm (
902903 name = "test-agent" ,
903904 package_name = "@runloop/example-agent" ,
905+ version = "1.2.3" ,
904906 )
905907
906908 assert isinstance (agent , AsyncAgent )
@@ -913,6 +915,7 @@ async def test_create_from_npm(self, mock_async_client: AsyncMock, agent_view: M
913915 },
914916 },
915917 name = "test-agent" ,
918+ version = "1.2.3" ,
916919 )
917920
918921 @pytest .mark .asyncio
@@ -926,9 +929,9 @@ async def test_create_from_npm_with_all_options(
926929 agent = await client .create_from_npm (
927930 name = "test-agent" ,
928931 package_name = "@runloop/example-agent" ,
929- npm_version = "1.2.3" ,
930932 registry_url = "https://registry.example.com" ,
931933 agent_setup = ["npm install" , "npm run setup" ],
934+ version = "1.2.3" ,
932935 extra_headers = {"X-Custom" : "header" },
933936 )
934937
@@ -939,12 +942,12 @@ async def test_create_from_npm_with_all_options(
939942 "type" : "npm" ,
940943 "npm" : {
941944 "package_name" : "@runloop/example-agent" ,
942- "npm_version" : "1.2.3" ,
943945 "registry_url" : "https://registry.example.com" ,
944946 "agent_setup" : ["npm install" , "npm run setup" ],
945947 },
946948 },
947949 name = "test-agent" ,
950+ version = "1.2.3" ,
948951 extra_headers = {"X-Custom" : "header" },
949952 )
950953
@@ -957,6 +960,7 @@ async def test_create_from_npm_raises_when_source_provided(self, mock_async_clie
957960 await client .create_from_npm (
958961 name = "test-agent" ,
959962 package_name = "@runloop/example-agent" ,
963+ version = "1.2.3" ,
960964 source = {"type" : "git" , "git" : {"repository" : "https://github.com/example/repo" }},
961965 )
962966
@@ -969,6 +973,7 @@ async def test_create_from_pip(self, mock_async_client: AsyncMock, agent_view: M
969973 agent = await client .create_from_pip (
970974 name = "test-agent" ,
971975 package_name = "runloop-example-agent" ,
976+ version = "1.2.3" ,
972977 )
973978
974979 assert isinstance (agent , AsyncAgent )
@@ -981,6 +986,7 @@ async def test_create_from_pip(self, mock_async_client: AsyncMock, agent_view: M
981986 },
982987 },
983988 name = "test-agent" ,
989+ version = "1.2.3" ,
984990 )
985991
986992 @pytest .mark .asyncio
@@ -994,9 +1000,9 @@ async def test_create_from_pip_with_all_options(
9941000 agent = await client .create_from_pip (
9951001 name = "test-agent" ,
9961002 package_name = "runloop-example-agent" ,
997- pip_version = "1.2.3" ,
9981003 registry_url = "https://pypi.example.com" ,
9991004 agent_setup = ["pip install extra-deps" ],
1005+ version = "1.2.3" ,
10001006 )
10011007
10021008 assert isinstance (agent , AsyncAgent )
@@ -1006,12 +1012,12 @@ async def test_create_from_pip_with_all_options(
10061012 "type" : "pip" ,
10071013 "pip" : {
10081014 "package_name" : "runloop-example-agent" ,
1009- "pip_version" : "1.2.3" ,
10101015 "registry_url" : "https://pypi.example.com" ,
10111016 "agent_setup" : ["pip install extra-deps" ],
10121017 },
10131018 },
10141019 name = "test-agent" ,
1020+ version = "1.2.3" ,
10151021 )
10161022
10171023 @pytest .mark .asyncio
@@ -1023,6 +1029,7 @@ async def test_create_from_git(self, mock_async_client: AsyncMock, agent_view: M
10231029 agent = await client .create_from_git (
10241030 name = "test-agent" ,
10251031 repository = "https://github.com/example/agent-repo" ,
1032+ version = "1.2.3" ,
10261033 )
10271034
10281035 assert isinstance (agent , AsyncAgent )
@@ -1035,6 +1042,7 @@ async def test_create_from_git(self, mock_async_client: AsyncMock, agent_view: M
10351042 },
10361043 },
10371044 name = "test-agent" ,
1045+ version = "1.2.3" ,
10381046 )
10391047
10401048 @pytest .mark .asyncio
@@ -1050,6 +1058,7 @@ async def test_create_from_git_with_all_options(
10501058 repository = "https://github.com/example/agent-repo" ,
10511059 ref = "develop" ,
10521060 agent_setup = ["npm install" , "npm run build" ],
1061+ version = "1.2.3" ,
10531062 )
10541063
10551064 assert isinstance (agent , AsyncAgent )
@@ -1064,6 +1073,7 @@ async def test_create_from_git_with_all_options(
10641073 },
10651074 },
10661075 name = "test-agent" ,
1076+ version = "1.2.3" ,
10671077 )
10681078
10691079 @pytest .mark .asyncio
@@ -1075,6 +1085,7 @@ async def test_create_from_object(self, mock_async_client: AsyncMock, agent_view
10751085 agent = await client .create_from_object (
10761086 name = "test-agent" ,
10771087 object_id = "obj_123" ,
1088+ version = "1.2.3" ,
10781089 )
10791090
10801091 assert isinstance (agent , AsyncAgent )
@@ -1087,6 +1098,7 @@ async def test_create_from_object(self, mock_async_client: AsyncMock, agent_view
10871098 },
10881099 },
10891100 name = "test-agent" ,
1101+ version = "1.2.3" ,
10901102 )
10911103
10921104 @pytest .mark .asyncio
@@ -1101,6 +1113,7 @@ async def test_create_from_object_with_agent_setup(
11011113 name = "test-agent" ,
11021114 object_id = "obj_123" ,
11031115 agent_setup = ["chmod +x setup.sh" , "./setup.sh" ],
1116+ version = "1.2.3" ,
11041117 )
11051118
11061119 assert isinstance (agent , AsyncAgent )
@@ -1114,6 +1127,7 @@ async def test_create_from_object_with_agent_setup(
11141127 },
11151128 },
11161129 name = "test-agent" ,
1130+ version = "1.2.3" ,
11171131 )
11181132
11191133
0 commit comments